config

package
v0.0.0-...-0d88966 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigPath string
	Conf       Config
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Version                      string
	EnableBackup                 bool
	EnableMonitor                bool
	MonitorIntervalSeconds       int
	MonitorRetries               int
	BackupHours                  []int
	RetentionHours               int
	LogRetentionDays             int
	ConcurrentBackupContainer    int
	BackupPath                   string
	LogsPath                     string
	BeforeBackupCMD              string
	AfterBackupCMD               string
	LogLevel                     string
	Log2File                     bool
	BackupOnStartup              bool
	CreateTestContainerOnStartup bool
	NotifyLevel                  string
	TelegramChatIDs              []int
	TelegramBotToken             string
}

func Init

func Init(configPath string) Config

func (*Config) Load

func (c *Config) Load() error

func (*Config) LoadFromEnv

func (c *Config) LoadFromEnv() error

func (*Config) LoadFromFile

func (c *Config) LoadFromFile() error

func (*Config) Save

func (c *Config) Save() error

func (*Config) SetDefaults

func (c *Config) SetDefaults() error

func (*Config) SetVersion

func (c *Config) SetVersion()

Jump to

Keyboard shortcuts

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