ubstorage

package
v0.0.0-...-05a15ff Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	Put(ctx context.Context, backup ubtypes.Backup, content io.ReadSeeker) error
	Get(ctx context.Context, id string) (io.ReadCloser, error)
	List(ctx context.Context, serviceId string) ([]StoredBackup, error)
	ListServices(context.Context) ([]string, error)
}

func NewS3BackupStorage

func NewS3BackupStorage(s3conf ubconfig.StorageS3Config, logger *log.Logger) (Storage, error)

func StorageFromConfig

func StorageFromConfig(conf ubconfig.StorageConfig, logger *log.Logger) (Storage, error)

type StoredBackup

type StoredBackup struct {
	ID          string
	Timestamp   time.Time
	Size        int64
	Description string
}

Jump to

Keyboard shortcuts

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