api

package
v0.0.0-...-23631de Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChShutdown chan bool = make(chan bool)
View Source
var MuAuth sync.RWMutex
View Source
var MuAuthTwitch sync.RWMutex

Functions

func AuthRatelimits

func AuthRatelimits()

Limit authorizations per hour per IP

func GetAuthCount

func GetAuthCount(sClientIP string) int

func GinInit

func GinInit()

func HttpAcceptDuo

func HttpAcceptDuo(c *gin.Context)

func HttpCancelDuo

func HttpCancelDuo(c *gin.Context)

func HttpConfirmMaps

func HttpConfirmMaps(c *gin.Context)

func HttpGetMaps

func HttpGetMaps(c *gin.Context)

func HttpOfferDuo

func HttpOfferDuo(c *gin.Context)

func HttpRefreshMaps

func HttpRefreshMaps(c *gin.Context)

func HttpRefreshServers

func HttpRefreshServers(c *gin.Context)

func HttpReqAcceptBan

func HttpReqAcceptBan(c *gin.Context)

func HttpReqAcceptRules

func HttpReqAcceptRules(c *gin.Context)

func HttpReqAddBan

func HttpReqAddBan(c *gin.Context)

func HttpReqAuth

func HttpReqAuth(c *gin.Context)

func HttpReqBlockNewGames

func HttpReqBlockNewGames(c *gin.Context)

func HttpReqDeleteBan

func HttpReqDeleteBan(c *gin.Context)

func HttpReqGSAntiCheatLogs

func HttpReqGSAntiCheatLogs(c *gin.Context)

func HttpReqGSChatLogs

func HttpReqGSChatLogs(c *gin.Context)

func HttpReqGSCheckBan

func HttpReqGSCheckBan(c *gin.Context)

func HttpReqGSFullReadyUp

func HttpReqGSFullReadyUp(c *gin.Context)

func HttpReqGSGameResults

func HttpReqGSGameResults(c *gin.Context)

func HttpReqGSGetGame

func HttpReqGSGetGame(c *gin.Context)

func HttpReqGSPartialReadyUp

func HttpReqGSPartialReadyUp(c *gin.Context)

func HttpReqGetAntiCheatLogs

func HttpReqGetAntiCheatLogs(c *gin.Context)

func HttpReqGetBanRecords

func HttpReqGetBanRecords(c *gin.Context)

func HttpReqGetGame

func HttpReqGetGame(c *gin.Context)

func HttpReqGetGameServers

func HttpReqGetGameServers(c *gin.Context)

func HttpReqGetGlobalChat

func HttpReqGetGlobalChat(c *gin.Context)

func HttpReqGetKnownAccs

func HttpReqGetKnownAccs(c *gin.Context)

func HttpReqGetOnlinePlayers

func HttpReqGetOnlinePlayers(c *gin.Context)

func HttpReqGetPlayers

func HttpReqGetPlayers(c *gin.Context)

func HttpReqGetQueue

func HttpReqGetQueue(c *gin.Context)

func HttpReqGetStreams

func HttpReqGetStreams(c *gin.Context)

func HttpReqHome

func HttpReqHome(c *gin.Context)

func HttpReqJoinQueue

func HttpReqJoinQueue(c *gin.Context)

func HttpReqLeaveQueue

func HttpReqLeaveQueue(c *gin.Context)

func HttpReqLogout

func HttpReqLogout(c *gin.Context)

func HttpReqMyIP

func HttpReqMyIP(c *gin.Context)

func HttpReqOpenID

func HttpReqOpenID(c *gin.Context)

func HttpReqOverrideVPN

func HttpReqOverrideVPN(c *gin.Context)

func HttpReqPingsReceiver

func HttpReqPingsReceiver(c *gin.Context)

func HttpReqReadyUp

func HttpReqReadyUp(c *gin.Context)

func HttpReqRemoveStream

func HttpReqRemoveStream(c *gin.Context)

func HttpReqSMURFListUpdated

func HttpReqSMURFListUpdated(c *gin.Context)

func HttpReqSendGlobalChat

func HttpReqSendGlobalChat(c *gin.Context)

func HttpReqSetAdmin

func HttpReqSetAdmin(c *gin.Context)

func HttpReqSetMmr

func HttpReqSetMmr(c *gin.Context)

func HttpReqShutdown

func HttpReqShutdown(c *gin.Context)

func HttpReqStatus

func HttpReqStatus(c *gin.Context)

func HttpReqTicketCreate

func HttpReqTicketCreate(c *gin.Context)

func HttpReqTicketList

func HttpReqTicketList(c *gin.Context)

func HttpReqTicketMessages

func HttpReqTicketMessages(c *gin.Context)

func HttpReqTicketReply

func HttpReqTicketReply(c *gin.Context)

func HttpReqUnban

func HttpReqUnban(c *gin.Context)

func HttpReqUpdateNameAvatar

func HttpReqUpdateNameAvatar(c *gin.Context)

func HttpReqValidateProf

func HttpReqValidateProf(c *gin.Context)

func HttpReqWebSocket

func HttpReqWebSocket(c *gin.Context)

func HttpRevokeMapsConfirm

func HttpRevokeMapsConfirm(c *gin.Context)

func HttpSteamID32to64

func HttpSteamID32to64(c *gin.Context)

func HttpTwitchAuth

func HttpTwitchAuth(c *gin.Context)

func HttpTwitchOpenIDCallback

func HttpTwitchOpenIDCallback(c *gin.Context)

func IncreaseAuthCount

func IncreaseAuthCount(sClientIP string)

func PerformShutDown

func PerformShutDown()

func SetupOpenID

func SetupOpenID()

func TwitchAuthRatelimits

func TwitchAuthRatelimits()

Limit authorizations per hour per IP

func TwitchGetAuthCount

func TwitchGetAuthCount(sClientIP string) int

func TwitchIncreaseAuthCount

func TwitchIncreaseAuthCount(sClientIP string)

Types

type BanRecordResponse

type BanRecordResponse struct {
	NicknameBase64    string `json:"base64name"`
	SteamID64         string `json:"steamid64"`
	CreatedAt         int64  `json:"created_at"`
	BannedBySteamID64 string `json:"banned_by"`
	AcceptedAt        int64  `json:"accepted_at"`
	BanLength         int64  `json:"ban_length"`
	BanReasonBase64   string `json:"base64reason"`
}

type ChatMsgResp

type ChatMsgResp struct {
	TimeStamp      int64  `json:"time_stamp"`
	TextBase64     string `json:"base64text"`
	SteamID64      string `json:"steamid64"`
	NicknameBase64 string `json:"base64name"`
	AvatarSmall    string `json:"avatar_small"`
}

type GameResponse

type GameResponse struct {
	ID              string           `json:"id"`
	PlayersA        []PlayerResponse `json:"players_a"`
	PlayersB        []PlayerResponse `json:"players_b"`
	GameConfig      string           `json:"game_config"`
	CampaignName    string           `json:"campaign_name"`
	PingsRequested  bool             `json:"pings_requested"`
	ServerIP        string           `json:"server_ip"`
	ProxyIP         string           `json:"proxy_ip"`
	Status          string           `json:"status"`
	MapDownloadLink string           `json:"map_download"`
}

type NoOpDiscoveryCache

type NoOpDiscoveryCache struct{}

func (*NoOpDiscoveryCache) Get

func (n *NoOpDiscoveryCache) Get(id string) openid.DiscoveredInfo

func (*NoOpDiscoveryCache) Put

func (n *NoOpDiscoveryCache) Put(id string, info openid.DiscoveredInfo)

type PlayerResponse

type PlayerResponse struct {
	SteamID64       string `json:"steamid64"`
	NicknameBase64  string `json:"nickname_base64"`
	AvatarSmall     string `json:"avatar_small"`
	Mmr             int    `json:"mmr"`
	Access          int    `json:"access"` //-2 - completely banned, -1 - chat banned, 0 - regular player, 1 - behaviour moderator, 2 - cheat moderator, 3 - behaviour+cheat moderator, 4 - full admin access
	IsInGame        bool   `json:"is_ingame"`
	IsInQueue       bool   `json:"is_inqueue"`
	MmrGrade        int    `json:"mmr_grade"`
	CustomMapsState int    `json:"custom_maps"` //1 - never confirmed, 2 - update required, 3 - confirmed
	IsInDuo         bool   `json:"in_duo"`
}

func AppendPlayerResponse

func AppendPlayerResponse(arPlayers []PlayerResponse, pPlayer *players.EntPlayer) []PlayerResponse

type PlayerResponseMe

type PlayerResponseMe struct {
	SteamID64       string `json:"steamid64"`
	NicknameBase64  string `json:"nickname_base64"`
	AvatarSmall     string `json:"avatar_small"`
	AvatarBig       string `json:"avatar_big"`
	Mmr             int    `json:"mmr"`
	Access          int    `json:"access"` //-2 - completely banned, -1 - chat banned, 0 - regular player, 1 - behaviour moderator, 2 - cheat moderator, 3 - behaviour+cheat moderator, 4 - full admin access
	BanReason       string `json:"banreason"`
	BanAcceptedAt   int64  `json:"ban_accepted_at"`
	BanLength       int64  `json:"ban_length"`
	IsInGame        bool   `json:"is_ingame"`
	IsInQueue       bool   `json:"is_inqueue"`
	MmrGrade        int    `json:"mmr_grade"`
	ProfValidated   bool   `json:"profile_validated"` //Steam profile validated
	RulesAccepted   bool   `json:"rules_accepted"`    //Rules accepted
	DuoOffer        string `json:"duo_offer"`
	CustomMapsState int    `json:"custom_maps"` //1 - never confirmed, 2 - update required, 3 - confirmed
	IsInDuo         bool   `json:"in_duo"`
}

Jump to

Keyboard shortcuts

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