Documentation
¶
Index ¶
- type ObjectStorage
- func (o *ObjectStorage) DeleteObject(bucket, objectKey string) error
- func (o *ObjectStorage) GetObjectFilePath(bucket, objectKey string) string
- func (o *ObjectStorage) MergeParts(bucket, objectKey, uploadID string, partStorage *PartStorage) error
- func (o *ObjectStorage) PutObject(bucket, objectKey string, source io.Reader) error
- type PartStorage
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
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
Click to show internal directories.
Click to hide internal directories.