notify

package
v0.0.0-...-da91ef8 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DingTalkMessage

type DingTalkMessage struct {
	MsgType string              `json:"msgtype"`
	Text    DingTalkMessageText `json:"text"`
}

DingTalkMessage 是钉钉消息格式

type DingTalkMessageText

type DingTalkMessageText struct {
	Content string `json:"content"`
}

type DingTalkNotifier

type DingTalkNotifier struct {
	WebhookURL string
}

func NewDingTalkNotifier

func NewDingTalkNotifier(webhookURL string) *DingTalkNotifier

NewDingTalkNotifier 创建一个新的 DingTalkNotifier 实例

func (*DingTalkNotifier) Send

func (d *DingTalkNotifier) Send(message string) error

Send 发送钉钉通知

type Notifier

type Notifier interface {
	Send(message string) error
}

Jump to

Keyboard shortcuts

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