Code Monkey home page Code Monkey logo

noticeservices's Introduction

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":"[email protected]"},{"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

noticeservices's People

Contributors

xinjiayu avatar

Stargazers

koala avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.