config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile added in v1.1.0

func CreateFile(prefix string) error

CreateFile creates a blank config file in the given path.

Types

type Root added in v1.1.0

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 added in v1.1.0

func Default() Root

Default returns a new config with default settings.

func Load added in v1.1.0

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

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

func (Root) Save added in v1.1.0

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