Documentation
¶
Overview ¶
Package providers defines the BackupProvider interface that all backup backends must implement.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupProvider ¶
type BackupProvider interface {
// Name returns the provider identifier (e.g. "restic").
Name() string
// Validate checks that the provider can access the backup
// repository described by the contract. It does not restore
// anything.
Validate(ctx context.Context, source contract.Source) error
// ListSnapshots returns the available snapshots in the repository.
ListSnapshots(ctx context.Context, source contract.Source) ([]Snapshot, error)
// GetSnapshotMetadata returns size and file-count information
// for a specific snapshot. Not all providers support this.
GetSnapshotMetadata(ctx context.Context, source contract.Source) (*SnapshotMetadata, error)
// RestoreArtifact restores the artifact referenced by the
// contract into the given destination directory. It returns
// the absolute path to the restored file.
RestoreArtifact(ctx context.Context, source contract.Source, destination string) (string, error)
}
BackupProvider is implemented by every supported backup backend.
Click to show internal directories.
Click to hide internal directories.