{"id":19922195,"url":"https://github.com/zyallers/zgin","last_synced_at":"2025-09-10T17:40:13.758Z","repository":{"id":45338369,"uuid":"297226005","full_name":"ZYallers/zgin","owner":"ZYallers","description":"ZGin is a API framework written in Go (Golang). An MVCS, Restful, and version control framework based on the Gin framework. If you need performance and good productivity, you will love ZGin.","archived":false,"fork":false,"pushed_at":"2024-07-24T06:12:35.000Z","size":209,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T12:49:34.997Z","etag":null,"topics":["framework","go","golang","httprouter","middleware","mvc","performance","server","version-control","zgin"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZYallers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-21T04:13:24.000Z","updated_at":"2024-07-24T06:11:46.000Z","dependencies_parsed_at":"2024-04-07T03:36:19.484Z","dependency_job_id":"a6e287c4-4cc2-4715-adb7-ffcd943dffc4","html_url":"https://github.com/ZYallers/zgin","commit_stats":null,"previous_names":[],"tags_count":71,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZYallers%2Fzgin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZYallers%2Fzgin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZYallers%2Fzgin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZYallers%2Fzgin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZYallers","download_url":"https://codeload.github.com/ZYallers/zgin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252156719,"owners_count":21703332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["framework","go","golang","httprouter","middleware","mvc","performance","server","version-control","zgin"],"created_at":"2024-11-12T22:09:57.159Z","updated_at":"2025-05-03T07:30:35.043Z","avatar_url":"https://github.com/ZYallers.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zgin\n[![Go Report Card](https://goreportcard.com/badge/github.com/ZYallers/zgin)](https://goreportcard.com/report/github.com/ZYallers/zgin)\n[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://travis-ci.org/ZYallers/zgin.svg?branch=master)](https://travis-ci.org/ZYallers/zgin) \n[![Foundation](https://img.shields.io/badge/Golang-Foundation-green.svg)](http://golangfoundation.org) \n[![GoDoc](https://pkg.go.dev/badge/github.com/ZYallers/zgin?status.svg)](https://pkg.go.dev/github.com/ZYallers/zgin?tab=doc)\n[![Sourcegraph](https://sourcegraph.com/github.com/ZYallers/zgin/-/badge.svg)](https://sourcegraph.com/github.com/ZYallers/zgin?badge)\n[![Release](https://img.shields.io/github/release/ZYallers/zgin.svg?style=flat-square)](https://github.com/ZYallers/zgin/releases)\n[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/ZYallers/zgin)](https://www.tickgit.com/browse?repo=github.com/ZYallers/zgin)\n[![goproxy.cn](https://goproxy.cn/stats/github.com/ZYallers/zgin/badges/download-count.svg)](https://goproxy.cn)\n\nZgin is a API framework written in Go (Golang). \nAn MVCS, Restful, and version control framework based on the [Gin](https://github.com/gin-gonic/gin) framework.\nIf you need performance and good productivity, you will love zgin.\n\n## Installation\nTo install zgin package, you need to install Go and set your Go workspace first.\n\n1. The first need Go installed (version 1.11+ is required), then you can use the below Go command to install zgin.\n```bash\n$ go get -u github.com/ZYallers/zgin\n```\n\n2. Import it in your code:\n```go \nimport \"github.com/ZYallers/zgin\" \n```\n\n## Quick start\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/ZYallers/zgin\"\n\t\"github.com/ZYallers/zgin/consts\"\n\t\"github.com/ZYallers/zgin/example/route\"\n\t\"github.com/ZYallers/zgin/handler\"\n\t\"github.com/ZYallers/zgin/helper/config\"\n\t\"github.com/ZYallers/zgin/middleware\"\n\t\"github.com/ZYallers/zgin/option\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc main() {\n\tgin.DisableConsoleColor()\n\tgin.DebugPrintRouteFunc = func(httpMethod, absolutePath, handlerName string, nuHandlers int) {}\n\tif err := config.ReadFile(); err != nil {\n\t\tpanic(fmt.Errorf(\"read config file error: %s\", err))\n\t}\n\tapp := zgin.New(\n\t\toption.WithMode(consts.DevMode),\n\t)\n\tapp.Run(\n\t\thandler.WithNoRoute(),\n\t\thandler.WithHealth(),\n\t\tmiddleware.WithZapRecovery(),\n\t\tmiddleware.WithZapLogger(),\n\t\thandler.WithExpVar(),\n\t\thandler.WithPrometheus(),\n\t\thandler.WithSwagger(),\n\t\thandler.WithPProf(),\n\t\tmiddleware.WithRestCheck(route.Restful),\n\t)\n}\n\n```\nrun main.go and visit http://0.0.0.0:9010/health (for windows \"http://localhost:8080/health\") on browser\n```bash\n$ go run main.go\n```\n\n## Zgin v1.stable\n- MVCS four-tier architecture support\n- Restful interface style support\n- API version control and permission custom configuration\n- PProf middleware support\n- Prometheus middleware support\n- Swagger api docs middleware support\n- Graceful server shutdown and reload\n\n## Build with jsoniter\nZgin uses encoding/json as default json package but you can change to [jsoniter](https://github.com/json-iterator/go) by build from other tags.\n```bash\n$ go build -tags=jsoniter .\n```\n\n## License\nReleased under the [MIT License](https://github.com/ZYallers/zgin/blob/master/LICENSE)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyallers%2Fzgin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyallers%2Fzgin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyallers%2Fzgin/lists"}