Documentation
¶
Index ¶
- type Option
- type Store
- func (s *Store) ConcurrencyHint() int
- func (s *Store) Delete(ctx context.Context, key string) error
- func (s *Store) Exists(ctx context.Context, key string) (bool, error)
- func (s *Store) Flush(ctx context.Context) error
- func (s *Store) Get(ctx context.Context, key string) ([]byte, error)
- func (s *Store) GetRange(ctx context.Context, key string, offset, length int64) ([]byte, error)
- func (s *Store) List(ctx context.Context, prefix string) ([]string, error)
- func (s *Store) Put(ctx context.Context, key string, data []byte) error
- func (s *Store) Size(ctx context.Context, key string) (int64, error)
- func (s *Store) TotalSize(ctx context.Context) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*s3Options)
Option configures an S3 store.
func WithCredentials ¶
WithCredentials sets static AWS credentials. When omitted the SDK default credential chain is used (env vars, shared config, IAM role, etc.).
func WithEndpoint ¶
WithEndpoint sets a custom S3-compatible endpoint URL (e.g. MinIO, Cloudflare R2). Path-style addressing is automatically enabled when an endpoint is set.
func WithPrefix ¶
WithPrefix sets a key prefix prepended to every object key. Use this to isolate multiple repositories within a single bucket.
func WithProfile ¶
WithProfile sets the AWS shared config profile name used by the SDK default credential chain (e.g. profile from ~/.aws/config).
func WithRegion ¶
WithRegion sets the AWS region for the bucket (e.g. "us-east-1").
func WithS3Client ¶
WithS3Client provides a pre-configured S3 client, skipping internal client creation. When set, credential, region, and endpoint options are ignored.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements store.ObjectStore for Amazon S3 and compatible services.
func (*Store) ConcurrencyHint ¶
ConcurrencyHint implements ConcurrencyHinter. S3 benefits from highly parallel uploads since each PUT is a separate HTTP round-trip.