Files
logan 2d73661dd1 feat: complete Loki query, insights, settings and deployment workflows
Add the Loki query UI, access policies, ingress insights, alert and registry settings, and their backend APIs. Include the related Kubernetes deployment and collector updates required by the integrated application.

Validated with go test ./..., npm run build, and npm run lint.
2026-10-25 21:28:32 +08:00

24 lines
882 B
Go

package models
import "time"
// NotifyChannel 通知通道:一个飞书/Lark 群机器人 webhook。
// 支持多通道对应不同告警群(如「应用告警群」「Nginx 告警群」),告警规则各自关联。
type NotifyChannel struct {
ID uint `json:"id"`
Name string `json:"name"`
Webhook string `json:"webhook"` // ENC: 加密存储,不外发
SigningSecret string `json:"signingSecret"` // ENC: 可选签名校验
Enabled bool `json:"enabled"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
func (c *NotifyChannel) Sanitized() map[string]interface{} {
return map[string]interface{}{
"id": c.ID, "name": c.Name,
"hasWebhook": c.Webhook != "", "hasSecret": c.SigningSecret != "",
"enabled": c.Enabled, "createdAt": c.CreatedAt, "updatedAt": c.UpdatedAt,
}
}