message

package
v0.0.0-...-cc65f9c Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendMessage

func SendMessage(message Message)

SendMessage 发送消息

Types

type MailMessage

type MailMessage struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	From     string
	Subject  string `json:"subject"`
	Body     string `json:"body"`
	To       []string
}

MailMessage 邮件消息

func (MailMessage) Dump

func (m MailMessage) Dump()

Dump .

type Message

type Message interface {
	Dump()
}

Message 消息主体

type SMSMessage

type SMSMessage struct {
	URL    string            `json:"url"`
	Method string            `json:"method"`
	Header map[string]string `json:"header"`
	Querys map[string]string `json:"query"`
	Params map[string]string `json:"body"`
	To     string
	Body   string
}

SMSMessage 短信消息

func (SMSMessage) Dump

func (m SMSMessage) Dump()

Dump .

Jump to

Keyboard shortcuts

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