bcdaaws

package
v0.0.0-...-95c6775 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: CC0-1.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParameter

func GetParameter(ctx context.Context, client CustomSSMClient, keyname string) (string, error)

Returns the value of a single parameter from the SSM Parameter Store

func GetParameters

func GetParameters(ctx context.Context, client CustomSSMClient, keynames []string) (map[string]string, error)

Returns a list of parameters from the SSM Parameter Store

func ParseS3Directory

func ParseS3Directory(bucket, key string) string

func ParseSQSEvent

func ParseSQSEvent(event events.SQSEvent) (*events.S3Event, error)

TODO: Iterate over records

func PutMetricSample

func PutMetricSample(
	ctx context.Context,
	client CustomCloudwatchClient,
	namespace string,
	name string,
	unit types.StandardUnit,
	value float64,
	dimensions []types.Dimension,
) error

Types

type CustomCloudwatchClient

type CustomCloudwatchClient interface {
	PutMetricData(ctx context.Context, input *cloudwatch.PutMetricDataInput, optFns ...func(*cloudwatch.Options)) (*cloudwatch.PutMetricDataOutput, error)
}

type CustomS3Client

type CustomS3Client interface {
	CreateBucket(ctx context.Context, input *s3.CreateBucketInput, optFns ...func(*s3.Options)) (*s3.CreateBucketOutput, error)
	HeadObject(ctx context.Context, input *s3.HeadObjectInput, optFns ...func(*s3.Options)) (*s3.HeadObjectOutput, error)
	GetObject(ctx context.Context, input *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)
	ListObjects(ctx context.Context, input *s3.ListObjectsInput, optFns ...func(*s3.Options)) (*s3.ListObjectsOutput, error)
	ListObjectsV2(ctx context.Context, input *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
	PutObject(ctx context.Context, input *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)
	DeleteObject(ctx context.Context, input *s3.DeleteObjectInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)
}

type CustomSSMClient

type CustomSSMClient interface {
	GetParameter(ctx context.Context, input *ssm.GetParameterInput, optFns ...func(*ssm.Options)) (*ssm.GetParameterOutput, error)
	GetParameters(ctx context.Context, input *ssm.GetParametersInput, optFns ...func(*ssm.Options)) (*ssm.GetParametersOutput, error)
}

type MockCloudwatchClient

type MockCloudwatchClient struct{}

func (*MockCloudwatchClient) PutMetricData

type MockS3Client

type MockS3Client struct{}

func (*MockS3Client) CreateBucket

func (m *MockS3Client) CreateBucket(ctx context.Context, input *s3.CreateBucketInput, optFns ...func(*s3.Options)) (*s3.CreateBucketOutput, error)

func (*MockS3Client) DeleteObject

func (m *MockS3Client) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)

func (*MockS3Client) GetObject

func (m *MockS3Client) GetObject(ctx context.Context, input *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)

func (*MockS3Client) HeadObject

func (m *MockS3Client) HeadObject(ctx context.Context, input *s3.HeadObjectInput, optFns ...func(*s3.Options)) (*s3.HeadObjectOutput, error)

func (*MockS3Client) ListObjects

func (m *MockS3Client) ListObjects(ctx context.Context, input *s3.ListObjectsInput, optFns ...func(*s3.Options)) (*s3.ListObjectsOutput, error)

func (*MockS3Client) ListObjectsV2

func (m *MockS3Client) ListObjectsV2(ctx context.Context, input *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)

func (*MockS3Client) PutObject

func (m *MockS3Client) PutObject(ctx context.Context, input *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)

type MockSSMClient

type MockSSMClient struct{}

func (*MockSSMClient) GetParameter

func (m *MockSSMClient) GetParameter(ctx context.Context, input *ssm.GetParameterInput, optFns ...func(*ssm.Options)) (*ssm.GetParameterOutput, error)

func (*MockSSMClient) GetParameters

func (m *MockSSMClient) GetParameters(ctx context.Context, input *ssm.GetParametersInput, optFns ...func(*ssm.Options)) (*ssm.GetParametersOutput, error)

Jump to

Keyboard shortcuts

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