Package apigateway provides a standard serialization format to wrap API Gateway responses that translate into specific end-user errors.
Error represents an error to return in response to an API Gateway request.
NewErrorResponse returns a response that satisfies the regular expression used to determine integration mappings via the API Gateway. messages is a stringable type. Error interface instances will be properly typecast.
Error returns the JSONified version of this error which will trigger the appropriate integration mapping.
Response is the type returned by an API Gateway function. Note that a non 2xx HTTP status code should be returned as a Response type rather than an Error. Errors should be reserved for Lambda functions that fail to execute.
NewResponse returns an API Gateway response object
MarshalJSON is a custom marshaller to ensure that the marshalled headers are always lowercase