impl

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CallerAttrImpl = []func(stub interface{}) (bool, CallerAttributes){MockStubAttrImpl}
View Source
var InnerInvokeImpl = []func(stub interface{}) (bool, InnerInvoke){MockStubInvokeImpl}
View Source
var NoImplError = errors.New("Not implied")

Functions

This section is empty.

Types

type CallerAttributes

type CallerAttributes interface {

	// used to read an specific attribute from the transaction certificate,
	// *attributeName* is passed as input parameter to this function.
	// Example:
	//  attrValue,error:=stub.ReadCertAttribute("position")
	GetCallerAttribute(attributeName string) ([]byte, error)

	// GetCallerCertificate returns caller certificate
	GetCallerCertificate() ([]byte, error)
}

func GetCallerAttributes

func GetCallerAttributes(stub shim.ChaincodeStubInterface) (CallerAttributes, error)

func MockStubAttrImpl

func MockStubAttrImpl(stub interface{}) (bool, CallerAttributes)

type InnerInvoke

type InnerInvoke interface {

	// InvokeChaincode locally calls the specified chaincode `Invoke` using the
	// same transaction context; that is, chaincode calling chaincode doesn't
	// create a new transaction message.
	InvokeChaincode(chaincodeName string, method string, args [][]byte) ([]byte, error)

	// QueryChaincode locally calls the specified chaincode `Query` using the
	// same transaction context; that is, chaincode calling chaincode doesn't
	// create a new transaction message.
	QueryChaincode(chaincodeName string, method string, args [][]byte) ([]byte, error)

	// acquire the (direct) chaincode name in a inner invoking
	GetCallingChaincodeName() string

	GetOriginalChaincodeName() string
}

func GetInnerInvoke

func GetInnerInvoke(stub shim.ChaincodeStubInterface) (InnerInvoke, error)

func MockStubInvokeImpl

func MockStubInvokeImpl(stub interface{}) (bool, InnerInvoke)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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