global

package
v0.0.0-...-4bf6eee Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(filename string) error

Types

type Config

type Config struct {
	Logger Logger `toml:"logger" yaml:"logger"`
	Server Server `toml:"server" yaml:"server"`
}

func C

func C() *Config

type Logger

type Logger struct {
	Level         int8   `toml:"level" yaml:"level" env:"LOGGER_LEVEL"`
	ConsoleWriter bool   `toml:"console_writer" yaml:"console_writer" env:"LOGGER_CONSOLE_WRITER"`
	RequestLogger bool   `toml:"request_logger" yaml:"request_logger" env:"LOGGER_REQUEST_LOGGER"`
	Filename      string `toml:"filename" yaml:"filename" env:"LOGGER_FILENAME"`
	MaxAge        int    `toml:"max_age" yaml:"max_age" env:"LOGGER_MAX_AGE"`
	MaxBackups    int    `toml:"max_backups" yaml:"max_backups" env:"LOGGER_MAX_BACKUPS"`
}

type Server

type Server struct {
	Url         string `toml:"url" yaml:"url" env:"SERVER_URL"`
	BindAddress string `toml:"bind_address" yaml:"bind_address" env:"SERVER_BIND_ADDRESS"`
	TlsCertFile string `toml:"tls_cert_file" yaml:"tls_cert_file" env:"SERVER_TLS_CERT_FILE"`
	TlsKeyFile  string `toml:"tls_key_file" yaml:"tls_key_file" env:"SERVER_TLS_KEY_FILE"`
}

Jump to

Keyboard shortcuts

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