Sparta: Index | Files

package events

import ""

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


Package Files

doc.go event.go

type APIGatewayContext Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

Package events imports 3 packages (graph) and is imported by 1 packages. Updated 2019-03-22. Refresh now. Tools for package owners.