{"id":13600240,"url":"https://github.com/rxrddd/austin-go","last_synced_at":"2026-01-16T05:34:28.698Z","repository":{"id":59067314,"uuid":"488061793","full_name":"rxrddd/austin-go","owner":"rxrddd","description":"austin项目的golang版本,一个聚合消息推送平台","archived":false,"fork":false,"pushed_at":"2023-01-25T06:44:40.000Z","size":245,"stargazers_count":88,"open_issues_count":2,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-07T02:37:25.450Z","etag":null,"topics":[],"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/rxrddd.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}},"created_at":"2022-05-03T03:05:25.000Z","updated_at":"2024-10-22T03:17:40.000Z","dependencies_parsed_at":"2023-02-14T05:31:31.061Z","dependency_job_id":null,"html_url":"https://github.com/rxrddd/austin-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxrddd%2Faustin-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxrddd%2Faustin-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxrddd%2Faustin-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxrddd%2Faustin-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rxrddd","download_url":"https://codeload.github.com/rxrddd/austin-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248301447,"owners_count":21080894,"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":[],"created_at":"2024-08-01T18:00:33.153Z","updated_at":"2026-01-16T05:34:28.684Z","avatar_url":"https://github.com/rxrddd.png","language":"Go","funding_links":[],"categories":["Go","Libraries that use [go-zero](https://github.com/tal-tech/go-zero)"],"sub_categories":[],"readme":"# austin-go\n\n#### 介绍\n\naustin项目的golang版本\n\n\u003e v1版本\n#### github地址：[https://github.com/rxrddd/austin-go](https://github.com/rxrddd/austin-go)\n#### gitee地址：[https://gitee.com/AbelZou/austin-go](https://gitee.com/AbelZou/austin-go)\n\n\u003e v2版本(基于kratos重新做了一个版本)\n#### github地址：[https://github.com/rxrddd/austin-v2](https://github.com/rxrddd/austin-v2)\n\n#### 项目描述\n\n1. 基于go-zero/grpc/ants/rabbitmq/mysql/redis 写的一个聚合消息推送平台\n  \n2. 你可以学习到:\n  \n  - go-zero的api和rpc层如何调用\n  - go-zero项目如何使用gorm,以及封装gorm对应的gorm cache\n  - go-zero项目中如何使用定时任务/mq消费\n\n#### 项目启动\n1. 需要搭建mysql/rabbitmq/redis服务\n1. 导入数据库文件:`austin-go/sql/austin.sql`并修改`send_account`表中的`config`配置\n2. 修改对应的mysql/rabbitmq/redis配置\n - rpc服务配置:`austin-go/app/austin-web/rpc/etc/austin.yaml`\n - job服务配置:`austin-go/app/austin-job/etc/austin-job.yaml`\n3. \n\u003e 手动启动\n - 启动api服务:`austin-go/app/austin-web/api/austin.go`\n - 启动rpc服务:`austin-go/app/austin-web/rpc/austin.go`\n - 启动job服务:`austin-go/app/austin-job/rpc/austin-job.go`\n\u003e docker一键启动\n- 执行 deployment-shell.sh\n4. 如需要测试去重服务则修改`message_template`表中的`deduplication_config`字段\n```\n{\"deduplication_10\":{\"num\":1,\"time\":300},\"deduplication_20\":{\"num\":5}}\n```\n5. 使用示例\n\u003e 邮件消息\n```\ncurl --location --request POST 'http://localhost:8888/send' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"code\": \"send\",\n    \"messageParam\": {\n        \"receiver\": \"test@qq.com\",\n        \"variables\": {\n            \"title\": \"测试操作\",\n            \"content\": \"Hello \u003cb\u003eBob\u003c/b\u003e and \u003ci\u003eCora\u003c/i\u003e!\"\n        }\n    },\n    \"messageTemplateId\": 2\n}'\n```\n\n\u003e 微信公众号消息\n```\ncurl --location --request POST 'http://localhost:8888/send' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"code\": \"send\",\n    \"messageParam\": {\n        \"receiver\": \"openId\",\n        \"variables\": {\n            \"map\": {\n                \"name\":\"张三12333\"\n            },\n            \"url\": \"https://www.baidu.com/\"\n        }\n    },\n    \"messageTemplateId\": 4\n}'\n\n//参数带颜色的\ncurl --location --request POST 'http://localhost:8888/send' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"code\": \"send\",\n    \"messageParam\": {\n        \"receiver\": \"openId\",\n        \"variables\": {\n            \"map\": {\n                \"name\":\"张三12333|#0000FF\"\n            },\n            \"url\": \"https://www.baidu.com/\"\n        }\n    },\n    \"messageTemplateId\": 4\n}'\n```\n\n\u003e 钉钉自定义机器人\n```\n//艾特某些手机号\ncurl --location --request POST 'http://localhost:8888/send' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"code\": \"send\",\n    \"messageParam\": {\n        \"receiver\": \"13588888888,13588888887\",\n        \"variables\": {\n            \"content\": \"测试\\n换行\"\n        }\n    },\n    \"messageTemplateId\": 5\n}'\n\n//艾特全部人\ncurl --location --request POST 'http://localhost:8888/send' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"code\": \"send\",\n    \"messageParam\": {\n        \"receiver\": \"@all\",\n        \"variables\": {\n            \"content\": \"测试\\n换行\"\n        }\n    },\n    \"messageTemplateId\": 5\n}'\n```\n\n\n\n\n#### 目录说明\n\n```\n├── app  \n│   ├── austin-admin        消息平台管理端  \n│   ├── austin-common       项目公用的一些结构体,接口定义  \n│   ├── austin-job          项目消费端 mq消费/定时任务  \n│   ├── austin-support      项目独有的一些支持方法  \n│   └── austin-web          项目对外提供的接口  \n├── common                  项目使用的公共的一些方法  \n├── gen.md                  生成api/rpc的脚本 参考goctl  \n└── sql                     项目sql文件  \n```\n\n#### 项目未完成功能\n\n1. 对接管理平台\n  \n2. 实现对应的推送信息handler\n  \n3. 文件导入实时/定时推送\n  \n4. 客户端sdk\n\n\n\n#### Thanks\n\ngo-zero : https://github.com/zeromicro/go-zero\n\naustin : https://gitee.com/zhongfucheng/austin\n\nants : https://github.com/panjf2000/ants\n\ngomail : https://gopkg.in/gomail.v2\n\nwechat : https://github.com/silenceper/wechat\n\nding : https://github.com/wanghuiyt/ding\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxrddd%2Faustin-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frxrddd%2Faustin-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxrddd%2Faustin-go/lists"}