Updated Notifiers (markdown)

master
Hunter Long 2018-09-20 03:01:30 -07:00
parent cd8f64e44d
commit 79c99edaf7
1 changed files with 8 additions and 1 deletions

@ -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{&notifier.Notification{