Documentation ¶ Index ¶ Constants func Init(mail *Mail, web *WebHook) func Send(msg *Message) func Serve() type Mail func (mail *Mail) SendMsg(msg *Message) type Message func (m *Message) Check() type Noticer type WebHook func (w *WebHook) SendMsg(msg *Message) Constants ¶ View Source const ( NotifyTypeMail = 1 NotifyTypeWebHook = 2 ) Variables ¶ This section is empty. Functions ¶ func Init ¶ func Init(mail *Mail, web *WebHook) func Send ¶ func Send(msg *Message) func Serve ¶ func Serve() Types ¶ type Mail ¶ type Mail struct { Port int From string Host string Secret string Nickname string } func (*Mail) SendMsg ¶ func (mail *Mail) SendMsg(msg *Message) type Message ¶ type Message struct { Type int Subject string Body string To []string OccurTime string } func (*Message) Check ¶ func (m *Message) Check() type Noticer ¶ type Noticer interface { SendMsg(*Message) } type WebHook ¶ type WebHook struct { Kind string Url string } func (*WebHook) SendMsg ¶ func (w *WebHook) SendMsg(msg *Message) Source Files ¶ View all Source files mail.go noticer.go webhook.go Click to show internal directories. Click to hide internal directories.