fastpastebin/database/handler.go

21 lines
445 B
Go
Raw Normal View History

2018-04-30 18:42:17 +05:00
package database
import (
// other
"github.com/jmoiron/sqlx"
)
// Handler is an interfaceable structure that proxifies calls from anyone
// to Database structure.
2018-04-30 18:42:17 +05:00
type Handler struct{}
// GetDatabaseConnection returns current database connection.
2018-04-30 18:42:17 +05:00
func (dbh Handler) GetDatabaseConnection() *sqlx.DB {
return d.GetDatabaseConnection()
}
// Initialize initializes connection to database.
2018-04-30 18:42:17 +05:00
func (dbh Handler) Initialize() {
d.Initialize()
}