Documentation ¶
Index ¶
Constants ¶
View Source
const ( TeamSwat = 0 TeamSuspects = 1 TeamSwatRed = 2 // CO-OP Team Red )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Details ¶
type Details struct { Info Info `param:"-" validate:"required"` Players []Player `param:"-" validate:"dive"` Objectives []Objective `param:"-" validate:"dive"` }
var Blank Details
func NewDetailsFromParams ¶
type Info ¶
type Info struct { Hostname string `validate:"required"` HostPort int `validate:"required,gt=0"` GameVariant string `validate:"required"` GameVersion string `validate:"required" param:"gamever"` // nolint: tagalign GameType string `validate:"required"` NumPlayers int `validate:"gte=0"` MaxPlayers int `validate:"gte=0"` MapName string `validate:"required"` Password bool StatsEnabled bool Round int `validate:"gte=0"` NumRounds int `validate:"gte=0"` TimeLeft int // can be negative TimeSpecial int `validate:"gte=0"` SwatScore int SuspectsScore int SwatWon int `validate:"gte=0"` SuspectsWon int `validate:"gte=0"` BombsDefused int `validate:"gte=0"` BombsTotal int `validate:"gte=0"` TocReports string `validate:"ratio"` WeaponsSecured string `validate:"ratio"` Version string `param:"-" validate:"-"` }
func MustNewInfoFromParams ¶
type Objective ¶
type Objective struct { Name string `validate:"required"` Status ObjectiveStatus `validate:"oneof=0 1 2"` }
type ObjectiveStatus ¶
type ObjectiveStatus int
const ( ObjInProgress ObjectiveStatus = iota ObjCompleted ObjFailed )
func (ObjectiveStatus) String ¶
func (os ObjectiveStatus) String() string
type Player ¶
type Player struct { Name string `param:"player" validate:"required"` Score int `param:"score"` Ping int `param:"ping"` Team PlayerTeam `validate:"oneof=0 1 2"` VIP bool `param:"vip"` CoopStatus PlayerCoopStatus `validate:"oneof=0 1 2 3 4"` Kills int `validate:"gte=0"` TeamKills int `param:"tkills" validate:"gte=0"` Deaths int `validate:"gte=0"` Arrests int `validate:"gte=0"` Arrested int `validate:"gte=0"` VIPEscapes int `param:"vescaped" validate:"gte=0"` VIPArrests int `param:"arrestedvip" validate:"gte=0"` VIPRescues int `param:"unarrestedvip" validate:"gte=0"` VIPKillsValid int `param:"validvipkills" validate:"gte=0"` VIPKillsInvalid int `param:"invalidvipkills" validate:"gte=0"` BombsDefused int `param:"bombsdiffused" validate:"gte=0"` BombsDetonated bool `param:"rdcrybaby"` CaseEscapes int `param:"escapedcase" validate:"gte=0"` CaseKills int `param:"killedcase" validate:"gte=0"` CaseSecured bool `param:"sgcrybaby"` }
type PlayerCoopStatus ¶
type PlayerCoopStatus int
const ( CoopStatusUnknown PlayerCoopStatus = iota CoopStatusReady CoopStatusHealthy CoopStatusInjured CoopStatusIncapacitated )
func (PlayerCoopStatus) String ¶
func (cs PlayerCoopStatus) String() string
type PlayerTeam ¶
type PlayerTeam int
func (PlayerTeam) String ¶
func (pt PlayerTeam) String() string
Click to show internal directories.
Click to hide internal directories.