message

package
v0.0.0-...-d606b87 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Messages = make(map[string]Message, 0)

Functions

func Enabled

func Enabled() bool

Enabled 是否启用

func NewServer

func NewServer() *mail2.SMTPServer

NewServer 创建 SMTPServer 服务

func Register

func Register(name string, message Message)

Register 注册

Types

type Bark

type Bark struct {
	// contains filtered or unexported fields
}

Bark 用于ios推送

func (Bark) Send

func (b Bark) Send(messageBody MessageBody)

type Mail

type Mail struct {
	Host     string `json:"host" yaml:"host"`
	Protocol string `json:"protocol" yaml:"protocol"`
	Port     int    `json:"port" yaml:"port"`
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
	FromName string `json:"from_name" yaml:"from_name"`
	To       string `json:"to" yaml:"to"`
}

func (Mail) Send

func (m Mail) Send(message MessageBody)

type Message

type Message interface {
	// Send 发送消息
	Send(MessageBody)
}

Message 消息发送

func GetSupport

func GetSupport() Message

GetSupport 获取支持

type MessageBody

type MessageBody struct {
	Title   string
	Content string
}

Jump to

Keyboard shortcuts

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