Files
magistrala/notifications/notifier.go
T
Washington Kigani Kamadi 843a0cae1f SMQ-3234 - Add notifications service (#3254)
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: dusan <borovcanindusan1@gmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: dusan <borovcanindusan1@gmail.com>
2025-11-28 15:26:55 +01:00

38 lines
894 B
Go

// Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0
package notifications
import (
"context"
)
// NotificationType represents the type of notification to send.
type NotificationType uint8
const (
// Invitation represents an invitation notification.
Invitation NotificationType = iota
// Acceptance represents an acceptance notification.
Acceptance
// Rejection represents a rejection notification.
Rejection
)
// Notification contains the data needed to send a notification.
type Notification struct {
Type NotificationType
InviterID string
InviteeID string
DomainID string
DomainName string
RoleID string
RoleName string
}
// Notifier represents a service for sending notifications.
type Notifier interface {
// Notify sends a notification based on the provided notification data.
Notify(ctx context.Context, n Notification) error
}