diff --git a/Notifier-Example.md b/Notifier-Example.md index 40b44a9..79518d7 100644 --- a/Notifier-Example.md +++ b/Notifier-Example.md @@ -1,7 +1,5 @@ Below is a full example of a Statping notifier which will give you a good example of how to create your own. Insert your new notifier inside the `/notifiers` folder once your ready! -[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/hunterlong/statping/core/notifier) - ```go package notifiers @@ -169,4 +167,20 @@ func (n *Example) OnUpdatedNotifier(s *Notification) { # Adding Notifiers To add a notifier to the Statping application, simply append your Notifier in the `AttachNotifiers()` function inside of [core/core.go](https://github.com/hunterlong/statping/blob/master/core/core.go). -https://github.com/hunterlong/statping/blob/master/core/core.go#L183 \ No newline at end of file +```go +// AttachNotifiers will attach all the notifier's into the system +func AttachNotifiers() error { + return notifier.AddNotifiers( + notifiers.Command, + notifiers.Discorder, + notifiers.Emailer, + notifiers.LineNotify, + notifiers.Mobile, + notifiers.Slacker, + notifiers.Telegram, + notifiers.Twilio, + notifiers.Webhook, + ) +} +``` +###### [AttachNotifiers](https://github.com/hunterlong/statping/blob/master/core/core.go#L183)