Documentation
¶
Overview ¶
Package s3 implements a s3-backed object store
Index ¶
Constants ¶
View Source
const DefaultURLExpiration = time.Hour * 24
DefaultURLExpiration Default expiration for the presigned download URLs. After this time attempts to download the object will fail TODO: check this default (AWS default is 900 seconds)
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(conf Config) (store.ObjectStore, error)
New creates an object store backed by a S3 bucket
func WithExpiration ¶
func WithExpiration(exp time.Duration) func(*s3.PresignOptions)
WithExpiration sets the expiration for the presigned URL
Types ¶
type Config ¶
type Config struct { // Name of the S3 bucket Bucket string // S3 Client Client *s3.Client // AWS endpoint (used for testing) Endpoint string // AWS Region Region string // Expiration for the presigned download URLs URLExpiration time.Duration }
Config S3 Store configuration
Click to show internal directories.
Click to hide internal directories.