mirror of https://github.com/statping/statping
Add new Fields to `Service` Struct
Add `UpdateNotify` Field to allow the Notifiers to check if `UpdateNotify` has been enabled in `CoreApp`. Add `DownText` Field to have a default Downtime Text which also has the 'Service has been down for n-Seconds' Text. Add `SuccessNotified` Field to check if a "Success" Message has already been send. This is because the `s.Online` Field is always "false" if the OnSuccess() Function is called of an Notifier.pull/258/head
parent
786bfe75fc
commit
d81c525d71
|
@ -50,7 +50,10 @@ type Service struct {
|
|||
Checkpoint time.Time `gorm:"-" json:"-"`
|
||||
SleepDuration time.Duration `gorm:"-" json:"-"`
|
||||
LastResponse string `gorm:"-" json:"-"`
|
||||
UserNotified bool `gorm:"-" json:"-"` /// True if the User was already notified about a Downtime
|
||||
UserNotified bool `gorm:"-" json:"-"` // True if the User was already notified about a Downtime
|
||||
UpdateNotify bool `gorm:"-" json:"-"` // This Variable is a simple copy of `core.CoreApp.UpdateNotify.Bool`
|
||||
DownText string `gorm:"-" json:"-"` // Contains the current generated Downtime Text
|
||||
SuccessNotified bool `gorm:"-" json:"-"` // Is 'true' if the user has already be informed that the Services now again available
|
||||
LastStatusCode int `gorm:"-" json:"status_code"`
|
||||
LastOnline time.Time `gorm:"-" json:"last_success"`
|
||||
Failures []FailureInterface `gorm:"-" json:"failures,omitempty"`
|
||||
|
|
Loading…
Reference in New Issue