user_admin

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 28 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)
	AddUsers(ctx context.Context, users []*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,
	userActivity activity.UserActiveActivityRepo,
	siteInfoCommonService siteinfo_common.SiteInfoCommonService,
	emailService *export.EmailService,
	questionCommonRepo questioncommon.QuestionRepo,
	answerCommonRepo answercommon.AnswerRepo,
	commentCommonRepo comment_common.CommentCommonRepo,
) *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) AddUsers added in v1.1.2

func (us *UserAdminService) AddUsers(ctx context.Context, req *schema.AddUsersReq) (
	resp []*validator.FormErrorField, err error)

AddUsers add users

func (*UserAdminService) GetUserActivation added in v1.1.1

func (us *UserAdminService) GetUserActivation(ctx context.Context, req *schema.GetUserActivationReq) (
	resp *schema.GetUserActivationResp, err error)

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) SendUserActivation added in v1.1.1

func (us *UserAdminService) SendUserActivation(ctx context.Context, req *schema.SendUserActivationReq) (err error)

SendUserActivation send user activation email

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