backuprepo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 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:"storage"`
	LocalPath    string                     `json:"-" db:"local_path"`
	Credentials  `json:"credentials"`
}

func (*BackupRepo) InitializeRepo

func (b *BackupRepo) InitializeRepo() error

type BackupRepoProcessor

type BackupRepoProcessor interface {
	ProcessBackupRepo(parsedJSONRepo *ParsedJSONRepo) (*BackupRepo, error)
}

type BackupRepoProcessorImpl

type BackupRepoProcessorImpl struct {
	StorageCreator storage.StorageCreator
}

func (*BackupRepoProcessorImpl) ProcessBackupRepo

func (p *BackupRepoProcessorImpl) ProcessBackupRepo(parsedJSONRepo *ParsedJSONRepo) (*BackupRepo, error)

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"`
}

type ParsedJSONRepo

type ParsedJSONRepo struct {
	Name         string                     `json:"name" db:"name"`
	RemoteURL    string                     `json:"remote_url" db:"remote_url"`
	PullInterval int                        `json:"pull_interval" db:"pull_interval"`
	LocalPath    string                     `json:"-" db:"local_path"`
	Storages     map[string]json.RawMessage `json:"storage"`
	Credentials  `json:"credentials"`
}

Jump to

Keyboard shortcuts

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