Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLI ¶
type CLI struct {
Config string `optional:"" short:"c" type:"existingfile" placeholder:"PATH" help:"Path to the config file."`
}
type Config ¶
type Config struct {
Logger LoggerConfig `env-prefix:"LOGGER_" yaml:"logger"`
Database DatabaseConfig `env-prefix:"DB_" yaml:"db"`
WireGuard WireGuardConfig `env-prefix:"WG_" yaml:"wireguard"`
SSH SSHConfig `env-prefix:"SSH_" yaml:"ssh"`
}
type DatabaseConfig ¶
type DatabaseConfig struct {
Path string `env:"PATH" yaml:"path"`
}
func (*DatabaseConfig) Default ¶
func (cfg *DatabaseConfig) Default()
type LoggerConfig ¶
type LoggerConfig struct {
Level string `env:"LEVEL" yaml:"level"`
Directory string `env:"DIRECTORY" yaml:"directory"`
MaxSize int `env:"MAX_SIZE" yaml:"max_size"`
MaxAge int `env:"MAX_AGE" yaml:"max_age"`
MaxBackups int `env:"MAX_BACKUPS" yaml:"max_backups"`
}
func (*LoggerConfig) Default ¶
func (cfg *LoggerConfig) Default()
func (*LoggerConfig) Validate ¶
func (cfg *LoggerConfig) Validate() error
type SSHConfig ¶
type WireGuardConfig ¶
type WireGuardConfig struct {
Host string `env:"HOST" yaml:"host"`
Path string `env:"PATH" yaml:"path"`
Address string `env:"ADDRESS" yaml:"address"`
Port int `env:"PORT" yaml:"port"`
Device string `env:"DEVICE" yaml:"device"`
AllowedIPs []string `env:"ALLOWED_IPS" yaml:"allowed_ips"`
PersistentKeepalive int `env:"PERSISTENT_KEEPALIVE" yaml:"persistent_keepalive"`
DNS []string `env:"DNS" yaml:"dns"`
}
func (*WireGuardConfig) Default ¶
func (cfg *WireGuardConfig) Default()
func (*WireGuardConfig) Validate ¶
func (cfg *WireGuardConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.