2021-01-30 21:20:02 +00:00
|
|
|
package notify
|
|
|
|
|
2021-02-18 03:33:30 +01:00
|
|
|
import "context"
|
|
|
|
|
2021-02-10 14:55:42 +01:00
|
|
|
// Notifier defines the behavior for notification services.
|
2021-01-30 21:20:02 +00:00
|
|
|
//
|
2021-02-10 14:55:42 +01:00
|
|
|
// The Send function simply sends a subject and a message string to the internal destination Notifier.
|
2022-02-07 10:24:43 +01:00
|
|
|
// E.g. for telegram.Telegram it sends the message to the specified group chat.
|
2021-01-30 21:20:02 +00:00
|
|
|
type Notifier interface {
|
2021-02-18 03:33:30 +01:00
|
|
|
Send(context.Context, string, string) error
|
2021-01-30 21:20:02 +00:00
|
|
|
}
|