Versions in this module Expand all Collapse all v0 v0.4.1 May 9, 2024 v0.4.0 Jan 1, 2024 Changes in this version + var ErrConfigBackupNameNotFound = errors.New("backup name in config not found") + var ErrConfigNotFound = errors.New("config file not found") + var ErrSshConfigNotFound = errors.New("user ssh config file not found") + func ResticCheck() error + type Backup struct + Config BackupTypeConfig + Name string + Type string + type BackupTypeConfig interface + String func() string + Validate func() error + type Config struct + Backups []Backup + Repository ConfigRepository + func NewConfig(filepath string) (*Config, error) + func (c *Config) BackupNames() []string + func (c *Config) CreateRepositoryStruct(bConf BackupTypeConfig) (ResticRepository, error) + func (c *Config) CreateTestStruct(bConf BackupTypeConfig) (tests.ResticTest, error) + func (c *Config) IsValidName(name string) bool + func (c *Config) ReadBackup(name string) (Backup, error) + type ConfigRepository struct + Password string + type LocalBackupConfig struct + Destination string + Excludes []string + Sources []string + func (c LocalBackupConfig) String() string + func (c LocalBackupConfig) Validate() error + type LocalBackupRepository struct + Destination string + Excludes []string + Password string + Sources []string + func (r LocalBackupRepository) Backup() error + func (r LocalBackupRepository) Check() error + func (r LocalBackupRepository) Init() ([]byte, error) + func (r LocalBackupRepository) Snapshots() ([]byte, error) + type ResticRepository interface + Backup func() error + Check func() error + Init func() ([]byte, error) + Snapshots func() ([]byte, error) + type S3BackupConfig struct + AccessKeyId string + Destination string + Excludes []string + Region string + SecretAccessKey string + Sources []string + func (c S3BackupConfig) String() string + func (c S3BackupConfig) Validate() error + type S3BackupRepository struct + AccessKeyId string + Destination string + Excludes []string + Password string + SecretAccessKey string + Sources []string + func (r S3BackupRepository) Backup() error + func (r S3BackupRepository) Check() error + func (r S3BackupRepository) Init() ([]byte, error) + func (r S3BackupRepository) Snapshots() ([]byte, error) + type SftpBackupConfig struct + Destination string + Excludes []string + Host string + Sources []string + func (c SftpBackupConfig) String() string + func (c SftpBackupConfig) Validate() error + type SftpBackupRepository struct + ConfigHost string + Destination string + Excludes []string + Password string + Sources []string + func (r SftpBackupRepository) Backup() error + func (r SftpBackupRepository) Check() error + func (r SftpBackupRepository) Init() ([]byte, error) + func (r SftpBackupRepository) Snapshots() ([]byte, error)