storage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const S3_DIR = ".dir.rsync-os"

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

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

func NewLocal

func NewLocal(module string, path string, topDir string) (*Local, error)

func (*Local) Delete

func (l *Local) Delete(fileName string, mode rsync.FileMode) error

func (*Local) List

func (l *Local) List() (rsync.FileList, error)

func (*Local) Put

func (l *Local) Put(fileName string, content io.Reader, fileSize int64, metadata rsync.FileMetadata) (written int64, err error)

type Minio

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

S3 with cache

func NewMinio

func NewMinio(bucket string, prefix string, cachePath string, endpoint string, accessKeyID string, secretAccessKey string, secure bool) (*Minio, error)

func (*Minio) Close

func (m *Minio) Close() error

func (*Minio) Delete

func (m *Minio) Delete(fileName string, mode rsync.FileMode) (err error)

func (*Minio) List

func (m *Minio) List() (rsync.FileList, error)

EXPERIMENTAL

func (*Minio) ListObj

func (m *Minio) ListObj() (rsync.FileList, error)

func (*Minio) Put

func (m *Minio) Put(fileName string, content io.Reader, fileSize int64, metadata rsync.FileMetadata) (written int64, err error)

object can be a regualar file, folder or symlink

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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