Documentation
¶
Index ¶
Constants ¶
View Source
const SystemOperator = "system"
Variables ¶
View Source
var SystemUser = User{ ID: SystemOperator, Name: SystemOperator, Nick: SystemOperator, }
Functions ¶
Types ¶
type Interface ¶
type Interface interface {
pb.UserServiceServer
}
type USERID ¶
type USERID string
const (
UnassignedUserID USERID = "unassigned"
)
func (USERID) IsUnassigned ¶
func (*USERID) UnmarshalJSON ¶
maybe int or string, unmarshal them to string(USERID)
type UserInPaging ¶
type UserInPaging struct {
Id interface{} `json:"id"` // 主键
Avatar string `json:"avatar"` // 头像
Username string `json:"username"` // 用户名
Nickname string `json:"nickname"` // 昵称
Mobile string `json:"mobile"` // 手机号
Email string `json:"email"` // 邮箱
Enabled bool `json:"enabled"` // 是否启用
UserDetail interface{} `json:"userDetail"` // 用户详细信息
Locked bool `json:"locked"` // 冻结FLAG(0:NOT,1:YES)
PasswordExist bool `json:"passwordExist"` // 密码是否存在
PwdExpireAt timestamp `json:"pwdExpireAt"` // 过期时间
Extra interface{} `json:"extra"` // 扩展字段
Source string `json:"source"` // 用户来源
SourceType string `json:"sourceType"` // 来源类型
Tag string `json:"tag"` // 标签
Channel string `json:"channel"` // 注册渠道
ChannelType string `json:"channelType"` // 渠道类型
TenantId int `json:"tenantId"` // 租户ID
CreatedAt timestamp `json:"createdAt"` // 创建时间
UpdatedAt timestamp `json:"updatedAt"` // 更新时间
LastLoginAt timestamp `json:"lastLoginAt"` // 最后登录时间
}
userInPaging 用户中心分页用户数据结构
type UserInfo ¶
type UserInfo struct {
ID USERID `json:"id"`
Token string `json:"token"`
Email string `json:"email"`
EmailExist bool `json:"emailExist"`
PasswordExist bool `json:"passwordExist"`
PhoneExist bool `json:"phoneExist"`
Birthday string `json:"birthday"`
PasswordStrength int `json:"passwordStrength"`
Phone string `json:"phone"`
AvatarUrl string `json:"avatarUrl"`
UserName string `json:"username"`
NickName string `json:"nickName"`
Enabled bool `json:"enabled"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
LastLoginAt string `json:"lastLoginAt"`
KratosID string `json:"kratosId"`
}
func NewUserInfoFromDTO ¶
func NewUserInfoFromDTO(dto *apistructs.UserInfoDto) *UserInfo
type UserPaging ¶
type UserPaging struct {
Data []UserInPaging `json:"data"`
Total int `json:"total"`
}
Click to show internal directories.
Click to hide internal directories.