backup

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBucketNotFound = errors.New("backup bucket could not be found")
)

Functions

This section is empty.

Types

type FakeProvider

type FakeProvider struct {
	BucketObjs []*corev1.Secret
}

func (*FakeProvider) Backup

func (p *FakeProvider) Backup(ctx context.Context, secret *corev1.Secret) error

func (*FakeProvider) Restore

func (p *FakeProvider) Restore(ctx context.Context, key client.ObjectKey) (*corev1.Secret, error)

type Provider

type Provider interface {
	Backup(context.Context, *corev1.Secret) error
	Restore(context.Context, client.ObjectKey) (*corev1.Secret, error)
}

func NewGCSProvider

func NewGCSProvider(ctx context.Context, bucket string, client *storage.Client) (Provider, error)

func NewS3Provider

func NewS3Provider(ctx context.Context, bucket string, cfg *aws.Config) (Provider, error)

Jump to

Keyboard shortcuts

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