Documentation ¶
Overview ¶
Package types contains information about responses for encoding and decoding responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerQuery ¶
type ServerQuery struct { Status string `json:"status"` Online bool `json:"online"` Error string `json:"error"` Motd string `json:"motd"` Version string `json:"version"` GameType string `json:"game_type"` GameID string `json:"game_id"` ServerMod string `json:"server_mod"` Map string `json:"map"` Players ServerQueryPlayers `json:"players"` Plugins []string `json:"plugins"` LastOnline string `json:"last_online"` LastUpdated string `json:"last_updated"` Duration int64 `json:"duration"` }
ServerQuery contains all information available from a query request to a server. This is the most specific information you can easily get from a server.
type ServerQueryPlayers ¶
type ServerQueryPlayers struct { Max int `json:"max"` Now int `json:"now"` List []string `json:"list"` }
ServerQueryPlayers contains information about the min and max numbers of players online. It also includes a list of players online, unlike a ping request.
type ServerStatus ¶
type ServerStatus struct { Status string `json:"status"` Online bool `json:"online"` Motd string `json:"motd"` MotdExtra interface{} `json:"motd_extra,omitempty"` MotdFormatted string `json:"motd_formatted,omitempty"` Favicon string `json:"favicon,omitempty"` Error string `json:"error"` Players ServerStatusPlayers `json:"players"` Server ServerStatusServer `json:"server"` LastOnline string `json:"last_online"` LastUpdated string `json:"last_updated"` Duration int64 `json:"duration"` }
ServerStatus contains all information available from a ping request. It also includes fields about the success of a request.
type ServerStatusPlayers ¶
ServerStatusPlayers contains information about the min and max numbers of players As it is a ping request, it does not contain a list of players online.
type ServerStatusServer ¶
ServerStatusServer contains information about the server version. As it is a ping request, it is fairly basic information.