forked from mirrors/homebox
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{},
|
|
},
|
|
}
|
|
}
|