Documentation
¶
Overview ¶
Package s3set provides a set.BinaryStore implementation that persists to an S3 bucket.
IAM Permissions ¶
The following IAM actions are required on the S3 bucket:
- s3:GetObject
- s3:PutObject
- s3:ListBucket
Removed members are marked with placeholder objects that are removed automatically by an S3 lifecycle rule. The store ensures this rule is present, which requires the following additional actions:
- s3:GetLifecycleConfiguration
- s3:PutLifecycleConfiguration
If the bucket does not already exist, the store attempts to create it automatically, which requires the following additional action:
- s3:CreateBucket
The store's Provision method can be called to trigger provisioning ahead of time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBinaryStore ¶
NewBinaryStore returns a new set.BinaryStore that uses the given S3 client to store set members in the given bucket.
Types ¶
type Option ¶
type Option func(*store)
Option is a functional option that changes the behavior of NewBinaryStore.
func WithRequestHook ¶
WithRequestHook is an Option that configures fn as a pre-request hook.
Before each S3 API request, fn is passed a pointer to the input struct, e.g. s3.HeadObjectInput, which it may modify in-place. It may be called with any S3 request type. The types of requests used may change in any version without notice.
Any functions returned by fn will be applied to the request's options before the request is sent.