Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { UserName string `json:"username" gorm:"column:username" comment:"用户名, 用户名不允许重复的"` PassWord string `json:"password" gorm:"column:password" comment:"不能保持用户的明文密码,hash算法"` Label map[string]string `json:"label" gorm:"column:label;serializer:json"` Role Roles `json:"role" gorm:"column:role;comment:用户角色,0表示普通用户,1表示审核用户,2表示管理员"` }
type DeleteUserRequest ¶
type DeleteUserRequest struct { Id int64 `json:"id" gorm:"column:id"` Username string `json:"username" gorm:"column:username;comment:用户名, 用户名不允许重复的"` }
func NewDeleteUserRequest ¶
func NewDeleteUserRequest() *DeleteUserRequest
创建DeleteUserRequest结构体 此处给api调用时使用的
type EditUserRequest ¶
type EditUserRequest struct { Username string `json:"username" gorm:"column:username;comment:用户名, 用户名不允许重复的"` PassWord string `json:"password" gorm:"column:password;comment:不能保持用户的明文密码,hash算法"` }
func NewEditUserRequest ¶
func NewEditUserRequest() *EditUserRequest
创建EditUserRequest结构体 此处给api调用时使用的
type QueryUserRequest ¶
type Service ¶
type Service interface { CreateUser(context.Context, *CreateUserRequest) (*Users, error) QueryUser(context.Context, *QueryUserRequest) (*Users, error) EditUser(context.Context, *EditUserRequest) (*Users, error) DeleteUser(context.Context, *DeleteUserRequest) error }
Click to show internal directories.
Click to hide internal directories.