Documentation ¶
Index ¶
- type NotificationCommon
- func (ns *NotificationCommon) AddBadgeAwardAlertCache(ctx context.Context, userID, notificationID, badgeID string) (err error)
- func (ns *NotificationCommon) AddNotification(ctx context.Context, msg *schema.NotificationMsg) (err error)
- func (ns *NotificationCommon) DecreaseRedDot(ctx context.Context, userID string, notificationType int) error
- func (ns *NotificationCommon) DeleteRedDot(ctx context.Context, userID string, notificationType int) error
- func (ns *NotificationCommon) RemoveBadgeAwardAlertCache(ctx context.Context, userID, notificationID string) (err error)
- func (ns *NotificationCommon) SendNotificationToAllFollower(ctx context.Context, msg *schema.NotificationMsg, questionID string)
- type NotificationRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationCommon ¶
type NotificationCommon struct {
// contains filtered or unexported fields
}
func NewNotificationCommon ¶
func NewNotificationCommon( data *data.Data, notificationRepo NotificationRepo, userCommon *usercommon.UserCommon, activityRepo activity_common.ActivityRepo, followRepo activity_common.FollowRepo, objectInfoService *object_info.ObjService, notificationQueueService notice_queue.NotificationQueueService, userExternalLoginRepo user_external_login.UserExternalLoginRepo, siteInfoService siteinfo_common.SiteInfoCommonService, ) *NotificationCommon
func (*NotificationCommon) AddBadgeAwardAlertCache ¶ added in v1.4.0
func (ns *NotificationCommon) AddBadgeAwardAlertCache(ctx context.Context, userID, notificationID, badgeID string) (err error)
AddBadgeAwardAlertCache add badge award alert cache
func (*NotificationCommon) AddNotification ¶
func (ns *NotificationCommon) AddNotification(ctx context.Context, msg *schema.NotificationMsg) (err error)
AddNotification need set LoginUserID Type 1 inbox 2 achievement [inbox] Activity [achievement] Rank ObjectInfo.Title ObjectInfo.ObjectID ObjectInfo.ObjectType
func (*NotificationCommon) DecreaseRedDot ¶ added in v1.4.0
func (*NotificationCommon) DeleteRedDot ¶ added in v1.4.0
func (*NotificationCommon) RemoveBadgeAwardAlertCache ¶ added in v1.4.0
func (ns *NotificationCommon) RemoveBadgeAwardAlertCache(ctx context.Context, userID, notificationID string) (err error)
RemoveBadgeAwardAlertCache remove badge award alert cache
func (*NotificationCommon) SendNotificationToAllFollower ¶
func (ns *NotificationCommon) SendNotificationToAllFollower(ctx context.Context, msg *schema.NotificationMsg, questionID string)
SendNotificationToAllFollower send notification to all followers
type NotificationRepo ¶
type NotificationRepo interface { AddNotification(ctx context.Context, notification *entity.Notification) (err error) GetNotificationPage(ctx context.Context, search *schema.NotificationSearch) ([]*entity.Notification, int64, error) ClearUnRead(ctx context.Context, userID string, notificationType int) (err error) ClearIDUnRead(ctx context.Context, userID string, id string) (err error) GetByUserIdObjectIdTypeId(ctx context.Context, userID, objectID string, notificationType int) (*entity.Notification, bool, error) UpdateNotificationContent(ctx context.Context, notification *entity.Notification) (err error) GetById(ctx context.Context, id string) (*entity.Notification, bool, error) CountNotificationByUser(ctx context.Context, cond *entity.Notification) (int64, error) }
Click to show internal directories.
Click to hide internal directories.