zero

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2024 License: MIT

README ยถ

gin-zero

Release

๐Ÿคทโ€ 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

  1. An example of http application: demo
  2. 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
  1. 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.

Directories ยถ

Path Synopsis
app
http/demo command
package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL