trigger

package
v0.0.0-...-8cb7df0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAPIGatewayCustomAuthorizerEventARN

func ExtractAPIGatewayCustomAuthorizerEventARN(event events.APIGatewayCustomAuthorizerRequest) string

ExtractAPIGatewayCustomAuthorizerEventARN returns an ARN from an APIGatewayCustomAuthorizerRequest

func ExtractAPIGatewayCustomAuthorizerRequestTypeEventARN

func ExtractAPIGatewayCustomAuthorizerRequestTypeEventARN(event events.APIGatewayCustomAuthorizerRequestTypeRequest) string

ExtractAPIGatewayCustomAuthorizerRequestTypeEventARN returns an ARN from an APIGatewayCustomAuthorizerRequestTypeRequest

func ExtractAPIGatewayEventARN

func ExtractAPIGatewayEventARN(event events.APIGatewayProxyRequest, region string) string

ExtractAPIGatewayEventARN returns an ARN from an APIGatewayProxyRequest

func ExtractAPIGatewayV2EventARN

func ExtractAPIGatewayV2EventARN(event events.APIGatewayV2HTTPRequest, region string) string

ExtractAPIGatewayV2EventARN returns an ARN from an APIGatewayV2HTTPRequest

func ExtractAPIGatewayWebSocketEventARN

func ExtractAPIGatewayWebSocketEventARN(event events.APIGatewayWebsocketProxyRequest, region string) string

ExtractAPIGatewayWebSocketEventARN returns an ARN from an APIGatewayWebsocketProxyRequest

func ExtractAlbEventARN

func ExtractAlbEventARN(event events.ALBTargetGroupRequest) string

ExtractAlbEventARN returns an ARN from an ALBTargetGroupRequest

func ExtractCloudwatchEventARN

func ExtractCloudwatchEventARN(event events.CloudWatchEvent) string

ExtractCloudwatchEventARN returns an ARN from a CloudWatchEvent

func ExtractCloudwatchLogsEventARN

func ExtractCloudwatchLogsEventARN(event events.CloudwatchLogsEvent, region string, accountID string) (string, error)

ExtractCloudwatchLogsEventARN returns an ARN from a CloudwatchLogsEvent

func ExtractDynamoDBStreamEventARN

func ExtractDynamoDBStreamEventARN(event events.DynamoDBEvent) string

ExtractDynamoDBStreamEventARN returns an ARN from a DynamoDBEvent

func ExtractKinesisStreamEventARN

func ExtractKinesisStreamEventARN(event events.KinesisEvent) string

ExtractKinesisStreamEventARN returns an ARN from a KinesisEvent

func ExtractS3EventArn

func ExtractS3EventArn(event events.S3Event) string

ExtractS3EventArn returns an ARN from a S3Event

func ExtractSNSEventArn

func ExtractSNSEventArn(event events.SNSEvent) string

ExtractSNSEventArn returns an ARN from a SNSEvent

func ExtractSQSEventARN

func ExtractSQSEventARN(event events.SQSEvent) string

ExtractSQSEventARN returns an ARN from a SQSEvent

func GetAWSPartitionByRegion

func GetAWSPartitionByRegion(region string) string

GetAWSPartitionByRegion parses an AWS region and returns an AWS partition

func GetStatusCodeFromHTTPResponse

func GetStatusCodeFromHTTPResponse(rawPayload []byte) (string, error)

GetStatusCodeFromHTTPResponse parses a generic payload and returns a status code, if it contains one. Returns an empty string if it does not, or an error in case of json parsing error.

func GetTagsFromALBTargetGroupRequest

func GetTagsFromALBTargetGroupRequest(event events.ALBTargetGroupRequest) map[string]string

GetTagsFromALBTargetGroupRequest returns a tagset containing http tags from an ALBTargetGroupRequest

func GetTagsFromAPIGatewayCustomAuthorizerEvent

func GetTagsFromAPIGatewayCustomAuthorizerEvent(event events.APIGatewayCustomAuthorizerRequest) map[string]string

GetTagsFromAPIGatewayCustomAuthorizerEvent returns a tagset containing http tags from an APIGatewayCustomAuthorizerRequest

func GetTagsFromAPIGatewayCustomAuthorizerRequestTypeEvent

func GetTagsFromAPIGatewayCustomAuthorizerRequestTypeEvent(event events.APIGatewayCustomAuthorizerRequestTypeRequest) map[string]string

GetTagsFromAPIGatewayCustomAuthorizerRequestTypeEvent returns a tagset containing http tags from an APIGatewayCustomAuthorizerRequestTypeRequest

func GetTagsFromAPIGatewayEvent

func GetTagsFromAPIGatewayEvent(event events.APIGatewayProxyRequest) map[string]string

GetTagsFromAPIGatewayEvent returns a tagset containing http tags from an APIGatewayProxyRequest

func GetTagsFromAPIGatewayV2HTTPRequest

func GetTagsFromAPIGatewayV2HTTPRequest(event events.APIGatewayV2HTTPRequest) map[string]string

GetTagsFromAPIGatewayV2HTTPRequest returns a tagset containing http tags from an APIGatewayProxyRequest

func GetTagsFromLambdaFunctionURLRequest

func GetTagsFromLambdaFunctionURLRequest(event events.LambdaFunctionURLRequest) map[string]string

GetTagsFromLambdaFunctionURLRequest returns a tagset containing http tags from a LambdaFunctionURLRequest

func ParseArn

func ParseArn(arn string) (string, string, string, error)

ParseArn parses an AWS ARN and returns the region and account

func Unmarshal

func Unmarshal(payload []byte) (map[string]any, error)

Unmarshal unmarshals a payload string into a generic interface

Types

type AWSEventType

type AWSEventType int

AWSEventType corresponds to the various event triggers we get from AWS

const (
	// Unknown describes an unknown event type
	Unknown AWSEventType = iota

	// APIGatewayEvent describes an event from classic AWS API Gateways
	APIGatewayEvent

	// APIGatewayV2Event describes an event from AWS API Gateways
	APIGatewayV2Event

	// APIGatewayWebsocketEvent describes an event from websocket AWS API Gateways
	APIGatewayWebsocketEvent

	// APIGatewayLambdaAuthorizerTokenEvent describes an event from a token-based API Gateway lambda authorizer
	APIGatewayLambdaAuthorizerTokenEvent

	// APIGatewayLambdaAuthorizerRequestParametersEvent describes an event from a request-parameters-based API Gateway lambda authorizer
	APIGatewayLambdaAuthorizerRequestParametersEvent

	// ALBEvent describes an event from application load balancers
	ALBEvent

	// CloudWatchEvent describes an event from Cloudwatch
	CloudWatchEvent

	// CloudWatchLogsEvent describes an event from Cloudwatch logs
	CloudWatchLogsEvent

	// CloudFrontRequestEvent describes an event from Cloudfront
	CloudFrontRequestEvent

	// DynamoDBStreamEvent describes an event from DynamoDB
	DynamoDBStreamEvent

	// KinesisStreamEvent describes an event from Kinesis
	KinesisStreamEvent

	// S3Event describes an event from S3
	S3Event

	// SNSEvent describes an event from SNS
	SNSEvent

	// SQSEvent describes an event from SQS
	SQSEvent

	// SNSSQSEvent describes an event from an SQS-wrapped SNS topic
	SNSSQSEvent

	// AppSyncResolverEvent describes an event from Appsync
	AppSyncResolverEvent

	// EventBridgeEvent describes an event from EventBridge
	EventBridgeEvent

	// LambdaFunctionURLEvent describes an event from an HTTP lambda function URL invocation
	LambdaFunctionURLEvent

	// StepFunctionEvent describes an event with a Step Function execution context
	StepFunctionEvent

	// LegacyStepFunctionEvent describes an event with a Legacy Lambda Step Function execution context
	LegacyStepFunctionEvent
)

func GetEventType

func GetEventType(payload map[string]any) AWSEventType

GetEventType takes in a payload string and returns an AWSEventType that matches the input payload. Returns `Unknown` if a payload could not be matched to an event.

func (AWSEventType) String

func (et AWSEventType) String() string

Directories

Path Synopsis
Package events provides a series of drop in replacements for "github.com/aws/aws-lambda-go/events".
Package events provides a series of drop in replacements for "github.com/aws/aws-lambda-go/events".

Jump to

Keyboard shortcuts

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