-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from nikoksr/refactor/simplify-notifier-interface
refactor(notifier): Simplify notify.Notifier interface
- Loading branch information
Showing
5 changed files
with
11 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
package notify | ||
|
||
// Notifier defines the behavior for notification services. It implements Send and AddReciever | ||
// Notifier defines the behavior for notification services. | ||
// | ||
// The Send command simply sends a message string to the internal destination Notifier. | ||
// E.g for telegram it sends the message to the specified group chat. | ||
// | ||
// The AddReceivers takes one or many strings and | ||
// adds these to the list of destinations for receiving messages | ||
// e.g. slack channels, telegram chats, email addresses. | ||
// The Send function simply sends a subject and a message string to the internal destination Notifier. | ||
// E.g for telegram.Telegram it sends the message to the specified group chat. | ||
type Notifier interface { | ||
Send(string, string) error | ||
AddReceivers(...string) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters