gameserver

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: 3 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServerUsed          = errors.New("server is being used")
	ErrServerAlreadyExists = errors.New("server already exists")
)

Functions

func PutStoredServer

func PutStoredServer(address string)

func RemoveStoredServer

func RemoveStoredServer(addr string)

Types

type ServerRecord

type ServerRecord struct {
	ID             uint
	Host           string
	LogSecret      string
	ServerPassword string // sv_password
	RconPassword   string // rcon_password
}

type StoredServer

type StoredServer struct {
	ID   uint   `gorm:"primary_key" json:"id"`
	Name string `json:"name"`

	Address      string `json:"-" sql:"unique"`
	RCONPassword string `json:"-"`
	Used         bool   `sql:"default:false" json:"-"`
}

func GetAllStoredServers

func GetAllStoredServers() []*StoredServer

func GetAvailableServers

func GetAvailableServers() []*StoredServer

func GetStoredServer

func GetStoredServer(id uint) (*StoredServer, error)

func NewStoredServer

func NewStoredServer(name, address, passwd string) (*StoredServer, error)

Jump to

Keyboard shortcuts

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