Documentation ¶
Index ¶
- Constants
- func Response(status int, body interface{}) *events.APIGatewayProxyResponse
- func StatusBadRequest(err error) (*events.APIGatewayProxyResponse, error)
- func StatusBadRequestWithBody(body map[string]interface{}) (*events.APIGatewayProxyResponse, error)
- func StatusInternalServerError(err error) (*events.APIGatewayProxyResponse, error)
- func StatusOK(body interface{}) (*events.APIGatewayProxyResponse, error)
- func StatusOKWithoutBody() (*events.APIGatewayProxyResponse, error)
- func StatusUnhandledMethod() (*events.APIGatewayProxyResponse, error)
- func StatusUnhandledRequest(err error) (*events.APIGatewayProxyResponse, error)
- type Message
Constants ¶
View Source
const (
CONTENT_TYPE = "application/json"
)
Variables ¶
This section is empty.
Functions ¶
func Response ¶
func Response(status int, body interface{}) *events.APIGatewayProxyResponse
Response returns a response to be returned by the API Gateway Request.
func StatusBadRequest ¶
func StatusBadRequest(err error) (*events.APIGatewayProxyResponse, error)
StatusBadRequest returns a response of an HTTP StatusBadRequest and an error message.
func StatusBadRequestWithBody ¶
func StatusBadRequestWithBody(body map[string]interface{}) (*events.APIGatewayProxyResponse, error)
StatusBadRequestWithBody returns a response of an HTTP StatusBadRequest with body.
func StatusInternalServerError ¶
func StatusInternalServerError(err error) (*events.APIGatewayProxyResponse, error)
StatusInternalServerError returns a response of an HTTP StatusInternalServerError.
func StatusOK ¶
func StatusOK(body interface{}) (*events.APIGatewayProxyResponse, error)
StatusOK returns a response of an HTTP StatusOK with body.
func StatusOKWithoutBody ¶
func StatusOKWithoutBody() (*events.APIGatewayProxyResponse, error)
StatusOKWithoutBody returns a response of an HTTP StatusOK without body.
func StatusUnhandledMethod ¶
func StatusUnhandledMethod() (*events.APIGatewayProxyResponse, error)
StatusUnhandledMethod returns a response of an HTTP StatusMethodNotAllowed and an error message of unhandled method.
func StatusUnhandledRequest ¶
func StatusUnhandledRequest(err error) (*events.APIGatewayProxyResponse, error)
StatusUnhandledRequest returns a response of an HTTP StatusNotImplemented and an error message.
Types ¶
Click to show internal directories.
Click to hide internal directories.