controllerhelpers

package
v0.0.0-...-937b28e Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: GPL-3.0 Imports: 19 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastScrollback

func BroadcastScrollback(so *wsevent.Client, room uint)

func CheckPrivilege

func CheckPrivilege(so *wsevent.Client, action authority.AuthAction) error

shitlord

func FilterHTTPRequest

func FilterHTTPRequest(action authority.AuthAction, f func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)

func GetIPAddr

func GetIPAddr(r *http.Request) string

func GetPlayer

func GetPlayer(token *jwt.Token) *player.Player

func GetToken

func GetToken(r *http.Request) (*jwt.Token, error)

func IsSteamIDWhitelisted

func IsSteamIDWhitelisted(steamid string) bool

func NewToken

func NewToken(player *player.Player) string

func SendToSlack

func SendToSlack(msg, name, steamid string)

func WhitelistListener

func WhitelistListener()

Types

type SlackMessage

type SlackMessage struct {
	Text string `json:"text"`
}

type TF2StadiumClaims

type TF2StadiumClaims struct {
	PlayerID       uint               `json:"player_id"`
	SteamID        string             `json:"steam_id"`
	MumblePassword string             `json:"mumble_password"`
	Role           authority.AuthRole `json:"role"`
	IssuedAt       int64              `json:"iat"`
	Issuer         string             `json:"iss"`
}

func (TF2StadiumClaims) Valid

func (c TF2StadiumClaims) Valid() error

Directories

Path Synopsis
Package hooks contains event hooks, which are called after specific events, like lobby joins and logins.
Package hooks contains event hooks, which are called after specific events, like lobby joins and logins.

Jump to

Keyboard shortcuts

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