Sparta: Index | Files

package events

import ""


Package Files


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 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 {
    Method      string            `json:"method"`
    Body        interface{}       `json:"body"`
    Headers     map[string]string `json:"headers"`
    QueryParams map[string]string `json:"queryParams"`
    PathParams  map[string]string `json:"pathParams"`
    Context     APIGatewayContext `json:"context"`

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). Updated 2018-01-29. Refresh now. Tools for package owners.