config

package
v0.0.0-...-d3751e6 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: GPL-3.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(file string, config *Config) (err error)

Types

type Config

type Config struct {
	Connect ConfigConnect `yaml:"connect"`
	Proxy   ConfigProxy   `yaml:"proxy"`
}

func DefaultConfig

func DefaultConfig() (config *Config)

func LoadConfig

func LoadConfig(file string) (config *Config, err error)

func (*Config) LocaleFull

func (this *Config) LocaleFull() (val string)

func (*Config) LocaleLoggedIn

func (this *Config) LocaleLoggedIn() (val string)

func (*Config) LocaleLostConn

func (this *Config) LocaleLostConn() (val string)

func (*Config) LocaleOffline

func (this *Config) LocaleOffline() (val string)

func (*Config) LocaleShutdown

func (this *Config) LocaleShutdown() (val string)

func (*Config) Route

func (this *Config) Route(domain string) (val []string)

func (*Config) RouteIcons

func (this *Config) RouteIcons(domain string) (val []string)

func (*Config) RouteMotds

func (this *Config) RouteMotds(domain string) (val []string)

func (*Config) RouteSample

func (this *Config) RouteSample(domain string) (val string)

type ConfigConnect

type ConfigConnect struct {
	Address     string                   `yaml:"address"`
	Credentials ConfigConnectCredentials `yaml:"credentials"`
}

type ConfigConnectCredentials

type ConfigConnectCredentials struct {
	Username string
	Password string
}

type ConfigProxy

type ConfigProxy struct {
	Bind   string             `yaml:"bind"`
	Routes []ConfigProxyRoute `yaml:"routes"`

	Locale         ConfigProxyLocale `yaml:"locale"`
	Motd           string            `yaml:"motd"`
	MaxPlayers     uint16            `yaml:"maxPlayers"`
	SyncMaxPlayers bool              `yaml:"syncMaxPlayers"`
	Authenticate   bool              `yaml:"authenticate"`
	// contains filtered or unexported fields
}

type ConfigProxyLocale

type ConfigProxyLocale struct {
	Full     string `yaml:"full"`
	Offline  string `yaml:"offline"`
	LoggedIn string `yaml:"loggedIn"`
	LostConn string `yaml:"lostConn"`
	Shutdown string `yaml:"shutdown"`
}

type ConfigProxyRoute

type ConfigProxyRoute struct {
	Domain  string   `yaml:"domain,omitempty"`
	Domains []string `yaml:"domains,omitempty"`
	Server  string   `yaml:"server,omitempty"`
	Servers []string `yaml:"servers,omitempty"`
	Motd    string   `yaml:"motd,omitempty"`
	Motds   []string `yaml:"motds,omitempty"`
	Icon    string   `yaml:"icon,omitempty"`
	Icons   []string `yaml:"icons,omitempty"`
	Sample  string   `yaml:"sample,omitempty"`
}

Jump to

Keyboard shortcuts

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