Documentation ¶
Index ¶
- Constants
- func GetAccountAllRights(stub shim.ChaincodeStubInterface, params []string) (*pb.AccountRights, error)
- func GetAccountRight(stub shim.ChaincodeStubInterface, params []string) (*pb.HaveRight, error)
- func GetOperationAllRights(stub shim.ChaincodeStubInterface, params []string) (*pb.AccountRights, error)
- type Role
Constants ¶
const ( // NoRights = "you have no right to make '%s' operation with chaincode '%s' with role '%s'" EmptyResponse = "ACL empty response" WrongArgsCount = "wrong arguments count, get: %d, want: %d" )
acl errors
const ( GetAccOpRightArgCount = 5 GetAccAllRightsArgCount = 5 AddRightsArgsCount = 5 RemoveRightsArgsCount = 5 )
access matrix functions args count
const ( Ch = "acl" CC = "acl" )
Ch - ACL channel name, CC - ACL chaincode name
const ( GetAccOpRightFn = "getAccountOperationRight" GetAccAllRightsFn = "getAccountAllRights" AddRightsFn = "addRights" RemoveRightsFn = "removeRights" )
acl chaincode functions
Variables ¶
This section is empty.
Functions ¶
func GetAccountAllRights ¶
func GetAccountAllRights(stub shim.ChaincodeStubInterface, params []string) (*pb.AccountRights, error)
GetAccountAllRights fetch all permissions, available for account, params[0] -> channel name params[1] -> chaincode name params[2] -> role params[3] -> operation name params[4] -> account address
func GetAccountRight ¶
GetAccountRight checks permission for user doing operation with chaincode in channel with role params[0] -> channel name params[1] -> chaincode name params[2] -> role params[3] -> operation name params[4] -> user address
func GetOperationAllRights ¶
func GetOperationAllRights(stub shim.ChaincodeStubInterface, params []string) (*pb.AccountRights, error)
GetOperationAllRights fetch all permissions for user with chaincode in channel with specified role params[0] -> channel name params[1] -> chaincode name params[2] -> role params[3] -> operation name params[4] -> user address