config

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig

type ApiConfig struct {
	ListenAddress string `yaml:"address"        envconfig:"API_LISTEN_ADDRESS"`
	ListenPort    uint   `yaml:"port"           envconfig:"API_LISTEN_PORT"`
	ClientTimeout uint   `yaml:"client_timeout" envconfig:"CLIENT_TIMEOUT"`
}

type Config

type Config struct {
	Logging  LoggingConfig `yaml:"logging"`
	Api      ApiConfig     `yaml:"api"`
	Tls      TlsConfig     `yaml:"tls"`
	Backends []string      `yaml:"backends" envconfig:"BACKENDS"`
}

func GetConfig

func GetConfig() *Config

Return global config instance

func Load

func Load(configFile string) (*Config, error)

type LoggingConfig

type LoggingConfig struct {
	Level string `yaml:"level" envconfig:"LOGGING_LEVEL"`
}

type TlsConfig

type TlsConfig struct {
	CertFilePath string `yaml:"certFilePath" envconfig:"TLS_CERT_FILE_PATH"`
	KeyFilePath  string `yaml:"keyFilePath"  envconfig:"TLS_KEY_FILE_PATH"`
}

Jump to

Keyboard shortcuts

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