yggdrasil

package
v0.0.1-bate.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRate        = errors.New("频率限制")
	ErrPassWord    = errors.New("错误的密码或邮箱")
	ErrNotUser     = errors.New("没有这个用户")
	ErrUserDisable = errors.New("用户被禁用")
)
View Source
var (
	ErrUUIDNotEq = errors.New("uuid 不相同")
)

Functions

This section is empty.

Types

type Yggdrasil

type Yggdrasil struct {
	// contains filtered or unexported fields
}

func NewYggdrasil

func NewYggdrasil(client *ent.Client, cache cache.Cache, c config.Config, prikey *rsa.PrivateKey) *Yggdrasil

func (*Yggdrasil) Auth

func (*Yggdrasil) Authenticate

func (y *Yggdrasil) Authenticate(cxt context.Context, auth yggdrasil.Authenticate) (yggdrasil.Token, error)

func (*Yggdrasil) BatchProfile

func (y *Yggdrasil) BatchProfile(ctx context.Context, names []string) ([]yggdrasil.UserInfo, error)

func (*Yggdrasil) DelTexture

func (y *Yggdrasil) DelTexture(ctx context.Context, t *model.TokenClaims, textureType string) error

func (*Yggdrasil) GetProfile

func (y *Yggdrasil) GetProfile(ctx context.Context, uuid string, unsigned bool, host string) (yggdrasil.UserInfo, error)

func (*Yggdrasil) HasJoined

func (y *Yggdrasil) HasJoined(ctx context.Context, username, serverId string, ip string, host string) (yggdrasil.UserInfo, error)

func (*Yggdrasil) Invalidate

func (y *Yggdrasil) Invalidate(ctx context.Context, t *model.TokenClaims) error

func (*Yggdrasil) PlayerCertificates

func (y *Yggdrasil) PlayerCertificates(ctx context.Context, t *model.TokenClaims) (yggdrasil.Certificates, error)

func (*Yggdrasil) Refresh

func (y *Yggdrasil) Refresh(ctx context.Context, t *model.TokenClaims) (yggdrasil.Token, error)

func (*Yggdrasil) SessionJoin

func (y *Yggdrasil) SessionJoin(ctx context.Context, s yggdrasil.Session, t *model.TokenClaims, ip string) error

func (*Yggdrasil) SignOut

func (y *Yggdrasil) SignOut(ctx context.Context, t yggdrasil.Pass) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL