Documentation
¶
Overview ¶
Package blobs is the port for storing content by key outside the database: artifact contents, previews, archives. Implement Blobs over S3, a disk or memory; the engine depends on the interface only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("blob not found")
ErrNotFound means the key is unknown to the blob store.
var ErrTooLarge = errors.New("blob exceeds the storage limit")
ErrTooLarge means the content exceeds the backend's per-blob cap.
Functions ¶
Types ¶
type Blobs ¶
type Blobs interface {
Put(ctx context.Context, key string, data []byte) error
Get(ctx context.Context, key string) ([]byte, error)
Has(ctx context.Context, key string) (bool, error)
// Delete removes a blob (no error when it does not exist).
Delete(ctx context.Context, key string) error
// MaxBytes is the per-blob cap (0 = no cap).
MaxBytes() int64
}
Blobs is the content store; keys are content sha256 (hex) or derived keys such as "preview/<owner tag>/<sha256>.pdf".