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
Click to show internal directories.
Click to hide internal directories.