Documentation ¶
Index ¶
- type PermNode
- func BuildAccountPermTree(aclMgr acl.ManagerInterface, account string, aksuri []string, ...) (*PermNode, error)
- func BuildMethodPermTree(aclMgr acl.ManagerInterface, contractName string, methodName string, ...) (*PermNode, error)
- func GetPermTreeList(root *PermNode) ([]*PermNode, error)
- func NewPermNode(akName string, acl *pb.Acl) *PermNode
- type ValidateStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PermNode ¶
type PermNode struct { Name string // the name(id) of account/ak/method ACL *pb.Acl // the ACL definition of this account/method Status ValidateStatus // the ACL validation status of this node SignInfo *pb.SignatureInfo // the signature info of this node, only AK have this field Children []*PermNode // the children of this node, usually are ACL members of account/method }
PermNode defines the node of perm tree
func BuildAccountPermTree ¶
func BuildAccountPermTree(aclMgr acl.ManagerInterface, account string, aksuri []string, sign []*pb.SignatureInfo) (*PermNode, error)
BuildAccountPermTree build PermTree for account
func BuildMethodPermTree ¶
func BuildMethodPermTree(aclMgr acl.ManagerInterface, contractName string, methodName string, aksuri []string, sign []*pb.SignatureInfo) (*PermNode, error)
BuildMethodPermTree build PermTree for contract method
func GetPermTreeList ¶
GetPermTreeList return a BFS list of a perm tree
func NewPermNode ¶
NewPermNode return a default PermNode
type ValidateStatus ¶
type ValidateStatus int
ValidateStatus define the validation status of a perm node
const ( // NotVerified : not verified by ACLValidator NotVerified ValidateStatus // Success : ACLValidator verified successful Success // Failed : ACLValidator verified failed Failed )
Click to show internal directories.
Click to hide internal directories.