s3remote

package
v1.30.1-cluster Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	// Path to S3 credentials file.
	CredsFilePath string

	// Pat to S3 configs file.
	ConfigFilePath string

	// GCS bucket to use.
	Bucket string

	// Directory in the bucket to write to.
	Dir string
	// contains filtered or unexported fields
}

FS represents filesystem for backups in S3.

Init must be called before calling other FS methods.

func (*FS) CopyPart

func (fs *FS) CopyPart(srcFS common.OriginFS, p common.Part) error

CopyPart copies p from srcFS to fs.

func (*FS) DeletePart

func (fs *FS) DeletePart(p common.Part) error

DeletePart deletes part p from fs.

func (*FS) DownloadPart

func (fs *FS) DownloadPart(p common.Part, w io.Writer) error

DownloadPart downloads part p from fs to w.

func (*FS) Init

func (fs *FS) Init() error

Init initializes fs.

func (*FS) ListParts

func (fs *FS) ListParts() ([]common.Part, error)

ListParts returns all the parts for fs.

func (*FS) RemoveEmptyDirs

func (fs *FS) RemoveEmptyDirs() error

RemoveEmptyDirs recursively removes empty dirs in fs.

func (*FS) String

func (fs *FS) String() string

String returns human-readable description for fs.

func (*FS) UploadPart

func (fs *FS) UploadPart(p common.Part, r io.Reader) error

UploadPart uploads part p from r to fs.

Jump to

Keyboard shortcuts

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