λΉμ μ΄ Go νλ‘μ νΈλ₯Ό λΉ λ₯΄κ² μμν μ μλλ‘ λμμ€κ»μ!
Inspired by Covenant Ko
- Go
- Gin-gonic
- GORM
- Go Queryset
- Swagger
- MySQL
- Docker
- Travis CI
- Deepsource Go
.
βββ main.go
βββ common
β βββ utils.go // small tools function
βββ docs // automatically generated file by swagger
βββ handler
β βββ memo.go // business logic
βββ models
β βββ autogenerated_memo.go // automatically generated file by gogqueryset
β βββ database.go // initial database setup
β βββ memo.go // memo models define & DB operation
βββ responses
β βββ memos.go // define responses format
βββ responses
β βββ memos.go // define request format
βββ routers
β βββ routers.go // grouping URI
β βββ v1
β βββ router.go // router binding
goqueryset -in {fileName}
# Move to directory
$ cd workspace
# Clone into YOUR $GOPATH/src
$ git clone https://github.com/KoEonYack/Boilerplate-CRUD-GO.git
# Docker compose
$ docker-compose up -d
# Run Case 1
$ go run main.go
# Run Case 2
# Docker build
$ docker build . -t boilerplate-crud
# Docker run
$ docker run -p 8080:8080 boilerplate-crud
- Github. go-clean-arch
- Book. Go νμ€ν μΉ κ°λ° (Mina Andrawos))