Versions in this module Expand all Collapse all v1 v1.4.6 Feb 25, 2020 Changes in this version + const ERROR + const ERRORTHRESHOLD + const HISTORY_QUERY_RESULT + const LogCritical + const LogDebug + const LogError + const LogInfo + const LogNotice + const LogWarning + const OK + const STATE_QUERY_RESULT + func Error(msg string) pb.Response + func IsEnabledForLogLevel(logLevel string) bool + func SetLoggingLevel(level LoggingLevel) + func SetupChaincodeLogging() + func Start(cc Chaincode) error + func StartInProc(env []string, args []string, cc Chaincode, recv <-chan *pb.ChaincodeMessage, ...) error + func Success(payload []byte) pb.Response + type Chaincode interface + Init func(stub ChaincodeStubInterface) pb.Response + Invoke func(stub ChaincodeStubInterface) pb.Response + type ChaincodeLogger struct + func NewLogger(name string) *ChaincodeLogger + func (c *ChaincodeLogger) Critical(args ...interface{}) + func (c *ChaincodeLogger) Criticalf(format string, args ...interface{}) + func (c *ChaincodeLogger) Debug(args ...interface{}) + func (c *ChaincodeLogger) Debugf(format string, args ...interface{}) + func (c *ChaincodeLogger) Error(args ...interface{}) + func (c *ChaincodeLogger) Errorf(format string, args ...interface{}) + func (c *ChaincodeLogger) Info(args ...interface{}) + func (c *ChaincodeLogger) Infof(format string, args ...interface{}) + func (c *ChaincodeLogger) IsEnabledFor(level LoggingLevel) bool + func (c *ChaincodeLogger) Notice(args ...interface{}) + func (c *ChaincodeLogger) Noticef(format string, args ...interface{}) + func (c *ChaincodeLogger) SetLevel(level LoggingLevel) + func (c *ChaincodeLogger) Warning(args ...interface{}) + func (c *ChaincodeLogger) Warningf(format string, args ...interface{}) + type ChaincodeStub struct + ChannelId string + TxID string + func (stub *ChaincodeStub) CreateCompositeKey(objectType string, attributes []string) (string, error) + func (stub *ChaincodeStub) DelPrivateData(collection string, key string) error + func (stub *ChaincodeStub) DelState(key string) error + func (stub *ChaincodeStub) GetArgs() [][]byte + func (stub *ChaincodeStub) GetArgsSlice() ([]byte, error) + func (stub *ChaincodeStub) GetBinding() ([]byte, error) + func (stub *ChaincodeStub) GetChannelID() string + func (stub *ChaincodeStub) GetCreator() ([]byte, error) + func (stub *ChaincodeStub) GetDecorations() map[string][]byte + func (stub *ChaincodeStub) GetFunctionAndParameters() (function string, params []string) + func (stub *ChaincodeStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error) + func (stub *ChaincodeStub) GetPrivateData(collection string, key string) ([]byte, error) + func (stub *ChaincodeStub) GetPrivateDataByPartialCompositeKey(collection, objectType string, attributes []string) (StateQueryIteratorInterface, error) + func (stub *ChaincodeStub) GetPrivateDataByRange(collection, startKey, endKey string) (StateQueryIteratorInterface, error) + func (stub *ChaincodeStub) GetPrivateDataHash(collection string, key string) ([]byte, error) + func (stub *ChaincodeStub) GetPrivateDataQueryResult(collection, query string) (StateQueryIteratorInterface, error) + func (stub *ChaincodeStub) GetPrivateDataValidationParameter(collection, key string) ([]byte, error) + func (stub *ChaincodeStub) GetQueryResult(query string) (StateQueryIteratorInterface, error) + func (stub *ChaincodeStub) GetQueryResultWithPagination(query string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) + func (stub *ChaincodeStub) GetSignedProposal() (*pb.SignedProposal, error) + func (stub *ChaincodeStub) GetState(key string) ([]byte, error) + func (stub *ChaincodeStub) GetStateByPartialCompositeKey(objectType string, attributes []string) (StateQueryIteratorInterface, error) + func (stub *ChaincodeStub) GetStateByPartialCompositeKeyWithPagination(objectType string, keys []string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) + func (stub *ChaincodeStub) GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error) + func (stub *ChaincodeStub) GetStateByRangeWithPagination(startKey, endKey string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) + func (stub *ChaincodeStub) GetStateValidationParameter(key string) ([]byte, error) + func (stub *ChaincodeStub) GetStringArgs() []string + func (stub *ChaincodeStub) GetTransient() (map[string][]byte, error) + func (stub *ChaincodeStub) GetTxID() string + func (stub *ChaincodeStub) GetTxTimestamp() (*timestamp.Timestamp, error) + func (stub *ChaincodeStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response + func (stub *ChaincodeStub) PutPrivateData(collection string, key string, value []byte) error + func (stub *ChaincodeStub) PutState(key string, value []byte) error + func (stub *ChaincodeStub) SetEvent(name string, payload []byte) error + func (stub *ChaincodeStub) SetPrivateDataValidationParameter(collection, key string, ep []byte) error + func (stub *ChaincodeStub) SetStateValidationParameter(key string, ep []byte) error + func (stub *ChaincodeStub) SplitCompositeKey(compositeKey string) (string, []string, error) + type ChaincodeStubInterface interface + CreateCompositeKey func(objectType string, attributes []string) (string, error) + DelPrivateData func(collection, key string) error + DelState func(key string) error + GetArgs func() [][]byte + GetArgsSlice func() ([]byte, error) + GetBinding func() ([]byte, error) + GetChannelID func() string + GetCreator func() ([]byte, error) + GetDecorations func() map[string][]byte + GetFunctionAndParameters func() (string, []string) + GetHistoryForKey func(key string) (HistoryQueryIteratorInterface, error) + GetPrivateData func(collection, key string) ([]byte, error) + GetPrivateDataByPartialCompositeKey func(collection, objectType string, keys []string) (StateQueryIteratorInterface, error) + GetPrivateDataByRange func(collection, startKey, endKey string) (StateQueryIteratorInterface, error) + GetPrivateDataHash func(collection, key string) ([]byte, error) + GetPrivateDataQueryResult func(collection, query string) (StateQueryIteratorInterface, error) + GetPrivateDataValidationParameter func(collection, key string) ([]byte, error) + GetQueryResult func(query string) (StateQueryIteratorInterface, error) + GetQueryResultWithPagination func(query string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) + GetSignedProposal func() (*pb.SignedProposal, error) + GetState func(key string) ([]byte, error) + GetStateByPartialCompositeKey func(objectType string, keys []string) (StateQueryIteratorInterface, error) + GetStateByPartialCompositeKeyWithPagination func(objectType string, keys []string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) + GetStateByRange func(startKey, endKey string) (StateQueryIteratorInterface, error) + GetStateByRangeWithPagination func(startKey, endKey string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) + GetStateValidationParameter func(key string) ([]byte, error) + GetStringArgs func() []string + GetTransient func() (map[string][]byte, error) + GetTxID func() string + GetTxTimestamp func() (*timestamp.Timestamp, error) + InvokeChaincode func(chaincodeName string, args [][]byte, channel string) pb.Response + PutPrivateData func(collection string, key string, value []byte) error + PutState func(key string, value []byte) error + SetEvent func(name string, payload []byte) error + SetPrivateDataValidationParameter func(collection, key string, ep []byte) error + SetStateValidationParameter func(key string, ep []byte) error + SplitCompositeKey func(compositeKey string) (string, []string, error) + type CommonIterator struct + func (iter *CommonIterator) Close() error + func (iter *CommonIterator) HasNext() bool + type CommonIteratorInterface interface + Close func() error + HasNext func() bool + type Handler struct + ChatStream PeerChaincodeStream + To string + type HistoryQueryIterator struct + func (iter *HistoryQueryIterator) Next() (*queryresult.KeyModification, error) + type HistoryQueryIteratorInterface interface + Next func() (*queryresult.KeyModification, error) + type LoggingLevel logging.Level + func LogLevel(levelString string) (LoggingLevel, error) + type MockQueryIteratorInterface interface + type MockStateRangeQueryIterator struct + Closed bool + Current *list.Element + EndKey string + StartKey string + Stub *MockStub + func NewMockStateRangeQueryIterator(stub *MockStub, startKey string, endKey string) *MockStateRangeQueryIterator + func (iter *MockStateRangeQueryIterator) Close() error + func (iter *MockStateRangeQueryIterator) HasNext() bool + func (iter *MockStateRangeQueryIterator) Next() (*queryresult.KV, error) + func (iter *MockStateRangeQueryIterator) Print() + type MockStub struct + ChaincodeEventsChannel chan *pb.ChaincodeEvent + ChannelID string + Decorations map[string][]byte + EndorsementPolicies map[string]map[string][]byte + Invokables map[string]*MockStub + Keys *list.List + Name string + PvtState map[string]map[string][]byte + State map[string][]byte + TxID string + TxTimestamp *timestamp.Timestamp + func NewMockStub(name string, cc Chaincode) *MockStub + func (stub *MockStub) CreateCompositeKey(objectType string, attributes []string) (string, error) + func (stub *MockStub) DelPrivateData(collection string, key string) error + func (stub *MockStub) DelState(key string) error + func (stub *MockStub) GetArgs() [][]byte + func (stub *MockStub) GetArgsSlice() ([]byte, error) + func (stub *MockStub) GetBinding() ([]byte, error) + func (stub *MockStub) GetChannelID() string + func (stub *MockStub) GetCreator() ([]byte, error) + func (stub *MockStub) GetDecorations() map[string][]byte + func (stub *MockStub) GetFunctionAndParameters() (function string, params []string) + func (stub *MockStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error) + func (stub *MockStub) GetPrivateData(collection string, key string) ([]byte, error) + func (stub *MockStub) GetPrivateDataByPartialCompositeKey(collection, objectType string, attributes []string) (StateQueryIteratorInterface, error) + func (stub *MockStub) GetPrivateDataByRange(collection, startKey, endKey string) (StateQueryIteratorInterface, error) + func (stub *MockStub) GetPrivateDataHash(collection, key string) ([]byte, error) + func (stub *MockStub) GetPrivateDataQueryResult(collection, query string) (StateQueryIteratorInterface, error) + func (stub *MockStub) GetPrivateDataValidationParameter(collection, key string) ([]byte, error) + func (stub *MockStub) GetQueryResult(query string) (StateQueryIteratorInterface, error) + func (stub *MockStub) GetQueryResultWithPagination(query string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) + func (stub *MockStub) GetSignedProposal() (*pb.SignedProposal, error) + func (stub *MockStub) GetState(key string) ([]byte, error) + func (stub *MockStub) GetStateByPartialCompositeKey(objectType string, attributes []string) (StateQueryIteratorInterface, error) + func (stub *MockStub) GetStateByPartialCompositeKeyWithPagination(objectType string, keys []string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) + func (stub *MockStub) GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error) + func (stub *MockStub) GetStateByRangeWithPagination(startKey, endKey string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) + func (stub *MockStub) GetStateValidationParameter(key string) ([]byte, error) + func (stub *MockStub) GetStringArgs() []string + func (stub *MockStub) GetTransient() (map[string][]byte, error) + func (stub *MockStub) GetTxID() string + func (stub *MockStub) GetTxTimestamp() (*timestamp.Timestamp, error) + func (stub *MockStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response + func (stub *MockStub) MockInit(uuid string, args [][]byte) pb.Response + func (stub *MockStub) MockInvoke(uuid string, args [][]byte) pb.Response + func (stub *MockStub) MockInvokeWithSignedProposal(uuid string, args [][]byte, sp *pb.SignedProposal) pb.Response + func (stub *MockStub) MockPeerChaincode(invokableChaincodeName string, otherStub *MockStub) + func (stub *MockStub) MockTransactionEnd(uuid string) + func (stub *MockStub) MockTransactionStart(txid string) + func (stub *MockStub) PutPrivateData(collection string, key string, value []byte) error + func (stub *MockStub) PutState(key string, value []byte) error + func (stub *MockStub) SetEvent(name string, payload []byte) error + func (stub *MockStub) SetPrivateDataValidationParameter(collection, key string, ep []byte) error + func (stub *MockStub) SetStateValidationParameter(key string, ep []byte) error + func (stub *MockStub) SplitCompositeKey(compositeKey string) (string, []string, error) + type PeerChaincodeStream interface + CloseSend func() error + Recv func() (*pb.ChaincodeMessage, error) + Send func(*pb.ChaincodeMessage) error + type SendPanicFailure string + func (e SendPanicFailure) Error() string + type StateQueryIterator struct + func (iter *StateQueryIterator) Next() (*queryresult.KV, error) + type StateQueryIteratorInterface interface + Next func() (*queryresult.KV, error)