versioned

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact interface {
	Save(backup map[string]BucketSnapshot) error
	Load() (map[string]BucketSnapshot, error)
}

type Backuper

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

func NewBackuper

func NewBackuper(sourceBuckets map[string]Bucket, destinationArtifact Artifact) Backuper

func (Backuper) Run

func (b Backuper) Run() error

type BlobVersion

type BlobVersion struct {
	BlobKey string `json:"blob_key"`
	Id      string `json:"version_id"`
}

type Bucket added in v1.15.0

type Bucket interface {
	Name() string
	Region() string
	CopyVersion(blobKey, versionId, originBucketName, originBucketRegion string) error
	ListVersions() ([]s3bucket.Version, error)
	CheckIfVersioned() error
}

type BucketSnapshot

type BucketSnapshot struct {
	BucketName string        `json:"bucket_name"`
	RegionName string        `json:"region_name"`
	Versions   []BlobVersion `json:"versions"`
}

type FileArtifact

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

func NewFileArtifact

func NewFileArtifact(filePath string) FileArtifact

func (FileArtifact) Load

func (a FileArtifact) Load() (map[string]BucketSnapshot, error)

func (FileArtifact) Save

func (a FileArtifact) Save(backup map[string]BucketSnapshot) error

type Restorer

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

func NewRestorer

func NewRestorer(destinationBuckets map[string]Bucket, sourceArtifact Artifact) Restorer

func (Restorer) Run

func (r Restorer) Run() error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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