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 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)
}
Click to show internal directories.
Click to hide internal directories.