sysccprovider

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: GPL-3.0, GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSystemChaincodeProviderFactory

func RegisterSystemChaincodeProviderFactory(sccfact SystemChaincodeProviderFactory)

RegisterSystemChaincodeProviderFactory is to be called once to set the factory that will be used to obtain instances of ChaincodeProvider

Types

type ChaincodeInstance

type ChaincodeInstance struct {
	ChainID          string
	ChaincodeName    string
	ChaincodeVersion string
}

ChaincodeInstance is unique identifier of chaincode instance

func (*ChaincodeInstance) String

func (ci *ChaincodeInstance) String() string

type SystemChaincodeProvider

type SystemChaincodeProvider interface {
	// IsSysCC returns true if the supplied chaincode is a system chaincode
	IsSysCC(name string) bool

	// IsSysCCAndNotInvokableCC2CC returns true if the supplied chaincode
	// is a system chaincode and is not invokable through a cc2cc invocation
	IsSysCCAndNotInvokableCC2CC(name string) bool

	// IsSysCCAndNotInvokable returns true if the supplied chaincode
	// is a system chaincode and is not invokable through a proposal
	IsSysCCAndNotInvokableExternal(name string) bool
}

SystemChaincodeProvider provides an abstraction layer that is used for different packages to interact with code in the system chaincode package without importing it; more methods should be added below if necessary

func GetSystemChaincodeProvider

func GetSystemChaincodeProvider() SystemChaincodeProvider

GetSystemChaincodeProvider returns instances of SystemChaincodeProvider; the actual implementation is controlled by the factory that is registered via RegisterSystemChaincodeProviderFactory

type SystemChaincodeProviderFactory

type SystemChaincodeProviderFactory interface {
	NewSystemChaincodeProvider() SystemChaincodeProvider
}

SystemChaincodeProviderFactory defines a factory interface so that the actual implementation can be injected

Jump to

Keyboard shortcuts

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