notifier_provider

package
v0.0.0-...-af6ba90 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 (n *NotificationStorageProvider) DeleteNotification(_ context.Context, _ uuid.UUID) error

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 (*SubscriptionStorageProvider) Matches

func (s *SubscriptionStorageProvider) Matches(subscription *notifier.SubscriptionInfo, notification *notifier.Notification) bool

func (*SubscriptionStorageProvider) Transform

Transform updates the notification with subscription-specific information.

func (*SubscriptionStorageProvider) UpdateSubscription

func (s *SubscriptionStorageProvider) UpdateSubscription(ctx context.Context, subscription *notifier.SubscriptionInfo) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL