Introduce di into the project

This commit is contained in:
ErickSkrauch
2020-04-16 19:42:38 +03:00
parent 0c81494559
commit 9046338396
12 changed files with 398 additions and 8 deletions

View File

@@ -7,16 +7,15 @@ import (
"github.com/gorilla/mux"
"github.com/elyby/chrly/api/mojang"
"github.com/elyby/chrly/mojangtextures"
)
type UuidsProvider interface {
type MojangUuidsProvider interface {
GetUuid(username string) (*mojang.ProfileInfo, error)
}
type UUIDsWorker struct {
Emitter
UUIDsProvider mojangtextures.UUIDsProvider
UUIDsProvider MojangUuidsProvider
}
func (ctx *UUIDsWorker) CreateHandler() *mux.Router {