Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleAsset ¶
type SimpleAsset struct { }
SimpleAsset implements a simple chaincode to manage an asset
func (*SimpleAsset) Init ¶
func (t *SimpleAsset) Init(stub shim.ChaincodeStubInterface) peer.Response
Init is called during chaincode instantiation to initialize any data. Note that chaincode upgrade also calls this function to reset or to migrate data. When calls function Init, you can set an original account and its value.
func (*SimpleAsset) Invoke ¶
func (t *SimpleAsset) Invoke(stub shim.ChaincodeStubInterface) peer.Response
Invoke is called per transaction on the chaincode. Each transaction is either a 'get' or a 'set' on the asset created by Init function. The Set method may create a new asset by specifying a new key-value pair.
Click to show internal directories.
Click to hide internal directories.