config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func InitConfig added in v0.7.0

func InitConfig() error

func LoadConfig

func LoadConfig()

Types

type BackupConfig

type BackupConfig struct {
	Hostname       string `yaml:"-"`
	RetentionCount int    `yaml:"retention-count" mapstructure:"retention-count"`
	DateTimeLayout string `yaml:"date-time-layout" mapstructure:"date-time-layout"`
	Cron           string `yaml:"cron" mapstructure:"cron"`
	Encrypt        bool   `yaml:"encrypt" mapstructure:"encrypt"`
}

type Config

type Config struct {
	Postgres   PostgresConfig  `yaml:"postgres" mapstructure:"postgres"`
	S3         S3Config        `yaml:"s3" mapstructure:"s3"`
	Backup     BackupConfig    `yaml:"backup" mapstructure:"backup"`
	Encryption Encryption      `yaml:"encryption" mapstructure:"encryption"`
	Notifiers  NotifiersConfig `yaml:"notifiers" mapstructure:"notifiers"`
}
var Current *Config

type DiscordNotifierConfig

type DiscordNotifierConfig struct {
	Enabled bool   `yaml:"enabled" mapstructure:"enabled"`
	Webhook string `yaml:"webhook" mapstructure:"webhook"`
}

type Encryption added in v0.5.0

type Encryption struct {
	GPG GPGConfig
}

type GPGConfig added in v0.5.0

type GPGConfig struct {
	KeyServer string `yaml:"key-server" mapstructure:"key-server"`
	KeyID     string `yaml:"key-id" mapstructure:"key-id"`
}

type NotifiersConfig

type NotifiersConfig struct {
	Enabled bool                  `yaml:"enabled" mapstructure:"enabled"`
	Discord DiscordNotifierConfig `yaml:"discord" mapstructure:"discord"`
}

type PostgresConfig

type PostgresConfig struct {
	Host     string `yaml:"host" mapstructure:"host"`
	Port     string `yaml:"port" mapstructure:"port"`
	User     string `yaml:"user" mapstructure:"user"`
	Password string `yaml:"password" mapstructure:"password"`
}

type S3Config

type S3Config struct {
	Endpoint  string `yaml:"endpoint" mapstructure:"endpoint"`
	Region    string `yaml:"region" mapstructure:"region"`
	AccessKey string `yaml:"access-key" mapstructure:"access-key"`
	SecretKey string `yaml:"secret-key" mapstructure:"secret-key"`
	Bucket    string `yaml:"bucket" mapstructure:"bucket"`
	Prefix    string `yaml:"prefix" mapstructure:"prefix"`
}

Jump to

Keyboard shortcuts

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