ginadapter

package
v0.0.0-...-0edfd9e Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Packge ginlambda add Gin 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 Gin engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GinLambda

type GinLambda struct {
	core.RequestAccessor
	// contains filtered or unexported fields
}

GinLambda makes it easy to send API Gateway proxy events to a Gin Engine. 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(gin *gin.Engine) *GinLambda

New creates a new instance of the GinLambda object. Receives an initialized *gin.Engine object - normally created with gin.Default(). It returns the initialized instance of the GinLambda object.

func (*GinLambda) Proxy

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 gneerated from the http.ResponseWriter.

Jump to

Keyboard shortcuts

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