Version: v1.15.0 Latest Latest

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

Go to latest
Published: May 3, 2020 License: MIT Imports: 3 Imported by: 1



Package events defines event types that are un/marshalled to and from other AWS services. It is a provisional namespace to fill gaps that exist as new event types are officially published by AWS via



This section is empty.


This section is empty.


This section is empty.


type APIGatewayContext

type APIGatewayContext struct {
	AppID        string             `json:"appId"`
	Method       string             `json:"method"`
	RequestID    string             `json:"requestId"`
	ResourceID   string             `json:"resourceId"`
	ResourcePath string             `json:"resourcePath"`
	Stage        string             `json:"stage"`
	Identity     APIGatewayIdentity `json:"identity"`

APIGatewayContext is the API-Gateway context information

type APIGatewayEnvelope

type APIGatewayEnvelope struct {
	Method      string                 `json:"method"`
	Headers     map[string]string      `json:"headers"`
	QueryParams map[string]string      `json:"queryParams"`
	PathParams  map[string]string      `json:"pathParams"`
	Context     APIGatewayContext      `json:"context"`
	Authorizer  map[string]interface{} `json:"authorizer"`

APIGatewayEnvelope is the type that maps to the VTL properties

type APIGatewayIdentity

type APIGatewayIdentity struct {
	AccountID                     string `json:"accountId"`
	APIKey                        string `json:"apiKey"`
	Caller                        string `json:"caller"`
	CognitoAuthenticationProvider string `json:"cognitoAuthenticationProvider"`
	CognitoAuthenticationType     string `json:"cognitoAuthenticationType"`
	CognitoIdentityID             string `json:"cognitoIdentityId"`
	CognitoIdentityPoolID         string `json:"cognitoIdentityPoolId"`
	SourceIP                      string `json:"sourceIp"`
	User                          string `json:"user"`
	UserAgent                     string `json:"userAgent"`
	UserArn                       string `json:"userArn"`

APIGatewayIdentity is the API Gateway identity information

type APIGatewayRequest

type APIGatewayRequest struct {
	Body interface{} `json:"body"`

APIGatewayRequest represents the API Gateway request that is submitted to a Lambda function. This format matches the inputmapping_default.VTL templates

func NewAPIGatewayMockRequest

func NewAPIGatewayMockRequest(lambdaName string,
	httpMethod string,
	whitelistParamValues map[string]string,
	eventData interface{}) (*APIGatewayRequest, error)

NewAPIGatewayMockRequest creates a mock API Gateway request. This request format mirrors the VTL templates in

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL