models

package
v0.0.2-0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: BSD-2-Clause Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownType = errors.New("invalid type")

ErrUnknownType occurs when an unknown type is encounterd during decoding of a model

Functions

This section is empty.

Types

type AnyStatisticState

type AnyStatisticState = struct {
	Start          int                     `mapstructure:"start"`
	Stop           int                     `mapstructure:"stop"`
	StartedRounds  int                     `mapstructure:"startedRounds"`
	FinishedRounds int                     `mapstructure:"finishedRounds"`
	Player         map[string]*PlayerModel `mapstructure:"player"`
	Team           map[string]*TeamModel   `mapstructure:"team"`
}

AnyStatisticState is data coming from the api

type ArgConfig

type ArgConfig = []ArgConfigItem

ArgConfig is data coming from the api

type ArgConfigItem

type ArgConfigItem = interface{}

ArgConfigItem is data coming from the api

type GameQueryGameIndex

type GameQueryGameIndex = map[string]*GameQueryGameItem

GameQueryGameIndex is data coming from the api

type GameQueryGameItem

type GameQueryGameItem struct {
	GameKey  string          `mapstructure:"gameKey"`
	Location map[string]bool `mapstructure:"location"`
}

GameQueryGameItem is data coming from the api

type GameQueryLocationIndex

type GameQueryLocationIndex = map[string]*GameQueryLocationItem

GameQueryLocationIndex is data coming from the api

type GameQueryLocationItem

type GameQueryLocationItem struct {
	LocationKey string `mapstructure:"locationKey"`
}

GameQueryLocationItem is data coming from the api

type GameQueryState

type GameQueryState struct {
	Game     GameQueryGameIndex     `mapstructure:"game"`
	Location GameQueryLocationIndex `mapstructure:"location"`
}

GameQueryState is data coming from the api

func CreateGameQueryState

func CreateGameQueryState(anyState *map[string]interface{}) (
	state *GameQueryState,
	err error,
)

CreateGameQueryState will create a new GameQueryState from a string / interface map

type MatchQueryMatchIndex

type MatchQueryMatchIndex = map[string]*MatchQueryMatchItem

MatchQueryMatchIndex is data coming from the api

type MatchQueryMatchItem

type MatchQueryMatchItem struct {
	MatchKey    string         `mapstructure:"matchKey"`
	GameKey     string         `mapstructure:"gameKey"`
	LocationKey string         `mapstructure:"locationKey"`
	Host        string         `mapstructure:"host"`
	Created     int            `mapstructure:"created"`
	Port        map[string]int `mapstructure:"port"`
}

MatchQueryMatchItem is data coming from the api

type MatchQueryState

type MatchQueryState struct {
	Match MatchQueryMatchIndex `mapstructure:"match"`
}

MatchQueryState is data coming from the api

func CreateMatchQueryState

func CreateMatchQueryState(anyState *map[string]interface{}) (
	state *MatchQueryState,
	err error,
)

CreateMatchQueryState will create a new MatchQueryState from a string / interface map

type NumberArgConfigItem

type NumberArgConfigItem struct {
	// type "number"
	Name             string `mapstructure:"name"`
	DefaultValue     int    `mapstructure:"defaultValue"`
	MinimumValue     int    `mapstructure:"minimumValue"`
	MinimumExclusive bool   `mapstructure:"minimumExclusive"`
	MaximumValue     int    `mapstructure:"maximumValue"`
	MaximumExclusive bool   `mapstructure:"maximumExclusive"`
	Option           []int  `mapstructure:"option"`
}

NumberArgConfigItem is data coming from the api

type PlayerModel

type PlayerModel struct {
	PlayerKey string         `mapstructure:"playerKey"`
	UID       string         `mapstructure:"uid"`
	Connected bool           `mapstructure:"connected"`
	Name      string         `mapstructure:"name"`
	Statistic map[string]int `mapstructure:"statistic"`
}

PlayerModel is data coming from the api

type StatisticQueryState

type StatisticQueryState struct {
	Statistic AnyStatisticState `mapstructure:"statistic"`
}

StatisticQueryState is data coming from the api

func CreateStatisticQueryState

func CreateStatisticQueryState(anyState *map[string]interface{}) (
	state *StatisticQueryState,
	err error,
)

CreateStatisticQueryState will create a new StatisticQueryState from a string / interface map

type StringArgConfigItem

type StringArgConfigItem struct {
	// type "string"
	Name               string   `mapstructure:"name"`
	DefaultValue       string   `mapstructure:"defaultValue"`
	ValidatePattern    string   `mapstructure:"validatePattern"`
	ValidateIgnoreCase bool     `mapstructure:"validateIgnoreCase"`
	Option             []string `mapstructure:"option"`
}

StringArgConfigItem is data coming from the api

type TeamModel

type TeamModel struct {
	TeamKey   string          `mapstructure:"teamKey"`
	Name      string          `mapstructure:"name"`
	Statistic map[string]int  `mapstructure:"statistic"`
	Player    map[string]bool `mapstructure:"player"`
}

TeamModel is data coming from the api

type TemplateQueryArgIndex

type TemplateQueryArgIndex = map[string]*TemplateQueryArgItem

TemplateQueryArgIndex is data coming from the api

type TemplateQueryArgItem

type TemplateQueryArgItem struct {
	TemplateKey string    `mapstructure:"templateKey"`
	Arg         ArgConfig `mapstructure:"arg"`
}

TemplateQueryArgItem is data coming from the api

type TemplateQueryState

type TemplateQueryState struct {
	Template TemplateQueryArgIndex
}

TemplateQueryState is data coming from the api

func CreateTemplateQueryState

func CreateTemplateQueryState(anyState *map[string]interface{}) (
	state *TemplateQueryState,
	err error,
)

CreateTemplateQueryState will create a new TemplateQueryState from a string / interface map

Jump to

Keyboard shortcuts

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