mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-16 21:58:40 +00:00
25 lines
433 B
Go
25 lines
433 B
Go
|
package services
|
||
|
|
||
|
import "github.com/hay-kot/homebox/backend/internal/data/repo"
|
||
|
|
||
|
type AllServices struct {
|
||
|
User *UserService
|
||
|
Group *GroupService
|
||
|
Items *ItemService
|
||
|
}
|
||
|
|
||
|
func New(repos *repo.AllRepos) *AllServices {
|
||
|
if repos == nil {
|
||
|
panic("repos cannot be nil")
|
||
|
}
|
||
|
|
||
|
return &AllServices{
|
||
|
User: &UserService{repos},
|
||
|
Group: &GroupService{repos},
|
||
|
Items: &ItemService{
|
||
|
repo: repos,
|
||
|
at: attachmentTokens{},
|
||
|
},
|
||
|
}
|
||
|
}
|