structs

package
v0.0.0-...-d6a9fdd Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Avatar

type Avatar struct {
	Face string `json:"face"`
	Head string `json:"head"`
	Body string `json:"body"`
}

type Bedrock

type Bedrock struct {
	ID   int    `gorm:"column:id; primaryKey; autoIncrement" json:"id"`
	FUID string `gorm:"column:fuid; type:char(36); unique;not null" json:"fuid"`
	XUID string `gorm:"column:xuid; type:char(36); unique;not null" json:"xuid"`
}

func (Bedrock) TableName

func (Bedrock) TableName() string

type Biography

type Biography struct {
	Biography string `json:"biography"`
}

type Config

type Config struct {
	Servers     map[string]RegisteredServer
	MySQL       MySQL
	General     General
	Credentials Credentials
}

type CoreCookie

type CoreCookie struct {
	AccessToken string `cookie:"accessToken"`
}

type Credentials

type Credentials struct {
	State     string
	JWTSecret string `toml:"jwt_secret"`
	Discord   CredentialsDiscord
}

type CredentialsDiscord

type CredentialsDiscord struct {
	ClientID     string `toml:"client_id"`
	ClientSecret string `toml:"client_secret"`
}

type DiscordSrvAccounts

type DiscordSrvAccounts struct {
	Link    int    `gorm:"column:link;primaryKey;autoIncrement" json:"id"`
	Discord string `gorm:"column:discord;not null;type:varchar(32);not null" json:"discord"`
	UUID    string `gorm:"column:uuid;not null;type:varchar(36);not null" json:"uuid"`
}

func (DiscordSrvAccounts) TableName

func (DiscordSrvAccounts) TableName() string

type DiscordUser

type DiscordUser struct {
	ID                   string `json:"id"`
	Username             string `json:"username"`
	Avatar               string `json:"avatar"`
	Discriminator        string `json:"discriminator"`
	PublicFlags          int    `json:"public_flags"`
	Flags                int    `json:"flags"`
	Banner               any    `json:"banner"`
	AccentColor          int    `json:"accent_color"`
	GlobalName           string `json:"global_name"`
	AvatarDecorationData any    `json:"avatar_decoration_data"`
	BannerColor          string `json:"banner_color"`
	Clan                 any    `json:"clan"`
	MfaEnabled           bool   `json:"mfa_enabled"`
	Locale               string `json:"locale"`
	PremiumType          int    `json:"premium_type"`
}

type Error

type Error struct {
	Error string `json:"error"`
}

type General

type General struct {
	CallbackURL string `toml:"callback_url"`
}

type JWTCallback

type JWTCallback struct {
	Claims      jwt.MapClaims
	AccessToken string
}

type JWTResponse

type JWTResponse struct {
	Success bool
}

type Me

type Me struct {
	Profile         Profile
	SessionExpireAt int64 `json:"session_expire_at"`
}

type MySQL

type MySQL struct {
	Core       MySQLCore
	DiscordSRV MySQLDiscordSRV
}

type MySQLCore

type MySQLCore struct {
	User     string
	Password string
	Host     string
	Port     int
	Database string
}

type MySQLDiscordSRV

type MySQLDiscordSRV struct {
	User     string
	Password string
	Host     string
	Port     int
	Database string
	Prefix   string
}

type Profile

type Profile struct {
	ID                 int       `gorm:"column:id; primaryKey; autoIncrement" json:"id"`
	Name               string    `gorm:"column:name; type:char(36);" json:"name"`
	UUID               string    `gorm:"column:uuid; type:char(36); unique; not null" json:"uuid"`
	InitialLoginDate   time.Time `gorm:"column:initial_login_date; not null" json:"initial_login_date"`
	LastLoginDate      time.Time `gorm:"column:last_login_date; not null;" json:"last_login_date"`
	TotalPlayTime      int64     `gorm:"column:total_play_time; default:0;" json:"total_play_time"`
	Experience         float64   `gorm:"column:experience; default:0.0;" json:"experience"`
	Currency           int       `gorm:"column:currency; default:0;" json:"currency"`
	TotalBuildBlocks   int       `gorm:"column:total_build_blocks; default:0;" json:"total_build_blocks"`
	TotalDestroyBlocks int       `gorm:"column:total_destroy_blocks; default:0;" json:"total_destroy_blocks"`
	TotalMobKills      int       `gorm:"column:total_mob_kills; default:0;" json:"total_mob_kills"`
	IsBedrock          bool      `gorm:"-" json:"is_bedrock"`
	XUID               string    `gorm:"-" json:"xuid"`
	Avatar             Avatar    `gorm:"-" json:"avatar"`
	Biography          string    `gorm:"column:biography" json:"biography"`
}

func (Profile) TableName

func (Profile) TableName() string

type RegisteredServer

type RegisteredServer struct {
	Address     string
	Port        int
	Description string
}

type ServerStatus

type ServerStatus struct {
	Name          string    `json:"name"`
	Description   *string   `json:"description"`
	IsOnline      bool      `json:"is_online"`
	OnlinePlayers *int      `json:"online_players"`
	MaxPlayers    *int      `json:"max_players"`
	Version       *string   `json:"version"`
	PlayersSample *[]string `json:"players_sample"`
}

type Tabler

type Tabler interface {
	TableName() string
}

type UUID

type UUID struct {
	UUID string `json:"uuid"`
}

Jump to

Keyboard shortcuts

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