storage

package
v0.0.0-...-4e28f1d Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPlayerSettings = []byte{}/* 1300 elements not displayed */

Functions

This section is empty.

Types

type Account

type Account struct {
	Id      uint32
	Key     string
	Hash    []byte
	Players [3]uint32
}

type Bolt

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

func NewBolt

func NewBolt() (*Bolt, error)

func (Bolt) CreateAccount

func (b Bolt) CreateAccount(account *Account) (uint32, error)

func (Bolt) CreatePlayer

func (b Bolt) CreatePlayer(account *Account, position byte, player *block.Player) (uint32, error)

func (Bolt) GetAccountPlayers

func (b Bolt) GetAccountPlayers(account *Account) ([3]*block.Player, error)

func (Bolt) GetGroupInfo

func (b Bolt) GetGroupInfo(id uint32) *block.GroupInfo

func (Bolt) GetLobbies

func (b Bolt) GetLobbies(serverId uint32) []*block.Lobby

func (Bolt) GetPlayer

func (b Bolt) GetPlayer(id uint32) (*block.Player, error)

func (Bolt) GetPlayerSettings

func (b Bolt) GetPlayerSettings(id uint32) *block.PlayerSettings

func (Bolt) GetRankUrls

func (b Bolt) GetRankUrls() []*block.RankUrl

func (Bolt) GetServerNews

func (b Bolt) GetServerNews() []*block.News

func (Bolt) Login

func (b Bolt) Login(account *Account) (*Account, error)

type Storage

type Storage interface {
	CreateAccount(account *Account) (uint32, error)
	Login(account *Account) (*Account, error)
	CreatePlayer(account *Account, position byte, player *block.Player) (uint32, error)
	GetServerNews() []*block.News
	GetRankUrls() []*block.RankUrl
	GetAccountPlayers(account *Account) ([3]*block.Player, error)
	GetGroupInfo(id uint32) *block.GroupInfo
	GetPlayerSettings(id uint32) *block.PlayerSettings
	GetPlayer(id uint32) (*block.Player, error)
	GetLobbies(serverId uint32) []*block.Lobby
}

Jump to

Keyboard shortcuts

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