lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
This provides an equivalent implementation to handlerfunc.HandlerFuncAdapterV2 that will proxy events.APIGatewayV2HTTPRequest to a http.Handler.
A http.HandlerFunc implements the http.Handler interface so I've implemented handlerfunc in terms of httpadapter. This will avoid implementation drift. To avoid breaking backwards compatibility, this uses type aliases and preserves the handlerfunc.New and handlerfunc.NewV2 methods.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
https://github.com/awslabs/aws-lambda-go-api-proxy/pull/80 implemented support for
handlerfunc
but nothttpadapter
.This provides an equivalent implementation to
handlerfunc.HandlerFuncAdapterV2
that will proxyevents.APIGatewayV2HTTPRequest
to ahttp.Handler
.A
http.HandlerFunc
implements thehttp.Handler
interface so I've implementedhandlerfunc
in terms ofhttpadapter
. This will avoid implementation drift. To avoid breaking backwards compatibility, this uses type aliases and preserves thehandlerfunc.New
andhandlerfunc.NewV2
methods.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.