config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RespawnTypeAll  = "all"
	RespawnTypeDead = "dead"
	RespawnTypeNone = "none"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterIngress

type ClusterIngress struct {
	Desktop []ENetIngress
	Web     struct {
		Port int
	}
}

type ClusterServerInfo

type ClusterServerInfo struct {
	Map         string
	Description string
	TimeLeft    int
	GameSpeed   int
}

type ClusterSettings

type ClusterSettings struct {
	Enabled           bool
	LogSessions       bool
	DBPath            string
	LogDirectory      string
	CacheDirectory    string
	ServerInfo        ClusterServerInfo
	Assets            []string
	Presets           []ServerPreset
	Spaces            []PresetSpace
	Matchmaking       MatchmakingSettings
	ServerDescription string
	Ingress           ClusterIngress
}

type Config

type Config struct {
	Redis       RedisSettings
	Cluster     ClusterSettings
	AssetStores []Store
	Discord     DiscordSettings
}

func GetSourConfig

func GetSourConfig(data []byte) (*Config, error)

type DiscordSettings

type DiscordSettings struct {
	Enabled     bool
	Domain      string
	Id          string
	Secret      string
	RedirectURI string
}

type DuelType

type DuelType struct {
	Name            string
	Preset          string
	ForceRespawn    RespawnType
	WarmupSeconds   uint
	GameSeconds     uint
	WinThreshold    uint
	OvertimeSeconds uint
	PauseOnDeath    bool
	Default         bool
}

type ENetIngress

type ENetIngress struct {
	Port       int
	Target     string
	ServerInfo ENetServerInfo
}

type ENetServerInfo

type ENetServerInfo struct {
	Enabled bool
	Master  bool
	Cluster bool
}

type FSStoreConfig

type FSStoreConfig struct {
	Path string
}

func (FSStoreConfig) Type

func (f FSStoreConfig) Type() StoreType

type MatchmakingSettings

type MatchmakingSettings struct {
	Duel []DuelType
}

type PresetSpace

type PresetSpace struct {
	Preset          string
	VotingCreates   bool
	ExploreMode     bool
	ExploreModeSkip string
	Config          SpaceConfig
}

type RedisSettings

type RedisSettings struct {
	Address  string
	Password string
	DB       int
}

type RespawnType

type RespawnType string

type ServerPreset

type ServerPreset struct {
	Name    string
	Virtual bool
	Default bool
	Config  server.Config
}

type SpaceConfig

type SpaceConfig struct {
	Alias       string
	Description string
	Links       []SpaceLink
}
type SpaceLink struct {
	Teleport    uint8
	Teledest    uint8
	Destination string
}

type Store

type Store struct {
	Name    string
	Default bool
	Config  StoreConfig
}

func (*Store) UnmarshalJSON

func (s *Store) UnmarshalJSON(data []byte) error

type StoreConfig

type StoreConfig interface {
	Type() StoreType
}

type StoreType

type StoreType uint8
const (
	StoreTypeFS StoreType = iota
)

Jump to

Keyboard shortcuts

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