Database dialects, proper database shutdown, pagination in configuration.
Added possibility to use different database (storage) backends. Currently supported: flatfiles and mysql. Fixes #2. Added database shutdown call. This call will properly shutdown database connections (in case of RDBMS) or flush pastes index cache on disk (in case of flatfiles). De-hardcoded pagination count. Fixes #12.
This commit is contained in:
@@ -146,4 +146,6 @@ func (c *Context) RegisterEcho(e *echo.Echo) {
|
||||
// Shutdown shutdowns entire application.
|
||||
func (c *Context) Shutdown() {
|
||||
c.Logger.Info().Msg("Shutting down Fast Pastebin...")
|
||||
|
||||
c.Database.Shutdown()
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ package context
|
||||
|
||||
const (
|
||||
// Version .
|
||||
Version = "0.1.1"
|
||||
Version = "0.1.2-dev"
|
||||
)
|
||||
|
||||
// New creates new context.
|
||||
|
Reference in New Issue
Block a user