alarm

package
v1.0.5-0...-20c45f9 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: GPL-3.0 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 struct {
	// contains filtered or unexported fields
}

func NewAlarm

func NewAlarm(alarms []IAlarm, sep time.Duration) *Alarm

func (*Alarm) Send

func (l *Alarm) Send(msg string)

type DDingAlarm

type DDingAlarm struct {
	AccessToken string
	// contains filtered or unexported fields
}

func (*DDingAlarm) GetLastSendTime

func (alarm *DDingAlarm) GetLastSendTime() time.Time

func (*DDingAlarm) Send

func (alarm *DDingAlarm) Send(msg string) error

type IAlarm

type IAlarm interface {
	Send(msg string) error
	GetLastSendTime() time.Time
}

type WxCorpAlarm

type WxCorpAlarm struct {
	CorpID  string
	AgentID int
	Secret  string

	UpdateTime time.Time
	ToUser     string
	// contains filtered or unexported fields
}

func (*WxCorpAlarm) GetLastSendTime

func (alarm *WxCorpAlarm) GetLastSendTime() time.Time

func (*WxCorpAlarm) Send

func (alarm *WxCorpAlarm) Send(content string) error

type WxCorpAlarmGroup

type WxCorpAlarmGroup struct {
	Key string
	// contains filtered or unexported fields
}

func (*WxCorpAlarmGroup) GetLastSendTime

func (alarm *WxCorpAlarmGroup) GetLastSendTime() time.Time

func (*WxCorpAlarmGroup) Send

func (alarm *WxCorpAlarmGroup) Send(msg string) error

Jump to

Keyboard shortcuts

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