Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBlankPathParameterResponse = ErrorResponse{Error: "No path parameter"}
View Source
var ErrInternalServerErrorResponse = ErrorResponse{Error: "Internal server error"}
View Source
var ErrInvalidBodyNoSerialResponse = ErrorResponse{Error: "No serial number provided"}
View Source
var ErrInvalidBodyResponse = ErrorResponse{Error: "Invalid request body"}
View Source
var ErrInvalidContentTypeResponse = ErrorResponse{Error: "Invalid request content-type"}
View Source
var ErrInvalidMediaTypeResponse = ErrorResponse{Error: "Invalid mediatype"}
View Source
var ErrInvalidPathParameterResponse = ErrorResponse{Error: "Invalid path parameter"}
Functions ¶
func APIResponse ¶
func APIResponse(status int, rawBody interface{}) (*events.APIGatewayProxyResponse, error)
APIResponse constructs an AWS Lambda API response object from the given data This object can be returned from the Lambda's main handler and will be picked up by AWS Lambda and rendered into an HTTP Response
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.