config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(path string, out any) error

Types

type AppConfig

type AppConfig struct {
	Http  HttpConfigSection  `yaml:"http"`
	Https HttpsConfigSection `yaml:"https"`
	Maps  map[string]string  `yaml:"maps"`
}

func GetAppConfig

func GetAppConfig() *AppConfig

func LoadAppConfig

func LoadAppConfig() *AppConfig

type HttpConfigSection

type HttpConfigSection struct {
	Enabled    bool   `yaml:"enabled"`
	ListenAddr string `yaml:"listen-addr"`
}

type HttpsConfigSection

type HttpsConfigSection struct {
	Enabled    bool   `yaml:"enabled"`
	ListenAddr string `yaml:"listen-addr"`
	CertFile   string `yaml:"cert-file"`
	KeyFile    string `yaml:"key-file"`
}

Jump to

Keyboard shortcuts

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