envelopes

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package envelopes validates Lambda envelopes and extracts typed payloads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIGateway

func APIGateway[T any](payload parser.Schema[T]) parser.Schema[T]

APIGateway validates a REST event with the application's body schema.

func APIGatewayV2

func APIGatewayV2[T any](payload parser.Schema[T]) parser.Schema[T]

APIGatewayV2 validates an HTTP API v2 event with the application's body schema.

func CloudWatch

func CloudWatch[T any](payload parser.Schema[T]) parser.Schema[[]T]

CloudWatch decompresses the log envelope and validates each message string.

func DynamoDBStream

func DynamoDBStream[T any](payload parser.Schema[T]) parser.Schema[[]Images[T]]

DynamoDBStream preserves one old/new image pair per input record.

func EventBridge

func EventBridge[T any](payload parser.Schema[T]) parser.Schema[T]

EventBridge validates metadata together with the selected detail schema.

func Kafka

func Kafka[T any](payload parser.Schema[T]) parser.Schema[[]T]

Kafka flattens topic-partition records after Base64-to-text decoding. RawMessage input preserves JSON topic order; Go maps use encoding/json's key order.

func Kinesis

func Kinesis[T any](payload parser.Schema[T]) parser.Schema[[]T]

Kinesis validates the decoded JSON/text data provided by the Kinesis schema.

func KinesisFirehose

func KinesisFirehose[T any](payload parser.Schema[T]) parser.Schema[[]T]

KinesisFirehose passes decoded text to the payload schema; JSON parsing is explicit.

func LambdaFunctionURL

func LambdaFunctionURL[T any](payload parser.Schema[T]) parser.Schema[T]

LambdaFunctionURL uses the HTTP API v2 shape without implicit Base64 decoding.

func SNS

func SNS[T any](payload parser.Schema[T]) parser.Schema[[]T]

SNS passes the notification's Message string to the payload schema unchanged.

func SNSSQS

func SNSSQS[T any](payload parser.Schema[T]) parser.Schema[[]T]

SNSSQS decodes the notification JSON, then validates its Message string.

func SQS

func SQS[T any](payload parser.Schema[T]) parser.Schema[[]T]

SQS validates record metadata and passes each body string to the payload schema.

func VpcLattice

func VpcLattice[T any](payload parser.Schema[T]) parser.Schema[T]

VpcLattice validates the v1 event's snake_case metadata and body.

func VpcLatticeV2

func VpcLatticeV2[T any](payload parser.Schema[T]) parser.Schema[T]

VpcLatticeV2 validates the v2 event's camelCase metadata and body.

Types

type Images

type Images[T any] struct {
	NewImage *T `json:"NewImage,omitempty"`
	OldImage *T `json:"OldImage,omitempty"`
}

Images retains missing images separately from present images with zero values.

Jump to

Keyboard shortcuts

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