{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.1.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package chaincodes\n\n## Functions\n\n```go\nfunc ListShadowCCs()\n```\nListShadowCCs lists all registered shadow ccs in the library\n\n```go\nfunc RegisterCCClients(ccs []*CCClient) error\n```\nRegisterCCClients registers and maps chaincode clients to their shadows\n\n## Types\n\n```go\ntype CCClient struct {\n\t//-------------config properties ------------\n\t//Name of the chaincode\n\tName string\n\n\t//InitArgs used for deploying the chaincode\n\tInitArgs []string\n\n\t//Path to the chaincode\n\tPath string\n\n\t//NumFinalQueryAttempts number of times to try final query before giving up\n\tNumFinalQueryAttempts int\n\n\t//NumberOfInvokes number of iterations to do invoke on\n\tNumberOfInvokes int\n\n\t//DelayBetweenInvokeMs delay between each invoke\n\tDelayBetweenInvokeMs int\n\n\t//DelayBetweenQueryMs delay between each query\n\tDelayBetweenQueryMs int\n\n\t//TimeoutToAbortSecs timeout for aborting this chaincode processing\n\tTimeoutToAbortSecs int\n\n\t//Lang of chaincode\n\tLang string\n\n\t//WaitAfterInvokeMs wait time before validating invokes for this chaincode\n\tWaitAfterInvokeMs int\n\n\t//Concurrency number of goroutines to spin\n\tConcurrency int\n\n\t//-------------runtime properties ------------\n\t//Unique number assigned to this CC by CCChecker\n\tID int\n\t// contains filtered or unexported fields\n}\n```\nCCClient chaincode properties, config and runtime\n\n```go\nfunc (cc *CCClient) Report(verbose bool, chainID string)\n```\nReport reports chaincode test execution, iter by iter\n\n```go\nfunc (cc *CCClient) Run(ctxt context.Context, chainID string, bc common.BroadcastClient, ec pb.EndorserClient, signer msp.SigningIdentity, wg *sync.WaitGroup) error\n```\nRun test over given number of iterations\n\n\ti will be unique across chaincodes and can be used as a key\n\t  this is useful if chaincode occurs multiple times in the array of chaincodes\n\n```go\nfunc (cc *CCClient) Validate(ctxt context.Context, chainID string, bc common.BroadcastClient, ec pb.EndorserClient, signer msp.SigningIdentity, wg *sync.WaitGroup) error\n```\nValidate test that was Run. Each successful iteration in the run is validated against\n\n```go\ntype ShadowCCIntf interface {\n\t//InitShadowCC initializes the shadow chaincode (will be called once for each chaincode)\n\tInitShadowCC(initArgs []string)\n\n\t//GetInvokeArgs gets invoke arguments from shadow\n\tGetInvokeArgs(ccnum int, iter int) [][]byte\n\n\t//PostInvoke passes the retvalue from the invoke to the shadow for post-processing\n\tPostInvoke(args [][]byte, retval []byte) error\n\n\t//GetQueryArgs mimics the Invoke and gets the query for an invoke\n\tGetQueryArgs(ccnum int, iter int) [][]byte\n\n\t//Validate the results against the query arguments\n\tValidate(args [][]byte, value []byte) error\n\n\t//GetNumQueries returns number of queries to perform\n\tGetNumQueries(numSuccessfulInvokes int) int\n\n\t//OverrideNumInvokes overrides the users number of invoke request\n\tOverrideNumInvokes(numInvokesPlanned int) int\n}\n```\nShadowCCIntf interfaces to be implemented by shadow chaincodes\n\n","path":"github.com/eric-erki/https-hyperledger.org/examples/ccchecker/chaincodes","name":"chaincodes","synopsis":"","isRedistributable":true}
