Documentation ¶
Index ¶
- func NewUserRankRepo(data *data.Data, configService *config.ConfigService) rank.UserRankRepo
- type UserRankRepo
- func (ur *UserRankRepo) ChangeUserRank(ctx context.Context, session *xorm.Session, userID string, ...) (err error)
- func (ur *UserRankRepo) CheckReachLimit(ctx context.Context, session *xorm.Session, userID string, maxDailyRank int) (reach bool, err error)
- func (ur *UserRankRepo) GetMaxDailyRank(ctx context.Context) (maxDailyRank int, err error)
- func (ur *UserRankRepo) TriggerUserRank(ctx context.Context, session *xorm.Session, userID string, deltaRank int, ...) (isReachStandard bool, err error)
- func (ur *UserRankRepo) UserRankPage(ctx context.Context, userID string, page, pageSize int) (rankPage []*entity.Activity, total int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUserRankRepo ¶
func NewUserRankRepo(data *data.Data, configService *config.ConfigService) rank.UserRankRepo
NewUserRankRepo new repository
Types ¶
type UserRankRepo ¶
type UserRankRepo struct {
// contains filtered or unexported fields
}
UserRankRepo user rank repository
func (*UserRankRepo) ChangeUserRank ¶ added in v1.1.1
func (ur *UserRankRepo) ChangeUserRank( ctx context.Context, session *xorm.Session, userID string, userCurrentScore, deltaRank int) (err error)
ChangeUserRank change user rank
func (*UserRankRepo) CheckReachLimit ¶ added in v1.1.1
func (*UserRankRepo) GetMaxDailyRank ¶ added in v1.1.1
func (ur *UserRankRepo) GetMaxDailyRank(ctx context.Context) (maxDailyRank int, err error)
func (*UserRankRepo) TriggerUserRank ¶
func (ur *UserRankRepo) TriggerUserRank(ctx context.Context, session *xorm.Session, userID string, deltaRank int, activityType int, ) (isReachStandard bool, err error)
TriggerUserRank trigger user rank change session is need provider, it means this action must be success or failure if outer action is failed then this action is need rollback
Click to show internal directories.
Click to hide internal directories.