homebox/backend/internal/repo/repos_all.go
Hayden 508e2e59bd
tests: improve repo package coverage (#3)
* refactor and add repo tests

* add CI name

* use atomic for test shutdown

* use go 1.19

* add timeout
2022-09-05 00:26:21 -08:00

24 lines
613 B
Go

package repo
import "github.com/hay-kot/content/backend/ent"
// AllRepos is a container for all the repository interfaces
type AllRepos struct {
Users *UserRepository
AuthTokens *TokenRepository
Groups *GroupRepository
Locations *LocationRepository
Labels *LabelRepository
Items *ItemsRepository
}
func EntAllRepos(db *ent.Client) *AllRepos {
return &AllRepos{
Users: &UserRepository{db},
AuthTokens: &TokenRepository{db},
Groups: &GroupRepository{db},
Locations: &LocationRepository{db},
Labels: &LabelRepository{db},
Items: &ItemsRepository{db},
}
}