You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
550 B
25 lines
550 B
package services
|
|
|
|
import (
|
|
"git.aiterp.net/rpdata/api/repositories"
|
|
"git.aiterp.net/rpdata/api/services/loaders"
|
|
)
|
|
|
|
// A Bundle contains all services.
|
|
type Bundle struct {
|
|
Tags *TagService
|
|
Characters *CharacterService
|
|
}
|
|
|
|
// NewBundle creates a new bundle.
|
|
func NewBundle(repos *repositories.Bundle) *Bundle {
|
|
bundle := &Bundle{}
|
|
|
|
bundle.Tags = &TagService{tags: repos.Tags}
|
|
bundle.Characters = &CharacterService{
|
|
characters: repos.Characters,
|
|
loader: loaders.CharacterLoaderFromRepository(repos.Characters),
|
|
}
|
|
|
|
return bundle
|
|
}
|