mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-24 07:46:30 +00:00
343290a55a
* cleanup unnecessary mocks * refactor document storage location * remove unused function * move ownership to document types to repo package * move types and mappers to repo package * refactor sets to own package
26 lines
515 B
Go
26 lines
515 B
Go
package services
|
|
|
|
import "github.com/hay-kot/homebox/backend/internal/repo"
|
|
|
|
type AllServices struct {
|
|
User *UserService
|
|
Location *LocationService
|
|
Labels *LabelService
|
|
Items *ItemService
|
|
}
|
|
|
|
func NewServices(repos *repo.AllRepos) *AllServices {
|
|
if repos == nil {
|
|
panic("repos cannot be nil")
|
|
}
|
|
|
|
return &AllServices{
|
|
User: &UserService{repos},
|
|
Location: &LocationService{repos},
|
|
Labels: &LabelService{repos},
|
|
Items: &ItemService{
|
|
repo: repos,
|
|
at: attachmentTokens{},
|
|
},
|
|
}
|
|
}
|