models

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RealmOnlineDelayMeansOffline = 15 * time.Second

Functions

This section is empty.

Types

type Account

type Account struct {
	ID       uint64      `xorm:"'id' pk autoincr"`
	Tier     rpcnet.Tier `xorm:"'tier'"`
	Locale   i18n.Locale `xorm:"'locale'"`
	Platform string      `xorm:"'platform'"`
	Username string      `xorm:"'username'"`
	// SRP Identity hash
	IdentityHash []byte `xorm:"'identity_hash'"`
	// Bcrypt hash - should be used when SRP IdentityHash is not required
	WebLoginHash []byte `xorm:"'web_login_hash'"`
	Locked       bool   `xorm:"'locked'"`
}

Account represents the authentication account This account tracks what privileges you are allowed, and what your password is.

type CVar

type CVar struct {
	RealmID uint64 `xorm:"'server_id'"`
	Key     string `xorm:"'key'"`
	Value   string
}

type EnlistedRealm

type EnlistedRealm struct {
	ID          uint64 `xorm:"'id' pk autoincr"`
	Note        string `xorm:"'note'"`
	Owner       uint64 `xorm:"'owner'"`
	Fingerprint string `xorm:"'fingerprint'"`
}

EnlistedRealm tracks a realm's registration state. Its only purpose is to act as a marker in the ID space of the home server, so that the real metadata can be updated at will

type GameAccount

type GameAccount struct {
	ID     uint64 `xorm:"'id' pk autoincr"`
	Name   string `xorm:"'name'"`
	Active bool   `xorm:"'active'"`
	Owner  uint64 `xorm:"'owner'"`
}

GameAccount represents the the game data account. GameAccounts track what character lists are tied to your account. (Legacy servers) By changing your account to Active, you can select a different character list upon logging in

type LoginTicket

type LoginTicket struct {
	Account string
	Ticket  string
	Expiry  time.Time
}

Bnet server

type Realm

type Realm struct {
	ID              uint64 `xorm:"'id' pk" json:"id"`
	Owner           uint64
	Name            string    `xorm:"'name'" json:"name"`
	ClientVersion   vsn.Build `json:"version"`
	Locked          bool
	Type            config.RealmType `json:"type"`
	Address         string           `json:"address"`
	RedirectAddress string           `json:"redirectAddress"`
	Description     string           `json:"description"`
	ActivePlayers   uint32           `json:"activePlayers"`
	Timezone        i18n.Timezone
	LastUpdated     time.Time   `json:"lastUpdated"`
	TierNeeded      rpcnet.Tier // TODO: have special hidden servers that only show up if you are of a tier
}

Realm tracks a public realm listing

func (Realm) Offline

func (r Realm) Offline() bool

type RealmList

type RealmList interface {
	ListRealms() []Realm
}

type RegistrationBody

type RegistrationBody struct {
	Email    string `json:"email"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type SessionKey

type SessionKey struct {
	ID uint64 `xorm:"'id' pk"`
	K  []byte
}

type WebEnlistRealmRequest

type WebEnlistRealmRequest struct {
	WebToken    string `json:"webToken"`
	Name        string `json:"string"`
	Fingerprint string `json:"fingerprint"`
}

type WebEnlistRealmResponse

type WebEnlistRealmResponse struct {
	RealmID uint64 `json:"realmID"`
}

type WebRegisterRequest

type WebRegisterRequest struct {
	Username        string `json:"username"`
	Password        string `json:"password"`
	CaptchaID       string `json:"captchaID"`
	CaptchaSolution string `json:"captchaSolution"`
}

type WebRegisterResponse

type WebRegisterResponse struct {
	Error        string `json:"error"`
	ResetCaptcha bool   `json:"resetCaptcha"`
	WebToken     string `json:"webToken,omitempty"`
}

type WebSignInRequest

type WebSignInRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type WebSignInResponse

type WebSignInResponse struct {
	Error    string `json:"error"`
	WebToken string `json:"webToken"`
}

type WebToken

type WebToken struct {
	Token   string `xorm:"'token' pk"`
	Account uint64
	Expiry  time.Time
}

Website

Jump to

Keyboard shortcuts

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