Boiler plate for go follow Clean architecture.
This is not Go example 101 about how to use Golang with JWT, Rethinkdb, sendgrid... But instead about how to put all of those pieces in to a complete picture that use Clean architecture.
The target of this project are:
- An example about architecture and how to integrate with other component.
- A boiler plate to help creating a back-end REST api service quickly.
I myself use this service to make it possible to implement my idea in weekend.
- Authentication: JWT
- Database: Rethinkdb
- Middleware
- Mail sending service: SendGrid
- Unit test & Integration test
// Register with email
POST /auth/registerbyemail
// Login by email & password
POST /auth/login
// Request reseting pass
POST /auth/reqresetpass
// Reset pass with token
POST /auth/resetpass
// Access resource with token authentication
GET /users/{userId}
To test all unit test
go test goclean/... -short
To test full integration test with rethinkdb
rethinkdb --http-port 8000
go test goclean/... -short