Documentation
¶
Index ¶
- func ConvertInt(s string) (i int)
- type AuthRolePerm
- type AuthUserPerm
- type Identity
- type Menu
- type MenuOption
- type MenuParam
- type MenuRoute
- type MenuRouteMeta
- type Permission
- type Project
- type ReqMenuForm
- type Role
- type RoleCategory
- type SaasOrganization
- type SaasUser
- type SecurityInfo
- type UserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertInt ¶
Types ¶
type AuthRolePerm ¶
type AuthUserPerm ¶
type Menu ¶
type Menu struct {
Id string `json:"id"`
ParentId string `json:"parentId"`
Name string `json:"name"`
Visible int `json:"visible"`
Icon string `json:"icon"`
Sort int `json:"sort"`
RouteName string `json:"routeName"`
RoutePath string `json:"routePath"`
Component string `json:"component"`
Type int `json:"type"`
Perm string `json:"perm"`
HasPerm bool `json:"hasPerm"`
KeepAlive int `json:"keepAlive"`
Params []MenuParam `json:"params"`
Hidden int `json:"hidden"`
Group def.MenuGroup `json:"group"` // 菜单所属程序组
Status int `json:"status"`
Children []*Menu `json:"children"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
}
func (*Menu) AddChildren ¶
func (*Menu) GetParentId ¶
type MenuOption ¶
type MenuOption struct {
Value string `json:"value"` // 使用string类型以匹配前端OptionType
Label string `json:"label"`
ParentId string `json:"-"` // 内部使用string以便与Value类型一致
Children []*MenuOption `json:"children"`
}
func (*MenuOption) AddChildren ¶
func (m *MenuOption) AddChildren(m2 *MenuOption)
func (*MenuOption) GetId ¶
func (m *MenuOption) GetId() string
func (*MenuOption) GetParentId ¶
func (m *MenuOption) GetParentId() string
type MenuRouteMeta ¶
type Permission ¶
type Permission struct {
Id int `json:"id,omitempty"`
Code string `json:"code,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Category string `json:"category,omitempty"`
}
Permission 权限: 通过 Category 按照 Platform 分级 全局配置,不关联特定的 Saas project 或 organization
type Project ¶
type Project struct {
Id int `json:"id,omitempty"`
Name string `json:"name,omitempty"`
MenuCategory string `json:"menuCategory,omitempty"`
}
Project 每个是 platform (App、Saas、Admin、Manager) 之一
type ReqMenuForm ¶
type ReqMenuForm struct {
Id string `json:"id"`
ParentId string `json:"parentId"`
Name string `json:"name"`
Visible int `json:"visible"`
Icon string `json:"icon"`
Sort int `json:"sort"`
RouteName string `json:"routeName"`
RoutePath string `json:"routePath"`
Component string `json:"component"`
Type int `json:"type"`
Perm string `json:"perm"`
HasPerm bool `json:"hasPerm"`
KeepAlive int `json:"keepAlive"`
Params []MenuParam `json:"params"`
Group def.MenuGroup `json:"group"` // 菜单所属程序组 - project(app) - menu category
Status int `json:"status"`
}
type Role ¶
type Role struct {
Id int `json:"id,omitempty"`
Code string `json:"code,omitempty"`
Name string `json:"name,omitempty"`
RoleCategoryCode string `json:"roleCategoryCode,omitempty"`
RoleValue string `json:"roleValue,omitempty"` // todo: no usage
ProjectCode string `json:"projectCode,omitempty"` // 可以限制一个SaaS Project, 也可以适用于全部 SaaS Project
IsGlobal bool `json:"isGlobal,omitempty"` // 同上
}
type RoleCategory ¶
type SaasOrganization ¶
type SecurityInfo ¶
type SecurityInfo struct {
Id int `json:"id"`
Code string `json:"code"` // 用户编号
Platform int `json:"platform"` // 用户平台 10-AppUser, 20-SaasUser, 30-AdminUser
SecondFaEnable int `json:"secondFaEnable"` // 是否启用2FA
SecondFaCode string `json:"secondFaCode"` // 2FA设备编号
Status int `json:"status"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
}
type UserRole ¶
type UserRole struct {
Id int `json:"id,omitempty"`
SaasUserCode string `json:"saasUserCode,omitempty"`
RoleCategoryCode string `json:"roleCategoryCode,omitempty"`
RoleCode string `json:"roleCode,omitempty"`
RoleValue string `json:"roleValue,omitempty"`
ProjectCode string `json:"projectCode,omitempty"`
IsGlobal bool `json:"isGlobal,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.