mem

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BlockstoreType = "mem"

Variables

View Source
var (
	ErrNoDataForKey            = fmt.Errorf("no data for key")
	ErrMultiPartNotFound       = fmt.Errorf("multipart ID not found")
	ErrNoPropertiesForKey      = fmt.Errorf("no properties for key")
	ErrInventoryNotImplemented = errors.New("inventory feature not implemented for memory storage adapter")
)

Functions

func WithTranslator

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

Types

type Adapter

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

func New

func New(opts ...func(a *Adapter)) *Adapter

func (*Adapter) AbortMultiPartUpload

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

func (*Adapter) CompleteMultiPartUpload

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

func (*Adapter) CreateMultiPartUpload

func (a *Adapter) CreateMultiPartUpload(obj block.ObjectPointer, r *http.Request, opts block.CreateMultiPartUploadOpts) (string, error)

func (*Adapter) GenerateInventory

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

func (*Adapter) Get

func (a *Adapter) Get(obj block.ObjectPointer, expectedSize int64) (io.ReadCloser, error)

func (*Adapter) GetProperties

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

func (*Adapter) GetRange

func (a *Adapter) GetRange(obj block.ObjectPointer, startPosition int64, endPosition int64) (io.ReadCloser, error)

func (*Adapter) Put

func (a *Adapter) Put(obj block.ObjectPointer, sizeBytes int64, reader io.Reader, opts block.PutOpts) error

func (*Adapter) Remove

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

func (*Adapter) UploadPart

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

func (*Adapter) ValidateConfiguration

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

func (*Adapter) WithContext

func (a *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