Documentation
¶
Overview ¶
Package notification defines the notification domain entity and its store interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct {
ID id.NotificationID `json:"id"`
AppID id.AppID `json:"app_id"`
EnvID id.EnvironmentID `json:"env_id"`
UserID id.UserID `json:"user_id"`
Type string `json:"type"`
Channel Channel `json:"channel"`
Subject string `json:"subject,omitempty"`
Body string `json:"body"`
Sent bool `json:"sent"`
SentAt *time.Time `json:"sent_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Notification represents a notification sent to a user.
type Store ¶
type Store interface {
CreateNotification(ctx context.Context, n *Notification) error
GetNotification(ctx context.Context, notifID id.NotificationID) (*Notification, error)
MarkSent(ctx context.Context, notifID id.NotificationID) error
ListUserNotifications(ctx context.Context, userID id.UserID) ([]*Notification, error)
}
Store defines the persistence interface for notification operations.
Click to show internal directories.
Click to hide internal directories.