irisadapter

package
v0.0.0-...-9b750e2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package irisLambda add Iris support for the aws-serverless-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 iris.Application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IrisLambda

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

IrisLambda makes it easy to send API Gateway proxy events to a iris.Application. 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(app *iris.Application) *IrisLambda

New creates a new instance of the IrisLambda object. Receives an initialized *iris.Application object - normally created with iris.Default(). It returns the initialized instance of the IrisLambda object.

func (*IrisLambda) Proxy

Proxy receives an API Gateway proxy event, transforms it into an http.Request object, and sends it to the iris.Application for routing. It returns a proxy response object generated from the http.ResponseWriter.

func (*IrisLambda) ProxyWithContext

ProxyWithContext receives context and an API Gateway proxy event, transforms them into an http.Request object, and sends it to the iris.Application for routing. It returns a proxy response object generated from the http.ResponseWriter.

Jump to

Keyboard shortcuts

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