gcsremote

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 GCP credentials file.
	//
	// Default credentials are used if empty.
	CredsFilePath 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 GCS.

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