mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
843a0cae1f
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>
38 lines
894 B
Go
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
|
|
}
|