Documentation ¶
Index ¶
- Constants
- Variables
- func CreateAuthenticationMiddleware(checker Authenticator) mux.MiddlewareFunc
- func CreateRequestEventsMiddleware(emitter Emitter, prefix string) mux.MiddlewareFunc
- func NotFoundHandler(response http.ResponseWriter, _ *http.Request)
- func StartServer(server *http.Server, logger slf.Logger)
- type Api
- type Authenticator
- type CapesRepository
- type Emitter
- type JwtAuth
- type MojangTexturesProvider
- type MojangUuidsProvider
- type Scope
- type SkinsRepository
- type Skinsystem
- type TexturesSigner
- type UUIDsWorker
Constants ¶
View Source
const UUID_ANY = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
noinspection GoSnakeCaseUsage
Variables ¶
View Source
var (
SkinScope = Scope("skin")
)
Functions ¶
func CreateAuthenticationMiddleware ¶
func CreateAuthenticationMiddleware(checker Authenticator) mux.MiddlewareFunc
func CreateRequestEventsMiddleware ¶
func CreateRequestEventsMiddleware(emitter Emitter, prefix string) mux.MiddlewareFunc
func NotFoundHandler ¶
func NotFoundHandler(response http.ResponseWriter, _ *http.Request)
Types ¶
type Api ¶
type Api struct {
SkinsRepo SkinsRepository
}
type Authenticator ¶
type CapesRepository ¶
type Emitter ¶
type Emitter interface { dispatcher.Emitter }
type MojangTexturesProvider ¶
type MojangTexturesProvider interface {
GetForUsername(username string) (*mojang.SignedTexturesResponse, error)
}
type MojangUuidsProvider ¶
type MojangUuidsProvider interface {
GetUuid(username string) (*mojang.ProfileInfo, error)
}
type SkinsRepository ¶
type Skinsystem ¶
type Skinsystem struct { Emitter SkinsRepo SkinsRepository CapesRepo CapesRepository MojangTexturesProvider MojangTexturesProvider TexturesSigner TexturesSigner TexturesExtraParamName string TexturesExtraParamValue string // contains filtered or unexported fields }
func NewSkinsystem ¶
func NewSkinsystem( emitter Emitter, skinsRepo SkinsRepository, capesRepo CapesRepository, mojangTexturesProvider MojangTexturesProvider, texturesSigner TexturesSigner, texturesExtraParamName string, texturesExtraParamValue string, ) (*Skinsystem, error)
func (*Skinsystem) Handler ¶
func (ctx *Skinsystem) Handler() *mux.Router
type TexturesSigner ¶
type UUIDsWorker ¶
type UUIDsWorker struct {
MojangUuidsProvider
}
func (*UUIDsWorker) Handler ¶
func (ctx *UUIDsWorker) Handler() *mux.Router
Click to show internal directories.
Click to hide internal directories.