Skip to content

golang-crew/Boilerplate-CRUD-GO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Backend Boilerplate with GO (Gin-gonic)

author PRs Welcome Build Status Go Report Card

당신이 Go ν”„λ‘œμ νŠΈλ₯Ό λΉ λ₯΄κ²Œ μ‹œμž‘ν• μˆ˜ μžˆλ„λ‘ λ„μ™€μ€„κ»˜μš”!

Inspired by Covenant Ko


πŸ“š Tech Stack

  • Go
  • Gin-gonic
  • GORM
  • Go Queryset
  • Swagger
  • MySQL
  • Docker
  • Travis CI
  • Deepsource Go

How it works

.
β”œβ”€β”€ 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

Generate Go-queryset

goqueryset -in {fileName}

πŸ”§ Run the Applications

# 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

πŸ“„ Reference

License

About

πŸ“¦ Bolierplate CRUD with GO-lang

Resources

License

Stars

Watchers

Forks