Documentation ¶
Overview ¶
Package store defines the interface of an object store service
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAccessingObject = errors.New("accessing object") //nolint:revive ErrCreatingObject = errors.New("creating object") //nolint:revive ErrInitializingStore = errors.New("initializing store") //nolint:revive ErrInvalidURL = errors.New("invalid object URL") //nolint:revive ErrObjectNotFound = errors.New("object not found") //nolint:revive ErrNotSupported = errors.New("not supported") //nolint:revive )
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object struct { ID string Checksum string // an url for downloading the object's content URL string }
Object represents an object stored in the store TODO: add metadata (e.g creation data, size)
type ObjectStore ¶
type ObjectStore interface { // Get retrieves an objects if exists in the store or an error otherwise Get(ctx context.Context, id string) (Object, error) // Put stores the object and returns the metadata Put(ctx context.Context, id string, content io.Reader) (Object, error) }
ObjectStore defines an interface for storing and retrieving blobs
Directories ¶
Path | Synopsis |
---|---|
Package api defines the interface to a store server
|
Package api defines the interface to a store server |
Package client implements an object store service client
|
Package client implements an object store service client |
Package downloader implements utility functions for downloading objects from a store
|
Package downloader implements utility functions for downloading objects from a store |
Package file implements a file-backed object store
|
Package file implements a file-backed object store |
Package s3 implements a s3-backed object store
|
Package s3 implements a s3-backed object store |
Package server implements an object store server
|
Package server implements an object store server |
Click to show internal directories.
Click to hide internal directories.