Documentation
¶
Overview ¶
Package storage persists challenge attachments and future blobs behind the ObjectStore interface. v0.1 implementation: S3Store (MinIO). The interface is S3-shaped on purpose so the concrete store can change without touching callers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectStore ¶
type ObjectStore interface {
// Put stores r under key. size is the exact byte length; contentType is the MIME type.
Put(ctx context.Context, key string, r io.Reader, size int64, contentType string) error
// Get opens the object at key for reading. The caller closes it.
Get(ctx context.Context, key string) (io.ReadCloser, error)
// Delete removes the object at key. Deleting a missing key is not an error.
Delete(ctx context.Context, key string) error
}
ObjectStore is the blob persistence interface. Only main.go and this package's tests may reference the concrete implementation.
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
S3Store implements ObjectStore against any S3-compatible endpoint (MinIO in v0.1).
func NewS3Store ¶
NewS3Store connects, ensures the bucket exists, and returns the store.
Click to show internal directories.
Click to hide internal directories.