From 76dd4fd2378c66cde6cae312d222f2d28023fb61 Mon Sep 17 00:00:00 2001 From: yxh Date: Wed, 22 Dec 2021 11:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E8=B7=AF=E7=94=B1=E6=8B=86?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/plugins/mail.go | 7 +++++++ app/common/plugins/sms.go | 14 ++++++++++++++ plugins/router/router.go | 8 ++++++++ router/plugins.go | 11 +++++++++++ 4 files changed, 40 insertions(+) create mode 100644 app/common/plugins/mail.go create mode 100644 app/common/plugins/sms.go create mode 100644 plugins/router/router.go create mode 100644 router/plugins.go diff --git a/app/common/plugins/mail.go b/app/common/plugins/mail.go new file mode 100644 index 0000000..dbb96be --- /dev/null +++ b/app/common/plugins/mail.go @@ -0,0 +1,7 @@ +package plugins + +type ICommonQQMail interface { + SendMail(mailTo []string, subject string, body string) error +} + +var CommonQQMail ICommonQQMail diff --git a/app/common/plugins/sms.go b/app/common/plugins/sms.go new file mode 100644 index 0000000..94c036d --- /dev/null +++ b/app/common/plugins/sms.go @@ -0,0 +1,14 @@ +package plugins + +type ICommonSmsWyyx interface { + SendSMSTemplate(params IWyyxReq) (string, error) +} + +// 网易云信 +var CommonSmsWyyx ICommonSmsWyyx + +// 入参 +type IWyyxReq struct { + Mobiles []string `v:"required#电话号码不能为空"` + Params []string `v:"required#短信参数不能为空"` +} diff --git a/plugins/router/router.go b/plugins/router/router.go new file mode 100644 index 0000000..09e5f02 --- /dev/null +++ b/plugins/router/router.go @@ -0,0 +1,8 @@ +/* +* @desc:插件路由 +* @company:云南省奇讯科技有限公司 +* @Author: yixiaohu +* @Date: 2021/12/22 10:42 + */ + +package router diff --git a/router/plugins.go b/router/plugins.go new file mode 100644 index 0000000..b00343c --- /dev/null +++ b/router/plugins.go @@ -0,0 +1,11 @@ +/* +* @desc:插件路由 +* @company:云南省奇讯科技有限公司 +* @Author: yixiaohu +* @Date: 2021/8/26 10:28 + */ + +package router + +//插件路由加载 +import _ "gfast/plugins/router"