Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotExist = errors.New("object does not exist")
)
Functions ¶
This section is empty.
Types ¶
type ErrRangeNotSatisfiable ¶ added in v0.0.18
type ErrRangeNotSatisfiable struct {
Range Range
}
ErrRangeNotSatisfiable is returned when the byte range option falls outside of the total size of the object.
func (ErrRangeNotSatisfiable) Error ¶ added in v0.0.18
func (e ErrRangeNotSatisfiable) Error() string
type GetConfig ¶
func NewGetConfig ¶
func NewGetConfig() GetConfig
type Object ¶
type Object interface {
// Size returns the total size of the object in bytes.
Size() int64
Body() io.ReadCloser
}
type Store ¶
type Store interface {
// Put stores an object with the given key and size from the provided reader.
// The size parameter should match the actual bytes to be read from data.
Put(ctx context.Context, key string, size uint64, data io.Reader) error
// Get retrieves the object identified by the given key.
// Returns an Object for reading the data, or an error if retrieval fails.
// Use GetOption functions like WithRange to retrieve partial objects.
Get(ctx context.Context, key string, opts ...GetOption) (Object, error)
// Delete an object from the store by the given key.
Delete(ctx context.Context, key string) error
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package flatfs is a Datastore implementation that stores all objects in a two-level directory structure in the local file system, regardless of the hierarchy of the keys.
|
Package flatfs is a Datastore implementation that stores all objects in a two-level directory structure in the local file system, regardless of the hierarchy of the keys. |
Click to show internal directories.
Click to hide internal directories.