ginadapter

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

README

Gin adapter for Function URL

A Gin adapter for API Gateway V1 and V2 are already available from https://github.com/awslabs/aws-lambda-go-api-proxy. This module provides an adapter specifically for Function URL events with both BUFFERED (which, technically, is no different from API Gateway V2/HTTP events) and RESPONSE_STREAM mode which uses https://github.com/aws/aws-lambda-go/tree/main/lambdaurl.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferedResponse

func BufferedResponse(ctx context.Context) *events.LambdaFunctionURLResponse

BufferedResponse returns the pending events.LambdaFunctionURLResponse from context.

If the gin handlers passed to StartBuffered or StartStream need access to the pending response, it can be retrieved from context with this method.

func Request

Request returns the original events.LambdaFunctionURLRequest from context.

If the gin handlers passed to StartBuffered or StartStream need access to the original invocation, it can be retrieved from context with this method.

func StartBuffered

func StartBuffered(r *gin.Engine, options ...lambda.Option)

StartBuffered starts the Lambda loop in BUFFERED mode with the given Gin engine.

func StartStream

func StartStream(r *gin.Engine, options ...lambda.Option)

StartStream starts the Lambda loop in STREAM_RESPONSE mode with the given Gin engine.

func StreamResponse

StreamResponse returns the pending events.LambdaFunctionURLStreamingResponse from context.

If the gin handlers passed to StartBuffered or StartStream need access to the pending response, it can be retrieved from context with this method.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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