gin-framework
:zap::rocket: Based on the gin framework, we have developed a user-friendly, simple, and fast development framework for API programming using go1.18+
File Explorer
Download Latest Version (.zip)- base.go
- base.go
- attachment.go
- auth.go
- user.go
- base.go
- common.go
- token.go
- user.go
- user.go
- common.go
- user.go
- user.go
- boot.go
- consumer.go
- producer.go
- admin.go
- command.go
- controller.go
- migrate.go
- model.go
- service.go
- config.dev.yaml
- config.prod.yaml
- config.test.yaml
- config.go
- white_list.go
- context.go
- vars.go
- casbin_auth.go
- cors_auth.go
- ip_auth.go
- login_auth.go
- rbac_model.conf
- requestid_auth.go
- 000001_create_users_table.down.sql
- 000001_create_users_table.up.sql
- 000002_create_admin_table.down.sql
- 000002_create_admin_table.up.sql
- 000003_create_users_info_table.down.sql
- 000003_create_users_info_table.up.sql
- 000004_create_casbin_rule_table.down.sql
- 000004_create_casbin_rule_table.up.sql
- 000005_create_gin_role_table.down.sql
- 000005_create_gin_role_table.up.sql
- casbin_rule.go
- gin_admin.go
- gin_role.go
- gin_user.go
- gin_user_info.go
- model.go
- jwt.go
- logger.go
- mysql.go
- redis.go
- pagination.go
- code.go
- response.go
- format_time.go
- helper.go
- node.go
- ticker.go
- tree.go
- upload.go
- validator.go
- backend.go
- common.go
- frontend.go
- register.go
- index.html
- admin.go
- attachment.go
- common.go
- user.go
- .air.toml
- Dockerfile
- go.mod
- LICENSE
- main.go
- Makefile
- README.md
- README.zh_CN.md
# Installation Guide
git clone https://github.com/MQEnergy/gin-framework
Downloads the entire project code from GitHub to your computer.
cd gin-framework
Moves into the project folder you just downloaded.
2. Official Install Script
Easy Recommendedgo install github.com/cosmtrek/air@latest
Downloads and installs the specified version directly β no need to clone the repo yourself.
brew install golang-migrate
Installs the pre-built package via Homebrew β no source build required.
scoop install migrate
Installs directly via Scoop (Windows).
Pulled directly from this repo's README.
3. Docker
Easy- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker build -t gin-framework .
Builds a runnable image based on the Dockerfile.
docker run -p 8080:80 gin-framework
Runs the built image as an actual container.
4. Go
Mediumgo run main.go
Runs the Go program directly without a separate build step.
go run main.go --help
Runs the Go program directly without a separate build step.
go install github.com/cosmtrek/air@latest
Downloads and installs the specified version directly β no need to clone the repo yourself.
go run main.go migrate -s=all
Runs the Go program directly without a separate build step.
go run main.go migrate -help
Runs the Go program directly without a separate build step.
Pulled directly from this repo's README.
5. Make
Medium- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make help
Compiles the code based on the generated build configuration to produce an executable.
make build
Compiles the code based on the generated build configuration to produce an executable.
make windows
Compiles the code based on the generated build configuration to produce an executable.
make darwin
Compiles the code based on the generated build configuration to produce an executable.
make linux
Compiles the code based on the generated build configuration to produce an executable.
Pulled directly from this repo's README.
