This project is an example for learning Golang design pattern and structuring folder by using OOP knowledge under the hood
just type this command in CLI: make run
connect to databaseuse Gorm's hooks (Auditable)prevent Gorm to keep continuously adding conditions to it by using Session in repository structgraceful shutdowncustom recovery middlewareresponse writer middlewarehandle errors by both gin and internal system convention- returning data from modified rows
- custom model binding and validation (must bind case)
- custom validation
- add example code for data validation
- log request body
- logging to Sentry (optional)
- auth middleware
- implement
RequestContext
- request timeout middleware
- auto route mapping *(SUPER HARD)
- refactor response util (use polymorphism)
- ...
https://medium.com/@anewnurse/go-series-2-create-restapi-using-gin-and-gorm-9c24f3e37324
https://medium.com/@anewnurse/go-series-3-domain-driven-design-ddd-f12707c68ea6