{"id":38311799,"url":"https://github.com/shixiaofeia/fly","last_synced_at":"2026-01-17T02:32:40.883Z","repository":{"id":143268995,"uuid":"385106206","full_name":"shixiaofeia/fly","owner":"shixiaofeia","description":"一个简单而优雅的后端项目, 封装常用数据库组件及应用示例, 助力后端人员快速开发","archived":false,"fork":false,"pushed_at":"2024-05-31T06:13:47.000Z","size":414,"stargazers_count":73,"open_issues_count":1,"forks_count":19,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-13T15:55:58.158Z","etag":null,"topics":["clickhouse","elasticsearch","go","iris","mongodb","mysql","redis","socket"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shixiaofeia.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":"2021-07-12T02:44:05.000Z","updated_at":"2024-11-03T05:55:09.000Z","dependencies_parsed_at":"2024-01-04T11:30:35.865Z","dependency_job_id":"2fbf435d-8da3-4a75-be31-a78d5645c31c","html_url":"https://github.com/shixiaofeia/fly","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shixiaofeia/fly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shixiaofeia%2Ffly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shixiaofeia%2Ffly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shixiaofeia%2Ffly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shixiaofeia%2Ffly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shixiaofeia","download_url":"https://codeload.github.com/shixiaofeia/fly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shixiaofeia%2Ffly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28492321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"online","status_checked_at":"2026-01-17T02:00:07.808Z","response_time":85,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["clickhouse","elasticsearch","go","iris","mongodb","mysql","redis","socket"],"created_at":"2026-01-17T02:32:40.752Z","updated_at":"2026-01-17T02:32:40.855Z","avatar_url":"https://github.com/shixiaofeia.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome To Fly\r\n\r\n\u003cp\u003e\r\n\u003ca href=\"https://www.oscs1024.com/project/shixiaofeia/fly?ref=badge_small\"\u003e\r\n    \u003cimg src=\"https://www.oscs1024.com/platform/badge/shixiaofeia/fly.svg?size=small\" alt=\"\"\u003e\r\n\u003c/a\u003e\r\n\u003ca href=\"https://github.com/shixiaofeia/fly\"\u003e\r\n    \u003cimg src=\"https://badgen.net/badge/Github/fly?icon=github\" alt=\"\"\u003e\r\n\u003c/a\u003e\r\n\u003ca href=\"https://github.com/shixiaofeia/fly/LICENSE\"\u003e\r\n    \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/shixiaofeia/fly?style=flat-square\"\u003e\r\n\u003c/a\u003e\r\n\u003cimg src=\"https://img.shields.io/github/go-mod/go-version/shixiaofeia/fly.svg?style=flat-square\" alt=\"\"\u003e\r\n\u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/shixiaofeia/fly?style=flat-square\"\u003e\r\n\u003cimg alt=\"GitHub Repo stars\" src=\"https://img.shields.io/github/stars/shixiaofeia/fly?style=social\"\u003e\r\n\u003c/p\u003e\r\n\r\n## 简介\r\n\r\n一个简单而优雅的后端项目, 封装常用数据库组件及应用示例, 助力后端人员快速开发\r\n\r\n[个人博客](https://blog.csdn.net/ywdhzxf/)\r\n\r\n## 项目结构\r\n\r\n参考 [Go程序布局](https://github.com/golang-standards/project-layout/blob/master/README_zh.md)\r\n\r\n```\r\n├── build               // 打包/集成\r\n|  ├── app              // 应用程序名\r\n|  |  ├── Dockerfile    // 集成的配置/脚本\r\n├── cmd                 // 可执行目录\r\n|  ├── app              // 应用程序名\r\n|  |  ├── main.go       // 入口文件\r\n├── configs             // 配置文件\r\n|  ├── config.json      \r\n├── doc                 // 项目文档\r\n├── example             // 示例目录\r\n├── internal            // 私有程序\r\n|  ├── api              // 接口\r\n|  ├── config           // 配置文件解析\r\n|  ├── constvar         // 常量\r\n|  ├── domain           // 表结构\r\n|  ├── httpcode         // 请求处理组件\r\n|  ├── kit              // 公用逻辑函数\r\n|  └── monitor          // 监控定时服务相关\r\n|  └── rpc              // rpc\r\n├── logs                // 日志存放\r\n├── pkg                 // 安全导入的包(可以被任何项目直接导入使用)\r\n|  ├── clickhouse       // ck组件\r\n|  ├── email            // 邮件组件\r\n|  ├── es               // es组件\r\n|  ├── kafka            // kafka组件\r\n|  ├── jwt              // jwt组件\r\n|  ├── libs             // 封装的公用方法\r\n|  ├── logging          // 日志组件\r\n|  ├── mongo            // mongo组件\r\n|  └── mq               // mq组件\r\n|  └── mysql            // mysql组件\r\n|  └── redis            // redis组件\r\n|  └── safego           // 安全运行组件\r\n|  └── ws               // socket组件\r\n├── .dockerignore       // docker忽略文件    \r\n├── .gitignore          // git忽略文件    \r\n├── go.mod              // 包管理    \r\n├── README.md\r\n```\r\n\r\n## 优雅的代码\r\n\r\n[请先参阅一遍官方的代码规范指南](https://github.com/golang/go/wiki/CodeReviewComments)\r\n\r\n[gofmt](https://golang.org/cmd/gofmt/)\r\n\r\n[goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports)\r\n\r\n## 技术选型\r\n\r\n### web框架\r\n\r\n[gin](https://github.com/gin-gonic/gin)\r\n\r\n### rpc\r\n\r\n[grpc](https://pkg.go.dev/google.golang.org/grpc)\r\n\r\n### socket\r\n\r\n[gorilla](https://github.com/gorilla/websocket)\r\n\r\n### mysql\r\n\r\n[gorm](https://gorm.io/)\r\n\r\n### clickhouse\r\n\r\n[dbr](https://github.com/mailru/dbr)\r\n\r\n### es\r\n\r\n[elastic](https://github.com/olivere/elastic/v6)\r\n\r\n### kafka\r\n\r\n[kafka-go](https://github.com/segmentio/kafka-go)\r\n\r\n### mongo\r\n\r\n[mongo](https://github.com/go-mgo/mgo/tree/v2)\r\n\r\n### redis\r\n\r\n[redis](https://github.com/go-redis/redis)\r\n\r\n### mq\r\n\r\n[amqp](https://github.com/streadway/amqp)\r\n\r\n### log\r\n\r\n[zap](https://pkg.go.dev/go.uber.org/zap)\r\n\r\n### config\r\n\r\n[viper](https://github.com/spf13/viper)\r\n\r\n## 启动方式\r\n\r\n\u003e 请先复制 configs 目录下的配置文件, 并修改为自己的配置\r\n\r\n### 命令行启动\r\n\r\n```\r\ngo run cmd/app/main.go -config ./configs/config.yml\r\n```\r\n\r\n### Docker启动\r\n\r\n```\r\ndocker build -f build/app/Dockerfile -t fly:v1.0.0 .\r\ndocker run --rm -it -p 8888:8888 -p 9999:9999 --name fly fly:v1.0.0\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshixiaofeia%2Ffly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshixiaofeia%2Ffly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshixiaofeia%2Ffly/lists"}