explore

package
Version: v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package explore scopes types that are used for the Sparta `explore` command line option.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIGatewayRequest

func NewAPIGatewayRequest(lambdaName string, httpMethod string, whitelistParamValues map[string]string, eventData interface{}, testingURL string) (*http.Response, error)

NewAPIGatewayRequest sends a mock request to a localhost server that was created by httptest.NewServer(NewLambdaHTTPHandler(lambdaFunctions, logger)). lambdaName is the lambdaFnName to be called, eventData is optional event-specific data, and the testingURL is the URL returned by httptest.NewServer(). The optional event data is embedded in the Sparta input mapping templates.

func NewLambdaRequest

func NewLambdaRequest(lambdaName string, eventData interface{}, testingURL string) (*http.Response, error)

NewLambdaRequest sends a mock request to a localhost server that was created by httptest.NewServer(NewLambdaHTTPHandler(lambdaFunctions, logger)). lambdaName is the lambdaFnName to be called, eventData is optional event-specific data, and the testingURL is the URL returned by httptest.NewServer().

func NewRawRequest

func NewRawRequest(lambdaName string, context interface{}, eventData interface{}, testingURL string) (*http.Response, error)

NewRawRequest mocks the NodeJS proxying tier by creating a JSON request that is POST'd to the golang lambda handler running on localhost. Most clients should use NewLambdaRequest or NewAPIGatewayRequest to create mock data. This function is available for advanced test cases who need more control over the mock request.

Types

This section is empty.

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