Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bloveless/request-validator

Example go lambda/api project that does request validation
https://github.com/bloveless/request-validator

Last synced: 23 days ago
JSON representation

Example go lambda/api project that does request validation

Awesome Lists containing this project

README

        

# Request Validator

This example app showcases using `aws-lambda-go-api-proxy` in order reduce code duplication. You'll notice that `cmd/http/main.go` and `cmd/lambda/main.go` are incredibly simple and delegate almost all the code to a standard chi router.

It also uses `gookit/validate` to do request validation. Validations are currently in `router.go` for simplicity.

You can run this application in three ways.

1. `make up` <-- this is an example of running chi directly for local development
2. `make local-api` <-- this is an example of running the the api gateway locally using AWS SAM
3. `cd terraform && terraform apply` <-- this is an example of deploying the api to AWS