gin-zero
๐คทโ What is gin-zero?
English | ็ฎไฝไธญๆ
gin-zero is a gin-based golang application scaffolding that supports one-click generation of HTTP, GRPC, Websocket applications, and can also be used to build microservice applications.
It integrates many excellent open source packages internally, and also provides some modular microservices governance packages.
gin-zero contains simple API description syntax and code generation tool called ginctl.
Quick start
- An example of http application: demo
- Install
git clone https://github.com/gin-ctl/zero
cd zero
go install github.com/gin-ctl/ginctl@latest
ginctl -h
# example
ginctl apply --app admin --module http # A command generates the admin application of the http request
ginctl api -a admin -m http -l user -o ping -d test # Generate an http request interface 'ping' for the user module in the admin application
# Then go to the route directory and fill in your request method for the ping interface
- Directory description
- app: application directory contains http, grpc, and websocket
- Application directory
app/http/demo
โโโ demo.go # main.go
โโโ deploy # deployment document
โย ย โโโ DockerFile
โย ย โโโ Makefile
โย ย โโโ certificate.yaml # Subscribe to ssl encrypted files for domain names for free
โย ย โโโ gateway.yaml # Kubernetes gateway configuration file
โย ย โโโ k8s.yaml # Kubernetes deployment file
โโโ etc
โย ย โโโ env.yaml # Modify your application configuration
โโโ logic
โย ย โโโ demo # Service code
โย ย โย ย โโโ logic.go # http request controller
โย ย โย ย โโโ types.go # http request checksum request structure
โย ย โโโ logic.go
โโโ middleware # middleware
โย ย โโโ auth.go
โโโ route # Routing file
โย ย โโโ route.go
โโโ storage # Log file
โโโ logs-2024-07-06.log
Code of Conduct
In order to ensure that the gin-zero community is welcoming to all, please review and abide by the [Code of Conduct](Code of Conduct).
Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via golang2024@163.com. All security vulnerabilities will be promptly addressed.
License
The gin-zero framework is open-sourced software licensed under the MIT license.