Versions in this module Expand all Collapse all v0 v0.1.0 Jul 22, 2026 Changes in this version + var ErrNotFound = errors.New("objectstore: object not found") + var ErrPreconditionFailed = errors.New("objectstore: precondition failed") + func IfAbsent() *string + func IsConsistentRead(ctx context.Context) bool + func WithCacheControl(ctx context.Context, cacheControl string) context.Context + func WithConsistentRead(ctx context.Context) context.Context + type Bucket interface + Delete func(ctx context.Context, key string) error + Get func(ctx context.Context, key string) (body io.ReadCloser, etag string, err error) + GetRange func(ctx context.Context, key string, off, length int64) (body io.ReadCloser, err error) + List func(ctx context.Context, prefix, startAfter string) ([]ObjectInfo, error) + Put func(ctx context.Context, key string, body io.Reader, length int64, ifMatch *string) (etag string, err error) + PutStream func(ctx context.Context, key string, body io.Reader, ifMatch *string) (etag string, err error) + Stat func(ctx context.Context, key string) (ObjectInfo, error) + func NewHealing(b Bucket, opts HealOpts) Bucket + func Open(ctx context.Context, raw string) (Bucket, error) + func Prefixed(inner Bucket, prefix string) Bucket + type FS struct + func OpenFS(root string) (*FS, error) + func (f *FS) Delete(ctx context.Context, key string) error + func (f *FS) Get(ctx context.Context, key string) (io.ReadCloser, string, error) + func (f *FS) GetRange(ctx context.Context, key string, off, length int64) (io.ReadCloser, error) + func (f *FS) List(ctx context.Context, prefix, startAfter string) ([]ObjectInfo, error) + func (f *FS) Put(ctx context.Context, key string, body io.Reader, length int64, ifMatch *string) (string, error) + func (f *FS) PutStream(ctx context.Context, key string, body io.Reader, ifMatch *string) (string, error) + func (f *FS) Stat(ctx context.Context, key string) (ObjectInfo, error) + type FetchOpts struct + Concurrency int + PartSize int64 + Threshold int64 + type HealOpts struct + Attempts int + Backoff time.Duration + FloorBps int64 + Window time.Duration + type LabelStats struct + GetBytes uint64 + GetCount uint64 + ListCount uint64 + ListObjectBytes uint64 + ListObjects uint64 + PutBytes uint64 + PutCount uint64 + type Metered struct + func NewMetered(b Bucket, classify func(key string) string) *Metered + func (m *Metered) Delete(ctx context.Context, key string) error + func (m *Metered) Get(ctx context.Context, key string) (io.ReadCloser, string, error) + func (m *Metered) GetRange(ctx context.Context, key string, off, length int64) (io.ReadCloser, error) + func (m *Metered) List(ctx context.Context, prefix, startAfter string) ([]ObjectInfo, error) + func (m *Metered) Put(ctx context.Context, key string, body io.Reader, length int64, ifMatch *string) (string, error) + func (m *Metered) PutStream(ctx context.Context, key string, body io.Reader, ifMatch *string) (string, error) + func (m *Metered) Stat(ctx context.Context, key string) (ObjectInfo, error) + func (m *Metered) Stats() Stats + type ObjectInfo struct + ETag string + Key string + LastModified time.Time + Size int64 + func FetchRangedAt(ctx context.Context, b Bucket, key string, dst io.WriterAt, opts FetchOpts) (ObjectInfo, error) + func FetchReader(ctx context.Context, b Bucket, key string, opts FetchOpts) (io.ReadCloser, ObjectInfo, error) + type S3 struct + func OpenS3(ctx context.Context, cfg S3Config) (*S3, error) + func (a *S3) Delete(ctx context.Context, key string) error + func (a *S3) Get(ctx context.Context, key string) (io.ReadCloser, string, error) + func (a *S3) GetRange(ctx context.Context, key string, off, length int64) (io.ReadCloser, error) + func (a *S3) List(ctx context.Context, prefix, startAfter string) ([]ObjectInfo, error) + func (a *S3) Put(ctx context.Context, key string, body io.Reader, length int64, ifMatch *string) (string, error) + func (a *S3) PutStream(ctx context.Context, key string, body io.Reader, ifMatch *string) (string, error) + func (a *S3) Stat(ctx context.Context, key string) (ObjectInfo, error) + type S3Config struct + AccessKey string + Bucket string + Clients int + EndpointURL string + ForceIPv4 bool + HTTPClient *http.Client + MaxAttempts int + Prefix string + Region string + SecretKey string + SessionToken string + UsePathStyle bool + type Stats struct + ByLabel map[string]LabelStats + TotalGet LabelStats + TotalList LabelStats + TotalPut LabelStats