backuprepo

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBackupRepo

func ValidateBackupRepo(backupRepo BackupRepo) error

Types

type BackupRepo

type BackupRepo struct {
	Name         string                     `json:"name" db:"name"`
	SrcRepo      *git.Repository            `json:"-"`
	RemoteURL    string                     `json:"remote_url" db:"remote_url"`
	PullInterval int                        `json:"pull_interval" db:"pull_interval"`
	Storages     map[string]storage.Storage `json:"-"`
	LocalPath    string                     `json:"-" db:"local_path"`
	Credentials  `json:"credentials"`
}

func (*BackupRepo) AddStorage added in v0.3.0

func (b *BackupRepo) AddStorage(storage storage.Storage)

func (*BackupRepo) BackupAndUpload added in v0.3.0

func (b *BackupRepo) BackupAndUpload() error

func (*BackupRepo) DecryptCredentials added in v0.3.0

func (b *BackupRepo) DecryptCredentials() error

func (*BackupRepo) InitializeRepo

func (b *BackupRepo) InitializeRepo() error

func (*BackupRepo) InitializeStorages added in v0.3.0

func (b *BackupRepo) InitializeStorages()

func (*BackupRepo) RemoveStorage added in v0.3.0

func (b *BackupRepo) RemoveStorage(storage_name string)

type BackupRepoManager added in v0.3.0

type BackupRepoManager struct {
	// contains filtered or unexported fields
}

func NewBackupRepoManager added in v0.3.0

func NewBackupRepoManager() *BackupRepoManager

func (*BackupRepoManager) AddBackupRepo added in v0.3.0

func (bm *BackupRepoManager) AddBackupRepo(r *BackupRepo)

func (*BackupRepoManager) AddStorage added in v0.3.0

func (bm *BackupRepoManager) AddStorage(repo_name string, storage storage.Storage)

func (*BackupRepoManager) DeleteBackupRepo added in v0.3.0

func (bm *BackupRepoManager) DeleteBackupRepo(name string)

func (*BackupRepoManager) GetAllBackupRepos added in v0.3.0

func (bm *BackupRepoManager) GetAllBackupRepos() []*BackupRepo

func (*BackupRepoManager) GetBackupRepo added in v0.3.0

func (bm *BackupRepoManager) GetBackupRepo(name string) *BackupRepo

func (*BackupRepoManager) RemoveStorage added in v0.3.0

func (bm *BackupRepoManager) RemoveStorage(repo_name, storage_name string)

type Credentials

type Credentials struct {
	GitUsername string `json:"username" db:"git_username"`
	GitPassword string `json:"password" db:"git_password"`
	GitKeyPath  string `json:"key_path" db:"git_key_path"`
}

Jump to

Keyboard shortcuts

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