dnote/pkg/server/controllers/controllers.go
2021-01-04 22:07:37 +11:00

22 lines
410 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)
c.Static = NewStatic(cfg)
return &c
}