Documentation
¶
Overview ¶
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Index ¶
- func NewMockSigningIdentity() (msp.SigningIdentity, error)
- type ChaincodeActionBuilder
- func (b *ChaincodeActionBuilder) Build() *pb.ChaincodeAction
- func (b *ChaincodeActionBuilder) ChaincodeID(name, path, version string) *ChaincodeActionBuilder
- func (b *ChaincodeActionBuilder) Events() *ChaincodeEventBuilder
- func (b *ChaincodeActionBuilder) Response(status int32, payload []byte, message string) *ChaincodeActionBuilder
- func (b *ChaincodeActionBuilder) Results() *mocks.ReadWriteSetBuilder
- type ChaincodeDataBuilder
- func (b *ChaincodeDataBuilder) Build() *ccprovider.ChaincodeData
- func (b *ChaincodeDataBuilder) BuildBytes() []byte
- func (b *ChaincodeDataBuilder) Name(value string) *ChaincodeDataBuilder
- func (b *ChaincodeDataBuilder) Policy(value string) *ChaincodeDataBuilder
- func (b *ChaincodeDataBuilder) VSCC(value string) *ChaincodeDataBuilder
- func (b *ChaincodeDataBuilder) Version(value string) *ChaincodeDataBuilder
- type ChaincodeEventBuilder
- func (b *ChaincodeEventBuilder) Build() *pb.ChaincodeEvent
- func (b *ChaincodeEventBuilder) BuildBytes() []byte
- func (b *ChaincodeEventBuilder) ChaincodeID(value string) *ChaincodeEventBuilder
- func (b *ChaincodeEventBuilder) EventName(value string) *ChaincodeEventBuilder
- func (b *ChaincodeEventBuilder) Payload(value []byte) *ChaincodeEventBuilder
- func (b *ChaincodeEventBuilder) TxID(value string) *ChaincodeEventBuilder
- type ConfigService
- func (fake *ConfigService) AddUpdateHandler(handler config.UpdateHandler)
- func (fake *ConfigService) AddUpdateHandlerArgsForCall(i int) config.UpdateHandler
- func (fake *ConfigService) AddUpdateHandlerCallCount() int
- func (fake *ConfigService) Get(key *config.Key) (*config.Value, error)
- func (fake *ConfigService) GetArgsForCall(i int) *config.Key
- func (fake *ConfigService) GetCallCount() int
- func (fake *ConfigService) GetReturns(result1 *config.Value, result2 error)
- func (fake *ConfigService) GetReturnsOnCall(i int, result1 *config.Value, result2 error)
- func (fake *ConfigService) Invocations() map[string][][]interface{}
- func (fake *ConfigService) Query(criteria *config.Criteria) ([]*config.KeyValue, error)
- func (fake *ConfigService) QueryArgsForCall(i int) *config.Criteria
- func (fake *ConfigService) QueryCallCount() int
- func (fake *ConfigService) QueryReturns(result1 []*config.KeyValue, result2 error)
- func (fake *ConfigService) QueryReturnsOnCall(i int, result1 []*config.KeyValue, result2 error)
- type ConfigServiceProvider
- func (fake *ConfigServiceProvider) ForChannel(channelID string) config.Service
- func (fake *ConfigServiceProvider) ForChannelArgsForCall(i int) string
- func (fake *ConfigServiceProvider) ForChannelCallCount() int
- func (fake *ConfigServiceProvider) ForChannelReturns(result1 config.Service)
- func (fake *ConfigServiceProvider) ForChannelReturnsOnCall(i int, result1 config.Service)
- func (fake *ConfigServiceProvider) Invocations() map[string][][]interface{}
- type ConfigValidatorRegistry
- type EndorsementBuilder
- type Identity
- func (id *Identity) Anonymous() bool
- func (id *Identity) ExpiresAt() time.Time
- func (id *Identity) GetIdentifier() *msp.IdentityIdentifier
- func (id *Identity) GetMSPIdentifier() string
- func (id *Identity) GetOrganizationalUnits() []*msp.OUIdentifier
- func (id *Identity) SatisfiesPrincipal(principal *mp.MSPPrincipal) error
- func (id *Identity) Serialize() ([]byte, error)
- func (id *Identity) Validate() error
- func (id *Identity) Verify(msg []byte, sig []byte) error
- func (id *Identity) WithError(err error) *Identity
- func (id *Identity) WithMSPID(mspID string) *Identity
- type LifecycleCCInfoProvider
- func (fake *LifecycleCCInfoProvider) ChaincodeInfo(channelID string, name string) (*lifecycle.LocalChaincodeInfo, error)
- func (fake *LifecycleCCInfoProvider) ChaincodeInfoArgsForCall(i int) (string, string)
- func (fake *LifecycleCCInfoProvider) ChaincodeInfoCallCount() int
- func (fake *LifecycleCCInfoProvider) ChaincodeInfoReturns(result1 *lifecycle.LocalChaincodeInfo, result2 error)
- func (fake *LifecycleCCInfoProvider) ChaincodeInfoReturnsOnCall(i int, result1 *lifecycle.LocalChaincodeInfo, result2 error)
- func (fake *LifecycleCCInfoProvider) Invocations() map[string][][]interface{}
- type MockSigningIdentity
- type MockStateDB
- func (db *MockStateDB) BytesKeySupported() bool
- func (db *MockStateDB) ExecuteQuery(namespace, query string) (statedb.ResultsIterator, error)
- func (db *MockStateDB) ExecuteQueryWithPagination(namespace, query, bookmark string, pageSize int32) (statedb.QueryResultsIterator, error)
- func (db *MockStateDB) GetState(namespace string, key string) ([]byte, error)
- func (db *MockStateDB) GetStateMultipleKeys(namespace string, keys []string) ([][]byte, error)
- func (db *MockStateDB) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (statedb.ResultsIterator, error)
- func (db *MockStateDB) GetStateRangeScanIteratorWithPagination(namespace string, startKey string, endKey string, pageSize int32) (statedb.QueryResultsIterator, error)
- func (db *MockStateDB) UpdateCache(uint64, []byte) error
- func (db *MockStateDB) WithError(err error) *MockStateDB
- func (db *MockStateDB) WithState(namespace, key string, value []byte) *MockStateDB
- type Peer
- func (fake *Peer) Endpoint() string
- func (fake *Peer) EndpointCallCount() int
- func (fake *Peer) EndpointReturns(result1 string)
- func (fake *Peer) EndpointReturnsOnCall(i int, result1 string)
- func (fake *Peer) Invocations() map[string][][]interface{}
- func (fake *Peer) MSPID() string
- func (fake *Peer) MSPIDCallCount() int
- func (fake *Peer) MSPIDReturns(result1 string)
- func (fake *Peer) MSPIDReturnsOnCall(i int, result1 string)
- type ProposalBuilder
- func (b *ProposalBuilder) Args(args ...[]byte) *ProposalBuilder
- func (b *ProposalBuilder) Build() *pb.SignedProposal
- func (b *ProposalBuilder) ChaincodeID(value string) *ProposalBuilder
- func (b *ProposalBuilder) ChannelID(value string) *ProposalBuilder
- func (b *ProposalBuilder) MSPID(value string) *ProposalBuilder
- func (b *ProposalBuilder) TransientArg(key string, value []byte) *ProposalBuilder
- type ProposalResponseBuilder
- func (b *ProposalResponseBuilder) Build() *pb.ProposalResponse
- func (b *ProposalResponseBuilder) Endorsement() *EndorsementBuilder
- func (b *ProposalResponseBuilder) Payload() *ResponsePayloadBuilder
- func (b *ProposalResponseBuilder) Response() *ResponseBuilder
- func (b *ProposalResponseBuilder) Timestamp(value *timestamp.Timestamp) *ProposalResponseBuilder
- func (b *ProposalResponseBuilder) Version(value int32) *ProposalResponseBuilder
- type ProposalResponseValidator
- func (fake *ProposalResponseValidator) Invocations() map[string][][]interface{}
- func (fake *ProposalResponseValidator) Validate(proposal *pb.SignedProposal, proposalResponses []*pb.ProposalResponse) (pb.TxValidationCode, error)
- func (fake *ProposalResponseValidator) ValidateArgsForCall(i int) (*pb.SignedProposal, []*pb.ProposalResponse)
- func (fake *ProposalResponseValidator) ValidateCallCount() int
- func (fake *ProposalResponseValidator) ValidateReturns(result1 pb.TxValidationCode, result2 error)
- func (fake *ProposalResponseValidator) ValidateReturnsOnCall(i int, result1 pb.TxValidationCode, result2 error)
- type ProposalResponseValidatorProvider
- func (fake *ProposalResponseValidatorProvider) Invocations() map[string][][]interface{}
- func (fake *ProposalResponseValidatorProvider) ValidatorForChannel(channelID string) api.ProposalResponseValidator
- func (fake *ProposalResponseValidatorProvider) ValidatorForChannelArgsForCall(i int) string
- func (fake *ProposalResponseValidatorProvider) ValidatorForChannelCallCount() int
- func (fake *ProposalResponseValidatorProvider) ValidatorForChannelReturns(result1 api.ProposalResponseValidator)
- func (fake *ProposalResponseValidatorProvider) ValidatorForChannelReturnsOnCall(i int, result1 api.ProposalResponseValidator)
- type ProposalResponsesBuilder
- type ResponseBuilder
- type ResponsePayloadBuilder
- type TxnClient
- func (fake *TxnClient) ComputeTxnID(nonce []byte) (string, error)
- func (fake *TxnClient) ComputeTxnIDArgsForCall(i int) []byte
- func (fake *TxnClient) ComputeTxnIDCallCount() int
- func (fake *TxnClient) ComputeTxnIDReturns(result1 string, result2 error)
- func (fake *TxnClient) ComputeTxnIDReturnsOnCall(i int, result1 string, result2 error)
- func (fake *TxnClient) GetPeer(endpoint string) (fabApi.Peer, error)
- func (fake *TxnClient) GetPeerArgsForCall(i int) string
- func (fake *TxnClient) GetPeerCallCount() int
- func (fake *TxnClient) GetPeerReturns(result1 fabApi.Peer, result2 error)
- func (fake *TxnClient) GetPeerReturnsOnCall(i int, result1 fabApi.Peer, result2 error)
- func (fake *TxnClient) Invocations() map[string][][]interface{}
- func (fake *TxnClient) InvokeHandler(handler invoke.Handler, request channel.Request, ...) (channel.Response, error)
- func (fake *TxnClient) InvokeHandlerArgsForCall(i int) (invoke.Handler, channel.Request, []channel.RequestOption)
- func (fake *TxnClient) InvokeHandlerCallCount() int
- func (fake *TxnClient) InvokeHandlerReturns(result1 channel.Response, result2 error)
- func (fake *TxnClient) InvokeHandlerReturnsOnCall(i int, result1 channel.Response, result2 error)
- func (fake *TxnClient) SigningIdentity() ([]byte, error)
- func (fake *TxnClient) SigningIdentityCallCount() int
- func (fake *TxnClient) SigningIdentityReturns(result1 []byte, result2 error)
- func (fake *TxnClient) SigningIdentityReturnsOnCall(i int, result1 []byte, result2 error)
- func (fake *TxnClient) VerifyProposalSignature(signedProposal *pb.SignedProposal) error
- func (fake *TxnClient) VerifyProposalSignatureArgsForCall(i int) *pb.SignedProposal
- func (fake *TxnClient) VerifyProposalSignatureCallCount() int
- func (fake *TxnClient) VerifyProposalSignatureReturns(result1 error)
- func (fake *TxnClient) VerifyProposalSignatureReturnsOnCall(i int, result1 error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockSigningIdentity ¶ added in v0.1.4
func NewMockSigningIdentity() (msp.SigningIdentity, error)
NewMockSigningIdentity ...
Types ¶
type ChaincodeActionBuilder ¶ added in v0.1.4
type ChaincodeActionBuilder struct {
// contains filtered or unexported fields
}
ChaincodeActionBuilder builds a mock ChaincodeAction
func NewChaincodeActionBuilder ¶ added in v0.1.4
func NewChaincodeActionBuilder() *ChaincodeActionBuilder
NewChaincodeActionBuilder returns a mock ChaincodeAction builder
func (*ChaincodeActionBuilder) Build ¶ added in v0.1.4
func (b *ChaincodeActionBuilder) Build() *pb.ChaincodeAction
Build returns the ChaincodeAction
func (*ChaincodeActionBuilder) ChaincodeID ¶ added in v0.1.4
func (b *ChaincodeActionBuilder) ChaincodeID(name, path, version string) *ChaincodeActionBuilder
ChaincodeID sets the chaincode ID
func (*ChaincodeActionBuilder) Events ¶ added in v0.1.4
func (b *ChaincodeActionBuilder) Events() *ChaincodeEventBuilder
Events sets the results
func (*ChaincodeActionBuilder) Response ¶ added in v0.1.4
func (b *ChaincodeActionBuilder) Response(status int32, payload []byte, message string) *ChaincodeActionBuilder
Response sets the response
func (*ChaincodeActionBuilder) Results ¶ added in v0.1.4
func (b *ChaincodeActionBuilder) Results() *mocks.ReadWriteSetBuilder
Results returns a read-write set builder
type ChaincodeDataBuilder ¶ added in v0.1.4
type ChaincodeDataBuilder struct {
// contains filtered or unexported fields
}
ChaincodeDataBuilder builds mock ChaincodeData
func NewChaincodeDataBuilder ¶ added in v0.1.4
func NewChaincodeDataBuilder() *ChaincodeDataBuilder
NewChaincodeDataBuilder returns a mock ChaincodeData builder
func (*ChaincodeDataBuilder) Build ¶ added in v0.1.4
func (b *ChaincodeDataBuilder) Build() *ccprovider.ChaincodeData
Build returns the ChaincodeData
func (*ChaincodeDataBuilder) BuildBytes ¶ added in v0.1.4
func (b *ChaincodeDataBuilder) BuildBytes() []byte
BuildBytes returns the ChaincodeData bytes
func (*ChaincodeDataBuilder) Name ¶ added in v0.1.4
func (b *ChaincodeDataBuilder) Name(value string) *ChaincodeDataBuilder
Name sets the chaincode name
func (*ChaincodeDataBuilder) Policy ¶ added in v0.1.4
func (b *ChaincodeDataBuilder) Policy(value string) *ChaincodeDataBuilder
Policy sets the chaincode policy
func (*ChaincodeDataBuilder) VSCC ¶ added in v0.1.4
func (b *ChaincodeDataBuilder) VSCC(value string) *ChaincodeDataBuilder
VSCC sets the VSCC
func (*ChaincodeDataBuilder) Version ¶ added in v0.1.4
func (b *ChaincodeDataBuilder) Version(value string) *ChaincodeDataBuilder
Version sets the chaincode version
type ChaincodeEventBuilder ¶ added in v0.1.4
type ChaincodeEventBuilder struct {
// contains filtered or unexported fields
}
ChaincodeEventBuilder builds a mock ChaincodeAction
func NewChaincodeEventBuilder ¶ added in v0.1.4
func NewChaincodeEventBuilder() *ChaincodeEventBuilder
NewChaincodeEventBuilder returns a mock ChaincodeAction builder
func (*ChaincodeEventBuilder) Build ¶ added in v0.1.4
func (b *ChaincodeEventBuilder) Build() *pb.ChaincodeEvent
Build returns the ChaincodeEvent
func (*ChaincodeEventBuilder) BuildBytes ¶ added in v0.1.4
func (b *ChaincodeEventBuilder) BuildBytes() []byte
BuildBytes returns the ChaincodeEvent bytes
func (*ChaincodeEventBuilder) ChaincodeID ¶ added in v0.1.4
func (b *ChaincodeEventBuilder) ChaincodeID(value string) *ChaincodeEventBuilder
ChaincodeID sets the chaincode ID
func (*ChaincodeEventBuilder) EventName ¶ added in v0.1.4
func (b *ChaincodeEventBuilder) EventName(value string) *ChaincodeEventBuilder
EventName sets the event name
func (*ChaincodeEventBuilder) Payload ¶ added in v0.1.4
func (b *ChaincodeEventBuilder) Payload(value []byte) *ChaincodeEventBuilder
Payload sets the payload
func (*ChaincodeEventBuilder) TxID ¶ added in v0.1.4
func (b *ChaincodeEventBuilder) TxID(value string) *ChaincodeEventBuilder
TxID sets the transaction ID
type ConfigService ¶
type ConfigService struct { GetStub func(key *config.Key) (*config.Value, error) QueryStub func(criteria *config.Criteria) ([]*config.KeyValue, error) AddUpdateHandlerStub func(handler config.UpdateHandler) // contains filtered or unexported fields }
func (*ConfigService) AddUpdateHandler ¶
func (fake *ConfigService) AddUpdateHandler(handler config.UpdateHandler)
func (*ConfigService) AddUpdateHandlerArgsForCall ¶
func (fake *ConfigService) AddUpdateHandlerArgsForCall(i int) config.UpdateHandler
func (*ConfigService) AddUpdateHandlerCallCount ¶
func (fake *ConfigService) AddUpdateHandlerCallCount() int
func (*ConfigService) GetArgsForCall ¶
func (fake *ConfigService) GetArgsForCall(i int) *config.Key
func (*ConfigService) GetCallCount ¶
func (fake *ConfigService) GetCallCount() int
func (*ConfigService) GetReturns ¶
func (fake *ConfigService) GetReturns(result1 *config.Value, result2 error)
func (*ConfigService) GetReturnsOnCall ¶
func (fake *ConfigService) GetReturnsOnCall(i int, result1 *config.Value, result2 error)
func (*ConfigService) Invocations ¶
func (fake *ConfigService) Invocations() map[string][][]interface{}
func (*ConfigService) QueryArgsForCall ¶
func (fake *ConfigService) QueryArgsForCall(i int) *config.Criteria
func (*ConfigService) QueryCallCount ¶
func (fake *ConfigService) QueryCallCount() int
func (*ConfigService) QueryReturns ¶
func (fake *ConfigService) QueryReturns(result1 []*config.KeyValue, result2 error)
func (*ConfigService) QueryReturnsOnCall ¶
func (fake *ConfigService) QueryReturnsOnCall(i int, result1 []*config.KeyValue, result2 error)
type ConfigServiceProvider ¶
type ConfigServiceProvider struct { ForChannelStub func(channelID string) config.Service // contains filtered or unexported fields }
func (*ConfigServiceProvider) ForChannel ¶
func (fake *ConfigServiceProvider) ForChannel(channelID string) config.Service
func (*ConfigServiceProvider) ForChannelArgsForCall ¶
func (fake *ConfigServiceProvider) ForChannelArgsForCall(i int) string
func (*ConfigServiceProvider) ForChannelCallCount ¶
func (fake *ConfigServiceProvider) ForChannelCallCount() int
func (*ConfigServiceProvider) ForChannelReturns ¶
func (fake *ConfigServiceProvider) ForChannelReturns(result1 config.Service)
func (*ConfigServiceProvider) ForChannelReturnsOnCall ¶
func (fake *ConfigServiceProvider) ForChannelReturnsOnCall(i int, result1 config.Service)
func (*ConfigServiceProvider) Invocations ¶
func (fake *ConfigServiceProvider) Invocations() map[string][][]interface{}
type ConfigValidatorRegistry ¶ added in v0.1.2
type ConfigValidatorRegistry struct { RegisterStub func(v config.Validator) // contains filtered or unexported fields }
func (*ConfigValidatorRegistry) Invocations ¶ added in v0.1.2
func (fake *ConfigValidatorRegistry) Invocations() map[string][][]interface{}
func (*ConfigValidatorRegistry) Register ¶ added in v0.1.2
func (fake *ConfigValidatorRegistry) Register(v config.Validator)
func (*ConfigValidatorRegistry) RegisterArgsForCall ¶ added in v0.1.2
func (fake *ConfigValidatorRegistry) RegisterArgsForCall(i int) config.Validator
func (*ConfigValidatorRegistry) RegisterCallCount ¶ added in v0.1.2
func (fake *ConfigValidatorRegistry) RegisterCallCount() int
type EndorsementBuilder ¶ added in v0.1.4
type EndorsementBuilder struct {
// contains filtered or unexported fields
}
EndorsementBuilder builds a mock ChaincodeAction
func NewEndorsementBuilder ¶ added in v0.1.4
func NewEndorsementBuilder() *EndorsementBuilder
NewEndorsementBuilder returns a mock ChaincodeAction builder
func (*EndorsementBuilder) Build ¶ added in v0.1.4
func (b *EndorsementBuilder) Build() *pb.Endorsement
Build returns the Endorsement
func (*EndorsementBuilder) Endorser ¶ added in v0.1.4
func (b *EndorsementBuilder) Endorser(value []byte) *EndorsementBuilder
Endorser sets the endorser
func (*EndorsementBuilder) Signature ¶ added in v0.1.4
func (b *EndorsementBuilder) Signature(value []byte) *EndorsementBuilder
Signature sets the signature
type Identity ¶ added in v0.1.4
type Identity struct {
// contains filtered or unexported fields
}
Identity implements identity
func NewIdentity ¶ added in v0.1.4
func NewIdentity() *Identity
NewIdentity creates new mock identity
func (*Identity) ExpiresAt ¶ added in v0.1.4
ExpiresAt returns the time at which the Identity expires.
func (*Identity) GetIdentifier ¶ added in v0.1.4
func (id *Identity) GetIdentifier() *msp.IdentityIdentifier
GetIdentifier returns the identifier (MSPID/IDID) for this instance
func (*Identity) GetMSPIdentifier ¶ added in v0.1.4
GetMSPIdentifier returns the MSP identifier for this instance
func (*Identity) GetOrganizationalUnits ¶ added in v0.1.4
func (id *Identity) GetOrganizationalUnits() []*msp.OUIdentifier
GetOrganizationalUnits returns the OU for this instance
func (*Identity) SatisfiesPrincipal ¶ added in v0.1.4
func (id *Identity) SatisfiesPrincipal(principal *mp.MSPPrincipal) error
SatisfiesPrincipal returns null if this instance matches the supplied principal or an error otherwise
func (*Identity) Serialize ¶ added in v0.1.4
Serialize returns a byte array representation of this identity
func (*Identity) Validate ¶ added in v0.1.4
Validate returns nil if this instance is a valid identity or an error otherwise
func (*Identity) Verify ¶ added in v0.1.4
Verify checks against a signature and a message to determine whether this identity produced the signature; it returns nil if so or an error otherwise
type LifecycleCCInfoProvider ¶ added in v0.1.4
type LifecycleCCInfoProvider struct { ChaincodeInfoStub func(channelID, name string) (*lifecycle.LocalChaincodeInfo, error) // contains filtered or unexported fields }
func (*LifecycleCCInfoProvider) ChaincodeInfo ¶ added in v0.1.4
func (fake *LifecycleCCInfoProvider) ChaincodeInfo(channelID string, name string) (*lifecycle.LocalChaincodeInfo, error)
func (*LifecycleCCInfoProvider) ChaincodeInfoArgsForCall ¶ added in v0.1.4
func (fake *LifecycleCCInfoProvider) ChaincodeInfoArgsForCall(i int) (string, string)
func (*LifecycleCCInfoProvider) ChaincodeInfoCallCount ¶ added in v0.1.4
func (fake *LifecycleCCInfoProvider) ChaincodeInfoCallCount() int
func (*LifecycleCCInfoProvider) ChaincodeInfoReturns ¶ added in v0.1.4
func (fake *LifecycleCCInfoProvider) ChaincodeInfoReturns(result1 *lifecycle.LocalChaincodeInfo, result2 error)
func (*LifecycleCCInfoProvider) ChaincodeInfoReturnsOnCall ¶ added in v0.1.4
func (fake *LifecycleCCInfoProvider) ChaincodeInfoReturnsOnCall(i int, result1 *lifecycle.LocalChaincodeInfo, result2 error)
func (*LifecycleCCInfoProvider) Invocations ¶ added in v0.1.4
func (fake *LifecycleCCInfoProvider) Invocations() map[string][][]interface{}
type MockSigningIdentity ¶ added in v0.1.4
type MockSigningIdentity struct { // we embed everything from a base identity Identity // signer corresponds to the object that can produce signatures from this identity Signer crypto.Signer }
MockSigningIdentity ...
func (*MockSigningIdentity) GetPublicVersion ¶ added in v0.1.4
func (id *MockSigningIdentity) GetPublicVersion() msp.Identity
GetPublicVersion ...
type MockStateDB ¶ added in v0.1.4
type MockStateDB struct {
// contains filtered or unexported fields
}
MockStateDB implements a mocked state database
func NewStateDB ¶ added in v0.1.4
func NewStateDB() *MockStateDB
NewStateDB return a new mocked state database
func (*MockStateDB) BytesKeySupported ¶ added in v0.1.4
func (db *MockStateDB) BytesKeySupported() bool
BytesKeySupported returns true if the implementation (underlying db) supports the any bytes to be used as key.
func (*MockStateDB) ExecuteQuery ¶ added in v0.1.4
func (db *MockStateDB) ExecuteQuery(namespace, query string) (statedb.ResultsIterator, error)
ExecuteQuery executes the given query and returns an iterator that contains results of type *VersionedKV.
func (*MockStateDB) ExecuteQueryWithPagination ¶ added in v0.1.4
func (db *MockStateDB) ExecuteQueryWithPagination(namespace, query, bookmark string, pageSize int32) (statedb.QueryResultsIterator, error)
ExecuteQueryWithPagination executes the given query and
func (*MockStateDB) GetState ¶ added in v0.1.4
func (db *MockStateDB) GetState(namespace string, key string) ([]byte, error)
GetState gets the value for given namespace and key. For a chaincode, the namespace corresponds to the chaincodeId
func (*MockStateDB) GetStateMultipleKeys ¶ added in v0.1.4
func (db *MockStateDB) GetStateMultipleKeys(namespace string, keys []string) ([][]byte, error)
GetStateMultipleKeys gets the values for multiple keys in a single call
func (*MockStateDB) GetStateRangeScanIterator ¶ added in v0.1.4
func (db *MockStateDB) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (statedb.ResultsIterator, error)
GetStateRangeScanIterator returns an iterator that contains all the key-values between given key ranges.
func (*MockStateDB) GetStateRangeScanIteratorWithPagination ¶ added in v0.1.4
func (db *MockStateDB) GetStateRangeScanIteratorWithPagination(namespace string, startKey string, endKey string, pageSize int32) (statedb.QueryResultsIterator, error)
GetStateRangeScanIteratorWithPagination returns an iterator that contains all the key-values between given key ranges.
func (*MockStateDB) UpdateCache ¶ added in v0.1.5
func (db *MockStateDB) UpdateCache(uint64, []byte) error
UpdateCache is not implemented
func (*MockStateDB) WithError ¶ added in v0.1.4
func (db *MockStateDB) WithError(err error) *MockStateDB
WithError injects an error
func (*MockStateDB) WithState ¶ added in v0.1.4
func (db *MockStateDB) WithState(namespace, key string, value []byte) *MockStateDB
WithState sets the state for the given namespace and key
type Peer ¶ added in v0.1.4
type Peer struct { MSPIDStub func() string EndpointStub func() string // contains filtered or unexported fields }
func (*Peer) EndpointCallCount ¶ added in v0.1.4
func (*Peer) EndpointReturns ¶ added in v0.1.4
func (*Peer) EndpointReturnsOnCall ¶ added in v0.1.4
func (*Peer) Invocations ¶ added in v0.1.4
func (*Peer) MSPIDCallCount ¶ added in v0.1.4
func (*Peer) MSPIDReturns ¶ added in v0.1.4
func (*Peer) MSPIDReturnsOnCall ¶ added in v0.1.4
type ProposalBuilder ¶ added in v0.1.4
type ProposalBuilder struct {
// contains filtered or unexported fields
}
ProposalBuilder builds a mock signed proposal
func NewProposalBuilder ¶ added in v0.1.4
func NewProposalBuilder() *ProposalBuilder
NewProposalBuilder returns a mock proposal builder
func (*ProposalBuilder) Args ¶ added in v0.1.4
func (b *ProposalBuilder) Args(args ...[]byte) *ProposalBuilder
Args adds chaincode arguments
func (*ProposalBuilder) Build ¶ added in v0.1.4
func (b *ProposalBuilder) Build() *pb.SignedProposal
Build returns the signed proposal
func (*ProposalBuilder) ChaincodeID ¶ added in v0.1.4
func (b *ProposalBuilder) ChaincodeID(value string) *ProposalBuilder
ChaincodeID sets the chaincode ID for the proposal
func (*ProposalBuilder) ChannelID ¶ added in v0.1.4
func (b *ProposalBuilder) ChannelID(value string) *ProposalBuilder
ChannelID sets the channel ID for the proposal
func (*ProposalBuilder) MSPID ¶ added in v0.1.4
func (b *ProposalBuilder) MSPID(value string) *ProposalBuilder
MSPID sets the MSP ID of the creator
func (*ProposalBuilder) TransientArg ¶ added in v0.1.4
func (b *ProposalBuilder) TransientArg(key string, value []byte) *ProposalBuilder
TransientArg adds a transient key-value
type ProposalResponseBuilder ¶ added in v0.1.4
type ProposalResponseBuilder struct {
// contains filtered or unexported fields
}
ProposalResponseBuilder builds a mock ProposalResponse
func NewProposalResponseBuilder ¶ added in v0.1.4
func NewProposalResponseBuilder() *ProposalResponseBuilder
NewProposalResponseBuilder returns a mock proposal response builder
func (*ProposalResponseBuilder) Build ¶ added in v0.1.4
func (b *ProposalResponseBuilder) Build() *pb.ProposalResponse
Build returns a proposal response
func (*ProposalResponseBuilder) Endorsement ¶ added in v0.1.4
func (b *ProposalResponseBuilder) Endorsement() *EndorsementBuilder
Endorsement returns a new endorsement builder
func (*ProposalResponseBuilder) Payload ¶ added in v0.1.4
func (b *ProposalResponseBuilder) Payload() *ResponsePayloadBuilder
Payload returns a new response payload builder
func (*ProposalResponseBuilder) Response ¶ added in v0.1.4
func (b *ProposalResponseBuilder) Response() *ResponseBuilder
Response returns a new response builder
func (*ProposalResponseBuilder) Timestamp ¶ added in v0.1.4
func (b *ProposalResponseBuilder) Timestamp(value *timestamp.Timestamp) *ProposalResponseBuilder
Timestamp sets the timestamp
func (*ProposalResponseBuilder) Version ¶ added in v0.1.4
func (b *ProposalResponseBuilder) Version(value int32) *ProposalResponseBuilder
Version sets the version
type ProposalResponseValidator ¶ added in v0.1.4
type ProposalResponseValidator struct { ValidateStub func(proposal *pb.SignedProposal, proposalResponses []*pb.ProposalResponse) (pb.TxValidationCode, error) // contains filtered or unexported fields }
func (*ProposalResponseValidator) Invocations ¶ added in v0.1.4
func (fake *ProposalResponseValidator) Invocations() map[string][][]interface{}
func (*ProposalResponseValidator) Validate ¶ added in v0.1.4
func (fake *ProposalResponseValidator) Validate(proposal *pb.SignedProposal, proposalResponses []*pb.ProposalResponse) (pb.TxValidationCode, error)
func (*ProposalResponseValidator) ValidateArgsForCall ¶ added in v0.1.4
func (fake *ProposalResponseValidator) ValidateArgsForCall(i int) (*pb.SignedProposal, []*pb.ProposalResponse)
func (*ProposalResponseValidator) ValidateCallCount ¶ added in v0.1.4
func (fake *ProposalResponseValidator) ValidateCallCount() int
func (*ProposalResponseValidator) ValidateReturns ¶ added in v0.1.4
func (fake *ProposalResponseValidator) ValidateReturns(result1 pb.TxValidationCode, result2 error)
func (*ProposalResponseValidator) ValidateReturnsOnCall ¶ added in v0.1.4
func (fake *ProposalResponseValidator) ValidateReturnsOnCall(i int, result1 pb.TxValidationCode, result2 error)
type ProposalResponseValidatorProvider ¶ added in v0.1.4
type ProposalResponseValidatorProvider struct { ValidatorForChannelStub func(channelID string) api.ProposalResponseValidator // contains filtered or unexported fields }
func (*ProposalResponseValidatorProvider) Invocations ¶ added in v0.1.4
func (fake *ProposalResponseValidatorProvider) Invocations() map[string][][]interface{}
func (*ProposalResponseValidatorProvider) ValidatorForChannel ¶ added in v0.1.4
func (fake *ProposalResponseValidatorProvider) ValidatorForChannel(channelID string) api.ProposalResponseValidator
func (*ProposalResponseValidatorProvider) ValidatorForChannelArgsForCall ¶ added in v0.1.4
func (fake *ProposalResponseValidatorProvider) ValidatorForChannelArgsForCall(i int) string
func (*ProposalResponseValidatorProvider) ValidatorForChannelCallCount ¶ added in v0.1.4
func (fake *ProposalResponseValidatorProvider) ValidatorForChannelCallCount() int
func (*ProposalResponseValidatorProvider) ValidatorForChannelReturns ¶ added in v0.1.4
func (fake *ProposalResponseValidatorProvider) ValidatorForChannelReturns(result1 api.ProposalResponseValidator)
func (*ProposalResponseValidatorProvider) ValidatorForChannelReturnsOnCall ¶ added in v0.1.4
func (fake *ProposalResponseValidatorProvider) ValidatorForChannelReturnsOnCall(i int, result1 api.ProposalResponseValidator)
type ProposalResponsesBuilder ¶ added in v0.1.4
type ProposalResponsesBuilder struct {
// contains filtered or unexported fields
}
ProposalResponsesBuilder builds a slice of mock ProposalResponse's
func NewProposalResponsesBuilder ¶ added in v0.1.4
func NewProposalResponsesBuilder() *ProposalResponsesBuilder
NewProposalResponsesBuilder returns a mock proposal responses builder
func (*ProposalResponsesBuilder) Build ¶ added in v0.1.4
func (b *ProposalResponsesBuilder) Build() []*pb.ProposalResponse
Build returns a slice of mock ProposalResponse's
func (*ProposalResponsesBuilder) ProposalResponse ¶ added in v0.1.4
func (b *ProposalResponsesBuilder) ProposalResponse() *ProposalResponseBuilder
ProposalResponse adds a new proposal response
type ResponseBuilder ¶ added in v0.1.4
type ResponseBuilder struct {
// contains filtered or unexported fields
}
ResponseBuilder builds a mock Response
func NewResponseBuilder ¶ added in v0.1.4
func NewResponseBuilder() *ResponseBuilder
NewResponseBuilder returns a mock response builder
func (*ResponseBuilder) Build ¶ added in v0.1.4
func (b *ResponseBuilder) Build() *pb.Response
Build returns the response
func (*ResponseBuilder) Message ¶ added in v0.1.4
func (b *ResponseBuilder) Message(value string) *ResponseBuilder
Message sets the response message
func (*ResponseBuilder) Payload ¶ added in v0.1.4
func (b *ResponseBuilder) Payload(value []byte) *ResponseBuilder
Payload sets the response payload
func (*ResponseBuilder) Status ¶ added in v0.1.4
func (b *ResponseBuilder) Status(value int32) *ResponseBuilder
Status sets the response status code
type ResponsePayloadBuilder ¶ added in v0.1.4
type ResponsePayloadBuilder struct {
// contains filtered or unexported fields
}
ResponsePayloadBuilder builds a mock Proposal Response Payload
func NewResponsePayloadBuilder ¶ added in v0.1.4
func NewResponsePayloadBuilder() *ResponsePayloadBuilder
NewResponsePayloadBuilder returns a mock Proposal Response Payload builder
func (*ResponsePayloadBuilder) Build ¶ added in v0.1.4
func (b *ResponsePayloadBuilder) Build() *pb.ProposalResponsePayload
Build returns the proposal response payload
func (*ResponsePayloadBuilder) BuildBytes ¶ added in v0.1.4
func (b *ResponsePayloadBuilder) BuildBytes() []byte
BuildBytes returns the proposal response payload bytes
func (*ResponsePayloadBuilder) ChaincodeAction ¶ added in v0.1.4
func (b *ResponsePayloadBuilder) ChaincodeAction() *ChaincodeActionBuilder
ChaincodeAction returns a ChaincodeActionBuilder
func (*ResponsePayloadBuilder) ProposalHash ¶ added in v0.1.4
func (b *ResponsePayloadBuilder) ProposalHash(value []byte) *ResponsePayloadBuilder
ProposalHash sets the proposal hash
type TxnClient ¶
type TxnClient struct { InvokeHandlerStub func(handler invoke.Handler, request channel.Request, options ...channel.RequestOption) (channel.Response, error) ComputeTxnIDStub func(nonce []byte) (string, error) SigningIdentityStub func() ([]byte, error) GetPeerStub func(endpoint string) (fabApi.Peer, error) VerifyProposalSignatureStub func(signedProposal *pb.SignedProposal) error // contains filtered or unexported fields }
func (*TxnClient) ComputeTxnID ¶ added in v0.1.4
func (*TxnClient) ComputeTxnIDArgsForCall ¶ added in v0.1.4
func (*TxnClient) ComputeTxnIDCallCount ¶ added in v0.1.4
func (*TxnClient) ComputeTxnIDReturns ¶ added in v0.1.4
func (*TxnClient) ComputeTxnIDReturnsOnCall ¶ added in v0.1.4
func (*TxnClient) GetPeerArgsForCall ¶ added in v0.1.4
func (*TxnClient) GetPeerCallCount ¶ added in v0.1.4
func (*TxnClient) GetPeerReturns ¶ added in v0.1.4
func (*TxnClient) GetPeerReturnsOnCall ¶ added in v0.1.4
func (*TxnClient) Invocations ¶
func (*TxnClient) InvokeHandler ¶ added in v0.1.4
func (*TxnClient) InvokeHandlerArgsForCall ¶ added in v0.1.4
func (*TxnClient) InvokeHandlerCallCount ¶ added in v0.1.4
func (*TxnClient) InvokeHandlerReturns ¶ added in v0.1.4
func (*TxnClient) InvokeHandlerReturnsOnCall ¶ added in v0.1.4
func (*TxnClient) SigningIdentity ¶ added in v0.1.4
func (*TxnClient) SigningIdentityCallCount ¶ added in v0.1.4
func (*TxnClient) SigningIdentityReturns ¶ added in v0.1.4
func (*TxnClient) SigningIdentityReturnsOnCall ¶ added in v0.1.4
func (*TxnClient) VerifyProposalSignature ¶ added in v0.1.4
func (fake *TxnClient) VerifyProposalSignature(signedProposal *pb.SignedProposal) error
func (*TxnClient) VerifyProposalSignatureArgsForCall ¶ added in v0.1.4
func (fake *TxnClient) VerifyProposalSignatureArgsForCall(i int) *pb.SignedProposal