Documentation
¶
Index ¶
- func GetNotifierNotificationFromAer(alarmEventRecord models.AlarmEventRecord, globalCloudID uuid.UUID) notifier.Notification
- func NewNotificationStorageProvider(repository a.AlarmRepositoryInterface, globalCloudID uuid.UUID) notifier.NotificationProvider
- func NewSubscriptionStorageProvider(repository a.AlarmRepositoryInterface) notifier.SubscriptionProvider
- type NotificationStorageProvider
- type SubscriptionStorageProvider
- func (s *SubscriptionStorageProvider) GetSubscriptions(ctx context.Context) ([]notifier.SubscriptionInfo, error)
- func (s *SubscriptionStorageProvider) Matches(subscription *notifier.SubscriptionInfo, notification *notifier.Notification) bool
- func (s *SubscriptionStorageProvider) Transform(subscription *notifier.SubscriptionInfo, notification *notifier.Notification) (*notifier.Notification, error)
- func (s *SubscriptionStorageProvider) UpdateSubscription(ctx context.Context, subscription *notifier.SubscriptionInfo) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNotifierNotificationFromAer ¶
func GetNotifierNotificationFromAer(alarmEventRecord models.AlarmEventRecord, globalCloudID uuid.UUID) notifier.Notification
GetNotifierNotificationFromAer convert alarmEventRecord to a notification type
func NewNotificationStorageProvider ¶
func NewNotificationStorageProvider(repository a.AlarmRepositoryInterface, globalCloudID uuid.UUID) notifier.NotificationProvider
NewNotificationStorageProvider creates a new NotificationProvider
func NewSubscriptionStorageProvider ¶
func NewSubscriptionStorageProvider(repository a.AlarmRepositoryInterface) notifier.SubscriptionProvider
NewSubscriptionStorageProvider creates a new SubscriptionStorageProvider
Types ¶
type NotificationStorageProvider ¶
type NotificationStorageProvider struct {
// contains filtered or unexported fields
}
NotificationStorageProvider implements the NotificationProvider interface as a means to abstract the concrete notification type out of the Notifier
func (*NotificationStorageProvider) DeleteNotification ¶
func (*NotificationStorageProvider) GetNotifications ¶
func (n *NotificationStorageProvider) GetNotifications(ctx context.Context) ([]notifier.Notification, error)
type SubscriptionStorageProvider ¶
type SubscriptionStorageProvider struct {
// contains filtered or unexported fields
}
SubscriptionStorageProvider implements the SubscriptionProvider interface as a means to abstract the concrete subscription type out of the Notifier
func (*SubscriptionStorageProvider) GetSubscriptions ¶
func (s *SubscriptionStorageProvider) GetSubscriptions(ctx context.Context) ([]notifier.SubscriptionInfo, error)
func (*SubscriptionStorageProvider) Matches ¶
func (s *SubscriptionStorageProvider) Matches(subscription *notifier.SubscriptionInfo, notification *notifier.Notification) bool
func (*SubscriptionStorageProvider) Transform ¶
func (s *SubscriptionStorageProvider) Transform(subscription *notifier.SubscriptionInfo, notification *notifier.Notification) (*notifier.Notification, error)
Transform updates the notification with subscription-specific information.
func (*SubscriptionStorageProvider) UpdateSubscription ¶
func (s *SubscriptionStorageProvider) UpdateSubscription(ctx context.Context, subscription *notifier.SubscriptionInfo) error
Click to show internal directories.
Click to hide internal directories.