Documentation
¶
Index ¶
- type APIGatewayEventUnmarshaler
- type APIGatewayResponse
- func HandleCreate(evt *apigatewayproxyevt.Event, unmarshaler APIGatewayEventUnmarshaler, ...) (*APIGatewayResponse, error)
- func HandleDelete(evt *apigatewayproxyevt.Event, deleteFunc api.DeleteFunc) (*APIGatewayResponse, error)
- func HandleGet(evt *apigatewayproxyevt.Event, getFunc api.GetFunc) (*APIGatewayResponse, error)
- func HandleList(evt *apigatewayproxyevt.Event, listFunc api.ListFunc) (*APIGatewayResponse, error)
- func HandleUpdate(evt *apigatewayproxyevt.Event, unmarshaler APIGatewayEventUnmarshaler, ...) (*APIGatewayResponse, error)
- func NewAPIGatewayResponse(status int) *APIGatewayResponse
- func NewAPIGatewayResponseWithBody(status int, body interface{}) *APIGatewayResponse
- func NewAPIGatewayResponseWithError(status int, error error) *APIGatewayResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIGatewayEventUnmarshaler ¶
type APIGatewayEventUnmarshaler func(event *apigatewayproxyevt.Event) (entity api.Entity, err error)
type APIGatewayResponse ¶
type APIGatewayResponse struct { StatusCode int `json:"statusCode"` Headers map[string]string `json:"headers"` Body interface{} `json:"body"` Base64Encoded bool `json:"isBase64Encoded"` }
func HandleCreate ¶
func HandleCreate(evt *apigatewayproxyevt.Event, unmarshaler APIGatewayEventUnmarshaler, createFunc api.CreateFunc) (*APIGatewayResponse, error)
func HandleDelete ¶
func HandleDelete(evt *apigatewayproxyevt.Event, deleteFunc api.DeleteFunc) (*APIGatewayResponse, error)
func HandleGet ¶
func HandleGet(evt *apigatewayproxyevt.Event, getFunc api.GetFunc) (*APIGatewayResponse, error)
func HandleList ¶
func HandleList(evt *apigatewayproxyevt.Event, listFunc api.ListFunc) (*APIGatewayResponse, error)
func HandleUpdate ¶
func HandleUpdate(evt *apigatewayproxyevt.Event, unmarshaler APIGatewayEventUnmarshaler, updateFunc api.UpdateFunc) (*APIGatewayResponse, error)
func NewAPIGatewayResponse ¶
func NewAPIGatewayResponse(status int) *APIGatewayResponse
func NewAPIGatewayResponseWithBody ¶
func NewAPIGatewayResponseWithBody(status int, body interface{}) *APIGatewayResponse
func NewAPIGatewayResponseWithError ¶
func NewAPIGatewayResponseWithError(status int, error error) *APIGatewayResponse
func (*APIGatewayResponse) SetBody ¶
func (r *APIGatewayResponse) SetBody(b interface{})
SetBody checks to see if body implements json.Marshaler first If it does, it will use MarshalJSON() function. If not, defer back to json.MarshalIndent()
Click to show internal directories.
Click to hide internal directories.