Documentation
¶
Overview ¶
Package memory is an in-memory storage.Backend used as a test double. It is not a deployment target: Presign* return stub URLs since there is no real endpoint to sign against.
Index ¶
- type Backend
- func (b *Backend) Delete(ctx context.Context, key string) error
- func (b *Backend) Get(ctx context.Context, key string) (io.ReadCloser, error)
- func (b *Backend) GetRange(ctx context.Context, key string, offset, length int64) (io.ReadCloser, error)
- func (b *Backend) List(ctx context.Context, fn func(storage.StoredObject) error) error
- func (b *Backend) PresignGet(ctx context.Context, key string, ttl time.Duration) (string, error)
- func (b *Backend) PresignPut(ctx context.Context, key string, ttl time.Duration) (string, error)
- func (b *Backend) Put(ctx context.Context, key string, r io.Reader, size int64, contentType string) error
- func (b *Backend) PutAged(key string, data []byte, modTime time.Time)
- func (b *Backend) Stat(ctx context.Context, key string) (storage.ObjectInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is a concurrency-safe in-memory object store.
func (*Backend) PresignGet ¶
func (*Backend) PresignPut ¶
func (*Backend) Put ¶
func (b *Backend) Put(ctx context.Context, key string, r io.Reader, size int64, contentType string) error
Put buffers the whole reader — acceptable because this is a test double, not a production path.
Click to show internal directories.
Click to hide internal directories.