Documentation ¶
Index ¶
- func DefaultHeaders() *string
- func DefaultMethods() *string
- func RespondBadRequest(message string, headers map[string]string) events.APIGatewayProxyResponse
- func RespondConflict(message string, headers map[string]string) events.APIGatewayProxyResponse
- func RespondCreated(message string, headers map[string]string) events.APIGatewayProxyResponse
- func RespondForbidden(message string, headers map[string]string) events.APIGatewayProxyResponse
- func RespondGenericServer(message string, headers map[string]string) events.APIGatewayProxyResponse
- func RespondJSONWith(status int, payload interface{}, headers map[string]string) (events.APIGatewayProxyResponse, error)
- func RespondNotFound(message string, headers map[string]string) events.APIGatewayProxyResponse
- func RespondOK(message string, headers map[string]string) events.APIGatewayProxyResponse
- func RespondUnAuthorised(message string, headers map[string]string) events.APIGatewayProxyResponse
- func SetDefaultHeaders(headers map[string]string)
- type Envelope
- type EnvelopeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHeaders ¶
func DefaultHeaders() *string
DefaultHeaders - provide sane defaults for rest api headers
func DefaultMethods ¶
func DefaultMethods() *string
DefaultMethods - provide sane defaults for rest api methods
func RespondBadRequest ¶
func RespondBadRequest(message string, headers map[string]string) events.APIGatewayProxyResponse
RespondBadRequest - respond bad request
func RespondConflict ¶
func RespondConflict(message string, headers map[string]string) events.APIGatewayProxyResponse
RespondConflict - respond conflict
func RespondCreated ¶
func RespondCreated(message string, headers map[string]string) events.APIGatewayProxyResponse
RespondCreated - respond created
func RespondForbidden ¶
func RespondForbidden(message string, headers map[string]string) events.APIGatewayProxyResponse
func RespondGenericServer ¶
func RespondGenericServer(message string, headers map[string]string) events.APIGatewayProxyResponse
RespondGenericServer - respond generic error
func RespondJSONWith ¶
func RespondJSONWith(status int, payload interface{}, headers map[string]string) (events.APIGatewayProxyResponse, error)
RespondJSONWith - api gateway proxy response
func RespondNotFound ¶
func RespondNotFound(message string, headers map[string]string) events.APIGatewayProxyResponse
RespondNotFound - respond not found
func RespondOK ¶
func RespondOK(message string, headers map[string]string) events.APIGatewayProxyResponse
RespondOK - respond ok
func RespondUnAuthorised ¶
func RespondUnAuthorised(message string, headers map[string]string) events.APIGatewayProxyResponse
func SetDefaultHeaders ¶
SetDefaultHeaders - set default headers that are applied to all lambda responses
Types ¶
type EnvelopeError ¶
type EnvelopeError struct { Title string `json:"title,omitempty"` Detail string `json:"detail,omitempty"` Envelope `json:"-"` }
func (EnvelopeError) MarshalJSON ¶
func (e EnvelopeError) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.