mirror of https://github.com/statping/statping
Updated Notifiers (markdown)
parent
cd8f64e44d
commit
79c99edaf7
|
@ -17,7 +17,6 @@ Statup has the `Notifier` interface which you'll need to include in your notifie
|
|||
type Notifier interface {
|
||||
OnSave() error // OnSave is triggered when the notifier is saved
|
||||
Send(interface{}) error // OnSave is triggered when the notifier is saved
|
||||
Test() error // Test will run a function inside the notifier to Test if it works
|
||||
Select() *Notification // Select returns the *Notification for a notifier
|
||||
}
|
||||
```
|
||||
|
@ -33,6 +32,14 @@ type BasicEvents interface {
|
|||
}
|
||||
```
|
||||
|
||||
The OnTest method will give the front end user the ability to test your notifier without saving.
|
||||
```go
|
||||
// Tester interface will include a function to Test users settings before saving
|
||||
type Tester interface {
|
||||
OnTest(Notification) (bool, error)
|
||||
}
|
||||
```
|
||||
|
||||
## Notifier Struct
|
||||
```go
|
||||
var example = &Example{¬ifier.Notification{
|
||||
|
|
Loading…
Reference in New Issue