Documentation ¶
Index ¶
- func AddGroupToNode(groupId interface{}, nodeId int, permissions ...int) error
- func AddNodeToNode(srcNodeId, tarNodeId interface{}, userId ...int) error
- func AddUser(name, cnName string) error
- func AddUserToGroup(userId, groupId interface{}) error
- func AddUserToNode(userId interface{}, nodeId int, permissions ...int) error
- func CreateGroup(name, cnName string) error
- func CreateNode(name, description string, userId, parentId int, opts ...interface{}) error
- func DeleteNode(nodeId interface{}) error
- func DeleteResourceRelationship(srcNodeId, tarNodeId interface{}) error
- func GetAllNodes() ([]*model.DBResourceNode, error)
- func GetAllResourceNodes(userId interface{}, isFull ...bool) ([]*model.ResourceNode, error)
- func GetGroupPermission(groupId, nodeId int) (int64, error)
- func GetGroupUsers(groupId interface{}) ([]*model.DBUser, error)
- func GetNodeGraph(nodeId interface{}) (*model.Graph, error)
- func GetTree(userId interface{}, isFull ...bool) (*model.Tree, error)
- func GetTreeNodeGroups(nodeId interface{}) ([]*model.DBGroup, error)
- func GetTreeNodeUsers(nodeId interface{}) ([]*model.DBUser, error)
- func GetUserPermission(userId, nodeId int) (int64, error)
- func PreDeleteNode(nodeId interface{}) (*model.Graph, error)
- func UpdataGroupNodePermissions(groupId, nodeId interface{}, permissions int) error
- func UpdataUserNodePermissions(userId, nodeId interface{}, permissions int) error
- func UpdateNodeName(name, cnName string, nodeId interface{}, userId ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGroupToNode ¶
将一个节点授权给组
func AddNodeToNode ¶
加入一条资源的管理关系,可选参数userId如果传入,则判断两个节点是否都有权限
func AddUserToNode ¶
将一个节点授权给一个用户
func CreateNode ¶
将一个节点加入树
func DeleteNode ¶
func DeleteNode(nodeId interface{}) error
func DeleteResourceRelationship ¶
func DeleteResourceRelationship(srcNodeId, tarNodeId interface{}) error
func GetAllNodes ¶
func GetAllNodes() ([]*model.DBResourceNode, error)
Fetch all node of the tree. For be used by cache model.
func GetAllResourceNodes ¶
func GetAllResourceNodes(userId interface{}, isFull ...bool) ([]*model.ResourceNode, error)
获取所有节点列表
func GetTreeNodeGroups ¶
获取节点有权限的组,只有是显示设定,而不是继承来的才有显示。
func GetTreeNodeUsers ¶
获取节点有权限的用户,只有是显示设定,而不是继承来的才有显示。
func PreDeleteNode ¶
func UpdateNodeName ¶
更新节点名称,可选参数同于权限验证。如果想验证则传入userid
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.