Documentation ¶
Index ¶
- Constants
- type RankService
- func (rs *RankService) CheckOperationObjectOwner(ctx context.Context, userID, objectID string) bool
- func (rs *RankService) CheckOperationPermission(ctx context.Context, userID string, action string, objectID string) (can bool, err error)
- func (rs *RankService) CheckOperationPermissions(ctx context.Context, userID string, actions []string) (can []bool, err error)
- func (rs *RankService) CheckVotePermission(ctx context.Context, userID, objectID string, voteUp bool) (can bool, err error)
- func (rs *RankService) GetRankPersonalWithPage(ctx context.Context, req *schema.GetRankPersonalWithPageReq) (pageModel *pager.PageModel, err error)
- type UserRankRepo
Constants ¶
View Source
const (
PermissionPrefix = "rank."
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RankService ¶
type RankService struct {
// contains filtered or unexported fields
}
RankService rank service
func NewRankService ¶
func NewRankService( userCommon *usercommon.UserCommon, userRankRepo UserRankRepo, objectInfoService *object_info.ObjService, roleService *role.UserRoleRelService, rolePowerService *role.RolePowerRelService, configRepo config.ConfigRepo) *RankService
NewRankService new rank service
func (*RankService) CheckOperationObjectOwner ¶ added in v1.0.0
func (rs *RankService) CheckOperationObjectOwner(ctx context.Context, userID, objectID string) bool
CheckOperationObjectOwner check operation object owner
func (*RankService) CheckOperationPermission ¶ added in v0.5.0
func (rs *RankService) CheckOperationPermission(ctx context.Context, userID string, action string, objectID string) ( can bool, err error)
CheckOperationPermission verify that the user has permission
func (*RankService) CheckOperationPermissions ¶ added in v0.5.0
func (rs *RankService) CheckOperationPermissions(ctx context.Context, userID string, actions []string) ( can []bool, err error)
CheckOperationPermissions verify that the user has permission
func (*RankService) CheckVotePermission ¶ added in v0.5.0
func (rs *RankService) CheckVotePermission(ctx context.Context, userID, objectID string, voteUp bool) ( can bool, err error)
CheckVotePermission verify that the user has vote permission
func (*RankService) GetRankPersonalWithPage ¶
func (rs *RankService) GetRankPersonalWithPage(ctx context.Context, req *schema.GetRankPersonalWithPageReq) ( pageModel *pager.PageModel, err error)
GetRankPersonalWithPage get personal comment list page
type UserRankRepo ¶
Click to show internal directories.
Click to hide internal directories.