dnote/pkg/server/controllers/controllers.go
Sung Won Cho 01a378c5b1
Simplify by removing web interface (#590)
* Implement MVC

* Implement settings

* Improve layout

* Lock sass dependency
2022-04-24 10:54:39 +10:00

32 lines
616 B
Go

package controllers
import (
"github.com/dnote/dnote/pkg/server/app"
"github.com/dnote/dnote/pkg/server/log"
)
// Controllers is a group of controllers
type Controllers struct {
Users *Users
Notes *Notes
Books *Books
Sync *Sync
Static *Static
Health *Health
}
// New returns a new group of controllers
func New(app *app.App, baseDir string) *Controllers {
log.Info(app.Config.PageTemplateDir)
c := Controllers{}
c.Users = NewUsers(app, baseDir)
c.Notes = NewNotes(app)
c.Books = NewBooks(app)
c.Sync = NewSync(app)
c.Static = NewStatic(app, baseDir)
c.Health = NewHealth(app)
return &c
}