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