Golang HTTP API Boilerplate using REST and Hexagonal architectural style and SOLID design principles.
Install the mockery
tool:
$ go install github.com/vektra/mockery/v2@latest
The project is built on top of this structure:
- cmd: Application main
- internal: Private application
- adapter: Adapter layer
- dao: Data access object layer
- http: HTTP layer
- domain: Domain business layer
- model: Entity layer
- port: Interface adapter layer
- usecase: Application business rules layer
- adapter: Adapter layer
- pkg: External library code
Diplay make commands with:
$ make help
Run Go API with:
$ make run
Run Docker project with:
$ make start
Run tests with:
$ make test
Generate mocks with:
$ mockery
Access to your local service:
- HTTP API on port :4100