storage

package
v0.2.1-0...-8f33b48 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var NotFile = errors.New("it is a dir")
View Source
var NotFound = errors.New("not found key in db")
View Source
var TargetNotFound = errors.New("link target not found")

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) GetURI

func (m *Minio) GetURI(fileName string) (string, 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

type Teambition

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

func NewTeambition

func NewTeambition(bucket string, prefix string, cachePath string, cookie string) (*Teambition, error)

func (*Teambition) Close

func (tb *Teambition) Close() error

func (*Teambition) Delete

func (tb *Teambition) Delete(fileName string, mode rsync.FileMode) (err error)

func (*Teambition) FinishSync

func (tb *Teambition) FinishSync() (err error)

func (*Teambition) GetURI

func (tb *Teambition) GetURI(fileName string) (uri string, err error)

not allow dir path

func (*Teambition) List

func (tb *Teambition) List() (rsync.FileList, error)

EXPERIMENTAL

func (*Teambition) Put

func (tb *Teambition) 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