Documentation ¶
Index ¶
- Constants
- Variables
- type Bucket
- func (b *Bucket) AddMetadata(ctx context.Context, addMetadata Metadata) error
- func (b *Bucket) AddMetadataKey(ctx context.Context, key string, value string) error
- func (b *Bucket) Create(ctx context.Context, location string) error
- func (b *Bucket) Delete(ctx context.Context) error
- func (b *Bucket) Empty(ctx context.Context) error
- func (b *Bucket) Exists(ctx context.Context) bool
- func (b *Bucket) GetMetadata(ctx context.Context) (Metadata, error)
- type Client
- func (c *Client) DeleteObjects(ctx context.Context, bucketName string, objs []*Object) error
- func (c *Client) ListBuckets(ctx context.Context, pageOpts *PageOpts) ([]*Bucket, error)
- func (c *Client) ListObjects(ctx context.Context, bucketName string, opts *ListOpts) ([]*Object, error)
- func (c *Client) NewBucket(name string) *Bucket
- func (c *Client) NewObject(bucketName string, key string) *Object
- type ErrAccessDenied
- type ErrBucketNotFound
- type ErrCheckFunc
- type ErrObjectNotFound
- type ListOpts
- type Metadata
- type Object
- func (o *Object) Copy(ctx context.Context, newKey string) (*Object, error)
- func (o *Object) Create(ctx context.Context, metadata Metadata) error
- func (o *Object) Delete(ctx context.Context) error
- func (o *Object) Exists(ctx context.Context) bool
- func (o *Object) GetAttrs(ctx context.Context) (*ObjectAttrs, error)
- func (o *Object) Move(ctx context.Context, newKey string) error
- func (o *Object) Read(ctx context.Context, readRange *ReadRange) (io.Reader, error)
- func (o *Object) SetAttrs(ctx context.Context, attrs *ObjectAttrs) error
- func (o *Object) Write(ctx context.Context, data io.Reader, metadata Metadata) error
- type ObjectAttrs
- type PageOpts
- type ReadRange
Constants ¶
View Source
const ( CHANGE_TIME_NSEC_METADATA_KEY = "change-time-nsec" CHANGE_TIME_SEC_METADATA_KEY = "change-time-sec" )
Variables ¶
View Source
var ErrPageOutOfBounds = errors.New("Start is bigger then slice length")
View Source
var TimeNowFunc = time.Now
for testing override
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct { Name string // contains filtered or unexported fields }
func (*Bucket) AddMetadata ¶
func (*Bucket) AddMetadataKey ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteObjects ¶
func (*Client) ListBuckets ¶
func (*Client) ListObjects ¶
type ErrAccessDenied ¶
type ErrAccessDenied struct {
Message string
}
func (*ErrAccessDenied) Error ¶
func (e *ErrAccessDenied) Error() string
type ErrBucketNotFound ¶
type ErrBucketNotFound struct {
Bucket string
}
func (*ErrBucketNotFound) Error ¶
func (e *ErrBucketNotFound) Error() string
type ErrCheckFunc ¶
ErrCheckFunc provides functionality to check if error matches a certain condition If error matches, a custom error should be returned. If not, the provided error is returned
type ErrObjectNotFound ¶
func (*ErrObjectNotFound) Error ¶
func (e *ErrObjectNotFound) Error() string
type ObjectAttrs ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.