85 lines
4.0 KiB
Go
85 lines
4.0 KiB
Go
package model
|
|
|
|
const (
|
|
MonitorStatusDown = 0
|
|
MonitorStatusUp = 1
|
|
)
|
|
|
|
type UptimeKumaWebhookRequest struct {
|
|
Heartbeat struct {
|
|
MonitorID int `json:"monitorID"`
|
|
Status int `json:"status"`
|
|
Time string `json:"time"`
|
|
Msg string `json:"msg"`
|
|
Important bool `json:"important"`
|
|
Duration int `json:"duration"`
|
|
Timezone string `json:"timezone"`
|
|
TimezoneOffset string `json:"timezoneOffset"`
|
|
LocalDateTime string `json:"localDateTime"`
|
|
} `json:"heartbeat"`
|
|
Monitor struct {
|
|
ID int `json:"id"`
|
|
Name string `json:"name"`
|
|
Description any `json:"description"`
|
|
PathName string `json:"pathName"`
|
|
Parent any `json:"parent"`
|
|
ChildrenIDs []any `json:"childrenIDs"`
|
|
URL string `json:"url"`
|
|
Method string `json:"method"`
|
|
Hostname any `json:"hostname"`
|
|
Port any `json:"port"`
|
|
Maxretries int `json:"maxretries"`
|
|
Weight int `json:"weight"`
|
|
Active bool `json:"active"`
|
|
ForceInactive bool `json:"forceInactive"`
|
|
Type string `json:"type"`
|
|
Timeout int `json:"timeout"`
|
|
Interval int `json:"interval"`
|
|
RetryInterval int `json:"retryInterval"`
|
|
ResendInterval int `json:"resendInterval"`
|
|
Keyword any `json:"keyword"`
|
|
InvertKeyword bool `json:"invertKeyword"`
|
|
ExpiryNotification bool `json:"expiryNotification"`
|
|
IgnoreTLS bool `json:"ignoreTls"`
|
|
UpsideDown bool `json:"upsideDown"`
|
|
PacketSize int `json:"packetSize"`
|
|
Maxredirects int `json:"maxredirects"`
|
|
AcceptedStatuscodes []string `json:"accepted_statuscodes"`
|
|
DNSResolveType string `json:"dns_resolve_type"`
|
|
DNSResolveServer string `json:"dns_resolve_server"`
|
|
DNSLastResult any `json:"dns_last_result"`
|
|
DockerContainer string `json:"docker_container"`
|
|
DockerHost any `json:"docker_host"`
|
|
ProxyID any `json:"proxyId"`
|
|
NotificationIDList struct {
|
|
Num5 bool `json:"5"`
|
|
} `json:"notificationIDList"`
|
|
Tags []any `json:"tags"`
|
|
Maintenance bool `json:"maintenance"`
|
|
MqttTopic string `json:"mqttTopic"`
|
|
MqttSuccessMessage string `json:"mqttSuccessMessage"`
|
|
DatabaseQuery any `json:"databaseQuery"`
|
|
AuthMethod any `json:"authMethod"`
|
|
GrpcURL any `json:"grpcUrl"`
|
|
GrpcProtobuf any `json:"grpcProtobuf"`
|
|
GrpcMethod any `json:"grpcMethod"`
|
|
GrpcServiceName any `json:"grpcServiceName"`
|
|
GrpcEnableTLS bool `json:"grpcEnableTls"`
|
|
RadiusCalledStationID any `json:"radiusCalledStationId"`
|
|
RadiusCallingStationID any `json:"radiusCallingStationId"`
|
|
Game any `json:"game"`
|
|
GamedigGivenPortOnly bool `json:"gamedigGivenPortOnly"`
|
|
HTTPBodyEncoding string `json:"httpBodyEncoding"`
|
|
JSONPath any `json:"jsonPath"`
|
|
ExpectedValue any `json:"expectedValue"`
|
|
KafkaProducerTopic any `json:"kafkaProducerTopic"`
|
|
KafkaProducerBrokers []any `json:"kafkaProducerBrokers"`
|
|
KafkaProducerSsl bool `json:"kafkaProducerSsl"`
|
|
KafkaProducerAllowAutoTopicCreation bool `json:"kafkaProducerAllowAutoTopicCreation"`
|
|
KafkaProducerMessage any `json:"kafkaProducerMessage"`
|
|
Screenshot any `json:"screenshot"`
|
|
IncludeSensitiveData bool `json:"includeSensitiveData"`
|
|
} `json:"monitor"`
|
|
Msg string `json:"msg"`
|
|
}
|