Documentation ¶
Index ¶
- func ExtractAPIGatewayCustomAuthorizerEventARN(event events.APIGatewayCustomAuthorizerRequest) string
- func ExtractAPIGatewayCustomAuthorizerRequestTypeEventARN(event events.APIGatewayCustomAuthorizerRequestTypeRequest) string
- func ExtractAPIGatewayEventARN(event events.APIGatewayProxyRequest, region string) string
- func ExtractAPIGatewayV2EventARN(event events.APIGatewayV2HTTPRequest, region string) string
- func ExtractAPIGatewayWebSocketEventARN(event events.APIGatewayWebsocketProxyRequest, region string) string
- func ExtractAlbEventARN(event events.ALBTargetGroupRequest) string
- func ExtractCloudwatchEventARN(event events.CloudWatchEvent) string
- func ExtractCloudwatchLogsEventARN(event events.CloudwatchLogsEvent, region string, accountID string) (string, error)
- func ExtractDynamoDBStreamEventARN(event events.DynamoDBEvent) string
- func ExtractKinesisStreamEventARN(event events.KinesisEvent) string
- func ExtractS3EventArn(event events.S3Event) string
- func ExtractSNSEventArn(event events.SNSEvent) string
- func ExtractSQSEventARN(event events.SQSEvent) string
- func GetAWSPartitionByRegion(region string) string
- func GetStatusCodeFromHTTPResponse(rawPayload []byte) (string, error)
- func GetTagsFromALBTargetGroupRequest(event events.ALBTargetGroupRequest) map[string]string
- func GetTagsFromAPIGatewayCustomAuthorizerEvent(event events.APIGatewayCustomAuthorizerRequest) map[string]string
- func GetTagsFromAPIGatewayCustomAuthorizerRequestTypeEvent(event events.APIGatewayCustomAuthorizerRequestTypeRequest) map[string]string
- func GetTagsFromAPIGatewayEvent(event events.APIGatewayProxyRequest) map[string]string
- func GetTagsFromAPIGatewayV2HTTPRequest(event events.APIGatewayV2HTTPRequest) map[string]string
- func GetTagsFromLambdaFunctionURLRequest(event events.LambdaFunctionURLRequest) map[string]string
- func ParseArn(arn string) (string, string, string, error)
- func Unmarshal(payload []byte) (map[string]any, error)
- type AWSEventType
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 ¶
ExtractS3EventArn returns an ARN from a S3Event
func ExtractSNSEventArn ¶
ExtractSNSEventArn returns an ARN from a SNSEvent
func ExtractSQSEventARN ¶
ExtractSQSEventARN returns an ARN from a SQSEvent
func GetAWSPartitionByRegion ¶
GetAWSPartitionByRegion parses an AWS region and returns an AWS partition
func GetStatusCodeFromHTTPResponse ¶
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
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