notify

package
v0.0.0-...-0282d68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

*********************************************************** ** @Description: notify ** @Author: Bee ** @Date: 2018-02-15 11:02 ** @Last Modified by: Bee ** @Last Modified time: 2018-02-15 11:02 ************************************************************

*********************************************************** ** @Description: notify ** @Author: george hao ** @Date: 2018-08-08 12:59 ** @Last Modified by: gwalker ** @Last Modified time: 2018-11-26 14:57 ************************************************************

*********************************************************** ** @Description: notify ** @Author: george hao ** @Date: 2018-08-09 13:05 ** @Last Modified by: Bee ** @Last Modified time: 2019-02-15 13:50 ************************************************************

Index

Constants

This section is empty.

Variables

View Source
var DingtalkChan chan *Dingtalk
View Source
var DingtalkUrl string
View Source
var SmsChan chan *Sms
View Source
var SmsUrl string
View Source
var WechatChan chan *Wechat
View Source
var WechatUrl string

Functions

func Dial

func Dial(addr string) (*smtp.Client, error)

func GetContentTypeString

func GetContentTypeString(format string) string

func SendDingtalkToChan

func SendDingtalkToChan(dingtalks map[string]string, content map[string]interface{}) bool

func SendMailUsing25

func SendMailUsing25(addr string, port string, auth smtp.Auth, from string, to []string, msg []byte) (err error)

func SendMailUsing465

func SendMailUsing465(addr string, port string, auth smtp.Auth, from string, to []string, msg []byte) (err error)

func SendSmsToChan

func SendSmsToChan(mobiles map[string]string, param map[string]string) bool

func SendToChan

func SendToChan(to, subject, body, mailtype string) bool

func SendWechatToChan

func SendWechatToChan(accounts map[string]string, param map[string]string) bool

Types

type Dingtalk

type Dingtalk struct {
	Dingtalks map[string]string
	Content   map[string]interface{}
}

func (*Dingtalk) SendDingtalk

func (s *Dingtalk) SendDingtalk() error

type PEmail

type PEmail struct {
	Config  *PEmailConfig
	Subject string
	Body    string
	To      string
	Format  string
}

func (*PEmail) SendToEmail

func (pe *PEmail) SendToEmail() error

type PEmailConfig

type PEmailConfig struct {
	Host string
	Port string
	User string
	Pwd  string
	From string
}

type Sms

type Sms struct {
	Mobiles map[string]string
	Param   map[string]string
}

func (*Sms) SendSms

func (s *Sms) SendSms() error

type SmsAjaxReturn

type SmsAjaxReturn struct {
	Status  int         `json:"status"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type Wechat

type Wechat struct {
	Accounts map[string]string
	Param    map[string]string
}

func (*Wechat) SendWechat

func (s *Wechat) SendWechat() error

type WechatAjaxReturn

type WechatAjaxReturn struct {
	Status  int         `json:"status"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL