datastore

package
v0.0.0-...-3925406 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectStorage

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

ObjectStorage stores s3 objects

func NewObjectStorage

func NewObjectStorage(s3DataFolder string) *ObjectStorage

NewObjectStorage returns new ObjectStorage

func (*ObjectStorage) DeleteObject

func (o *ObjectStorage) DeleteObject(bucket, objectKey string) error

DeleteObject deletes an object

func (*ObjectStorage) GetObjectFilePath

func (o *ObjectStorage) GetObjectFilePath(bucket, objectKey string) string

GetObjectFilePath returns absolute path to a object. Will return empty string if file not found or is not a file

func (*ObjectStorage) MergeParts

func (o *ObjectStorage) MergeParts(bucket, objectKey, uploadID string, partStorage *PartStorage) error

MergeParts merges upload parts to create a new object

func (*ObjectStorage) PutObject

func (o *ObjectStorage) PutObject(bucket, objectKey string, source io.Reader) error

PutObject stores an object

type PartStorage

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

PartStorage stores multipart upload parts

func NewPartStorage

func NewPartStorage(s3DataFolder string) *PartStorage

NewPartStorage returns new PartStorage

func (*PartStorage) MergeParts

func (ps *PartStorage) MergeParts(uploadID string, sink io.Writer) error

MergeParts merges all parts of an upload and write to a sink

func (*PartStorage) StorePart

func (ps *PartStorage) StorePart(uploadID string, partNumber int, source io.Reader) error

StorePart stores a part to the storage

Jump to

Keyboard shortcuts

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