dnote/pkg/server/controllers/controllers.go
Sung Won Cho b68ddf0cb8 wip
2021-01-03 18:40:45 +11:00

22 lines
413 B
Go

package controllers
import (
"github.com/dnote/dnote/pkg/server/app"
"github.com/dnote/dnote/pkg/server/config"
)
// Controllers is a group of controllers
type Controllers struct {
Users *Users
Static *Static
}
// New returns a new group of controllers
func New(cfg config.Config, app *app.App) *Controllers {
c := Controllers{}
c.Users = NewUsers(cfg, app.DB)
c.Static = NewStatic(cfg)
return &c
}