local

package
v0.33.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const BlockstoreType = "local"

Variables

View Source
var (
	ErrPathNotWritable       = errors.New("path provided is not writable")
	ErrInventoryNotSupported = errors.New("inventory feature not implemented for local storage adapter")
	ErrInvalidUploadIDFormat = errors.New("invalid upload id format")
)

Functions

func WithRemoveEmptyDir added in v0.31.0

func WithRemoveEmptyDir(b bool) func(a *Adapter)

func WithTranslator

func WithTranslator(t block.UploadIDTranslator) func(a *Adapter)

Types

type Adapter

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

func NewAdapter

func NewAdapter(path string, opts ...func(a *Adapter)) (*Adapter, error)

func (*Adapter) AbortMultiPartUpload

func (l *Adapter) AbortMultiPartUpload(obj block.ObjectPointer, uploadID string) error

func (*Adapter) BlockstoreType added in v0.11.0

func (l *Adapter) BlockstoreType() string

func (*Adapter) CompleteMultiPartUpload

func (l *Adapter) CompleteMultiPartUpload(obj block.ObjectPointer, uploadID string, multipartList *block.MultipartUploadCompletion) (*string, int64, error)

func (*Adapter) Copy added in v0.14.0

func (l *Adapter) Copy(sourceObj, destinationObj block.ObjectPointer) error

func (*Adapter) CreateMultiPartUpload

func (l *Adapter) CreateMultiPartUpload(obj block.ObjectPointer, _ *http.Request, _ block.CreateMultiPartUploadOpts) (string, error)

func (*Adapter) Exists added in v0.22.1

func (l *Adapter) Exists(obj block.ObjectPointer) (bool, error)

func (*Adapter) GenerateInventory

func (l *Adapter) GenerateInventory(_ context.Context, _ logging.Logger, _ string, _ bool, _ []string) (block.Inventory, error)

func (*Adapter) Get

func (l *Adapter) Get(obj block.ObjectPointer, _ int64) (reader io.ReadCloser, err error)

func (*Adapter) GetProperties

func (l *Adapter) GetProperties(obj block.ObjectPointer) (block.Properties, error)

func (*Adapter) GetRange

func (l *Adapter) GetRange(obj block.ObjectPointer, start int64, end int64) (io.ReadCloser, error)

func (*Adapter) GetStorageNamespaceInfo added in v0.33.0

func (l *Adapter) GetStorageNamespaceInfo() block.StorageNamespaceInfo

func (*Adapter) Path added in v0.31.0

func (l *Adapter) Path() string

func (*Adapter) Put

func (l *Adapter) Put(obj block.ObjectPointer, _ int64, reader io.Reader, _ block.PutOpts) error

func (*Adapter) Remove

func (l *Adapter) Remove(obj block.ObjectPointer) error

func (*Adapter) UploadCopyPart added in v0.31.0

func (l *Adapter) UploadCopyPart(sourceObj, destinationObj block.ObjectPointer, uploadID string, partNumber int64) (string, error)

func (*Adapter) UploadCopyPartRange added in v0.31.0

func (l *Adapter) UploadCopyPartRange(sourceObj, destinationObj block.ObjectPointer, uploadID string, partNumber, startPosition, endPosition int64) (string, error)

func (*Adapter) UploadPart

func (l *Adapter) UploadPart(obj block.ObjectPointer, _ int64, reader io.Reader, uploadID string, partNumber int64) (string, error)

func (*Adapter) ValidateConfiguration

func (l *Adapter) ValidateConfiguration(_ string) error

func (*Adapter) Walk added in v0.22.1

func (l *Adapter) Walk(walkOpt block.WalkOpts, walkFn block.WalkFunc) error

func (*Adapter) WithContext

func (l *Adapter) WithContext(ctx context.Context) block.Adapter

Jump to

Keyboard shortcuts

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