Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityCommon ¶ added in v0.5.0
type ActivityCommon struct {
// contains filtered or unexported fields
}
func NewActivityCommon ¶ added in v0.5.0
func NewActivityCommon( activityRepo ActivityRepo, ) *ActivityCommon
NewActivityCommon new activity common
func (*ActivityCommon) HandleActivity ¶ added in v0.5.0
func (ac *ActivityCommon) HandleActivity()
HandleActivity handle activity message
type ActivityRepo ¶
type ActivityRepo interface { GetActivityTypeByObjID(ctx context.Context, objectId string, action string) (activityType, rank int, hasRank int, err error) GetActivityTypeByObjKey(ctx context.Context, objectKey, action string) (activityType int, err error) GetActivity(ctx context.Context, session *xorm.Session, objectID, userID string, activityType int) ( existsActivity *entity.Activity, exist bool, err error) GetUserIDObjectIDActivitySum(ctx context.Context, userID, objectID string) (int, error) GetActivityTypeByConfigKey(ctx context.Context, configKey string) (activityType int, err error) AddActivity(ctx context.Context, activity *entity.Activity) (err error) GetUsersWhoHasGainedTheMostReputation( ctx context.Context, startTime, endTime time.Time, limit int) (rankStat []*entity.ActivityUserRankStat, err error) GetUsersWhoHasVoteMost( ctx context.Context, startTime, endTime time.Time, limit int) (voteStat []*entity.ActivityUserVoteStat, err error) }
type FollowRepo ¶
type FollowRepo interface { GetFollowIDs(ctx context.Context, userID, objectType string) (followIDs []string, err error) GetFollowAmount(ctx context.Context, objectID string) (followAmount int, err error) GetFollowUserIDs(ctx context.Context, objectID string) (userIDs []string, err error) IsFollowed(userId, objectId string) (bool, error) }
Click to show internal directories.
Click to hide internal directories.