{"modulePath":"github.com/mcc-github/blockchain","version":"v0.0.0-20190916220231-95b87edfbee2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package shim\n\nCopyright IBM Corp. All Rights Reserved.\n\nSPDX-License-Identifier: Apache-2.0\n\n## Constants\n\n```go\nconst (\n\tLogDebug    = LoggingLevel(logging.DEBUG)\n\tLogInfo     = LoggingLevel(logging.INFO)\n\tLogNotice   = LoggingLevel(logging.NOTICE)\n\tLogWarning  = LoggingLevel(logging.WARNING)\n\tLogError    = LoggingLevel(logging.ERROR)\n\tLogCritical = LoggingLevel(logging.CRITICAL)\n)\n```\n\n```go\nconst (\n\tSTATE_QUERY_RESULT resultType = iota + 1\n\tHISTORY_QUERY_RESULT\n)\n```\n\n```go\nconst (\n\tLogDebug    = LoggingLevel(logging.DEBUG)\n\tLogInfo     = LoggingLevel(logging.INFO)\n\tLogNotice   = LoggingLevel(logging.NOTICE)\n\tLogWarning  = LoggingLevel(logging.WARNING)\n\tLogError    = LoggingLevel(logging.ERROR)\n\tLogCritical = LoggingLevel(logging.CRITICAL)\n)\n```\n\n```go\nconst (\n\tOK = 200\n\n\tERRORTHRESHOLD = 400\n\n\tERROR = 500\n)\n```\n\n```go\nconst (\n\tSTATE_QUERY_RESULT resultType = iota + 1\n\tHISTORY_QUERY_RESULT\n)\n```\n\n## Functions\n\n```go\nfunc CreateCompositeKey(objectType string, attributes []string) (string, error)\n```\n\n```go\nfunc Error(msg string) pb.Response\n```\n\n```go\nfunc IsEnabledForLogLevel(logLevel string) bool\n```\n\n```go\nfunc SetLoggingLevel(level LoggingLevel)\n```\n\n```go\nfunc SetupChaincodeLogging()\n```\n\n```go\nfunc Start(cc Chaincode) error\n```\n\n```go\nfunc StartInProc(env []string, args []string, cc Chaincode, recv \u003c-chan *pb.ChaincodeMessage, send chan\u003c- *pb.ChaincodeMessage) error\n```\n\n```go\nfunc Success(payload []byte) pb.Response\n```\n\n## Types\n\n```go\ntype Chaincode interface {\n\tInit(stub ChaincodeStubInterface) pb.Response\n\n\tInvoke(stub ChaincodeStubInterface) pb.Response\n}\n```\n\n```go\ntype ChaincodeLogger struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewLogger(name string) *ChaincodeLogger\n```\n\n```go\nfunc (c *ChaincodeLogger) Critical(args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) Criticalf(format string, args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) Debug(args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) Debugf(format string, args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) Error(args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) Errorf(format string, args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) Info(args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) Infof(format string, args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) IsEnabledFor(level LoggingLevel) bool\n```\n\n```go\nfunc (c *ChaincodeLogger) Notice(args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) Noticef(format string, args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) SetLevel(level LoggingLevel)\n```\n\n```go\nfunc (c *ChaincodeLogger) Warning(args ...interface{})\n```\n\n```go\nfunc (c *ChaincodeLogger) Warningf(format string, args ...interface{})\n```\n\n```go\ntype ChaincodeStub struct {\n\tTxID      string\n\tChannelId string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (stub *ChaincodeStub) CreateCompositeKey(objectType string, attributes []string) (string, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) DelPrivateData(collection string, key string) error\n```\n\n```go\nfunc (stub *ChaincodeStub) DelState(key string) error\n```\n\n```go\nfunc (stub *ChaincodeStub) GetArgs() [][]byte\n```\n\n```go\nfunc (stub *ChaincodeStub) GetArgsSlice() ([]byte, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetBinding() ([]byte, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetChannelID() string\n```\n\n```go\nfunc (stub *ChaincodeStub) GetCreator() ([]byte, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetDecorations() map[string][]byte\n```\n\n```go\nfunc (stub *ChaincodeStub) GetFunctionAndParameters() (function string, params []string)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetPrivateData(collection string, key string) ([]byte, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetPrivateDataByPartialCompositeKey(collection, objectType string, attributes []string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetPrivateDataByRange(collection, startKey, endKey string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetPrivateDataHash(collection string, key string) ([]byte, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetPrivateDataQueryResult(collection, query string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetPrivateDataValidationParameter(collection, key string) ([]byte, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetQueryResult(query string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetQueryResultWithPagination(query string, pageSize int32,\n\tbookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetSignedProposal() (*pb.SignedProposal, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetState(key string) ([]byte, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetStateByPartialCompositeKey(objectType string, attributes []string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetStateByPartialCompositeKeyWithPagination(objectType string, keys []string,\n\tpageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetStateByRangeWithPagination(startKey, endKey string, pageSize int32,\n\tbookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetStateValidationParameter(key string) ([]byte, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetStringArgs() []string\n```\n\n```go\nfunc (stub *ChaincodeStub) GetTransient() (map[string][]byte, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) GetTxID() string\n```\n\n```go\nfunc (stub *ChaincodeStub) GetTxTimestamp() (*timestamp.Timestamp, error)\n```\n\n```go\nfunc (stub *ChaincodeStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response\n```\n\n```go\nfunc (stub *ChaincodeStub) PutPrivateData(collection string, key string, value []byte) error\n```\n\n```go\nfunc (stub *ChaincodeStub) PutState(key string, value []byte) error\n```\n\n```go\nfunc (stub *ChaincodeStub) SetEvent(name string, payload []byte) error\n```\n\n```go\nfunc (stub *ChaincodeStub) SetPrivateDataValidationParameter(collection, key string, ep []byte) error\n```\n\n```go\nfunc (stub *ChaincodeStub) SetStateValidationParameter(key string, ep []byte) error\n```\n\n```go\nfunc (stub *ChaincodeStub) SplitCompositeKey(compositeKey string) (string, []string, error)\n```\n\n```go\ntype ChaincodeStubInterface interface {\n\tGetArgs() [][]byte\n\n\tGetStringArgs() []string\n\n\tGetFunctionAndParameters() (string, []string)\n\n\tGetArgsSlice() ([]byte, error)\n\n\tGetTxID() string\n\n\tGetChannelID() string\n\n\tInvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response\n\n\tGetState(key string) ([]byte, error)\n\n\tPutState(key string, value []byte) error\n\n\tDelState(key string) error\n\n\tSetStateValidationParameter(key string, ep []byte) error\n\n\tGetStateValidationParameter(key string) ([]byte, error)\n\n\tGetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error)\n\n\tGetStateByRangeWithPagination(startKey, endKey string, pageSize int32,\n\t\tbookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)\n\n\tGetStateByPartialCompositeKey(objectType string, keys []string) (StateQueryIteratorInterface, error)\n\n\tGetStateByPartialCompositeKeyWithPagination(objectType string, keys []string,\n\t\tpageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)\n\n\tCreateCompositeKey(objectType string, attributes []string) (string, error)\n\n\tSplitCompositeKey(compositeKey string) (string, []string, error)\n\n\tGetQueryResult(query string) (StateQueryIteratorInterface, error)\n\n\tGetQueryResultWithPagination(query string, pageSize int32,\n\t\tbookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)\n\n\tGetHistoryForKey(key string) (HistoryQueryIteratorInterface, error)\n\n\tGetPrivateData(collection, key string) ([]byte, error)\n\n\tGetPrivateDataHash(collection, key string) ([]byte, error)\n\n\tPutPrivateData(collection string, key string, value []byte) error\n\n\tDelPrivateData(collection, key string) error\n\n\tSetPrivateDataValidationParameter(collection, key string, ep []byte) error\n\n\tGetPrivateDataValidationParameter(collection, key string) ([]byte, error)\n\n\tGetPrivateDataByRange(collection, startKey, endKey string) (StateQueryIteratorInterface, error)\n\n\tGetPrivateDataByPartialCompositeKey(collection, objectType string, keys []string) (StateQueryIteratorInterface, error)\n\n\tGetPrivateDataQueryResult(collection, query string) (StateQueryIteratorInterface, error)\n\n\tGetCreator() ([]byte, error)\n\n\tGetTransient() (map[string][]byte, error)\n\n\tGetBinding() ([]byte, error)\n\n\tGetDecorations() map[string][]byte\n\n\tGetSignedProposal() (*pb.SignedProposal, error)\n\n\tGetTxTimestamp() (*timestamp.Timestamp, error)\n\n\tSetEvent(name string, payload []byte) error\n}\n```\n\n```go\ntype CommonIterator struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (iter *CommonIterator) Close() error\n```\n\n```go\nfunc (iter *CommonIterator) HasNext() bool\n```\n\n```go\ntype CommonIteratorInterface interface {\n\tHasNext() bool\n\n\tClose() error\n}\n```\n\n```go\ntype Handler struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype HistoryQueryIterator struct {\n\t*CommonIterator\n}\n```\n\n```go\nfunc (iter *HistoryQueryIterator) Next() (*queryresult.KeyModification, error)\n```\n\n```go\ntype HistoryQueryIteratorInterface interface {\n\tCommonIteratorInterface\n\n\tNext() (*queryresult.KeyModification, error)\n}\n```\n\n```go\ntype LoggingLevel logging.Level\n```\n\n```go\nfunc LogLevel(levelString string) (LoggingLevel, error)\n```\n\n```go\ntype MockQueryIteratorInterface interface {\n\tStateQueryIteratorInterface\n}\n```\n\n```go\ntype MockStateRangeQueryIterator struct {\n\tClosed   bool\n\tStub     *MockStub\n\tStartKey string\n\tEndKey   string\n\tCurrent  *list.Element\n}\n```\n\n```go\nfunc NewMockStateRangeQueryIterator(stub *MockStub, startKey string, endKey string) *MockStateRangeQueryIterator\n```\n\n```go\nfunc (iter *MockStateRangeQueryIterator) Close() error\n```\n\n```go\nfunc (iter *MockStateRangeQueryIterator) HasNext() bool\n```\n\n```go\nfunc (iter *MockStateRangeQueryIterator) Next() (*queryresult.KV, error)\n```\n\n```go\nfunc (iter *MockStateRangeQueryIterator) Print()\n```\n\n```go\ntype MockStub struct {\n\tName string\n\n\tState map[string][]byte\n\n\tKeys *list.List\n\n\tInvokables map[string]*MockStub\n\n\tTxID string\n\n\tTxTimestamp *timestamp.Timestamp\n\n\tChannelID string\n\n\tPvtState map[string]map[string][]byte\n\n\tEndorsementPolicies map[string]map[string][]byte\n\n\tChaincodeEventsChannel chan *pb.ChaincodeEvent\n\n\tCreator []byte\n\n\tDecorations map[string][]byte\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewMockStub(name string, cc Chaincode) *MockStub\n```\n\n```go\nfunc (stub *MockStub) CreateCompositeKey(objectType string, attributes []string) (string, error)\n```\n\n```go\nfunc (stub *MockStub) DelPrivateData(collection string, key string) error\n```\n\n```go\nfunc (stub *MockStub) DelState(key string) error\n```\n\n```go\nfunc (stub *MockStub) GetArgs() [][]byte\n```\n\n```go\nfunc (stub *MockStub) GetArgsSlice() ([]byte, error)\n```\n\n```go\nfunc (stub *MockStub) GetBinding() ([]byte, error)\n```\n\n```go\nfunc (stub *MockStub) GetChannelID() string\n```\n\n```go\nfunc (stub *MockStub) GetCreator() ([]byte, error)\n```\n\n```go\nfunc (stub *MockStub) GetDecorations() map[string][]byte\n```\n\n```go\nfunc (stub *MockStub) GetFunctionAndParameters() (function string, params []string)\n```\n\n```go\nfunc (stub *MockStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *MockStub) GetPrivateData(collection string, key string) ([]byte, error)\n```\n\n```go\nfunc (stub *MockStub) GetPrivateDataByPartialCompositeKey(collection, objectType string, attributes []string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *MockStub) GetPrivateDataByRange(collection, startKey, endKey string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *MockStub) GetPrivateDataHash(collection, key string) ([]byte, error)\n```\n\n```go\nfunc (stub *MockStub) GetPrivateDataQueryResult(collection, query string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *MockStub) GetPrivateDataValidationParameter(collection, key string) ([]byte, error)\n```\n\n```go\nfunc (stub *MockStub) GetQueryResult(query string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *MockStub) GetQueryResultWithPagination(query string, pageSize int32,\n\tbookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)\n```\n\n```go\nfunc (stub *MockStub) GetSignedProposal() (*pb.SignedProposal, error)\n```\n\n```go\nfunc (stub *MockStub) GetState(key string) ([]byte, error)\n```\n\n```go\nfunc (stub *MockStub) GetStateByPartialCompositeKey(objectType string, attributes []string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *MockStub) GetStateByPartialCompositeKeyWithPagination(objectType string, keys []string,\n\tpageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)\n```\n\n```go\nfunc (stub *MockStub) GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error)\n```\n\n```go\nfunc (stub *MockStub) GetStateByRangeWithPagination(startKey, endKey string, pageSize int32,\n\tbookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)\n```\n\n```go\nfunc (stub *MockStub) GetStateValidationParameter(key string) ([]byte, error)\n```\n\n```go\nfunc (stub *MockStub) GetStringArgs() []string\n```\n\n```go\nfunc (stub *MockStub) GetTransient() (map[string][]byte, error)\n```\n\n```go\nfunc (stub *MockStub) GetTxID() string\n```\n\n```go\nfunc (stub *MockStub) GetTxTimestamp() (*timestamp.Timestamp, error)\n```\n\n```go\nfunc (stub *MockStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response\n```\n\n```go\nfunc (stub *MockStub) MockInit(uuid string, args [][]byte) pb.Response\n```\n\n```go\nfunc (stub *MockStub) MockInvoke(uuid string, args [][]byte) pb.Response\n```\n\n```go\nfunc (stub *MockStub) MockInvokeWithSignedProposal(uuid string, args [][]byte, sp *pb.SignedProposal) pb.Response\n```\n\n```go\nfunc (stub *MockStub) MockPeerChaincode(invokableChaincodeName string, otherStub *MockStub, channel string)\n```\n\n```go\nfunc (stub *MockStub) MockTransactionEnd(uuid string)\n```\n\n```go\nfunc (stub *MockStub) MockTransactionStart(txid string)\n```\n\n```go\nfunc (stub *MockStub) PutPrivateData(collection string, key string, value []byte) error\n```\n\n```go\nfunc (stub *MockStub) PutState(key string, value []byte) error\n```\n\n```go\nfunc (stub *MockStub) SetEvent(name string, payload []byte) error\n```\n\n```go\nfunc (stub *MockStub) SetPrivateDataValidationParameter(collection, key string, ep []byte) error\n```\n\n```go\nfunc (stub *MockStub) SetStateValidationParameter(key string, ep []byte) error\n```\n\n```go\nfunc (stub *MockStub) SplitCompositeKey(compositeKey string) (string, []string, error)\n```\n\n```go\ntype PeerChaincodeStream interface {\n\tSend(*pb.ChaincodeMessage) error\n\tRecv() (*pb.ChaincodeMessage, error)\n\tCloseSend() error\n}\n```\n\n```go\ntype SendPanicFailure string\n```\n\n```go\nfunc (e SendPanicFailure) Error() string\n```\n\n```go\ntype StateQueryIterator struct {\n\t*CommonIterator\n}\n```\n\n```go\nfunc (iter *StateQueryIterator) Next() (*queryresult.KV, error)\n```\n\n```go\ntype StateQueryIteratorInterface interface {\n\tCommonIteratorInterface\n\n\tNext() (*queryresult.KV, error)\n}\n```\n\n","path":"github.com/mcc-github/blockchain/core/chaincode/shim","name":"shim","synopsis":"","isRedistributable":true}
