代码拉取完成,页面将自动刷新
austin项目的golang版本
https://github.com/rxrddd/austin-go
https://gitee.com/AbelZou/austin-go
基于go-zero/grpc/ants/rabbitmq/mysql/redis 写的一个聚合消息推送平台
你可以学习到:
austin-go/sql/austin.sql
并修改send_account
表中的config
配置austin-go/app/austin-web/rpc/etc/austin.yaml
austin-go/app/austin-job/etc/austin-job.yaml
手动启动
austin-go/app/austin-web/api/austin.go
austin-go/app/austin-web/rpc/austin.go
austin-go/app/austin-job/rpc/austin-job.go
docker一键启动
message_template
表中的deduplication_config
字段{"deduplication_10":{"num":1,"time":300},"deduplication_20":{"num":5}}
邮件消息
curl --location --request POST 'http://localhost:8888/send' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "send",
"messageParam": {
"receiver": "test@qq.com",
"variables": {
"title": "测试操作",
"content": "Hello <b>Bob</b> and <i>Cora</i>!"
}
},
"messageTemplateId": 2
}'
微信公众号消息
curl --location --request POST 'http://localhost:8888/send' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "send",
"messageParam": {
"receiver": "openId",
"variables": {
"map": {
"name":"张三12333"
},
"url": "https://www.baidu.com/"
}
},
"messageTemplateId": 4
}'
//参数带颜色的
curl --location --request POST 'http://localhost:8888/send' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "send",
"messageParam": {
"receiver": "openId",
"variables": {
"map": {
"name":"张三12333|#0000FF"
},
"url": "https://www.baidu.com/"
}
},
"messageTemplateId": 4
}'
钉钉自定义机器人
//艾特某些手机号
curl --location --request POST 'http://localhost:8888/send' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "send",
"messageParam": {
"receiver": "13588888888,13588888887",
"variables": {
"content": "测试\n换行"
}
},
"messageTemplateId": 5
}'
//艾特全部人
curl --location --request POST 'http://localhost:8888/send' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "send",
"messageParam": {
"receiver": "@all",
"variables": {
"content": "测试\n换行"
}
},
"messageTemplateId": 5
}'
├── app
│ ├── austin-admin 消息平台管理端
│ ├── austin-common 项目公用的一些结构体,接口定义
│ ├── austin-job 项目消费端 mq消费/定时任务
│ ├── austin-support 项目独有的一些支持方法
│ └── austin-web 项目对外提供的接口
├── common 项目使用的公共的一些方法
├── gen.md 生成api/rpc的脚本 参考goctl
└── sql 项目sql文件
对接管理平台
实现对应的推送信息handler
文件导入实时/定时推送
客户端sdk
go-zero : https://github.com/zeromicro/go-zero
austin : https://gitee.com/zhongfucheng/austin
ants : https://github.com/panjf2000/ants
gomail : https://gopkg.in/gomail.v2
wechat : https://github.com/silenceper/wechat
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。