This is a simple CRUD application build on a Clean-Architecture written in Golang.
> make init
> make up
> curl -i -XPOST -d '{"title": "test", "body": "this is a test article"}' localhost:8080/articles
> curl -i -XGET localhost:8080/articles
> curl -i -XGET localhost:8080/articles/1
> curl -i -XPUT -d '{"title": "updated title", "body": "this article is updated"}' localhost:8080/articles/1
> curl -i -XDELETE localhost:8080/articles/1
layer | directory |
---|---|
Enterprise Business Rules | entities |
Application Business Rules | usecase |
Interface Adapters | adapter |
Frameworks & Drivers | driver |
Core business rules are implemented in this layer.
By describing the business logic API, this layer expresses what this software will achieve.
This layer describes the input(controller), output(presenter) and data presistence process(gateway).
This layer describes establishing DB connections, configuring routing and using the framework.