Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_LOG_LEVEL = "info" DEFAULT_PORT = 8080 DEFAULT_INTERVAL = time.Duration(1 * time.Minute) DEFAULT_WORLD_DIR = "/world" SERVER_TYPE_VANILLA = "vanilla" SERVER_TYPE_FORGE = "forge" SERVER_TYPE_PAPER = "paper" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { LogLevel string `yaml:"logLevel,omitempty"` Port int `yaml:"port,omitempty"` Interval time.Duration `yaml:"interval,omitempty"` ReduceMetrics bool `yaml:"reduceMetrics,omitempty"` ServerType string `yaml:"server,omitempty"` DynmapEnabled bool `yaml:"dynmap,omitempty"` WorldDir string `yaml:"world,omitempty"` RCON RCONConfig `yaml:"rcon,omitempty"` Remote RemoteConfig `yaml:"remote,omitempty"` }
func LoadConfig ¶
Loads config from file, returns error if config is invalid Arguments:
path: Path to config file env: Determines if enviroment variables in the file will be expanded before decoding
RCON Parameters are validated inside the RCON package itself, so it is not checked here.
type ErrInvalidInterval ¶
func (*ErrInvalidInterval) Error ¶
func (e *ErrInvalidInterval) Error() string
type ErrUnknownLogLevel ¶
type ErrUnknownLogLevel struct {
Level string
}
func (*ErrUnknownLogLevel) Error ¶
func (e *ErrUnknownLogLevel) Error() string
type ErrUnknownServerType ¶
type ErrUnknownServerType struct {
Type string
}
func (*ErrUnknownServerType) Error ¶
func (e *ErrUnknownServerType) Error() string
type RCONConfig ¶
Click to show internal directories.
Click to hide internal directories.