backup

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	Name      string
	Path      string
	Host      string
	CreatedAt time.Time
}

Backup for provider.

func New

func New(options Options) Backup

New returns backup filled with Options.

func (*Backup) Delete

func (b *Backup) Delete(storage Storage) error

Delete backup from given storage.

func (*Backup) Filename

func (b *Backup) Filename() string

Filename backup filename from path.

func (*Backup) Get

func (b *Backup) Get(storage Storage) error

Get backup from given storage.

func (*Backup) Save

func (b *Backup) Save(storage Storage) error

Save backup to given storage.

type Options

type Options struct {
	Name string
	Path string
	Host string
}

Options options for Backup.

type Storage

type Storage interface {
	Save(Backup) error
	Delete(Backup) error
	Get(Backup) error
	List(Backup) ([]Backup, error)
}

Storage interface of different storages.

Jump to

Keyboard shortcuts

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