2018-04-30 18:42:17 +05:00
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
|
|
|
// local
|
|
|
|
"github.com/pztrn/fastpastebin/context"
|
|
|
|
"github.com/pztrn/fastpastebin/database/interface"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
c *context.Context
|
|
|
|
d *Database
|
|
|
|
)
|
|
|
|
|
2018-04-30 22:31:48 +05:00
|
|
|
// New initializes database structure.
|
2018-04-30 18:42:17 +05:00
|
|
|
func New(cc *context.Context) {
|
|
|
|
c = cc
|
|
|
|
d = &Database{}
|
|
|
|
c.RegisterDatabaseInterface(databaseinterface.Interface(Handler{}))
|
|
|
|
}
|