Documentation ¶
Index ¶
- Constants
- type ChaincodeMismatchErr
- type CollectionsConfigUpgradesNotAllowed
- type DeployedCCInfoProvider
- func (p *DeployedCCInfoProvider) ChaincodeInfo(chaincodeName string, qe ledger.SimpleQueryExecutor) (*ledger.DeployedChaincodeInfo, error)
- func (p *DeployedCCInfoProvider) CollectionInfo(chaincodeName, collectionName string, qe ledger.SimpleQueryExecutor) (*common.StaticCollectionConfig, error)
- func (p *DeployedCCInfoProvider) Namespaces() []string
- func (p *DeployedCCInfoProvider) UpdatedChaincodes(stateUpdates map[string][]*kvrwset.KVWrite) ([]*ledger.ChaincodeLifecycleInfo, error)
- type EmptyChaincodeNameErr
- type EmptyVersionErr
- type ExistsErr
- type FilesystemSupport
- type IdenticalVersionErr
- type InstantiationPolicyMissing
- type InvalidArgsLenErr
- type InvalidCCOnFSError
- type InvalidChaincodeNameErr
- type InvalidChannelNameErr
- type InvalidDeploymentSpecErr
- type InvalidFunctionErr
- type InvalidStatedbArtifactsErr
- type InvalidVersionErr
- type LifeCycleSysCC
- func (lscc *LifeCycleSysCC) Chaincode() shim.Chaincode
- func (lscc *LifeCycleSysCC) ChaincodeContainerInfo(chaincodeName string, qe ledger.QueryExecutor) (*ccprovider.ChaincodeContainerInfo, error)
- func (lscc *LifeCycleSysCC) ChaincodeDefinition(chaincodeName string, qe ledger.QueryExecutor) (ccprovider.ChaincodeDefinition, error)
- func (lscc *LifeCycleSysCC) Enabled() bool
- func (lscc *LifeCycleSysCC) Init(stub shim.ChaincodeStubInterface) pb.Response
- func (lscc *LifeCycleSysCC) InitArgs() [][]byte
- func (lscc *LifeCycleSysCC) InvokableCC2CC() bool
- func (lscc *LifeCycleSysCC) InvokableExternal() bool
- func (lscc *LifeCycleSysCC) Invoke(stub shim.ChaincodeStubInterface) pb.Response
- func (lscc *LifeCycleSysCC) Name() string
- func (lscc *LifeCycleSysCC) Path() string
- type MarshallErr
- type NotFoundErr
- type PrivateChannelDataNotAvailable
- type TXNotFoundErr
Constants ¶
const ( // INSTALL install command INSTALL = "install" // DEPLOY deploy command DEPLOY = "deploy" // UPGRADE upgrade chaincode UPGRADE = "upgrade" // CCEXISTS get chaincode CCEXISTS = "getid" // CHAINCODEEXISTS get chaincode alias CHAINCODEEXISTS = "ChaincodeExists" // GETDEPSPEC get ChaincodeDeploymentSpec GETDEPSPEC = "getdepspec" // GETDEPLOYMENTSPEC get ChaincodeDeploymentSpec alias GETDEPLOYMENTSPEC = "GetDeploymentSpec" // GETCCDATA get ChaincodeData GETCCDATA = "getccdata" // GETCHAINCODEDATA get ChaincodeData alias GETCHAINCODEDATA = "GetChaincodeData" // GETCHAINCODES gets the instantiated chaincodes on a channel GETCHAINCODES = "getchaincodes" // GETCHAINCODESALIAS gets the instantiated chaincodes on a channel GETCHAINCODESALIAS = "GetChaincodes" // GETINSTALLEDCHAINCODES gets the installed chaincodes on a peer GETINSTALLEDCHAINCODES = "getinstalledchaincodes" // GETINSTALLEDCHAINCODESALIAS gets the installed chaincodes on a peer GETINSTALLEDCHAINCODESALIAS = "GetInstalledChaincodes" // GETCOLLECTIONSCONFIG gets the collections config for a chaincode GETCOLLECTIONSCONFIG = "GetCollectionsConfig" // GETCOLLECTIONSCONFIGALIAS gets the collections config for a chaincode GETCOLLECTIONSCONFIGALIAS = "getcollectionsconfig" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChaincodeMismatchErr ¶
type ChaincodeMismatchErr string
ChaincodeMismatchErr chaincode name from two places don't match
func (ChaincodeMismatchErr) Error ¶
func (f ChaincodeMismatchErr) Error() string
type CollectionsConfigUpgradesNotAllowed ¶ added in v1.2.0
type CollectionsConfigUpgradesNotAllowed string
CollectionsConfigUpgradesNotAllowed when V1_2 capability is not enabled
func (CollectionsConfigUpgradesNotAllowed) Error ¶ added in v1.2.0
func (f CollectionsConfigUpgradesNotAllowed) Error() string
type DeployedCCInfoProvider ¶ added in v1.3.0
type DeployedCCInfoProvider struct { }
DeployedCCInfoProvider implements ineterface ledger.DeployedChaincodeInfoProvider
func (*DeployedCCInfoProvider) ChaincodeInfo ¶ added in v1.3.0
func (p *DeployedCCInfoProvider) ChaincodeInfo(chaincodeName string, qe ledger.SimpleQueryExecutor) (*ledger.DeployedChaincodeInfo, error)
ChaincodeInfo implements function in interface ledger.DeployedChaincodeInfoProvider
func (*DeployedCCInfoProvider) CollectionInfo ¶ added in v1.3.0
func (p *DeployedCCInfoProvider) CollectionInfo(chaincodeName, collectionName string, qe ledger.SimpleQueryExecutor) (*common.StaticCollectionConfig, error)
CollectionInfo implements function in interface ledger.DeployedChaincodeInfoProvider
func (*DeployedCCInfoProvider) Namespaces ¶ added in v1.3.0
func (p *DeployedCCInfoProvider) Namespaces() []string
Namespaces implements function in interface ledger.DeployedChaincodeInfoProvider
func (*DeployedCCInfoProvider) UpdatedChaincodes ¶ added in v1.3.0
func (p *DeployedCCInfoProvider) UpdatedChaincodes(stateUpdates map[string][]*kvrwset.KVWrite) ([]*ledger.ChaincodeLifecycleInfo, error)
UpdatedChaincodes implements function in interface ledger.DeployedChaincodeInfoProvider
type EmptyChaincodeNameErr ¶
type EmptyChaincodeNameErr string
EmptyChaincodeNameErr trying to upgrade to same version of Chaincode
func (EmptyChaincodeNameErr) Error ¶
func (f EmptyChaincodeNameErr) Error() string
type EmptyVersionErr ¶
type EmptyVersionErr string
EmptyVersionErr empty version error
func (EmptyVersionErr) Error ¶
func (f EmptyVersionErr) Error() string
type FilesystemSupport ¶ added in v1.2.0
type FilesystemSupport interface { // PutChaincodeToLocalStorage stores the supplied chaincode // package to local storage (i.e. the file system) PutChaincodeToLocalStorage(ccprovider.CCPackage) error // GetChaincodeFromLocalStorage retrieves the chaincode package // for the requested chaincode, specified by name and version GetChaincodeFromLocalStorage(ccname string, ccversion string) (ccprovider.CCPackage, error) // GetChaincodesFromLocalStorage returns an array of all chaincode // data that have previously been persisted to local storage GetChaincodesFromLocalStorage() (*pb.ChaincodeQueryResponse, error) // GetInstantiationPolicy returns the instantiation policy for the // supplied chaincode (or the channel's default if none was specified) GetInstantiationPolicy(channel string, ccpack ccprovider.CCPackage) ([]byte, error) // CheckInstantiationPolicy checks whether the supplied signed proposal // complies with the supplied instantiation policy CheckInstantiationPolicy(signedProposal *pb.SignedProposal, chainName string, instantiationPolicy []byte) error }
FilesystemSupport contains functions that LSCC requires to execute its tasks
type IdenticalVersionErr ¶
type IdenticalVersionErr string
IdenticalVersionErr trying to upgrade to same version of Chaincode
func (IdenticalVersionErr) Error ¶
func (f IdenticalVersionErr) Error() string
type InstantiationPolicyMissing ¶
type InstantiationPolicyMissing string
InstantiationPolicyMissing when no existing instantiation policy is found when upgrading CC
func (InstantiationPolicyMissing) Error ¶
func (f InstantiationPolicyMissing) Error() string
type InvalidArgsLenErr ¶
type InvalidArgsLenErr int
InvalidArgsLenErr invalid arguments length error
func (InvalidArgsLenErr) Error ¶
func (i InvalidArgsLenErr) Error() string
type InvalidCCOnFSError ¶
type InvalidCCOnFSError string
InvalidCCOnFSError error due to mismatch between fingerprint on lscc and installed CC
func (InvalidCCOnFSError) Error ¶
func (f InvalidCCOnFSError) Error() string
type InvalidChaincodeNameErr ¶
type InvalidChaincodeNameErr string
InvalidChaincodeNameErr invalid chaincode name error
func (InvalidChaincodeNameErr) Error ¶
func (f InvalidChaincodeNameErr) Error() string
type InvalidChannelNameErr ¶ added in v1.2.0
type InvalidChannelNameErr string
InvalidChannelNameErr invalid channel name error
func (InvalidChannelNameErr) Error ¶ added in v1.2.0
func (f InvalidChannelNameErr) Error() string
type InvalidDeploymentSpecErr ¶
type InvalidDeploymentSpecErr string
InvalidDeploymentSpecErr invalid chaincode deployment spec error
func (InvalidDeploymentSpecErr) Error ¶
func (f InvalidDeploymentSpecErr) Error() string
type InvalidFunctionErr ¶
type InvalidFunctionErr string
InvalidFunctionErr invalid function error
func (InvalidFunctionErr) Error ¶
func (f InvalidFunctionErr) Error() string
type InvalidStatedbArtifactsErr ¶ added in v1.1.0
type InvalidStatedbArtifactsErr string
InvalidStatedbArtifactsErr invalid state database artifacts error
func (InvalidStatedbArtifactsErr) Error ¶ added in v1.1.0
func (f InvalidStatedbArtifactsErr) Error() string
type InvalidVersionErr ¶
type InvalidVersionErr string
InvalidVersionErr invalid version error
func (InvalidVersionErr) Error ¶
func (f InvalidVersionErr) Error() string
type LifeCycleSysCC ¶
type LifeCycleSysCC struct { // aclProvider is responsible for access control evaluation ACLProvider aclmgmt.ACLProvider // SCCProvider is the interface which is passed into system chaincodes // to access other parts of the system SCCProvider sysccprovider.SystemChaincodeProvider // PolicyChecker is the interface used to perform // access control PolicyChecker policy.PolicyChecker // Support provides the implementation of several // static functions Support FilesystemSupport PlatformRegistry *platforms.Registry }
LifeCycleSysCC implements chaincode lifecycle and policies around it
func New ¶ added in v1.2.0
func New(sccp sysccprovider.SystemChaincodeProvider, ACLProvider aclmgmt.ACLProvider, platformRegistry *platforms.Registry) *LifeCycleSysCC
New creates a new instance of the LSCC Typically there is only one of these per peer
func (*LifeCycleSysCC) Chaincode ¶ added in v1.3.0
func (lscc *LifeCycleSysCC) Chaincode() shim.Chaincode
func (*LifeCycleSysCC) ChaincodeContainerInfo ¶ added in v1.3.0
func (lscc *LifeCycleSysCC) ChaincodeContainerInfo(chaincodeName string, qe ledger.QueryExecutor) (*ccprovider.ChaincodeContainerInfo, error)
func (*LifeCycleSysCC) ChaincodeDefinition ¶ added in v1.3.0
func (lscc *LifeCycleSysCC) ChaincodeDefinition(chaincodeName string, qe ledger.QueryExecutor) (ccprovider.ChaincodeDefinition, error)
func (*LifeCycleSysCC) Enabled ¶ added in v1.3.0
func (lscc *LifeCycleSysCC) Enabled() bool
func (*LifeCycleSysCC) Init ¶
func (lscc *LifeCycleSysCC) Init(stub shim.ChaincodeStubInterface) pb.Response
Init is mostly useless for SCC
func (*LifeCycleSysCC) InitArgs ¶ added in v1.3.0
func (lscc *LifeCycleSysCC) InitArgs() [][]byte
func (*LifeCycleSysCC) InvokableCC2CC ¶ added in v1.3.0
func (lscc *LifeCycleSysCC) InvokableCC2CC() bool
func (*LifeCycleSysCC) InvokableExternal ¶ added in v1.3.0
func (lscc *LifeCycleSysCC) InvokableExternal() bool
func (*LifeCycleSysCC) Invoke ¶
func (lscc *LifeCycleSysCC) Invoke(stub shim.ChaincodeStubInterface) pb.Response
Invoke implements lifecycle functions "deploy", "start", "stop", "upgrade". Deploy's arguments - {[]byte("deploy"), []byte(<chainname>), <unmarshalled pb.ChaincodeDeploymentSpec>}
Invoke also implements some query-like functions Get chaincode arguments - {[]byte("getid"), []byte(<chainname>), []byte(<chaincodename>)}
func (*LifeCycleSysCC) Name ¶ added in v1.3.0
func (lscc *LifeCycleSysCC) Name() string
func (*LifeCycleSysCC) Path ¶ added in v1.3.0
func (lscc *LifeCycleSysCC) Path() string
type MarshallErr ¶
type MarshallErr string
MarshallErr error marshaling/unmarshalling
func (MarshallErr) Error ¶
func (m MarshallErr) Error() string
type NotFoundErr ¶
type NotFoundErr string
NotFoundErr chaincode not registered with LSCC error
func (NotFoundErr) Error ¶
func (t NotFoundErr) Error() string
type PrivateChannelDataNotAvailable ¶ added in v1.2.1
type PrivateChannelDataNotAvailable string
PrivateChannelDataNotAvailable when V1_2 or later capability is not enabled
func (PrivateChannelDataNotAvailable) Error ¶ added in v1.2.1
func (f PrivateChannelDataNotAvailable) Error() string
type TXNotFoundErr ¶
type TXNotFoundErr string
TXNotFoundErr transaction not found error
func (TXNotFoundErr) Error ¶
func (t TXNotFoundErr) Error() string