cfg

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkipWine added in v1.18.0

func SkipWine() bool

Types

type ACC

type ACC struct {
	ServerPath string `yaml:"server_path"`
	ServerExe  string `yaml:"server_exe"`
}

type Auth

type Auth struct {
	PublicKeyPath     string         `yaml:"public_key_path"`
	PrivateKeyPath    string         `yaml:"private_key_path"`
	AdminPassword     string         `yaml:"admin_password"`
	ModeratorPassword string         `yaml:"moderator_password"`
	ReadOnlyPassword  string         `yaml:"read_only_password"`
	Timeout           *time.Duration `yaml:"timeout"`
}

type CORS

type CORS struct {
	Origins  string `yaml:"origins"`
	Loglevel string `yaml:"loglevel"`
}

type Config

type Config struct {
	Dev        bool      `yaml:"dev"`
	SkipWine   bool      `yaml:"skip_wine"`
	Loglevel   string    `yaml:"loglevel"`
	ConfigPath string    `yaml:"config_path"`
	Webserver  Webserver `yaml:"webserver"`
	CORS       CORS      `yaml:"cors"`
	Auth       Auth      `yaml:"auth"`
	ACC        ACC       `yaml:"acc"`
}

func Load

func Load(file string) *Config

Load loads the application config from config.yml.

type Webserver

type Webserver struct {
	Host       string `yaml:"host"`
	TLS        bool   `yaml:"tls"`
	Cert       string `yaml:"cert"`
	PrivateKey string `yaml:"private_key"`
}

Jump to

Keyboard shortcuts

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