Feature:
- Modular Project Structure.
- Full example including tests.
- Docker deployment.
- Compatible.
-
Prepare
.env
.cp .env.sample .env
-
Start mysql and create database.
docker-compose up -d
-
Prepare database schema.
rel migrate
-
Build and Running
make
.
├── api
│ ├── handler
│ │ ├── todos.go
│ │ └── [other handler].go
│ └── middleware
│ └── [other middleware].go
├── bin
│ ├── api
│ └── [other executable]
├── cmd
│ ├── api
│ │ └── main.go
│ └── [other cmd]
│ └── main.go
├── db
│ ├── schema.sql
│ └── migrations
│ └── [migration file]
├── todos
│ ├── todo.go
│ ├── create.go
│ ├── update.go
│ ├── delete.go
│ ├── service.go
│ └── todostest
│ ├── todo.go
│ └── service.go
├── [other domain]
│ ├── [entity a].go
│ ├── [business logic].go
│ ├── [other domain]test
│ │ └── service.go
│ └── service.go
└── [other client]
├── [entity b].go
├── client.go
└── [other client]test
└── client.go