notify

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LINE_NOTIFY_URL string = "https://notify-api.line.me/api/notify"
)

Variables

This section is empty.

Functions

func LineNotificationOff

func LineNotificationOff()

func LineNotificationOn

func LineNotificationOn()

Types

type LineNotifyToken

type LineNotifyToken struct {
	Token string
	Tag   string
}

func NewLineClient

func NewLineClient(token string) *LineNotifyToken

func NewLineClientWithTag

func NewLineClientWithTag(token, tag string) *LineNotifyToken

func (*LineNotifyToken) SendImageFile

func (t *LineNotifyToken) SendImageFile(msg, imgpath string) error

func (*LineNotifyToken) SendImageUrl

func (t *LineNotifyToken) SendImageUrl(msg, imgurl, thumbUrl string) error

func (*LineNotifyToken) SendMessage

func (t *LineNotifyToken) SendMessage(msg string) error

func (*LineNotifyToken) SendSticker

func (t *LineNotifyToken) SendSticker(msg string, packageId, id int32) error

type MailContent

type MailContent struct {
	From            *mail.Address
	To              []*mail.Address
	Cc              []*mail.Address
	Bcc             []*mail.Address
	ReplyTo         *mail.Address
	Subject         string
	Body            string
	BodyContentType string
	Headers         map[string]string
	Attachments     map[string]string
	ServerInfo      *SmtpServer
}

func (*MailContent) AddBcc

func (m *MailContent) AddBcc(bcc string) error

func (*MailContent) AddCc

func (m *MailContent) AddCc(cc string) error

func (*MailContent) AddHeader

func (m *MailContent) AddHeader(key, value string) error

func (*MailContent) AddTo

func (m *MailContent) AddTo(to string) error

func (*MailContent) Attach

func (m *MailContent) Attach(file string)

func (*MailContent) SendMail

func (m *MailContent) SendMail() error

func (*MailContent) SetFrom

func (m *MailContent) SetFrom(from string) error

func (*MailContent) SetHeader

func (m *MailContent) SetHeader(key, value string)

func (*MailContent) SetReplyTo

func (m *MailContent) SetReplyTo(reply string) error

type SlackMessageToken

type SlackMessageToken struct {
	WebhookUrl string
}

func NewSlackMessageClient

func NewSlackMessageClient(whurl string) *SlackMessageToken

func (*SlackMessageToken) SendMessage

func (t *SlackMessageToken) SendMessage(obj interface{}) error

func (*SlackMessageToken) SendSimpleMessage

func (t *SlackMessageToken) SendSimpleMessage(msg string) error

type SmtpServer

type SmtpServer struct {
	SmtpHost     string
	SmtpPort     uint16
	SmtpUsername string
	SmtpPassword string
	SmtpSecret   string
	Identity     string
}

func NewSmtpServer

func NewSmtpServer(
	host string,
	port uint16,
	username, password string,
) *SmtpServer

func NewSmtpServerCRAMMD5

func NewSmtpServerCRAMMD5(
	host string,
	port uint16,
	username, secret string,
) *SmtpServer

func NewSmtpServerWithID

func NewSmtpServerWithID(
	host string,
	port uint16,
	username, password, identity string,
) *SmtpServer

func (*SmtpServer) EasySendMail

func (s *SmtpServer) EasySendMail(from, to, subject, body string) error

func (*SmtpServer) NewHTMLMessage

func (s *SmtpServer) NewHTMLMessage(subject, body string) *MailContent

func (*SmtpServer) NewMessage

func (s *SmtpServer) NewMessage(subject, body string) *MailContent

Jump to

Keyboard shortcuts

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