Documentation ¶
Index ¶
- func SplitAccountURI(akuri string) []string
- type PermNode
- func BuildAccountPermTree(aclMgr base.AclManager, account string, aksuri []string) (*PermNode, error)
- func BuildMethodPermTree(aclMgr base.AclManager, 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 ¶
func SplitAccountURI ¶
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 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 base.AclManager, account string, aksuri []string) (*PermNode, error)
BuildAccountPermTree build PermTree for account
func BuildMethodPermTree ¶
func BuildMethodPermTree(aclMgr base.AclManager, contractName string, methodName string, aksuri []string) (*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.