1
0
mirror of https://github.com/nikoksr/notify.git synced 2025-01-24 03:16:35 +02:00
notify/notifier.go
Niko Köser bd82278932
refactor(notifier): remove AddReceivers function from notify.Notifier interface
AddReceivers was added to the notify.Notifier interface in 3d7cc206e13d7149c0e9750d257f43abd276b1f4
and the fact that it shouldn't be there was obviously overlooked during
the code review.
The AddReceivers function is present in all services so far, but it does
not define the behavior of our services. The behavior is defined only by
the Send function. The AddReceivers function is also not called once in
the code on a notify.notifier. This can also be seen by the fact that I
can remove the AddReceivers function from the notify.Notifier interface
without getting any errors in the rest of the code.
2021-02-10 14:55:42 +01:00

10 lines
318 B
Go

package notify
// Notifier defines the behavior for notification services.
//
// 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
}