Documentation
¶
Overview ¶
Package driver defines the interface for storage service implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket interface {
CreateBucket(ctx context.Context, name string) error
DeleteBucket(ctx context.Context, name string) error
ListBuckets(ctx context.Context) ([]BucketInfo, error)
PutObject(ctx context.Context, bucket, key string, data []byte, contentType string, metadata map[string]string) error
GetObject(ctx context.Context, bucket, key string) (*Object, error)
DeleteObject(ctx context.Context, bucket, key string) error
HeadObject(ctx context.Context, bucket, key string) (*ObjectInfo, error)
ListObjects(ctx context.Context, bucket string, opts ListOptions) (*ListResult, error)
CopyObject(ctx context.Context, dstBucket, dstKey string, src CopySource) error
}
Bucket is the interface that storage provider implementations must satisfy.
type BucketInfo ¶
BucketInfo describes a storage bucket.
type CopySource ¶
CopySource identifies the source for a copy operation.
type ListOptions ¶
ListOptions configures a list operation.
type ListResult ¶
type ListResult struct {
Objects []ObjectInfo
CommonPrefixes []string
NextPageToken string
IsTruncated bool
}
ListResult is the result of a list operation.
Click to show internal directories.
Click to hide internal directories.