echolam

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 6 Imported by: 0

README

echolam

echolam is a library that bind AWS Lambda, AWS API Gateway to Echo framework

Install

go get -u github.com/aws-serverless-go/echolam

Example

package main

import (
	"github.com/aws-serverless-go/echolam"
	"github.com/labstack/echo/v4"
	"net/http"
)

func main() {
	e := echo.New()
	e.GET("/", func(c echo.Context) error {
		return c.String(http.StatusOK, "Hello, World!")
	})
	if echolam.IsLambdaRuntime() {
		echolam.StartLambdaWithAPIGateway(e)
	} else {
		e.Logger.Fatal(e.Start(":1323"))
	}
}

License

MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLambdaRuntime

func IsLambdaRuntime() bool

func StartLambdaWithAPIGateway

func StartLambdaWithAPIGateway(e *echo.Echo)

Types

This section is empty.

Jump to

Keyboard shortcuts

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