mirror of
https://github.com/dnote/dnote
synced 2026-03-15 23:15:50 +01:00
21 lines
401 B
Go
21 lines
401 B
Go
package controllers
|
|
|
|
import (
|
|
"github.com/dnote/dnote/pkg/clock"
|
|
"github.com/dnote/dnote/pkg/server/config"
|
|
"github.com/jinzhu/gorm"
|
|
)
|
|
|
|
// Controllers is a group of controllers
|
|
type Controllers struct {
|
|
Users *Users
|
|
}
|
|
|
|
// New returns a new group of controllers
|
|
func New(cfg config.Config, db *gorm.DB, cl clock.Clock) *Controllers {
|
|
c := Controllers{}
|
|
|
|
c.Users = NewUsers(cfg, db)
|
|
|
|
return &c
|
|
}
|