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