Documentation
¶
Overview ¶
Package pusher @Author arthur 15:52:00
Index ¶
- Constants
- func BuildAlarmMsg(notification db.Notification, table *db.BaseTable, alarm *db.Alarm, ...) (msg *db.PushMsg, err error)
- func Execute(channelIds []int, pushMsg *db.PushMsg) error
- type DingDing
- type Email
- type FeiShu
- type IPusher
- type MentionedOption
- type Slack
- type Telegram
- type TelegramBot
- type WeChat
Constants ¶
View Source
const ( COLOR = "#8b0000" SUBNAME = "alarm" AUTHORLINK = "" ICON = "https://avatars.githubusercontent.com/u/104639309?s=200&v=4" FOOTER = "clickvisual" )
Variables ¶
This section is empty.
Functions ¶
func BuildAlarmMsg ¶
func BuildAlarmMsg(notification db.Notification, table *db.BaseTable, alarm *db.Alarm, filter *db.AlarmFilter, partialLog string) (msg *db.PushMsg, err error)
BuildAlarmMsg Description: 提供一个通用的md模式的获取内容的方法 param notification 通知的部分方法 param alarm 警告的数据库连接 param oneTheLogs 日志内容
Types ¶
type MentionedOption ¶
type MentionedOption struct {
// contains filtered or unexported fields
}
func NewEmptyOption ¶
func NewEmptyOption() *MentionedOption
func NewMentionAllOption ¶
func NewMentionAllOption() *MentionedOption
func NewMentionMobileOption ¶
func NewMentionMobileOption(mobileList ...string) *MentionedOption
type TelegramBot ¶
type TelegramBot struct {
// contains filtered or unexported fields
}
func NewTelegram ¶
func NewTelegram(token string) (*TelegramBot, error)
func (*TelegramBot) SendFile ¶
func (tg *TelegramBot) SendFile(filePath, fileName, mime, caption string, to int64) error
func (*TelegramBot) SendMessage ¶
func (tg *TelegramBot) SendMessage(msg string, to int64, markdown bool) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.