{"id":24300008,"url":"https://github.com/xfstart07/gim","last_synced_at":"2026-04-06T08:31:37.125Z","repository":{"id":64303999,"uuid":"207525506","full_name":"xfstart07/gim","owner":"xfstart07","description":"golang implement im server","archived":false,"fork":false,"pushed_at":"2023-02-15T02:22:56.000Z","size":8291,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T11:44:21.451Z","etag":null,"topics":["docker","golang","grpc","im","protobuf3","redis"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xfstart07.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-09-10T10:03:31.000Z","updated_at":"2021-02-23T02:18:07.000Z","dependencies_parsed_at":"2024-06-20T16:35:35.073Z","dependency_job_id":"b36360cd-6fb2-4038-b9f4-8ebd9d7ee491","html_url":"https://github.com/xfstart07/gim","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xfstart07/gim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfstart07%2Fgim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfstart07%2Fgim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfstart07%2Fgim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfstart07%2Fgim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xfstart07","download_url":"https://codeload.github.com/xfstart07/gim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xfstart07%2Fgim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"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":["docker","golang","grpc","im","protobuf3","redis"],"created_at":"2025-01-16T22:20:05.112Z","updated_at":"2026-04-06T08:31:37.107Z","avatar_url":"https://github.com/xfstart07.png","language":"Go","readme":"# GIM\n\nGolang 实现 的 IM 系统。\n\n## TODO LIST\n\n第一阶段：\n\n- [x]  1. 通过api接口实现用户的注册，并将信息存入 redis\n- [x]  2. 服务端启动 http，grpc 服务，client 能连接上\n- [x]  3. 用户可以通过命令行进行实现私聊，群聊\n- [x]  4. 与服务端连接断开后，用户的下线功能\n- [x]  5. 格式化客户端信息打印\n- [x]  6. 聊天信息存储文件中。\n- [x]  7. 接入 etcd 做客户端和服务端的服务发现。\n- [x]  8. 完善客户端重连和服务端连接下线功能\n- [x]  9. 通过 redis 的 pubsub 分发消息\n- [x]  10. 重构代码，将对象接口化，合理化\n- [x]  11. 用户退出，注销\n- [x]  12. 客户端获取所有用户列表\n- [ ]  13. 添加测试用例\n\n## protobuf\n\n生成 GRPC 接口描述文件\n\n```bash\nmake gen_proto\n```\n\n## 消息\n\n### 注册\n\n向服务器注册账户\n\n```bash\ncurl -X POST --header 'Content-Type: application/json' -d '{\"user_name\": \"leon\"}' http://localhost:8081/registerAccount\n```\n\n返回信息\n\n```json\n{\"code\":\"0\",\"message\":\"OK\",\"data\":{\"user_id\":1567996897857327000,\"user_name\":\"leon\"}}\n```\n\n## 使用\n\n服务端启动\n\n```bash\nmake run_server\n```\n\n客户端启动\n\n```bash \nmake run_client\n```\n\n要启动多个客户端需要修改 `config/client.ini` 的用户信息\n\n## 构建\n\n```bash\nmake build_server\n```\n\n## 部署\n\n### 配置 server\n\n请查看 [deployment/nginx/gim.conf](deployment/nginx/gim.conf) 文件.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxfstart07%2Fgim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxfstart07%2Fgim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxfstart07%2Fgim/lists"}