Versions in this module Expand all Collapse all v0 v0.1.0 Jul 4, 2026 Changes in this version + var ErrAccessDenied = errors.New("s3storage: access denied") + var ErrBucketNotFound = errors.New("s3storage: bucket not found") + var ErrNotFound = errors.New("s3storage: object not found") + type Object struct + ContentType string + ETag string + Key string + LastModified time.Time + Metadata map[string]string + Size int64 + type Option func(*Store) + func WithBaseEndpoint(u string) Option + func WithKeyPrefix(prefix string) Option + func WithPathStyle() Option + func WithPublicBaseURL(u string) Option + func WithUploadPartSize(n int64) Option + type PresignedUpload struct + Header http.Header + URL string + type Store struct + func New(cfg aws.Config, bucket string, opts ...Option) *Store + func (s *Store) Delete(ctx context.Context, key string) error + func (s *Store) Download(ctx context.Context, key string) (io.ReadCloser, *Object, error) + func (s *Store) Exists(ctx context.Context, key string) (bool, error) + func (s *Store) List(ctx context.Context, prefix string) iter.Seq2[*Object, error] + func (s *Store) PresignGet(ctx context.Context, key string, ttl time.Duration) (string, error) + func (s *Store) PresignPut(ctx context.Context, key string, ttl time.Duration, opts ...UploadOption) (*PresignedUpload, error) + func (s *Store) PublicURL(key string) string + func (s *Store) Stat(ctx context.Context, key string) (*Object, error) + func (s *Store) Upload(ctx context.Context, key string, r io.Reader, opts ...UploadOption) (*Object, error) + type UploadOption func(*uploadConfig) + func WithCacheControl(v string) UploadOption + func WithContentDisposition(v string) UploadOption + func WithContentType(ct string) UploadOption + func WithMetadata(m map[string]string) UploadOption