util

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthToSteamID64

func AuthToSteamID64(auth string) (string, error)

AuthToSteamID64 Converts Auth to SteamID64

func CheckServerConnection

func CheckServerConnection(IPString string, Port int, RconPassword string) bool

CheckServerConnection Check server pulse by sending "status" command

func FormatMapName

func FormatMapName(mapname string) string

FormatMapName Formats correct map name.

func GetVersion

func GetVersion() (string, error)

GetVersion Gets get5-web-go version from github

func IsValidSteamID

func IsValidSteamID(auth string) bool

IsValidSteamID Checks if steamid is correct format or not

func PickleToSteamID64s

func PickleToSteamID64s(Pickles []byte) ([]string, error)

PickleToSteamID64s Un-pickles Python array to SteamID64 array

func RandString

func RandString(n int) string

RandString Generates random string

func Round added in v0.1.1

func Round(f float64, places int) float64

func SendRCON

func SendRCON(host string, port int, pass string, cmd string) (string, error)

SendRCON Sends Remote-Commands to specific IP SRCDS.

func SteamID64sToPickle

func SteamID64sToPickle(ids []string) ([]byte, error)

SteamID64sToPickle Pickles Steamid64 array

Types

type Config

type Config struct {
	SteamAPIKey string
	DefaultPage string
	SQLHost     string
	SQLUser     string
	SQLPass     string
	SQLPort     int
	SQLDBName   string
	HOST        string
}

Config Configration Struct for config.ini

var (
	Cnf Config
)

type GET5AvailableDatas

type GET5AvailableDatas struct {
	Gamestate     int    `json:"gamestate"`
	Available     int    `json:"available"`
	PluginVersion string `json:"plugin_version"`
}

GET5AvailableDatas Struct for Get5 availability check.

func CheckServerAvailability

func CheckServerAvailability(IPString string, Port int, RconPassword string) (GET5AvailableDatas, error)

CheckServerAvailability if server is usable for get5_web

Jump to

Keyboard shortcuts

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