echoadapter

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 28

Documentation

Overview

Packge echolambda add Echo support for the aws-severless-go-api library. Uses the core package behind the scenes and exposes the New method to get a new instance and Proxy method to send request to the echo.Echo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoLambda

type EchoLambda struct {
	core.RequestAccessor

	Echo *echo.Echo
}

EchoLambda makes it easy to send API Gateway proxy events to a echo.Echo. The library transforms the proxy event into an HTTP request and then creates a proxy response object from the http.ResponseWriter

func New

func New(e *echo.Echo) *EchoLambda

New creates a new instance of the EchoLambda object. Receives an initialized *echo.Echo object - normally created with echo.New(). It returns the initialized instance of the EchoLambda object.

func (*EchoLambda) Proxy

Proxy receives an API Gateway proxy event, transforms it into an http.Request object, and sends it to the echo.Echo for routing. It returns a proxy response object generated from the http.ResponseWriter.

func (*EchoLambda) ProxyWithContext

ProxyWithContext receives context and an API Gateway proxy event, transforms them into an http.Request object, and sends it to the echo.Echo for routing. It returns a proxy response object generated from the http.ResponseWriter.

type EchoLambdaALB added in v0.14.0

type EchoLambdaALB struct {
	core.RequestAccessorALB

	Echo *echo.Echo
}

EchoLambdaALB makes it easy to send ALB proxy events to a echo.Echo. The library transforms the proxy event into an HTTP request and then creates a proxy response object from the http.ResponseWriter

func NewALB added in v0.14.0

func NewALB(e *echo.Echo) *EchoLambdaALB

NewAPI creates a new instance of the EchoLambdaAPI object. Receives an initialized *echo.Echo object - normally created with echo.New(). It returns the initialized instance of the EchoLambdaALB object.

func (*EchoLambdaALB) Proxy added in v0.14.0

Proxy receives an ALB event, transforms it into an http.Request object, and sends it to the echo.Echo for routing. It returns a proxy response object generated from the http.ResponseWriter.

func (*EchoLambdaALB) ProxyWithContext added in v0.14.0

ProxyWithContext receives context and an ALB event, transforms them into an http.Request object, and sends it to the echo.Echo for routing. It returns a proxy response object generated from the http.ResponseWriter.

type EchoLambdaV2 added in v0.12.0

type EchoLambdaV2 struct {
	core.RequestAccessorV2

	Echo *echo.Echo
}

EchoLambdaV2 makes it easy to send API Gateway proxy V2 events to a echo.Echo. The library transforms the proxy event into an HTTP request and then creates a proxy response object from the http.ResponseWriter

func NewV2 added in v0.12.0

func NewV2(e *echo.Echo) *EchoLambdaV2

NewV2 creates a new instance of the EchoLambda object. Receives an initialized *echo.Echo object - normally created with echo.New(). It returns the initialized instance of the EchoLambdaV2 object.

func (*EchoLambdaV2) Proxy added in v0.12.0

Proxy receives an API Gateway proxy V2 event, transforms it into an http.Request object, and sends it to the echo.Echo for routing. It returns a proxy response object generated from the http.ResponseWriter.

func (*EchoLambdaV2) ProxyWithContext added in v0.12.0

ProxyWithContext receives context and an API Gateway proxy V2 event, transforms them into an http.Request object, and sends it to the echo.Echo for routing. It returns a proxy response object generated from the http.ResponseWriter.

Jump to

Keyboard shortcuts

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