Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Database DatabaseConfig `yaml:"database"` Settings SettingsConfig `yaml:"settings"` Durability DurabilityConfig `yaml:"durability"` Security SecurityConfig `yaml:"security"` Server ServerConfig `yaml:"server"` Metrics MetricsConfig `yaml:"metrics"` Mailer MailerConfig `yaml:"mailer"` Logging LoggingConfig `yaml:"logging"` }
func MustReadConfig ¶
MustReadConfig reads all configurations from the provided config file and env vars
type DatabaseConfig ¶
type DatabaseConfig struct { Backend string `yaml:"backend" envconfig:"DATABASE_BACKEND"` File string `yaml:"file" envconfig:"DATABASE_FILE"` Host string `yaml:"host" envconfig:"DATABASE_HOST"` Port int `yaml:"port" envconfig:"DATABASE_PORT"` SSLMode string `yaml:"ssl_mode" envconfig:"DATABASE_SSL_MODE"` Username string `yaml:"username" envconfig:"DATABASE_USERNAME"` Password string `yaml:"password" envconfig:"DATABASE_PASSWORD"` Name string `yaml:"name" envconfig:"DATABASE_NAME"` }
type DurabilityConfig ¶
type DurabilityConfig struct {
BufferLocation string `yaml:"buffer_location" envconfig:"DURABILITY_BUFFER_LOCATION"`
}
type LoggingConfig ¶
type LoggingConfig struct {
Level string `yaml:"level" envconfig:"LOGGING_LEVEL"`
}
type MailerConfig ¶
type MetricsConfig ¶
type MetricsConfig struct { SendInflux bool `yaml:"send_influx" envconfig:"METRICS_SEND_INFLUX"` InfluxURL string `yaml:"influx_url" envconfig:"METRICS_INFLUX_URL"` InfluxUser string `yaml:"influx_user" envconfig:"METRICS_INFLUX_USER"` InfluxPassword string `yaml:"influx_password" envconfig:"METRICS_INFLUX_PASSWORD"` InfluxDB string `yaml:"influx_db" envconfig:"METRICS_INFLUX_DB"` }
type SecurityConfig ¶
type SecurityConfig struct { MinPasswordLength int `yaml:"min_password_length" envconfig:"SECURITY_MIN_PASSWORD_LENGTH"` MaxPasswordAgeDays int `yaml:"max_password_age_days" envconfig:"SECURITY_MAX_PASSWORD_AGE_DAYS"` MaxPasswordReuse int `yaml:"max_password_reuse" envconfig:"SECURITY_MAX_PASSWORD_REUSE"` InitialUser string `yaml:"initial_user" envconfig:"SECURITY_INITIAL_USER"` InitialPassword string `yaml:"initial_password" envconfig:"SECURITY_INITIAL_PASSWORD"` SessionMaxSeconds int `yaml:"session_max_seconds" envconfig:"SECURITY_MAX_SESSION_SECONDS"` MaxFailedLogins int `yaml:"max_failed_logins" envconfig:"SECURITY_MAX_FAILED_LOGINS"` LockoutDurationSeconds int `yaml:"lockout_duration_seconds" envconfig:"SECURITY_LOCKOUT_DURATION_SECONDS"` SessionSecret string `yaml:"session_secret" envconfig:"SECURITY_SESSION_SECRET"` }
type ServerConfig ¶
type SettingsConfig ¶
Click to show internal directories.
Click to hide internal directories.