Documentation ¶
Index ¶
- type AkcHighThroughput
- func (akcStub *AkcHighThroughput) Delete(APIstub shim.ChaincodeStubInterface, args []string) (bool, error)
- func (akcStub *AkcHighThroughput) Get(APIstub shim.ChaincodeStubInterface, args []string) ([]byte, error)
- func (akcStub *AkcHighThroughput) Insert(APIstub shim.ChaincodeStubInterface, args []string) error
- func (akcStub *AkcHighThroughput) Prune(APIstub shim.ChaincodeStubInterface, args []string) ([]byte, error)
- type ResponseData
- type SampleChaincode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AkcHighThroughput ¶
func (*AkcHighThroughput) Delete ¶
func (akcStub *AkcHighThroughput) Delete(APIstub shim.ChaincodeStubInterface, args []string) (bool, error)
*
- Deletes all rows associated with an aggregate variable from the ledger. The args array
- contains the following argument:
- - args[0] -> The name of the variable to delete
- - args[1] -> The key of the variable to prune *
- @param APIstub The chaincode shim
- @param args The arguments array for the delete invocation *
- @return A response structure indicating success or failure with a message
func (*AkcHighThroughput) Get ¶
func (akcStub *AkcHighThroughput) Get(APIstub shim.ChaincodeStubInterface, args []string) ([]byte, error)
*
- Retrieves the aggregate value of a variable in the ledger. Gets all delta rows for the variable
- and computes the final value from all deltas. The args array for the invocation must contain the
- following argument:
- - args[0] -> The name of the variable to get the value of
- - args[1] -> The key of the variable to get the value of *
- @param APIstub The chaincode shim
- @param args The arguments array for the get invocation *
- @return A response structure indicating success or failure with a message
func (*AkcHighThroughput) Insert ¶
func (akcStub *AkcHighThroughput) Insert(APIstub shim.ChaincodeStubInterface, args []string) error
*
- Insert (updates) the ledger to include a new delta for a particular variable. If this is the first time
- this variable is being added to the ledger, then its initial value is assumed to be 0. The arguments
- to give in the args array are as follows:
- - args[0] -> name of the variable
- - args[1] -> key of the variable
- - args[2] -> new delta (float)
- - args[3] -> operation (currently supported are addition "OP_ADD" and subtraction "OP_SUB") *
- @param APIstub The chaincode shim
- @param args The arguments array for the update invocation *
- @return A response structure indicating success or failure with a message
func (*AkcHighThroughput) Prune ¶
func (akcStub *AkcHighThroughput) Prune(APIstub shim.ChaincodeStubInterface, args []string) ([]byte, error)
*
- Prune a variable by deleting all of its delta rows while computing the final value. Once all rows
- have been processed and deleted, a single new row is added which defines a delta containing the final
- computed value of the variable. If type prune is PRUNE_FAST, this is NOT safe as any failures or errors during pruning
- will result in an undefined final value for the variable and loss of data. Use type PRUNE_SAFE if data
- integrity is important. The args array contains the following argument:
- - args[0] -> The name of the variable to prune
- - args[1] -> The key of the variable to prune
- - args[2] -> Type of prune *
- @param APIstub The chaincode shim
- @param args The args array for the pruneFast invocation *
- @return A response structure indicating success or failure with a message
type ResponseData ¶
type SampleChaincode ¶
type SampleChaincode struct { }
func (*SampleChaincode) Init ¶
func (t *SampleChaincode) Init(stub shim.ChaincodeStubInterface) peer.Response
func (*SampleChaincode) Invoke ¶
func (t *SampleChaincode) Invoke(stub shim.ChaincodeStubInterface) peer.Response
Click to show internal directories.
Click to hide internal directories.