{"id":13562100,"url":"https://github.com/xinliangnote/go-gin-api","last_synced_at":"2025-05-14T05:10:33.723Z","repository":{"id":37664124,"uuid":"203927039","full_name":"xinliangnote/go-gin-api","owner":"xinliangnote","description":"基于 Gin 进行模块化设计的 API 框架，封装了常用功能，使用简单，致力于进行快速的业务研发。比如，支持 cors 跨域、jwt 签名验证、zap 日志收集、panic 异常捕获、trace 链路追踪、prometheus 监控指标、swagger 文档生成、viper 配置文件解析、gorm 数据库组件、gormgen 代码生成工具、graphql 查询语言、errno 统一定义错误码、gRPC 的使用、cron 定时任务 等等。","archived":false,"fork":false,"pushed_at":"2023-12-23T00:57:01.000Z","size":4319,"stargazers_count":5798,"open_issues_count":38,"forks_count":1120,"subscribers_count":73,"default_branch":"master","last_synced_at":"2025-04-11T00:02:17.705Z","etag":null,"topics":["api-gin","cron","gin","gin-api","go","golang","gorm","graphql","jaeger","jwt","pprof","prometheus","swagger","trace","viper","zap"],"latest_commit_sha":null,"homepage":"https://www.yuque.com/xinliangnote/go-gin-api/ngc3x5","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/xinliangnote.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}},"created_at":"2019-08-23T05:01:08.000Z","updated_at":"2025-04-10T16:06:52.000Z","dependencies_parsed_at":"2024-01-12T18:38:59.776Z","dependency_job_id":"8b26f1dc-78e6-4348-acbc-4d905ec48d94","html_url":"https://github.com/xinliangnote/go-gin-api","commit_stats":{"total_commits":140,"total_committers":7,"mean_commits":20.0,"dds":0.1071428571428571,"last_synced_commit":"8fd9a005d1953545f74f68cc0e0bc1fa14b332cf"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinliangnote%2Fgo-gin-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinliangnote%2Fgo-gin-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinliangnote%2Fgo-gin-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinliangnote%2Fgo-gin-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xinliangnote","download_url":"https://codeload.github.com/xinliangnote/go-gin-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076849,"owners_count":22010611,"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":["api-gin","cron","gin","gin-api","go","golang","gorm","graphql","jaeger","jwt","pprof","prometheus","swagger","trace","viper","zap"],"created_at":"2024-08-01T13:01:04.531Z","updated_at":"2025-05-14T05:10:33.697Z","avatar_url":"https://github.com/xinliangnote.png","language":"Go","readme":"## 关于\n\n`go-gin-api` 是基于 [Gin](https://github.com/gin-gonic/gin) 进行模块化设计的 API 框架，封装了常用的功能，使用简单，致力于进行快速的业务研发，同时增加了更多限制，约束项目组开发成员，规避混乱无序及自由随意的编码。\n\n供参考学习，线上使用请谨慎！\n\n集成组件：\n\n1. 支持 [rate](https://golang.org/x/time/rate) 接口限流 \n1. 支持 panic 异常时邮件通知 \n1. 支持 [cors](https://github.com/rs/cors) 接口跨域 \n1. 支持 [Prometheus](https://github.com/prometheus/client_golang) 指标记录 \n1. 支持 [Swagger](https://github.com/swaggo/gin-swagger) 接口文档生成 \n1. 支持 [GraphQL](https://github.com/99designs/gqlgen) 查询语言 \n1. 支持 trace 项目内部链路追踪 \n1. 支持 [pprof](https://github.com/gin-contrib/pprof) 性能剖析\n1. 支持 errno 统一定义错误码 \n1. 支持 [zap](https://go.uber.org/zap) 日志收集 \n1. 支持 [viper](https://github.com/spf13/viper) 配置文件解析\n1. 支持 [gorm](https://gorm.io/gorm) 数据库组件\n1. 支持 [go-redis](https://github.com/go-redis/redis/v7) 组件\n1. 支持 RESTful API 返回值规范\n1. 支持 生成数据表 CURD、控制器方法 等代码生成器\n1. 支持 [cron](https://github.com/jakecoffman/cron) 定时任务，在后台可界面配置\n1. 支持 [websocket](https://github.com/gorilla/websocket) 实时通讯，在后台有界面演示\n1. 支持 web 界面，使用的 [Light Year Admin 模板](https://gitee.com/yinqi/Light-Year-Admin-Using-Iframe)\n\n\n## 文档索引（可加入交流群）\n\n- 中文文档：[go-gin-api - 语雀](https://www.yuque.com/xinliangnote/go-gin-api/ngc3x5)\n- English Document：[en.md](https://github.com/xinliangnote/go-gin-api/blob/master/en.md)\n\n## 轻量版\n\n为了满足开发者对于简单、轻量级 API 框架的需求，开发了 gin-api-mono，旨在提供更便捷的业务开发体验。\n\n相比于 go-gin-api，首先 gin-api-mono 去掉了一些集成的功能和界面，使得整个框架更加简洁、轻量。其次 gin-api-mono 对框架代码进行了升级，以确保其在性能和稳定性方面的优势。这样，开发者就可以更灵活地选择所需的功能，并获得更好的性能和稳定性。\n\n详见链接：https://xiaobot.net/post/e9f7ef4c-81b1-4ffc-9053-bec55c3abb12\n\n## 其他\n\n查看 Jaeger 链路追踪 Demo 代码，请查看 [v1.0 版](https://github.com/xinliangnote/go-gin-api/releases/tag/v1.0) ，链接地址：http://127.0.0.1:9999/jaeger_test\n\n调用的其他服务端 Demo 代码为 [https://github.com/xinliangnote/go-jaeger-demo](https://github.com/xinliangnote/go-jaeger-demo)\n\n## 联系作者\n\n![联系作者](https://i.loli.net/2021/07/02/cwiLQ13CRgJIS86.jpg)\n\n","funding_links":[],"categories":["Go","Go (531)","Repositories"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinliangnote%2Fgo-gin-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxinliangnote%2Fgo-gin-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinliangnote%2Fgo-gin-api/lists"}