push

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package push @Author arthur 15:52:00

Index

Constants

View Source
const (
	ChannelDingDing = iota + 1
	ChannelWeChat
	ChannelFeiShu
	ChannelSlack
	ChannelEmail
	ChannelTelegram
)
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

This section is empty.

Types

type DingDing

type DingDing struct{}

func (*DingDing) Send

func (d *DingDing) Send(notification view.Notification, alarm *db.Alarm, channel *db.AlarmChannel, oneTheLogs string) (err error)

type Email added in v0.3.1

type Email struct {
}

func (*Email) Send added in v0.3.1

func (e *Email) Send(notification view.Notification, alarm *db.Alarm, channel *db.AlarmChannel, oneTheLogs string) (err error)

type FeiShu added in v0.3.1

type FeiShu struct{}

func (*FeiShu) Send added in v0.3.1

func (s *FeiShu) Send(notification view.Notification, alarm *db.Alarm,
	channel *db.AlarmChannel, oneTheLogs string) (err error)

type Operator

type Operator interface {
	Send(notification view.Notification, alarm *db.Alarm, channel *db.AlarmChannel, oneTheLogs string) (err error)
}

func Instance

func Instance(typ int) (Operator, error)

type Slack added in v0.3.1

type Slack struct{}

func (*Slack) Send added in v0.3.1

func (s *Slack) Send(notification view.Notification, alarm *db.Alarm,
	channel *db.AlarmChannel, oneTheLogs string) (err error)

type Telegram added in v0.3.1

type Telegram struct {
}

func (*Telegram) Send added in v0.3.1

func (t *Telegram) Send(notification view.Notification, alarm *db.Alarm, channel *db.AlarmChannel, oneTheLogs string) (err error)

type TelegramBot added in v0.3.1

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

func NewTelegram added in v0.3.1

func NewTelegram(token string) (*TelegramBot, error)

func (*TelegramBot) SendFile added in v0.3.1

func (tg *TelegramBot) SendFile(filePath, fileName, mime, caption string, to int64) error

func (*TelegramBot) SendMessage added in v0.3.1

func (tg *TelegramBot) SendMessage(msg string, to int64, markdown bool) error

type WeChat

type WeChat struct{}

func (*WeChat) Send

func (d *WeChat) Send(notification view.Notification, alarm *db.Alarm, channel *db.AlarmChannel, oneTheLogs string) (err error)

Send ... oneTheLogs one of the logs, detail info

Directories

Path Synopsis
Package feishu @Author arthur 09:51:00
Package feishu @Author arthur 09:51:00

Jump to

Keyboard shortcuts

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