20 lines
342 B
Go
20 lines
342 B
Go
package database
|
|
|
|
import (
|
|
// local
|
|
"github.com/pztrn/fastpastebin/context"
|
|
"github.com/pztrn/fastpastebin/database/interface"
|
|
)
|
|
|
|
var (
|
|
c *context.Context
|
|
d *Database
|
|
)
|
|
|
|
// New initializes database structure.
|
|
func New(cc *context.Context) {
|
|
c = cc
|
|
d = &Database{}
|
|
c.RegisterDatabaseInterface(databaseinterface.Interface(Handler{}))
|
|
}
|