Documentation ¶
Index ¶
- Variables
- type Driver
- func (d *Driver) Close() error
- func (d *Driver) Delete(ctx context.Context, key string) error
- func (d *Driver) Get(ctx context.Context, key string) ([]byte, error)
- func (d *Driver) GetStream(ctx context.Context, key string) (io.ReadCloser, error)
- func (d *Driver) Has(ctx context.Context, key string) (bool, error)
- func (d *Driver) Put(ctx context.Context, key string, value []byte) (int, error)
- func (d *Driver) PutStream(ctx context.Context, key string, r io.Reader) (int64, error)
- func (d *Driver) URL(ctx context.Context, key string) *PresignedURL
- func (d *Driver) WalkKeys(ctx context.Context, walk func(context.Context, string) error) error
- type PresignedURL
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Ptrs to underlying storage library errors. ErrAlreadyExists = storage.ErrAlreadyExists ErrNotFound = storage.ErrNotFound )
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct { // Underlying storage Storage storage.Storage // S3-only parameters Proxy bool Bucket string PresignedCache *ttl.Cache[string, PresignedURL] }
Driver wraps a kv.KVStore to also provide S3 presigned GET URLs.
func AutoConfig ¶
func NewFileStorage ¶ added in v0.6.0
func NewS3Storage ¶ added in v0.6.0
func (*Driver) Delete ¶
Remove attempts to remove the supplied key (and corresponding value) from storage.
func (*Driver) GetStream ¶
GetStream returns an io.ReadCloser for the value bytes at key in the storage.
Click to show internal directories.
Click to hide internal directories.