Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GinFaas ¶
type GinFaas struct { core.RequestAccessor // contains filtered or unexported fields }
GinFaas makes it easy to send API Gateway proxy events to a Gin
func New ¶
New creates a new instance of the GinFaas object. Receives an initialized *gin.Engine object - normally created with gin.Default(). It returns the initialized instance of the GinFaas object.
func (*GinFaas) Proxy ¶
func (g *GinFaas) Proxy(req events.APIGatewayRequest) (events.APIGatewayResponse, error)
Proxy receives an API Gateway proxy event, transforms it into an http.Request object, and sends it to the gin.Engine for routing. It returns a proxy response object generated from the http.ResponseWriter.
func (*GinFaas) ProxyWithContext ¶
func (g *GinFaas) ProxyWithContext(ctx context.Context, req events.APIGatewayRequest) (events.APIGatewayResponse, error)
ProxyWithContext receives context and an API Gateway proxy event, transforms them into an http.Request object, and sends it to the gin.Engine for routing. It returns a proxy response object generated from the http.ResponseWriter.