Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRegion = errors.New("s3api.Config: no region env var name defined") ErrNoAccessKeyID = errors.New("s3api.Config: no access key id env var name defined") ErrNoSecretAccessKey = errors.New("s3api.Config: no secret access key env var name defined") ErrNoBucketName = errors.New("s3api.Config: no bucket name env var name defined") )
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
Client S3API
}
Factory builds an S3-backed store. Tests can inject a Mock via Client. Factory can optionally carry a preconstructed S3 client (e.g., a mock in tests).
type S3API ¶
type S3API interface {
PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)
GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)
DeleteObject(ctx context.Context, params *s3.DeleteObjectInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
HeadObject(ctx context.Context, params *s3.HeadObjectInput, optFns ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
}
S3API is the subset of the AWS S3 client used by this store. It enables mocking in tests.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (Store) IsPersistent ¶
Click to show internal directories.
Click to hide internal directories.