rank

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserRankRepo

func NewUserRankRepo(data *data.Data, configRepo config.ConfigRepo) rank.UserRankRepo

NewUserRankRepo new repository

Types

type UserRankRepo

type UserRankRepo struct {
	// contains filtered or unexported fields
}

UserRankRepo user rank repository

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

func (*UserRankRepo) UserRankPage

func (ur *UserRankRepo) UserRankPage(ctx context.Context, userID string, page, pageSize int) (
	rankPage []*entity.Activity, total int64, err error,
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL