{"modulePath":"github.com/RP4N/aws-lambda-go-api-proxy","version":"v0.14.14","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package httpadapter\n\n## Types\n\n```go\ntype HandlerAdapter struct {\n\tcore.RequestAccessor\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(handler http.Handler) *HandlerAdapter\n```\n\n```go\nfunc (h *HandlerAdapter) Proxy(event events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)\n```\nProxy receives an API Gateway proxy event, transforms it into an http.Request object, and sends it to the http.HandlerFunc for routing. It returns a proxy response object generated from the http.Handler.\n\n```go\nfunc (h *HandlerAdapter) ProxyWithContext(ctx context.Context, event events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)\n```\nProxyWithContext receives context and an API Gateway proxy event, transforms them into an http.Request object, and sends it to the http.Handler for routing. It returns a proxy response object generated from the http.ResponseWriter.\n\n```go\ntype HandlerAdapterALB struct {\n\tcore.RequestAccessorALB\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewALB(handler http.Handler) *HandlerAdapterALB\n```\n\n```go\nfunc (h *HandlerAdapterALB) Proxy(event events.ALBTargetGroupRequest) (events.ALBTargetGroupResponse, error)\n```\nProxy receives an ALB Target Group proxy event, transforms it into an http.Request object, and sends it to the http.HandlerFunc for routing. It returns a proxy response object generated from the http.ResponseWriter.\n\n```go\nfunc (h *HandlerAdapterALB) ProxyWithContext(ctx context.Context, event events.ALBTargetGroupRequest) (events.ALBTargetGroupResponse, error)\n```\nProxyWithContext receives context and an ALB proxy event, transforms them into an http.Request object, and sends it to the http.Handler for routing. It returns a proxy response object generated from the http.ResponseWriter.\n\n```go\ntype HandlerAdapterV2 struct {\n\tcore.RequestAccessorV2\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewV2(handler http.Handler) *HandlerAdapterV2\n```\n\n```go\nfunc (h *HandlerAdapterV2) Proxy(event events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error)\n```\nProxy receives an API Gateway proxy event, transforms it into an http.Request object, and sends it to the http.HandlerFunc for routing. It returns a proxy response object generated from the http.ResponseWriter.\n\n```go\nfunc (h *HandlerAdapterV2) ProxyWithContext(ctx context.Context, event events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error)\n```\nProxyWithContext receives context and an API Gateway proxy event, transforms them into an http.Request object, and sends it to the http.Handler for routing. It returns a proxy response object generated from the http.ResponseWriter.\n\n","path":"github.com/RP4N/aws-lambda-go-api-proxy/httpadapter","name":"httpadapter","synopsis":"","isRedistributable":true}
