providers

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupProvider

type BackupProvider interface {
	EnsureBackupBucket(ctx context.Context) error
	ListBackups(ctx context.Context) (BackupVersions, error)
	CleanupBackups(ctx context.Context) error
	GetNextBackupName(ctx context.Context) string
	DownloadBackup(ctx context.Context, version *BackupVersion, writer io.Writer) error
	UploadBackup(ctx context.Context, reader io.Reader) error
}

type BackupVersion

type BackupVersion struct {
	Name    string
	Version string
	Date    time.Time
}

type BackupVersions

type BackupVersions interface {
	// Latest returns the most recent backup
	Latest() *BackupVersion
	// List returns all backups sorted by date descending, e.g. the newest backup comes first
	List() []*BackupVersion
	// Get a backup at the specified version
	Get(version string) (*BackupVersion, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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