Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServer ¶
type APIServer struct { ID int64 `json:"serverID"` Host string `json:"address"` Game string `json:"game"` IP string `json:"ip"` Port int `json:"port"` CountryInfo DbCountry `json:"location"` Info SteamServerInfo `json:"info"` Players []SteamPlayerInfo `json:"players"` FilteredPlayers FilteredPlayerInfo `json:"filteredPlayers"` Rules map[string]string `json:"rules"` }
APIServer represents an individual game server's information, including its A2S information as well as its geographical data. if available.
type APIServerList ¶
type APIServerList struct { RetrievedAt string `json:"retrievalDate"` RetrievedTimeStamp int64 `json:"timestamp"` ServerCount int `json:"serverCount"` Servers []APIServer `json:"servers"` FailedCount int `json:"failedCount"` FailedServers []string `json:"failedServers"` }
APIServerList represents the server detail list returned in response to building the master list or in response to building the list of server details via a user's API request.
var MasterList *APIServerList
MasterList represents the list of all servers returned from the master server and directly exposed to the user via queries if timed auto queries are enabled.
func GetDefaultServerList ¶
func GetDefaultServerList() *APIServerList
GetDefaultServerList Returns a default, empty, server list with the current date and time in response to a server detail list request that failed for whatever reason.
type DbCountry ¶
type DbCountry struct { CountryName string `json:"countryName"` CountryCode string `json:"countryCode"` Continent string `json:"region"` State string `json:"state"` }
DbCountry This struct is for the JSON representation displayed by the API
type DbServer ¶
type DbServer struct { ID int64 `json:"serverID"` Game string `json:"game"` Host string `json:"host"` }
DbServer represents an individual server's internal ID information.
type DbServerID ¶
DbServerID represents the outer struct that is retrieved from the server ID database.
func GetDefaultServerID ¶
func GetDefaultServerID() DbServerID
GetDefaultServerID returns the default DbServerID outer struct when a given host does not have an ID that was found in the server ID database.
type FilteredPlayerInfo ¶
type FilteredPlayerInfo struct { FilteredPlayerCount int `json:"count"` FilteredPlayers []SteamPlayerInfo `json:"players"` }
FilteredPlayerInfo is a collection of all players on a server that actually exist on the server and are not bugged or stuck due to the Steam de-auth bug that exists in game servers for certain games (such as Quake Live)
type SteamExtraData ¶
type SteamExtraData struct { Port int16 `json:"gamePort"` SteamID uint64 `json:"serverSteamID"` SourceTVPort int16 `json:"sourceTvProxyPort"` SourceTVName string `json:"sourceTvProxyName"` Keywords string `json:"keywords"` GameID uint64 `json:"steamAppID"` }
SteamExtraData represents the original extra data field, if present returned by a direct A2S_INFO query of a given host.
type SteamPlayerInfo ¶
type SteamPlayerInfo struct { Name string `json:"name"` Score int32 `json:"score"` TimeConnectedSecs float32 `json:"secsConnected"` TimeConnectedTot string `json:"totalConnected"` }
SteamPlayerInfo represents a player returned by a Steam A2S_PLAYER query
type SteamServerInfo ¶
type SteamServerInfo struct { Protocol int `json:"protocol"` Name string `json:"serverName"` Map string `json:"map"` Folder string `json:"gameDir"` Game string `json:"game"` GameTypeShort string `json:"gameTypeShort"` // custom field for sorting GameTypeFull string `json:"gameTypeFull"` // custom field for sorting ID int16 `json:"steamApp"` Players int16 `json:"players"` MaxPlayers int16 `json:"maxPlayers"` Bots int16 `json:"bots"` ServerType string `json:"serverType"` Environment string `json:"serverOS"` Visibility int16 `json:"private"` VAC int16 `json:"antiCheat"` Version string `json:"serverVersion"` ExtraData SteamExtraData `json:"extra"` }
SteamServerInfo represents the original information returned by a direct A2S_INFO query of a given host.