Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudApi ¶
type CloudApi struct { models.Model ID uint32 `json:"id" gorm:"primaryKey;autoIncrement;comment:唯一编号"` ApiName string `json:"api_name" gorm:"size:200;not null;default:'';comment:接口名称"` ApiKey string `json:"api_key" gorm:"size:100;not null;uniqueIndex;default:'';comment:接口标识"` ApiMethod string `json:"api_method" gorm:"size:50;not null;default:'';comment:接口请求类型:POST、GET、PUT、DELETE"` ApiDesc string `json:"api_desc" gorm:"size:128;not null;default:'';comment:接口描述"` ApiUrl string `json:"api_url" gorm:"size:255;not null;uniqueIndex;default:'';comment:接口地址"` CreateUser string `json:"create_user" gorm:"size:255;not null;default:'';comment:接口创建人"` UpdateUser string `json:"update_user" gorm:"size:255;not null;default:'';comment:接口修改人"` ApiSort uint8 `json:"api_sort" gorm:"index;not null;default:0;comment:接口排序"` ApiStatus uint8 `json:"api_status" gorm:"index;not null;default:0;comment:接口状态(0未完成,1已完成,2已废弃)"` models.ModelTime }
type CloudEtcd ¶
type CloudEtcd struct { common.Model Name string `json:"name" gorm:"size:200;not null;uniqueIndex;default:'';comment:注册服务名"` Remark string `json:"remark" gorm:"size:255;not null;index;default:'';comment:备注"` Content string `json:"content" gorm:"text;not null;index;default:'';comment:注册内容"` IsSubscribe uint32 `json:"is_subscribe" gorm:"not null;index;default:0;comment:是否订阅"` SubUserID string `json:"sub_user_id" gorm:"text;null;index;comment:订阅的用户ID"` IsDelete uint32 `json:"is_delete" gorm:"not null;index;default:0;comment:是否软删除"` IsRegister uint32 `json:"is_register" gorm:"not null;index;default:0;comment:是否注册成功"` common.ControlBy common.ModelTime }
func (*CloudEtcd) ParseFields ¶
type CloudLog ¶
type CloudLog struct { common.Model LogID string `json:"log_id" gorm:"size:200;not null;uniqueIndex;default:'';comment:日志ID"` LogName string `json:"log_name" gorm:"size:100;not null;index;default:'';comment:日志名称"` RequestUrl string `json:"request_url" gorm:"size:255;not null;index;default:'';comment:请求接口"` Method string `json:"method" gorm:"size:100;not null;index;default:'';comment:请求方法"` RequestUser string `json:"request_user" gorm:"size:100;not null;index;default:'';comment:请求用户"` ClientIP string `json:"client_ip" gorm:"size:200;not null;index;default:'';comment:客户端IP"` Level string `json:"Level" gorm:"size:100;not null;index;default:'';comment:级别"` AppType uint32 `json:"app_type" gorm:"not null;index;default:0;comment:应用类型"` ParamsData string `json:"params_data" gorm:"text;default:'';comment:请求参数"` common.ModelTime }
func (*CloudLog) ParseFields ¶
type CloudMenu ¶
type CloudMenu struct { MenuId uint32 `json:"menu_id" gorm:"primaryKey;autoIncrement;comment:唯一编号"` MenuName string `json:"menu_name" gorm:"size:200;not null;default:'';comment:菜单名"` MenuTitle string `json:"menu_title" gorm:"size:128;not null;default:'';comment:菜单标题"` MenuIcon string `json:"menu_icon" gorm:"size:128;not null;default:'';comment:菜单图标"` MenuPath string `json:"menu_path" gorm:"size:255;not null;uniqueIndex;default:'';comment:菜单路径"` MenuType string `json:"menu_type" gorm:"size:255;not null;default:'';comment:菜单类型:D目录、M模块、C按钮"` Permission string `json:"permission" gorm:"size:255;not null;uniqueIndex;default:'';comment:菜单权限标识"` ParentId uint32 `json:"parent_id" gorm:"index;not null;default:0;comment:父级ID"` Component string `json:"component" gorm:"index;size:255;not null;default:'';comment:菜单组件"` MenuSort uint8 `json:"menu_sort" gorm:"index;not null;default:0;comment:菜单排序"` Visible uint8 `json:"visible" gorm:"index;not null;default:0;comment:菜单是否显示:0显示、1隐藏"` NoCache uint8 `json:"no_cache" gorm:"index;not null;default:0;comment:是否缓存:0缓存、1不缓存"` IsFrame uint8 `json:"is_frame" gorm:"index;not null;default:0"` common.ControlBy common.ModelTime // 树节点 ChildNode *CloudMenuTree `json:"child_node" gorm:"-"` }
func (*CloudMenu) ParseFields ¶
ParseFields 提取tag值
type CloudMenuTree ¶
type CloudMenuTree []*CloudMenu
func (CloudMenuTree) UserTreeNode ¶
func (c CloudMenuTree) UserTreeNode() UserMenuTree
TreeNode 格式化树节点
type CloudRole ¶
type CloudRole struct { RoleId uint32 `json:"role_id" gorm:"primaryKey;autoIncrement;comment:唯一编号"` RoleName string `json:"role_name" gorm:"size:200;not null;index;default:'';comment:角色名"` RoleKey string `json:"role_key" gorm:"size:128;not null;uniqueIndex;default:'';comment:角色Key"` RoleRemark string `json:"role_remark" gorm:"size:255;not null;default:'';comment:角色备注"` RoleSort uint8 `json:"role_sort" gorm:"not null;index;default:0;comment:角色排序"` Status uint8 `json:"status" gorm:"not null;index;default:0;comment:角色状态: 0正常、1禁用"` common.ControlBy common.ModelTime }
func (*CloudRole) ParseFields ¶
type CloudRoleMenu ¶
type CloudRoleMenu struct { RoleId uint32 `json:"role_id" gorm:"not null;index;default:0;comment:角色ID"` MenuId uint32 `json:"menu_id" gorm:"not null;index;default:0;comment:菜单ID"` common.ControlBy common.ModelTime }
func (*CloudRoleMenu) ParseFields ¶
func (c *CloudRoleMenu) ParseFields(p any) *CloudRoleMenu
func (CloudRoleMenu) TableName ¶
func (c CloudRoleMenu) TableName() string
type CloudUser ¶
type CloudUser struct { common.Model UserName string `json:"user_name" gorm:"size:200;not null;uniqueIndex;default:'';comment:用户名"` PassWord string `json:"pass_word" gorm:"size:255;not null;default:'';comment:密码"` UserEmail string `json:"user_email" gorm:"size:200;not null;default:'';comment:邮箱"` LoginIp string `json:"login_ip" gorm:"size:200;not null;default:'';comment:登录IP"` LastTime uint32 `json:"last_time" gorm:"index;not null;default:0;comment:最后登录时间"` Status uint8 `json:"status" gorm:"index;not null;default:0;comment:用户状态: 0正常、1禁用"` Admin uint8 `json:"admin" gorm:"index;not null;default:0;comment:是否超级管理员:0否、1是"` common.ModelTime }
func (*CloudUser) ParseFields ¶
type CloudUserRole ¶
type CloudUserRole struct { UID uint32 `json:"uid" gorm:"primaryKey;autoIncrement;comment:用户ID"` RoleId uint32 `json:"role_id" gorm:"not null;index;default:0;comment:角色ID"` common.ControlBy common.ModelTime }
func (*CloudUserRole) ParseFields ¶
func (c *CloudUserRole) ParseFields(p any) *CloudUserRole
func (CloudUserRole) TableName ¶
func (c CloudUserRole) TableName() string
type GetCloudUserAndRole ¶
type MenuPermsResp ¶
type MenuPermsResp struct { Menus UserMenuTree `json:"menus"` Perms []string `json:"perms"` }
type UserMenuTree ¶
type UserMenuTree []*ItemTree
Click to show internal directories.
Click to hide internal directories.