config

package
v0.0.0-...-1b273af Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(prefix string) error

CreateFile creates a blank config file in the given path.

Types

type Root

type Root struct {
	MainSettings   mainSettings   `toml:"main_settings"`
	JavaSettings   javaSettings   `toml:"java_settings"`
	ServerSettings serverSettings `toml:"server_settings"`
	BackupSettings backupSettings `toml:"backup_settings"`
}

Root is the root-level of our server configuration structure.

func Default

func Default() Root

Default returns a new config with default settings.

func Load

func Load(prefix string) (conf Root, err error)

Load reads a config from a config file in the given path.

func (Root) Save

func (c Root) Save(prefix string) error

Save writes the given config to the disk at the given path.

Jump to

Keyboard shortcuts

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