Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationSender ¶
NotificationSender provides an interface to send notifications (e.g. to Shoutrrr)
type Notifier ¶
type Notifier interface {
Notify(entries []models.CountryEntry) (err error)
}
Notifier will send notifications when we receive new updates for selected countries
type RealNotifier ¶
type RealNotifier struct { Sender NotificationSender // contains filtered or unexported fields }
RealNotifier will send notifications when we receive new updates for selected countries
func NewNotifier ¶
func NewNotifier(sender NotificationSender, countries []string, db store.CovidStore) *RealNotifier
NewNotifier creates a new RealNotifier
func (*RealNotifier) Notify ¶
func (notifier *RealNotifier) Notify(entries []models.CountryEntry) (err error)
Notify sends notification when we receive updates for selected countries
type ShoutrrrSender ¶
type ShoutrrrSender struct {
// contains filtered or unexported fields
}
ShoutrrrSender implements the NotificationSender interface for Shoutrrr
func NewNotificationSender ¶
func NewNotificationSender(url string) *ShoutrrrSender
NewNotificationSender creates a new ShoutrrrSender
func (*ShoutrrrSender) Send ¶
func (s *ShoutrrrSender) Send(title, message string) (err error)
Send a notification
Click to show internal directories.
Click to hide internal directories.