rpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeRPCResult

func DecodeRPCResult(msg proto.Message, r []byte) error

func EncodeRPCResult

func EncodeRPCResult(msg proto.Message) ([]byte, error)

Types

type Caller

type Caller interface {
	Deploy(method string, arg [][]byte) (string, error)
	Invoke(method string, arg [][]byte) (string, error)
	Query(method string, arg [][]byte) ([]byte, error)
}

type ChaincodeAdapter

type ChaincodeAdapter struct {
	*shim.MockStub
	TxIDGen func() string
}

func NewLocalChaincode

func NewLocalChaincode(cc shim.Chaincode) *ChaincodeAdapter

func (*ChaincodeAdapter) DefaultTxID

func (c *ChaincodeAdapter) DefaultTxID()

func (*ChaincodeAdapter) Deploy

func (c *ChaincodeAdapter) Deploy(method string, arg [][]byte) (string, error)

func (*ChaincodeAdapter) Invoke

func (c *ChaincodeAdapter) Invoke(method string, arg [][]byte) (string, error)

func (*ChaincodeAdapter) Query

func (c *ChaincodeAdapter) Query(method string, arg [][]byte) ([]byte, error)

func (*ChaincodeAdapter) SpecifyTxID

func (c *ChaincodeAdapter) SpecifyTxID(txid string)

type DummyCallerBuilder

type DummyCallerBuilder struct {
	CCName string
	// contains filtered or unexported fields
}

func (*DummyCallerBuilder) AppendPreHandler

func (d *DummyCallerBuilder) AppendPreHandler(h tx.TxPreHandler) error

func (*DummyCallerBuilder) GetCaller

func (d *DummyCallerBuilder) GetCaller(txid string, h tx.TxHandler) Caller

func (*DummyCallerBuilder) GetQueryer

func (d *DummyCallerBuilder) GetQueryer(h tx.TxHandler) Caller

func (DummyCallerBuilder) Invoke

func (c DummyCallerBuilder) Invoke(stub shim.ChaincodeStubInterface, function string, args [][]byte, _ bool) ([]byte, error)

func (*DummyCallerBuilder) NewTxID

func (d *DummyCallerBuilder) NewTxID(txid string)

func (*DummyCallerBuilder) Reset

func (d *DummyCallerBuilder) Reset()

func (*DummyCallerBuilder) Stub

func (d *DummyCallerBuilder) Stub() *shim.MockStub

Jump to

Keyboard shortcuts

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