{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.0.0-alpha","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\n## Types\n\n```go\ntype AssetManagementChaincode struct {\n}\n```\nAssetManagementChaincode is simple chaincode implementing a basic Asset Management system with access control enforcement at chaincode level. Look here for more information on how to implement access control at chaincode level: [https://github.com/hyperledger/fabric/blob/master/docs/tech/application-ACL.md](https://github.com/hyperledger/fabric/blob/master/docs/tech/application-ACL.md) An asset is simply represented by a string.\n\n```go\nfunc (t *AssetManagementChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response\n```\nInit method will be called during deployment. The deploy transaction metadata is supposed to contain the administrator cert\n\n```go\nfunc (t *AssetManagementChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response\n```\nInvoke will be called for every transaction. Supported functions are the following: \"assign(asset, owner)\": to assign ownership of assets. An asset can be owned by a single entity. Only an administrator can call this function. \"transfer(asset, newOwner)\": to transfer the ownership of an asset. Only the owner of the specific asset can call this function. An asset is any string to identify it. An owner is representated by one of his ECert/TCert.\n\n","path":"github.com/eric-erki/https-hyperledger.org/examples/chaincode/go/asset_management","name":"main","synopsis":"","isRedistributable":true}
