Documentation ¶
Index ¶
- type UserAdminRepo
- type UserAdminService
- func (us *UserAdminService) AddUser(ctx context.Context, req *schema.AddUserReq) (err error)
- func (us *UserAdminService) AddUsers(ctx context.Context, req *schema.AddUsersReq) (resp []*validator.FormErrorField, err error)
- func (us *UserAdminService) GetUserActivation(ctx context.Context, req *schema.GetUserActivationReq) (resp *schema.GetUserActivationResp, err error)
- func (us *UserAdminService) GetUserInfo(ctx context.Context, userID string) (resp *schema.GetUserInfoResp, err error)
- func (us *UserAdminService) GetUserPage(ctx context.Context, req *schema.GetUserPageReq) (pageModel *pager.PageModel, err error)
- func (us *UserAdminService) SendUserActivation(ctx context.Context, req *schema.SendUserActivationReq) (err error)
- func (us *UserAdminService) UpdateUserPassword(ctx context.Context, req *schema.UpdateUserPasswordReq) (err error)
- func (us *UserAdminService) UpdateUserRole(ctx context.Context, req *schema.UpdateUserRoleReq) (err error)
- func (us *UserAdminService) UpdateUserStatus(ctx context.Context, req *schema.UpdateUserStatusReq) (err error)
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 ¶
func (us *UserAdminService) AddUsers(ctx context.Context, req *schema.AddUsersReq) ( resp []*validator.FormErrorField, err error)
AddUsers add users
func (*UserAdminService) GetUserActivation ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.