Documentation
¶
Overview ¶
Package blobstore provides an interface for object storage operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("blobstore: object not found")
ErrNotFound is returned by Store.Get when the requested object does not exist.
Functions ¶
Types ¶
type Store ¶
type Store interface {
// Put uploads data to the store at the given key.
// Returns the etag of the uploaded object.
Put(ctx context.Context, key, contentType string, data []byte) (etag string, err error)
// Get retrieves an object from the store.
// Caller is responsible for closing the returned ReadCloser.
Get(ctx context.Context, key string) (rc io.ReadCloser, size int64, err error)
// Delete removes an object from the store.
Delete(ctx context.Context, key string) error
}
Store defines the interface for blob storage operations.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mock provides an in-memory implementation of blobstore.Store for testing.
|
Package mock provides an in-memory implementation of blobstore.Store for testing. |
|
Package s3 provides an S3-compatible implementation of blobstore.Store.
|
Package s3 provides an S3-compatible implementation of blobstore.Store. |
Click to show internal directories.
Click to hide internal directories.