lambda

package
v0.0.0-...-13ac722 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package lambda provides helpers for interacting with AWS Lambda/API Gateway

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func JSON

func Start

Start wraps the provided handler function and returns the error message within the response. This allows for normal Go error handling to take place within the handler function while ensuring the error is contextualized within the API Gateway response.

Types

type APIGatewayError

type APIGatewayError interface {
	StatusCode() int
}

type BadRequestError

type BadRequestError struct {
	Message string
}

func (BadRequestError) Error

func (e BadRequestError) Error() string

func (BadRequestError) StatusCode

func (BadRequestError) StatusCode() int

type NotFoundError

type NotFoundError struct {
	Message string
}

func (NotFoundError) Error

func (e NotFoundError) Error() string

func (NotFoundError) StatusCode

func (NotFoundError) StatusCode() int

type UnauthorizedError

type UnauthorizedError struct {
	Message string
}

func (UnauthorizedError) Error

func (e UnauthorizedError) Error() string

func (UnauthorizedError) StatusCode

func (UnauthorizedError) StatusCode() int

Jump to

Keyboard shortcuts

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