Accelerate the development of your REST API!
This cutting-edge tool empowers you to swiftly generate a blazing-fast REST API without the hassle of manual database configuration.
Kickstart with Go-QuickStart -pkg=awesomeProject
and behold the extraordinary results unfold before your eyes.
go install github.com/fanchann/Go-QuickStart
Set your environment variable
DB_DRIVER=mysql
DB_AUTH_USERNAME=root
DB_AUTH_PASSWORD=root
DB_NAME=local_production
DB_URL=127.0.0.1
DB_PORT=3306
.
├── .env
├── go.mod
├── go.sum
├── interface
│ ├── controller
│ └── middleware
├── internal
│ ├── models
│ │ ├── domain
│ │ └── web
│ ├── repositories
│ └── services
├── main.go
├── pkg
│ ├── config
│ │ └── config.go
│ ├── database
│ │ └── mysql.go
│ └── utils
│ └── error.go
├── README.md
└── tests
Contains the sub-layers "controller" and "middleware".
- Controller
Handles user's HTTP requests and connects them to the application logic. - Middleware
Adds additional features like authentication, authorization, logging, etc.
Contains the sub-layers "models", "repositories", and "services".
- Models
Provides definitions for the data structures used in the application. - Repositories
Interacts with the data storage, such as a database. - Services
Provides the business logic of the application.
Contains utilities, configuration files, and connections to external resources.
- Config
Application configuration files. - Database
Implementation of the database connection. - Utils
Common utilities used in the application.
Contains unit tests or automated tests to ensure the functionality of the application