Updated Notifiers (markdown)

master
Hunter Long 2018-09-14 18:22:52 -07:00
parent 3bb194f307
commit ac23e04a5d
1 changed files with 6 additions and 9 deletions

@ -15,14 +15,10 @@ Statup has the `Notifier` interface which you'll need to include in your notifie
```go
// Notifier interface is required to create a new Notifier
type Notifier interface {
// Run will trigger inside of the notifier when enabled
Run() error
// OnSave is triggered when the notifier is saved
OnSave() error
// Test will run a function inside the notifier to Test if it works
Test() error
// Select returns the *Notification for a notifier
Select() *Notification
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
}
```
@ -71,3 +67,4 @@ You can completely custom your notifications to include a detailed form.
- `Title` give your input element a title
- `Placeholder` optional field if you want a placeholder in input
- `DbField` required field to save variable into database (read above)
- `Placeholder` optional field for inserting small hint under the input