user_admin

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 33 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, suspendedUntil time.Time) (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)
	DeletePermanentlyUsers(ctx context.Context) (err error)
	GetExpiredSuspendedUsers(ctx context.Context) (users []*entity.User, 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,
	userExternalLoginRepo user_external_login.UserExternalLoginRepo,
	notificationRepo notificationcommon.NotificationRepo,
	pluginUserConfigRepo plugin_common.PluginUserConfigRepo,
	badgeAwardRepo badge.BadgeAwardRepo,
) *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) CheckAndUnsuspendExpiredUsers added in v1.6.0

func (us *UserAdminService) CheckAndUnsuspendExpiredUsers(ctx context.Context) error

CheckAndUnsuspendExpiredUsers checks for users whose suspension has expired and restores them to normal status

func (*UserAdminService) DeletePermanently added in v1.4.5

func (us *UserAdminService) DeletePermanently(ctx context.Context, req *schema.DeletePermanentlyReq) (err error)

func (*UserAdminService) EditUserProfile

func (us *UserAdminService) EditUserProfile(ctx context.Context, req *schema.EditUserProfileReq) (
	errFields []*validator.FormErrorField, err error)

EditUserProfile edit user profile

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

Jump to

Keyboard shortcuts

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