Documentation
¶
Index ¶
- func CreateLambda(ctx context.Context, lambdaReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- func DeleteLambda(ctx context.Context, lambdaReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- func GetLambda(ctx context.Context, lambdaReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- func UpdateLambda(ctx context.Context, lambdaReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- type Book
- type CreateReq
- type DeleteReq
- type GetReq
- type UpdateReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLambda ¶
func CreateLambda(ctx context.Context, lambdaReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
func DeleteLambda ¶
func DeleteLambda(ctx context.Context, lambdaReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
func GetLambda ¶
func GetLambda(ctx context.Context, lambdaReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
func UpdateLambda ¶
func UpdateLambda(ctx context.Context, lambdaReq events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
Types ¶
type Book ¶
type CreateReq ¶
type CreateReq struct { Author string `json:"author,omitempty"` Title string `json:"title,omitempty"` Pages int `json:"pages"` }
func (*CreateReq) Valid ¶
Valid is a naive implementation of a validator for the Book CreateReq In production you should use something like https://github.com/go-playground/validator to perform validation in-line with unmarshalling for a more cohesive experience
type DeleteReq ¶
func (*DeleteReq) Valid ¶
Valid is a naive implementation of a validator for the Book DeleteReq In production you should use something like https://github.com/go-playground/validator to perform validation in-line with unmarshalling for a more cohesive experience
type GetReq ¶
func (*GetReq) Valid ¶
Valid is a naive implementation of a validator for the Book GetReq In production you should use something like https://github.com/go-playground/validator to perform validation in-line with unmarshalling for a more cohesive experience
type UpdateReq ¶
type UpdateReq struct { Author string `json:"author,omitempty"` ID primitive.ObjectID `lambda:"path.id" json:"id,omitempty"` Pages int `json:"pages"` Title string `json:"title,omitempty"` }
func (*UpdateReq) Valid ¶
Valid is a naive implementation of a validator for the Book UpdateReq In production you should use something like https://github.com/go-playground/validator to perform validation in-line with unmarshalling for a more cohesive experience