This commit is contained in:
2022-02-09 22:00:02 +01:00
parent 0a966a637b
commit e574667a8c
6 changed files with 9 additions and 74 deletions

View File

@@ -7,7 +7,7 @@ import (
// API is wrapper for one RouterGroup and mgo DB
type API struct {
DBConnection Connection
DBConnection mgocrud.Connection
DBName string
routerGroup *gin.RouterGroup
jwtSecret []byte
@@ -18,11 +18,11 @@ type API struct {
type Context struct {
*gin.Context
API *API
DB Database
DB mgocrud.Database
}
// New returns new instance of the API
func New(connection Connection, dbname string, routerGroup *gin.RouterGroup) *API {
func New(connection mgocrud.Connection, dbname string, routerGroup *gin.RouterGroup) *API {
return &API{
DBConnection: connection,
DBName: dbname,