config

package
v0.0.0-...-3e34aa0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedType = errors.New("Unsupported field type")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug struct {
		Env    bool `env:"env"`
		Web    bool `env:"web"`
		Runner bool `env:"runner"`
	} `env:"debug"`
	Conoha struct {
		UserName string `env:"username"`
		Password string `env:"password"`
		TenantID string `env:"tenantId"`
		Services struct {
			Identity string `env:"identity"`
			Image    string `env:"image"`
			Compute  string `env:"compute"`
		} `env:"services"`
	} `env:"conoha"`
	Cloudflare struct {
		Token          string `env:"token"`
		ZoneID         string `env:"zoneId"`
		GameDomainName string `env:"gameDomain"`
	} `env:"cloudflare"`
	Mega backup.MegaCredentialInfo `env:"mega"`
	Game struct {
		Motd      string   `env:"motd"`
		Operators []string `env:"operators"`
		Whitelist []string `env:"whitelist"`
	} `env:"game"`
	ControlPanel struct {
		Secret string `env:"secret"`
		Origin string `env:"origin"`
		Redis  struct {
			Address  string `env:"address"`
			Password string `env:"password"`
		} `env:"redis"`
		Locale string `env:"locale"`
	} `env:"controlPanel"`
	MonitorKey string `env:"_ignore"`
	ServerAddr string `env:"_ignore"`
}

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) Locate

func (cfg *Config) Locate(path string) string

func (*Config) LocatePersist

func (cfg *Config) LocatePersist(path string) string

type ServerConfig

type ServerConfig struct {
	Name      string `json:"name"`
	IsVanilla bool   `json:"isVanilla"`
}

Jump to

Keyboard shortcuts

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