Documentation ¶
Index ¶
- Constants
- type GetRecord
- type HydratedNotification
- type NotifRecord
- type NotifSeen
- type NotificationManager
- func (nm *NotificationManager) AddFollow(ctx context.Context, follower, followed, recid uint) error
- func (nm *NotificationManager) AddMention(ctx context.Context, user uint, postid uint, mentioned uint) error
- func (nm *NotificationManager) AddReplyTo(ctx context.Context, user uint, replyid uint, replyto *types.FeedPost) error
- func (nm *NotificationManager) AddRepost(ctx context.Context, op uint, repost, reposter uint) error
- func (nm *NotificationManager) AddUpVote(ctx context.Context, voter uint, postid uint, voteid uint, postauthor uint) error
- func (nm *NotificationManager) GetCount(ctx context.Context, user uint) (int64, error)
- func (nm *NotificationManager) GetNotifications(ctx context.Context, user uint) ([]*appbskytypes.NotificationList_Notification, error)
- func (nm *NotificationManager) UpdateSeen(ctx context.Context, usr uint, seen time.Time) error
Constants ¶
View Source
const ( NotifKindReply = 1 NotifKindMention = 2 NotifKindUpVote = 3 NotifKindFollow = 4 NotifKindRepost = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HydratedNotification ¶
type HydratedNotification struct { Record any IsRead bool IndexedAt time.Time Uri string Cid string Author *appbskytypes.ActorRef_WithInfo Reason string ReasonSubject *string }
type NotifRecord ¶
type NotificationManager ¶
type NotificationManager struct {
// contains filtered or unexported fields
}
func NewNotificationManager ¶
func NewNotificationManager(db *gorm.DB, getrec GetRecord) *NotificationManager
func (*NotificationManager) AddFollow ¶
func (nm *NotificationManager) AddFollow(ctx context.Context, follower, followed, recid uint) error
func (*NotificationManager) AddMention ¶
func (*NotificationManager) AddReplyTo ¶
func (*NotificationManager) GetNotifications ¶
func (nm *NotificationManager) GetNotifications(ctx context.Context, user uint) ([]*appbskytypes.NotificationList_Notification, error)
func (*NotificationManager) UpdateSeen ¶
Click to show internal directories.
Click to hide internal directories.