content

package
v0.0.0-...-513d4e4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeishuPrivateCardMsg

type FeishuPrivateCardMsg struct {
	ReceiveId     string `json:"receive_id"`
	ReceiveIdType string `json:"receive_id_type"`
	MsgType       string `json:"msg_type"`
	Content       string `json:"content"`
}

FeishuPrivateCardMsg 私聊消息的结构体

type WebhookContent

type WebhookContent interface {
	// GenerateFeishuCardContentOneAlert 生成单个告警的 Feishu 卡片内容并发送到群聊和私聊
	GenerateFeishuCardContentOneAlert(ctx context.Context, alert template.Alert, event *model.MonitorAlertEvent, rule *model.MonitorAlertRule, sendGroup *model.MonitorSendGroup) error
	// SentFeishuGroup 发送消息到 Feishu 群聊
	SentFeishuGroup(ctx context.Context, msg string, robotToken string) error
	// SentFeishuPrivate 发送消息到 Feishu 私聊
	SentFeishuPrivate(ctx context.Context, cardContent string, privateUserIds map[string]string) error
}

func NewWebhookContent

func NewWebhookContent(l *zap.Logger, dao dao.WebhookDao, robot robot.WebhookRobot) WebhookContent

Jump to

Keyboard shortcuts

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