30 lines
877 B
Go
30 lines
877 B
Go
package models
|
|
|
|
type AlertItem struct {
|
|
Id int64 `json:"id"`
|
|
ContactPointId int64 `json:"contactPointId"`
|
|
Name string `json:"name"`
|
|
Condition string `json:"condition"`
|
|
CustomMessage string `json:"customMessage"`
|
|
|
|
/* how long does the condition have to be true for the alert to go off */
|
|
TriggerInterval int64 `json:"triggerInterval"`
|
|
|
|
/* current alert status, possible values: good, pending, alerting */
|
|
LastStatus string `json:"lastStatus"`
|
|
/* time at which was status last changed */
|
|
LastStatusAt int64 `json:"lastStatusAt"`
|
|
}
|
|
|
|
type AlertConditionSensorValue struct {
|
|
SensorId int64 `json:"sensorId"`
|
|
Condition string `json:"condition"`
|
|
Value float64 `json:"value"`
|
|
}
|
|
|
|
type AlertConditionSensorLastContact struct {
|
|
SensorId int64 `json:"sensorId"`
|
|
Value int64 `json:"value"`
|
|
ValueUnit string `json:"valueUnit"`
|
|
}
|