Documentation
¶
Index ¶
- Variables
- func ApplyTagToObject(ctx context.Context, bucketName, objectKey, tagKey, tagValue string) error
- func DrainSQSQueue(ctx context.Context, sqsClient *sqs.Client, queueURL, bucket, prefix string) (bool, error)
- func GetBucketEncryptionKeyARN(ctx context.Context, bucketName string) (string, error)
- func GetDestinationS3Client() (*s3.Client, error)
- func GetFileStoreS3Client() (*s3.Client, error)
- func GetKMSClient() (*kms.Client, error)
- func GetObject(ctx context.Context, s3Client *s3.Client, bucketName, objectKey string) (*s3.GetObjectOutput, error)
- func GetPresignClient() (*s3.PresignClient, error)
- func GetPresignedURL(ctx context.Context, s3Client *s3.Client, bucketName, objectKey string) (string, error)
- func GetSQSClient() (*sqs.Client, error)
- func GetSourceS3Client() (*s3.Client, error)
- func ListObjectsInPrefix(ctx context.Context, s3Client *s3.Client, bucketName, prefix string) ([]s3types.Object, error)
- func NewDestinationS3ClientFromConfig(ctx context.Context, awsConfig *AWSConfig) error
- func NewFileStoreS3ClientFromConfig(ctx context.Context, awsConfig *AWSConfig) error
- func NewKMSClientFromConfig(ctx context.Context, awsConfig *AWSConfig) (*kms.Client, error)
- func NewPresignClient(ctx context.Context) (*s3.PresignClient, error)
- func NewS3Client(ctx context.Context, awsConfig *AWSConfig) (*s3.Client, error)
- func NewSQSClientFromConfig(ctx context.Context, awsConfig *AWSConfig) (*sqs.Client, error)
- func NewSourceS3ClientFromConfig(ctx context.Context, awsConfig *AWSConfig) error
- func ObjectExists(ctx context.Context, s3Client *s3.Client, bucketName, objectKey string) (bool, error)
- type AWSConfig
Constants ¶
This section is empty.
Variables ¶
var ( SourceS3Client *s3.Client DestinationS3Client *s3.Client FileStoreS3Client *s3.Client PresignClient *s3.PresignClient )
var (
KMSClient *kms.Client
)
var (
SQSClient *sqs.Client
)
Functions ¶
func ApplyTagToObject ¶
ApplyTagToObject applies a single tag to an object in an S3 bucket
func DrainSQSQueue ¶ added in v0.8.0
func DrainSQSQueue(ctx context.Context, sqsClient *sqs.Client, queueURL, bucket, prefix string) (bool, error)
DrainSQSQueue long-polls SQS (up to 20s per receive) and deletes only messages whose S3 event matches the given bucket and prefix. Unrelated messages are left in the queue for other consumers. Returns true if any matching messages were found.
func GetDestinationS3Client ¶ added in v0.2.0
GetDestinationS3Client returns the initialized Amazon S3 client instance.
func GetFileStoreS3Client ¶ added in v0.2.0
func GetKMSClient ¶
func GetPresignClient ¶
func GetPresignClient() (*s3.PresignClient, error)
GetPresignClient returns the initialized Amazon S3 presign client instance.
func GetPresignedURL ¶
func GetSQSClient ¶
GetSQSClient returns the initialized Amazon SQS client instance.
func GetSourceS3Client ¶ added in v0.2.0
GetSourceS3Client returns the initialized Amazon S3 client instance.
func ListObjectsInPrefix ¶
func NewDestinationS3ClientFromConfig ¶ added in v0.2.0
NewDestinationS3ClientFromConfig creates Amazon S3 client destination S3
func NewFileStoreS3ClientFromConfig ¶ added in v0.2.0
func NewKMSClientFromConfig ¶
func NewPresignClient ¶
func NewPresignClient(ctx context.Context) (*s3.PresignClient, error)
NewPresignClient creates and returns an Amazon S3 presign client using the provided context and AWS configuration.
func NewS3Client ¶ added in v0.8.0
NewS3Client creates an S3 client from AWS credentials.
func NewSQSClientFromConfig ¶
NewSQSClientFromConfig creates and returns an Amazon SQS client using the provided context and AWS configuration.
func NewSourceS3ClientFromConfig ¶ added in v0.2.0
NewSourceS3ClientFromConfig creates Amazon S3 client for source S3