Documentation
¶
Index ¶
- Constants
- func ResponseError(in *service.ChaincodeExec, r peer.Response) (peer.Response, error)
- func ResponseInvokeError(in *service.ChaincodeExec, r peer.Response) (peer.Response, error)
- type ChaincodeService
- func (cs *ChaincodeService) Chaincode(channel string, chaincode string) (*testing.MockStub, error)
- func (cs *ChaincodeService) Events(in *service.ChaincodeLocator, stream service.Chaincode_EventsServer) (err error)
- func (cs *ChaincodeService) Exec(ctx context.Context, in *service.ChaincodeExec) (*peer.ProposalResponse, error)
- func (cs *ChaincodeService) Invoke(ctx context.Context, in *service.ChaincodeInput) (proposalResponse *peer.ProposalResponse, err error)
- func (cs *ChaincodeService) Query(ctx context.Context, in *service.ChaincodeInput) (*peer.ProposalResponse, error)
- func (cs *ChaincodeService) WithChannel(channel string, mockStubs ...*testing.MockStub) *ChaincodeService
- type Channel
- type Channels
- type ResponseMutator
Constants ¶
View Source
const (
MessageProtocolVersion = 1
)
Variables ¶
This section is empty.
Functions ¶
func ResponseError ¶
func ResponseInvokeError ¶
Types ¶
type ChaincodeService ¶
type ChaincodeService struct {
// channel name -> chaincode name
ChannelCC Channels
ResponseMutator ResponseMutator
// contains filtered or unexported fields
}
func New ¶
func New() *ChaincodeService
func (*ChaincodeService) Events ¶
func (cs *ChaincodeService) Events(in *service.ChaincodeLocator, stream service.Chaincode_EventsServer) (err error)
func (*ChaincodeService) Exec ¶
func (cs *ChaincodeService) Exec(ctx context.Context, in *service.ChaincodeExec) (*peer.ProposalResponse, error)
func (*ChaincodeService) Invoke ¶
func (cs *ChaincodeService) Invoke(ctx context.Context, in *service.ChaincodeInput) (proposalResponse *peer.ProposalResponse, err error)
func (*ChaincodeService) Query ¶
func (cs *ChaincodeService) Query(ctx context.Context, in *service.ChaincodeInput) (*peer.ProposalResponse, error)
func (*ChaincodeService) WithChannel ¶
func (cs *ChaincodeService) WithChannel(channel string, mockStubs ...*testing.MockStub) *ChaincodeService
type ResponseMutator ¶
ResponseMutator allows to imitate peer errors or unavailability
Click to show internal directories.
Click to hide internal directories.