user_admin

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAdminRepo

type UserAdminRepo interface {
	UpdateUserStatus(ctx context.Context, userID string, userStatus, mailStatus int, email string) (err error)
	GetUserInfo(ctx context.Context, userID string) (user *entity.User, exist bool, err error)
	GetUserInfoByEmail(ctx context.Context, email string) (user *entity.User, exist bool, err error)
	GetUserPage(ctx context.Context, page, pageSize int, user *entity.User,
		usernameOrDisplayName string, isStaff bool) (users []*entity.User, total int64, err error)
	AddUser(ctx context.Context, user *entity.User) (err error)
	UpdateUserPassword(ctx context.Context, userID string, password string) (err error)
}

UserAdminRepo user repository

type UserAdminService

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

UserAdminService user service

func NewUserAdminService

func NewUserAdminService(
	userRepo UserAdminRepo,
	userRoleRelService *role.UserRoleRelService,
	authService *auth.AuthService,
	userCommonService *usercommon.UserCommon,
) *UserAdminService

NewUserAdminService new user admin service

func (*UserAdminService) AddUser

func (us *UserAdminService) AddUser(ctx context.Context, req *schema.AddUserReq) (err error)

AddUser add user

func (*UserAdminService) GetUserInfo

func (us *UserAdminService) GetUserInfo(ctx context.Context, userID string) (resp *schema.GetUserInfoResp, err error)

GetUserInfo get user one

func (*UserAdminService) GetUserPage

func (us *UserAdminService) GetUserPage(ctx context.Context, req *schema.GetUserPageReq) (pageModel *pager.PageModel, err error)

GetUserPage get user list page

func (*UserAdminService) UpdateUserPassword

func (us *UserAdminService) UpdateUserPassword(ctx context.Context, req *schema.UpdateUserPasswordReq) (err error)

UpdateUserPassword update user password

func (*UserAdminService) UpdateUserRole

func (us *UserAdminService) UpdateUserRole(ctx context.Context, req *schema.UpdateUserRoleReq) (err error)

UpdateUserRole update user role

func (*UserAdminService) UpdateUserStatus

func (us *UserAdminService) UpdateUserStatus(ctx context.Context, req *schema.UpdateUserStatusReq) (err error)

UpdateUserStatus update user

Jump to

Keyboard shortcuts

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