5 Star 12 Fork 6

Gitee 极速下载 / Notice-Services

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/xinjiayu/NoticeServices
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

NoticeServices 通用的通知服务

通用的通知服务支持web、webhook、短信、邮件、企业微信等通知消息的统一可配置管理与发送。支持通知模板、信息发送模板等配置。可以为多个业务应用提供通知消息发送服务。

支持功能:

  • 即时推送
  • 预约推送
  • 定期推送

支持多种发送通道:

  • 邮件
  • webhook (可配置多个)
  • web (http api接口方式)
  • 短信 (阿里云、腾讯云)
  • 企业微信

逻辑架构图

design01

技术栈

基础框架:GoFrame中文文档

数据库:SQLite 【 中文文档

目录结构说明:

参考基础框架中的说明 【项目结构

公共通知服务API

通知数据

{
    "app_id":"dfasdfasdf",
    "config_id":"3eb5e3d5cd2c71ef6fce3f391c9eabcd",
    "come_from":"xxxadf",
    "method":"instant",
    "method_num":2,
    "method_task":"*",
    "msg_title":"3556777744系統故障了",
    "msg_body":"我们的内容信息",
    "msg_url":"http://www.aaa.com/aafd",
    "user_ids":"aaaa|bbbb|cccc",
    "party_ids":"",
    "totag":[{"name":"mail","value":"940290@qq.com"},{"name":"webhook","value":"cccc"}]
}

method:信息的任务方式,取值范围为:instant、appointment、regular

instant:即时发送 appointment:预约发送 regular:定期发送

使用说明

通知配置与模板配置

一个业务需要发送通知,需要在通知服务中创建一个通知配置。并配置这个通知采用哪儿些发送通道进行发送通知。并且针对选择的通道设置发信模板信息。

短信发送

发送内容如果是多个值的,msg_body中的内容要采用|分割。每个值对应短信模板中的可替换变量。

关于build.sh编译脚本

在使用build.sh脚本进行程序编译的时候,提示

fatal: No names found, cannot describe anything.
./build.sh linux|windows|mac

是因为源码没有进行git版本的标签设置。

支持将git的tag编译到程序中。需要创建git的tag。只有创建了tag,编译的程序才会显示版本号。

git tag v0.0.1

git push origin v0.0.1

dao及model文件生成

采用gf框架的代码生成工具

gf gen dao  -path ./app/ -t app,config,info,job,template,userInfo

感谢 JetBrains

JetBrains
MIT License Copyright (c) 2021 rain Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

NoticeServices 通用的通知服务 通用的通知服务支持web、短信、邮件、企业微信等通知消息的统一可配置管理与发送 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors/Notice-Services.git
git@gitee.com:mirrors/Notice-Services.git
mirrors
Notice-Services
Notice-Services
main

搜索帮助