exchange-diary
backend server
Domain Driven Design (Hexagonal architecture)
├── application // same as interface layer in hexagonal architecture
│ ├── cmd // command line interface
│ ├── controller // http controller
│ ├── middleware // middleware that handles requests
│ └── route // http route, which delegate impl to controller
├── domain // domain layer in hexagonal architecture, never have any external dependencies
│ ├── entity // entity in domain layer
│ ├── repository // interface of persistence layer
│ └── service // domain service layer
└── infrastructure // handle external dependencies
├── configs // every configs include gin framework
└── persistence // impl of persistence layer
GOLDEN_RULE: domain/ 에는 외부 dependency가 들어오지 않는다.
application/
: application layer- 원래는
interface
라고 명칭을 가져가야 하지만, 코드의 interface와 명칭이 중복되어, application 영역으로 명시함. hexagonal
에서 application service layer + interface layer의 코드가 들어있음
- 원래는
domain/
: domain layerinfrastructure/
: infra layer
- go mod를 사용할 경우
... 중략 ...
export PATH="$PATH:$HOME/go/bin"
export GO111MODULE=on
$ go install golang.org/x/tools/cmd/goimports
$ go install golang.org/x/lint/golint
$ cp pre-commit.example .git/hooks/pre-commit
$ chmod +x .git/hooks/pre-commit
- go run + local mysql db
$ make run
$ make build
$ make docker
$ make clean
$ ./bin/exchange-diray -phase=${phase}
- local docker api server image + google cloud sql
$ make down && make up
- google cloud run + google cloud sql (same as sandbox db)
- trigger (cloud build)
- push to /main branch
- api server:
google cloud run
- static server:
google cloud storage FUSE
- db:
google cloud sql
- ci / cd:
Cloud Code
&Cloud Build
- devops
Cloud Monitoring
Cloud Logging
Cloud Trace
다이어리방 생성 / 읽기 / 업데이트 / 나가기 관련 플로우
crud를 제외한 나머지 api 플로우
다이어리 관련된 플로우