34 lines
522 B
Go
34 lines
522 B
Go
package webhook
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
StatusFiring = "firing"
|
|
StatusResolved = "resolved"
|
|
)
|
|
|
|
type Payload struct {
|
|
Version string
|
|
GroupKey string
|
|
TruncatedAlerts int
|
|
Status string
|
|
Receiver string
|
|
GroupLabels map[string]any
|
|
CommonLabels map[string]any
|
|
CommonAnnotations map[string]any
|
|
ExternalURL string
|
|
Alerts []Alert
|
|
}
|
|
|
|
type Alert struct {
|
|
Status string
|
|
Labels map[string]any
|
|
Annotations map[string]any
|
|
StartsAt time.Time
|
|
EndsAt time.Time
|
|
GeneratorURL string
|
|
Fingerprint string
|
|
}
|