Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllNotificationsFailedError = errors.New("all notifications failed")
Functions ¶
This section is empty.
Types ¶
type ChannelRegistry ¶
type ChannelRegistry struct {
// contains filtered or unexported fields
}
func NewChannelRegistry ¶
func NewChannelRegistry() *ChannelRegistry
func (*ChannelRegistry) Register ¶
func (r *ChannelRegistry) Register(channel NotificationChannel)
func (*ChannelRegistry) SendNotification ¶
func (r *ChannelRegistry) SendNotification(ctx context.Context, sentNotif *model.SentNotification, offer *model.Offer) (*model.SentNotification, error)
type NotificationChannel ¶
type NotificationChannel interface { // SendNotification sends notification to the user and returns error if any SendNotification(ctx context.Context, sentNotif *model.SentNotification, offer *model.Offer) error // GetName returns name of the channel for identification GetName() string }
NotificationChannel is an interface for sending notifications by single channel
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func NewNotifier ¶
func (*Notifier) TrySendNotification ¶
Click to show internal directories.
Click to hide internal directories.