testing

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ChannelMockStubs

type ChannelMockStubs map[string]*MockStub

type ChannelsMockStubs

type ChannelsMockStubs map[string]ChannelMockStubs

type EventSubscription

type EventSubscription struct {
	// contains filtered or unexported fields
}

func (*EventSubscription) Close

func (es *EventSubscription) Close() error

func (*EventSubscription) Errors

func (es *EventSubscription) Errors() chan error

func (*EventSubscription) Events

func (es *EventSubscription) Events() chan *peer.ChaincodeEvent

type MockStub

type MockStub = cckittesting.MockStub

type MockedPeer

type MockedPeer struct {
	// channel name -> chaincode name
	ChannelCC ChannelsMockStubs
	// contains filtered or unexported fields
}

func NewPeer

func NewPeer() *MockedPeer

NewInvoker implements Invoker interface from hlf-sdk-go

func (*MockedPeer) Chaincode

func (mi *MockedPeer) Chaincode(channel string, chaincode string) (*MockStub, error)

func (*MockedPeer) Invoke

func (mi *MockedPeer) Invoke(ctx context.Context, from msp.SigningIdentity, channel string, chaincode string, fn string, args [][]byte, transArgs api.TransArgs) (*peer.Response, api.ChaincodeTx, error)

func (*MockedPeer) Query

func (mi *MockedPeer) Query(ctx context.Context, from msp.SigningIdentity, channel string, chaincode string, fn string, args [][]byte, transArgs api.TransArgs) (*peer.Response, error)

func (*MockedPeer) Subscribe

func (mi *MockedPeer) Subscribe(ctx context.Context, from msp.SigningIdentity, channel, chaincode string) (api.EventCCSubscription, error)

func (*MockedPeer) WithChannel

func (mi *MockedPeer) WithChannel(channel string, mockStubs ...*MockStub) *MockedPeer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL