Documentation
¶
Overview ¶
Package s3 provides an S3-compatible implementation of storage.ObjectBackend.
The caller owns the S3 client, including endpoint selection, credentials, retries, transport, and lifecycle. Backend construction performs no network operation. The selected service must implement conditional PutObject writes: If-None-Match for immutable objects and If-Match for pointer promotion.
Index ¶
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 adapts a caller-owned AWS SDK v2 S3 client to ObjectBackend.
Backend does not close or otherwise manage Client. A Backend is safe to share when its Client is safe to share.
func New ¶
New creates an inert S3-compatible object backend.
The caller must configure client with its credentials, region, endpoint, transport, and retry policy before calling New. New performs no network work.
func (*Backend) Put ¶
func (b *Backend) Put( ctx context.Context, key string, data []byte, condition storage.ObjectPutCondition, ) (storage.ObjectValue, error)
Put conditionally writes one object and returns its opaque ETag as Version.
Exactly one condition is required. Backend never performs an unconditional last-writer-wins write.