Documentation ¶
Index ¶
- type Notification
- func (this Notification) Ago() string
- func (this Notification) Delete(ctx context.Context) error
- func (this *Notification) FindByColumn(ctx context.Context, col, val string) error
- func (this *Notification) FindByID(ctx context.Context, id string) error
- func (this Notification) Label() string
- func (this *Notification) New(level scumflashes.FlashLevel, topic, organisationID, userID string)
- func (this *Notification) Publish(ctx context.Context) error
- func (this *Notification) Save(ctx context.Context) error
- type NotificationStatus
- type NotificationVars
- type Notifications
- func (Notifications) AvailableFilters() scumfilter.Filters
- func (this Notifications) ByID() map[string]Notification
- func (this Notifications) ByTopic() map[string]Notifications
- func (this Notifications) EmailCopy(uri string) marcel.Email
- func (this *Notifications) FindAll(ctx context.Context, criteria scummodel.Criteria) error
- func (this Notifications) ForTopic(in string) Notifications
- func (this *Notifications) MarkEmailed(ctx context.Context) error
- func (Notifications) Searchable() scumsearch.Searchable
- func (this Notifications) Seen() Notifications
- func (this Notifications) Unseen() Notifications
- func (this *Notifications) UnseenAndNotEmailedForUser(ctx context.Context, userID string) error
- type Publisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct { Queue Publisher ID string Topic string Level scumflashes.FlashLevel Template string Vars NotificationVars Target string OrganisationID string UserID string UserEmail string Emailed bool EmailedAt time.Time Seen bool SeenAt time.Time CreatedAt time.Time UpdatedAt time.Time Revision string }
func (Notification) Ago ¶
func (this Notification) Ago() string
func (*Notification) FindByColumn ¶
func (this *Notification) FindByColumn(ctx context.Context, col, val string) error
func (*Notification) FindByID ¶
func (this *Notification) FindByID(ctx context.Context, id string) error
func (Notification) Label ¶
func (this Notification) Label() string
func (*Notification) New ¶
func (this *Notification) New(level scumflashes.FlashLevel, topic, organisationID, userID string)
type NotificationStatus ¶
type NotificationStatus struct { NoUnread bool Num int NumWarnings int NumSuccess int NumInfo int AnyWarnings bool AnySuccess bool AnyInfo bool }
func NotificationStatusForUser ¶
func NotificationStatusForUser(ctx context.Context, userID string) (NotificationStatus, error)
type NotificationVars ¶
type NotificationVars []any
func (*NotificationVars) Scan ¶
func (this *NotificationVars) Scan(value interface{}) error
type Notifications ¶
type Notifications struct { Data []Notification Criteria scummodel.Criteria }
func (Notifications) AvailableFilters ¶
func (Notifications) AvailableFilters() scumfilter.Filters
func (Notifications) ByID ¶
func (this Notifications) ByID() map[string]Notification
func (Notifications) ByTopic ¶
func (this Notifications) ByTopic() map[string]Notifications
func (Notifications) ForTopic ¶
func (this Notifications) ForTopic(in string) Notifications
func (*Notifications) MarkEmailed ¶
func (this *Notifications) MarkEmailed(ctx context.Context) error
func (Notifications) Searchable ¶
func (Notifications) Searchable() scumsearch.Searchable
func (Notifications) Seen ¶
func (this Notifications) Seen() Notifications
func (Notifications) Unseen ¶
func (this Notifications) Unseen() Notifications
func (*Notifications) UnseenAndNotEmailedForUser ¶
func (this *Notifications) UnseenAndNotEmailedForUser(ctx context.Context, userID string) error
Click to show internal directories.
Click to hide internal directories.