Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GorillaMuxAdapter ¶
type GorillaMuxAdapter struct { RequestAccessor core.RequestAccessor RequestAccessorV2 core.RequestAccessorV2 // contains filtered or unexported fields }
func New ¶
func New(router *mux.Router) *GorillaMuxAdapter
func (*GorillaMuxAdapter) Proxy ¶
func (h *GorillaMuxAdapter) Proxy(event core.SwitchableAPIGatewayRequest) (*core.SwitchableAPIGatewayResponse, error)
Proxy receives an API Gateway proxy event or API Gateway V2 event, transforms it into an http.Request object, and sends it to the mux.Router for routing. It returns a proxy response object generated from the http.ResponseWriter.
func (*GorillaMuxAdapter) ProxyWithContext ¶ added in v0.3.0
func (h *GorillaMuxAdapter) ProxyWithContext(ctx context.Context, event core.SwitchableAPIGatewayRequest) (*core.SwitchableAPIGatewayResponse, error)
ProxyWithContext receives context and an API Gateway proxy event or API Gateway V2 event, transforms them into an http.Request object, and sends it to the mux.Router for routing. It returns a proxy response object generated from the http.ResponseWriter.
type GorillaMuxAdapterALB ¶ added in v0.14.0
type GorillaMuxAdapterALB struct { core.RequestAccessorALB // contains filtered or unexported fields }
func NewALB ¶ added in v0.14.0
func NewALB(router *mux.Router) *GorillaMuxAdapterALB
func (*GorillaMuxAdapterALB) Proxy ¶ added in v0.14.0
func (h *GorillaMuxAdapterALB) Proxy(event events.ALBTargetGroupRequest) (events.ALBTargetGroupResponse, error)
Proxy receives an API Gateway proxy event, transforms it into an http.Request object, and sends it to the mux.Router for routing. It returns a proxy response object generated from the http.ResponseWriter.
func (*GorillaMuxAdapterALB) ProxyWithContext ¶ added in v0.14.0
func (h *GorillaMuxAdapterALB) ProxyWithContext(ctx context.Context, event events.ALBTargetGroupRequest) (events.ALBTargetGroupResponse, error)
ProxyWithContext receives context and an API Gateway proxy event, transforms them into an http.Request object, and sends it to the mux.Router for routing. It returns a proxy response object generated from the http.ResponseWriter.
type GorillaMuxAdapterV2 ¶ added in v0.12.0
type GorillaMuxAdapterV2 struct { core.RequestAccessorV2 // contains filtered or unexported fields }
func NewV2 ¶ added in v0.12.0
func NewV2(router *mux.Router) *GorillaMuxAdapterV2
func (*GorillaMuxAdapterV2) Proxy ¶ added in v0.12.0
func (h *GorillaMuxAdapterV2) Proxy(event events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error)
Proxy receives an API Gateway proxy event, transforms it into an http.Request object, and sends it to the mux.Router for routing. It returns a proxy response object generated from the http.ResponseWriter.
func (*GorillaMuxAdapterV2) ProxyWithContext ¶ added in v0.12.0
func (h *GorillaMuxAdapterV2) ProxyWithContext(ctx context.Context, event events.APIGatewayV2HTTPRequest) (events.APIGatewayV2HTTPResponse, error)
ProxyWithContext receives context and an API Gateway proxy event, transforms them into an http.Request object, and sends it to the mux.Router for routing. It returns a proxy response object generated from the http.ResponseWriter.