config

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Webserver struct {
		ServerConfig   `yaml:",inline"`
		FullURL        string `yaml:"full_url"`
		LiteURL        string `yaml:"lite_url"`
		DomainsOnlyURL string `yaml:"domains_only_url"`
		CertPath       string `yaml:"cert_path"`
		CertKeyPath    string `yaml:"cert_key_path"`
	}
	Prometheus struct {
		ServerConfig        `yaml:",inline"`
		Enabled             bool   `yaml:"enabled"`
		MetricsURL          string `yaml:"metrics_url"`
		ExposeSystemMetrics bool   `yaml:"expose_system_metrics"`
	}
}
var (
	AppConfig Config
	Version   = "1.4.0"
)

func ReadConfig

func ReadConfig(configPath string) (Config, error)

ReadConfig reads the config file and returns a filled Config struct.

type ServerConfig added in v1.4.0

type ServerConfig struct {
	ListenAddr string   `yaml:"listen_addr"`
	ListenPort int      `yaml:"listen_port"`
	RealIP     bool     `yaml:"real_ip"`
	Whitelist  []string `yaml:"whitelist"`
}

Jump to

Keyboard shortcuts

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