awsclienthandler

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	S3Client      *s3.Client
	PresignClient *s3.PresignClient
)
View Source
var (
	KMSClient *kms.Client
)
View Source
var (
	SQSClient *sqs.Client
)

Functions

func ApplyTagToObject

func ApplyTagToObject(ctx context.Context, bucketName, objectKey, tagKey, tagValue string) error

ApplyTagToObject applies a single tag to an object in an S3 bucket

func GetBucketEncryptionKeyARN

func GetBucketEncryptionKeyARN(ctx context.Context, bucketName string) (string, error)

func GetKMSClient

func GetKMSClient() (*kms.Client, error)

func GetObject

func GetObject(ctx context.Context, bucketName, objectKey string) (*s3.GetObjectOutput, error)

func GetPresignClient

func GetPresignClient() (*s3.PresignClient, error)

GetPresignClient returns the initialized Amazon S3 presign client instance.

func GetPresignedURL

func GetPresignedURL(ctx context.Context, bucketName, objectKey string) (string, error)

func GetS3Client

func GetS3Client() (*s3.Client, error)

GetS3Client returns the initialized Amazon S3 client instance.

func GetSQSClient

func GetSQSClient() (*sqs.Client, error)

GetSQSClient returns the initialized Amazon SQS client instance.

func ListObjectsInPrefix

func ListObjectsInPrefix(ctx context.Context, bucketName, prefix string) ([]s3types.Object, error)

func NewKMSClientFromConfig

func NewKMSClientFromConfig(ctx context.Context, awsConfig *AWSConfig) (*kms.Client, error)

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 NewS3ClientFromConfig

func NewS3ClientFromConfig(ctx context.Context, awsConfig *AWSConfig) (*s3.Client, error)

NewS3ClientFromConfig creates and returns an Amazon S3 client using the provided context and AWS configuration.

func NewSQSClientFromConfig

func NewSQSClientFromConfig(ctx context.Context, awsConfig *AWSConfig) (*sqs.Client, error)

NewSQSClientFromConfig creates and returns an Amazon SQS client using the provided context and AWS configuration.

func ObjectExists

func ObjectExists(ctx context.Context, bucketName, objectKey string) (bool, error)

Types

type AWSConfig

type AWSConfig struct {
	Region          string `json:"region"`
	AccessKeyID     string `json:"accessKeyId"`
	SecretAccessKey string `json:"secretAccessKey"`
	SessionToken    string `json:"sessionToken"`
	Endpoint        string `json:"endpoint"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL