config

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version string = "0.0.1"

Functions

This section is empty.

Types

type Config

type Config struct {
	Webserver struct {
		ListenAddr     string `yaml:"listen_addr"`
		ListenPort     int    `yaml:"listen_port"`
		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 {
		Enabled    bool   `yaml:"enabled"`
		MetricsURL string `yaml:"metrics_url"`
		ListenAddr string `yaml:"listen_addr"`
		ListenPort int    `yaml:"listen_port"`
	}
}
var AppConfig Config

func ReadConfig

func ReadConfig(configPath string) (Config, error)

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

Jump to

Keyboard shortcuts

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