Documentation ¶
Index ¶
- Variables
- type AbortMultipartUploadOpts
- type CompleteMultipartUploadOpts
- type CompletedPart
- type CreateMultipartUploadOpts
- type CreateMultipartUploadResult
- type DeleteOpts
- type DownloadOpts
- type DownloadResult
- type GeneratePresignedUploadURLOpts
- type GeneratePresignedUploadURLResult
- type ListOpts
- type ListResult
- type Metadata
- type MoveOpts
- type Object
- type ObjectSliceDiff
- type StatOpts
- type StatResult
- type Storage
- type UploadOpts
- type UploadPartOpts
- type UploadPartResult
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotSupportByBackend = errors.New("operation not supported by backend")
)
Functions ¶
This section is empty.
Types ¶
type CompleteMultipartUploadOpts ¶
type CompleteMultipartUploadOpts struct { Path string UploadID string CompletedParts []CompletedPart }
type CompletedPart ¶
type CompletedPart struct { ETag string `xml:"ETag" json:"ETag"` Size int64 `xml:"Size" json:"Size"` PartNumber int32 `xml:"PartNumber" json:"PartNumber"` }
CompletedPart represents a part that has been uploaded
type CreateMultipartUploadOpts ¶
type CreateMultipartUploadOpts struct {
Path string
}
type CreateMultipartUploadResult ¶
type CreateMultipartUploadResult struct {
UploadID string
}
type DeleteOpts ¶
type DeleteOpts struct {
Path string
}
type DownloadOpts ¶
type DownloadResult ¶
type DownloadResult struct {
BytesWritten int64
}
type GeneratePresignedUploadURLResult ¶
type GeneratePresignedUploadURLResult struct {
URL string
}
type ListResult ¶
type ListResult struct {
Objects []Object
}
type Metadata ¶
Metadata represents the meta information of the object includes object name , object version , etc...
type Object ¶
Object is a generic representation of a storage object
func (Object) HasExtension ¶
HasExtension determines whether or not an object contains a file extension
type ObjectSliceDiff ¶
ObjectSliceDiff provides information on what has changed since last calling ListObjects
type StatResult ¶
type StatResult struct {
Object Object
}
type Storage ¶
type Storage interface { List(ctx context.Context, opts *ListOpts) (*ListResult, error) Download(ctx context.Context, opts *DownloadOpts) (*DownloadResult, error) Upload(ctx context.Context, opts *UploadOpts) error Stat(ctx context.Context, opts *StatOpts) (*StatResult, error) Delete(ctx context.Context, opts *DeleteOpts) error Move(ctx context.Context, opts *MoveOpts) error CreateMultipartUpload(ctx context.Context, opts *CreateMultipartUploadOpts) (*CreateMultipartUploadResult, error) UploadPart(ctx context.Context, opts *UploadPartOpts) (*UploadPartResult, error) CompleteMultipartUpload(ctx context.Context, opts *CompleteMultipartUploadOpts) error AbortMultipartUpload(ctx context.Context, opts *AbortMultipartUploadOpts) error GeneratePresignedUploadURL(ctx context.Context, opts *GeneratePresignedUploadURLOpts) (*GeneratePresignedUploadURLResult, error) }
Storage is a generic interface for storage backends
type UploadOpts ¶
type UploadPartOpts ¶
type UploadPartResult ¶
type UploadPartResult struct {
CompletedPart CompletedPart
}
Click to show internal directories.
Click to hide internal directories.