models

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryParamOutputAdapters = "adapters"
	QueryParamInputType      = "inputType"
	QueryParamOutputType     = "outputType"
	QueryParamToken          = "token"
	QueryParamOutputURL      = "url"
)

Variables

This section is empty.

Functions

func BodyToMessageBytesEawsyLambda

func BodyToMessageBytesEawsyLambda(bodyType MessageBodyType, event *apigatewayproxyevt.Event) []byte

func BodyToMessageBytesFastHTTP

func BodyToMessageBytesFastHTTP(bodyType MessageBodyType, ctx *fasthttp.RequestCtx) []byte

Types

type AwsAPIGatewayProxyOutput

type AwsAPIGatewayProxyOutput struct {
	IsBase64Encoded bool              `json:"isBase64Encoded"`
	StatusCode      int               `json:"statusCode"`
	Body            string            `json:"body"`
	Headers         map[string]string `json:"headers"`
}

func ErrorInfosToAlexaResponse

func ErrorInfosToAlexaResponse(errs ...ErrorInfo) AwsAPIGatewayProxyOutput

type ErrorInfo

type ErrorInfo struct {
	StatusCode int
	Body       []byte
}

type HookData

type HookData struct {
	InputType     string
	InputBody     []byte
	OutputType    string
	OutputURL     string
	OutputNames   []string
	Token         string
	InputMessage  []byte
	OutputMessage cc.Message
}

func HookDataFromEawsyLambdaEvent

func HookDataFromEawsyLambdaEvent(bodyType MessageBodyType, event *apigatewayproxyevt.Event) HookData

func HookDataFromFastHTTPReqCtx

func HookDataFromFastHTTPReqCtx(bodyType MessageBodyType, ctx *fasthttp.RequestCtx) HookData

type MessageBodyType

type MessageBodyType int
const (
	JSON MessageBodyType = iota
	URLEncoded
	URLEncodedJSONPayload
	URLEncodedJSONPayloadOrJSON
)

Jump to

Keyboard shortcuts

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