Documentation ¶
Overview ¶
Package user 用户管理,权限,邀请别人假如
提供了与用户数据相关的工具函数
Index ¶
- Variables
- func CheckDepartmentsManager(userID int, departmentIds []int, areaID uint64) (err error)
- func CheckQrCode(c *gin.Context)
- func CheckRoleID(roleID int) (err error)
- func DelUser(c *gin.Context)
- func GetArea(info entity.Area) (areaInfo area.Area, err error)
- func GetInvitationCode(c *gin.Context)
- func GetVerificationCode(c *gin.Context)
- func InfoUser(c *gin.Context)
- func ListUser(c *gin.Context)
- func RegisterUserRouter(r gin.IRouter)
- func TransferOwner(c *gin.Context)
- func UpdateUser(c *gin.Context)
- func UserInfoDepartment(c *gin.Context)
- func WrapUserInfo(user entity.User, isOwner bool) (infoUser entity.UserInfo, err error)
- func WrapUsers(userRoles []entity.UserRole, areaID uint64) (listUsers []entity.UserInfo, err error)
- type CheckQrCodeResp
- type GetVerificationCodeResp
- type ListUserResp
- type UserInfoDepartmentResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NameSizeMin = 6 NameSizeMax = 20 )
Functions ¶
func CheckDepartmentsManager ¶ added in v1.9.1
CheckDepartmentsManager 检查多个部门的主管是否被删除,并重置它 TODO 尝试在删除的hook中做删除主管的操作,但要注意,原先的删除/更新逻辑的影响
func CheckRoleID ¶
func GetVerificationCode ¶
func RegisterUserRouter ¶
RegisterUserRouter 注册与用户相关的路由及其处理函数
func TransferOwner ¶
func UserInfoDepartment ¶ added in v1.9.1
UserInfoDepartment 用于处理用户详情接口的请求
func WrapUserInfo ¶
Types ¶
type CheckQrCodeResp ¶
type CheckQrCodeResp struct { UserInfo entity.UserInfo `json:"user_info"` AreaInfo area.Area `json:"area_info"` }
CheckQrCodeResp 扫描邀请二维码接口返回数据
type GetVerificationCodeResp ¶
type ListUserResp ¶
type ListUserResp struct { IsOwner bool `json:"is_owner"` UserCount int `json:"user_count"` Users []entity.UserInfo `json:"users"` }
ListUserResp 成员列表接口返回数据
type UserInfoDepartmentResp ¶ added in v1.9.1
type UserInfoDepartmentResp struct {
DepartmentInfos []entity.DepartmentInfo `json:"department_infos"` // 所在部门
}
UserInfoDepartmentResp 用户所在部门
Click to show internal directories.
Click to hide internal directories.