cmd

package
v0.0.0-...-25a6cea Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const FlagStackName = "stack-name"
View Source
const FunctionArnKey = "EListManFunctionArn"

Variables

Functions

func Execute

func Execute() error

func GetLambdaArn

func GetLambdaArn(
	ctx context.Context, cfc CloudFormationClient, stackName string,
) (arn string, err error)

func NewDynamoDb

func NewDynamoDb(tableName string) *db.DynamoDb

Types

type CloudFormationClient

type CloudFormationClient interface {
	DescribeStacks(
		context.Context,
		*cloudformation.DescribeStacksInput,
		...func(*cloudformation.Options),
	) (*cloudformation.DescribeStacksOutput, error)
}

func NewCloudFormationClient

func NewCloudFormationClient() CloudFormationClient

type CloudFormationClientFactoryFunc

type CloudFormationClientFactoryFunc func() CloudFormationClient

type DynamoDbFactoryFunc

type DynamoDbFactoryFunc func(tableName string) *db.DynamoDb

type EListManFactoryFunc

type EListManFactoryFunc func(stackName string) (EListManFunc, error)

func (EListManFactoryFunc) Invoke

func (newFunc EListManFactoryFunc) Invoke(
	ctx context.Context,
	stackName string,
	request, response any,
) (err error)

type EListManFunc

type EListManFunc interface {
	Invoke(ctx context.Context, request, response any) error
}

func NewEListManLambda

func NewEListManLambda(stackName string) (EListManFunc, error)

type Lambda

type Lambda struct {
	Client LambdaClient
	Arn    string
}

func NewLambda

func NewLambda(
	ctx context.Context,
	cfc CloudFormationClient,
	lc LambdaClient,
	stackName string,
) (l *Lambda, err error)

func (*Lambda) Invoke

func (l *Lambda) Invoke(
	ctx context.Context, request, response any,
) (err error)

type LambdaClient

type LambdaClient interface {
	Invoke(
		context.Context,
		*lambda.InvokeInput,
		...func(*lambda.Options),
	) (*lambda.InvokeOutput, error)
}

func NewLambdaClient

func NewLambdaClient() LambdaClient

type LambdaClientFactoryFunc

type LambdaClientFactoryFunc func() LambdaClient

Jump to

Keyboard shortcuts

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