alert

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alarm

type Alarm interface {
	SetProxy(string)
	SetHookURL(string)
	Send(ctx context.Context, content string) error
	Method() string
}

Alarm interface

type DingDing

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

DingDing dingding alarm implementation

func NewDingDing

func NewDingDing() *DingDing

func (*DingDing) Method

func (dd *DingDing) Method() string

Method alert method

func (*DingDing) Send

func (dd *DingDing) Send(ctx context.Context, content string) error

Send text message

func (*DingDing) SetHookURL

func (dd *DingDing) SetHookURL(url string)

SetHookURL set RequestURL eg: https://oapi.dingtalk.com/robot/send?access_token=xxxxx

func (*DingDing) SetProxy added in v0.3.10

func (dd *DingDing) SetProxy(proxy string)

type Telegram added in v0.2.6

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

func NewTelegram added in v0.2.6

func NewTelegram() *Telegram

func (*Telegram) Method added in v0.2.6

func (tel *Telegram) Method() string

Method alert method

func (*Telegram) Send added in v0.2.6

func (tel *Telegram) Send(ctx context.Context, content string) error

Send text message

func (*Telegram) SetHookURL added in v0.2.6

func (tel *Telegram) SetHookURL(_url string)

SetHookURL setting RequestURL eg:https://api.telegram.org/bot{token}/sendMessage?chat_id={chatId}

func (*Telegram) SetProxy added in v0.3.10

func (tel *Telegram) SetProxy(proxy string)

Jump to

Keyboard shortcuts

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