Categorygithub.com/JunNishimura/clean-architecture-with-go
modulepackage
0.0.0-20241216142427-666a0caa58c0
Repository: https://github.com/junnishimura/clean-architecture-with-go.git
Documentation: pkg.go.dev

# README

Template project of Clean-Architecture

This is a simple CRUD application build on a Clean-Architecture written in Golang.

:triangular_flag_on_post: DEMO

1. use Docker to set up an environment to run the application

> make init
> make up 

2. Call API by curl command

create

> curl -i -XPOST -d '{"title": "test", "body": "this is a test article"}' localhost:8080/articles

read

> curl -i -XGET localhost:8080/articles
> curl -i -XGET localhost:8080/articles/1

update

> curl -i -XPUT -d '{"title": "updated title", "body": "this article is updated"}' localhost:8080/articles/1

delete

> curl -i -XDELETE localhost:8080/articles/1

:book: Explanation

cleanarchitecture

layerdirectory
Enterprise Business Rulesentities
Application Business Rulesusecase
Interface Adaptersadapter
Frameworks & Driversdriver

Enterprise Business Rules

Core business rules are implemented in this layer.

Application Business Rules

By describing the business logic API, this layer expresses what this software will achieve.

Interface Adapters

This layer describes the input(controller), output(presenter) and data presistence process(gateway).

Frameworks & Drivers

This layer describes establishing DB connections, configuring routing and using the framework.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author