chrly/di/profiles.go
ErickSkrauch dac3ca9001
[BREAKING]
Introduce universal profile entity
Remove fs-based capes serving
Rework management API
Rework Redis storage schema
Reducing amount of the bus emitter usage
2024-01-30 09:05:04 +01:00

28 lines
649 B
Go

package di
import (
"github.com/defval/di"
. "github.com/elyby/chrly/http"
"github.com/elyby/chrly/internal/profiles"
)
var profilesDi = di.Options(
di.Provide(newProfilesManager, di.As(new(ProfilesManager))),
di.Provide(newProfilesProvider, di.As(new(ProfilesProvider))),
)
func newProfilesManager(r profiles.ProfilesRepository) *profiles.Manager {
return profiles.NewManager(r)
}
func newProfilesProvider(
finder profiles.ProfilesFinder,
mojangProfilesProvider profiles.MojangProfilesProvider,
) *profiles.Provider {
return &profiles.Provider{
ProfilesFinder: finder,
MojangProfilesProvider: mojangProfilesProvider,
}
}