Documentation ¶
Index ¶
- Constants
- Variables
- func InitManager()
- type Config
- type Domain4Fe
- type DomainLockOrUnlockEventMetadata
- type InstancePmsRole
- type InstancePmsRoleGrantItem
- type InstancePmsRolesWithGrantInfo
- type MenuTreeItem
- type PmsDomainType4Lock
- type PmsRoleDetail
- type PmsRuleController
- type PmsRuleControllerFactory
- type ReqDomainLockStatus
- type ReqLockDomain
- type ReqUnlockDomain
- type Resource
- type RespDomainLockStatus
- type Service
- type UserPmsChecker
Constants ¶
View Source
const ( MsgNoPermission = "权限验证未通过 (您当前无操作权限). " MsgInvalidPmsRoleType = "权限角色类型非法. " MsgInvalidReqObjectType = "权限验证对象非法. " MsgInvalidReqDomType = "无效的权限验证域. " MsgNeedRoot = "需要root超级管理员权限. " MsgSysLocked = "系统维护中... " )
Variables ¶
View Source
var Manager *pms
Functions ¶
func InitManager ¶
func InitManager()
Types ¶
type Domain4Fe ¶
type Domain4Fe []string
func Trans2Domain4Fe ¶
func (Domain4Fe) GetDomainTypeAndId ¶
type DomainLockOrUnlockEventMetadata ¶
type DomainLockOrUnlockEventMetadata struct { TgtDomainType PmsDomainType4Lock `json:"tgtDomainType"` TgtDomainId int `json:"tgtDomainId,omitempty"` TgtDomainNameDetail string `json:"tgtDomainNameDetail"` // 目标Domain对象的详尽名称 PerformedOperation string `json:"performedOperation"` }
type InstancePmsRole ¶
type InstancePmsRole struct { Id int `json:"id"` RoleType int `json:"roleType"` Name string `json:"name"` Desc string `json:"desc"` Details []PmsRoleDetail `json:"details"` Grant []*InstancePmsRoleGrantItem `json:"grant"` }
type InstancePmsRolesWithGrantInfo ¶
type InstancePmsRolesWithGrantInfo struct { Iid int `json:"iid"` Roles []*InstancePmsRole `json:"roles"` }
type MenuTreeItem ¶
type MenuTreeItem struct { Name string `yaml:"name" json:"name"` Path string `yaml:"path" json:"path"` Icon string `yaml:"icon" json:"icon"` Children []MenuTreeItem `yaml:"children" json:"children,omitempty"` }
type PmsDomainType4Lock ¶
type PmsDomainType4Lock string
const (
PmsSysDomainType PmsDomainType4Lock = pmsplugin.SystemDom
)
type PmsRoleDetail ¶
type PmsRuleController ¶
type PmsRuleController interface { Create(data interface{}) error Update(data interface{}) error Delete(data interface{}) error }
PmsRuleController ...
type PmsRuleControllerFactory ¶
type PmsRuleControllerFactory interface {
CreateController() PmsRuleController
}
PmsRuleControllerFactory: the interface of factory method
func NewPmsRuleControllerFactory ¶
func NewPmsRuleControllerFactory(roleType int) PmsRuleControllerFactory
NewPmsRuleControllerFactory: Use a simple factory to encapsulate the factory method
type ReqDomainLockStatus ¶
type ReqDomainLockStatus ReqLockDomain
type ReqLockDomain ¶
type ReqLockDomain struct { TgtDomainType PmsDomainType4Lock `json:"tgtDomainType" validate:"required" form:"tgtDomainType"` // 目标Domain实体类型 TgtDomainId int `json:"tgtDomainId" form:"tgtDomainId"` // 目标Domain实体的id, 注: 当TgtDomainType为 "system" 时, 将忽略该字段 }
type ReqUnlockDomain ¶
type ReqUnlockDomain ReqLockDomain
type Resource ¶
type Resource struct {
Permission []MenuTreeItem
}
type RespDomainLockStatus ¶
type RespDomainLockStatus struct { TgtDomainType PmsDomainType4Lock `json:"tgtDomainType"` // 目标Domain实体类型 TgtDomainId int `json:"tgtDomainId"` // 目标Domain实体的id, 注: 当TgtDomainType为 "system" 时, 将忽略该字段 TgtDomainName string `json:"tgtDomainName"` // 目标Domain实体的名称 Locked bool `json:"locked"` // 当前是否被锁定 LockByUid int `json:"lockByUid"` LockByUsername string `json:"lockByUsername"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AdminMenuList ¶
func (s *Service) AdminMenuList() []MenuTreeItem
type UserPmsChecker ¶
type UserPmsChecker interface { Check(reqPms view.ReqPermission) error // if err == nil, means reqPermission passed // contains filtered or unexported methods }
UserPmsChecker ...
Source Files ¶
Click to show internal directories.
Click to hide internal directories.