Documentation ¶
Overview ¶
Response returns an API Gateway Proxy Response with a nil error to provide detailed status codes and response bodies. While a status code must be provided, further arguments are recognized with reflection but not required.
Index ¶
- func Bad(err error) (events.APIGatewayProxyResponse, error)
- func BadRequest(s string) (events.APIGatewayProxyResponse, error)
- func LogRequest(r events.APIGatewayProxyRequest)
- func NotOk(code int, err error) (events.APIGatewayProxyResponse, error)
- func Ok(body interface{}) (events.APIGatewayProxyResponse, error)
- func OkInterface(token string, body interface{}) (events.APIGatewayProxyResponse, error)
- func OkVoid(token string) (events.APIGatewayProxyResponse, error)
- func Unauthorized(err error) (events.APIGatewayProxyResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
func BadRequest(s string) (events.APIGatewayProxyResponse, error)
func LogRequest ¶
func LogRequest(r events.APIGatewayProxyRequest)
func Ok ¶
func Ok(body interface{}) (events.APIGatewayProxyResponse, error)
func OkInterface ¶
func OkInterface(token string, body interface{}) (events.APIGatewayProxyResponse, error)
func Unauthorized ¶
func Unauthorized(err error) (events.APIGatewayProxyResponse, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.