{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package lscc\n\n## Constants\n\n```go\nconst (\n\n\t// INSTALL install command\n\tINSTALL = \"install\"\n\n\t// DEPLOY deploy command\n\tDEPLOY = \"deploy\"\n\n\t// UPGRADE upgrade chaincode\n\tUPGRADE = \"upgrade\"\n\n\t// CCEXISTS get chaincode\n\tCCEXISTS = \"getid\"\n\n\t// CHAINCODEEXISTS get chaincode alias\n\tCHAINCODEEXISTS = \"ChaincodeExists\"\n\n\t// GETDEPSPEC get ChaincodeDeploymentSpec\n\tGETDEPSPEC = \"getdepspec\"\n\n\t// GETDEPLOYMENTSPEC get ChaincodeDeploymentSpec alias\n\tGETDEPLOYMENTSPEC = \"GetDeploymentSpec\"\n\n\t// GETCCDATA get ChaincodeData\n\tGETCCDATA = \"getccdata\"\n\n\t// GETCHAINCODEDATA get ChaincodeData alias\n\tGETCHAINCODEDATA = \"GetChaincodeData\"\n\n\t// GETCHAINCODES gets the instantiated chaincodes on a channel\n\tGETCHAINCODES = \"getchaincodes\"\n\n\t// GETCHAINCODESALIAS gets the instantiated chaincodes on a channel\n\tGETCHAINCODESALIAS = \"GetChaincodes\"\n\n\t// GETINSTALLEDCHAINCODES gets the installed chaincodes on a peer\n\tGETINSTALLEDCHAINCODES = \"getinstalledchaincodes\"\n\n\t// GETINSTALLEDCHAINCODESALIAS gets the installed chaincodes on a peer\n\tGETINSTALLEDCHAINCODESALIAS = \"GetInstalledChaincodes\"\n\n\t// GETCOLLECTIONSCONFIG gets the collections config for a chaincode\n\tGETCOLLECTIONSCONFIG = \"GetCollectionsConfig\"\n\n\t// GETCOLLECTIONSCONFIGALIAS gets the collections config for a chaincode\n\tGETCOLLECTIONSCONFIGALIAS = \"getcollectionsconfig\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tChaincodeNameRegExp    = regexp.MustCompile(\"^[a-zA-Z0-9]+([-_][a-zA-Z0-9]+)*$\")\n\tChaincodeVersionRegExp = regexp.MustCompile(\"^[A-Za-z0-9_.+-]+$\")\n)\n```\n\n## Types\n\n```go\ntype ChaincodeMismatchErr string\n```\nChaincodeMismatchErr chaincode name from two places don't match\n\n```go\nfunc (f ChaincodeMismatchErr) Error() string\n```\n\n```go\ntype CollectionsConfigUpgradesNotAllowed string\n```\nCollectionsConfigUpgradesNotAllowed when V1\\_2 capability is not enabled\n\n```go\nfunc (f CollectionsConfigUpgradesNotAllowed) Error() string\n```\n\n```go\ntype DeployedCCInfoProvider struct {\n}\n```\nDeployedCCInfoProvider implements ineterface ledger.DeployedChaincodeInfoProvider\n\n```go\nfunc (p *DeployedCCInfoProvider) ChaincodeInfo(chaincodeName string, qe ledger.SimpleQueryExecutor) (*ledger.DeployedChaincodeInfo, error)\n```\nChaincodeInfo implements function in interface ledger.DeployedChaincodeInfoProvider\n\n```go\nfunc (p *DeployedCCInfoProvider) CollectionInfo(chaincodeName, collectionName string, qe ledger.SimpleQueryExecutor) (*common.StaticCollectionConfig, error)\n```\nCollectionInfo implements function in interface ledger.DeployedChaincodeInfoProvider\n\n```go\nfunc (p *DeployedCCInfoProvider) Namespaces() []string\n```\nNamespaces implements function in interface ledger.DeployedChaincodeInfoProvider\n\n```go\nfunc (p *DeployedCCInfoProvider) UpdatedChaincodes(stateUpdates map[string][]*kvrwset.KVWrite) ([]*ledger.ChaincodeLifecycleInfo, error)\n```\nUpdatedChaincodes implements function in interface ledger.DeployedChaincodeInfoProvider\n\n```go\ntype ExistsErr string\n```\nExistsErr chaincode exists error\n\n```go\nfunc (t ExistsErr) Error() string\n```\n\n```go\ntype FilesystemSupport interface {\n\t// PutChaincodeToLocalStorage stores the supplied chaincode\n\t// package to local storage (i.e. the file system)\n\tPutChaincodeToLocalStorage(ccprovider.CCPackage) error\n\n\t// GetChaincodeFromLocalStorage retrieves the chaincode package\n\t// for the requested chaincode, specified by name and version\n\tGetChaincodeFromLocalStorage(ccname string, ccversion string) (ccprovider.CCPackage, error)\n\n\t// GetChaincodesFromLocalStorage returns an array of all chaincode\n\t// data that have previously been persisted to local storage\n\tGetChaincodesFromLocalStorage() (*pb.ChaincodeQueryResponse, error)\n\n\t// GetInstantiationPolicy returns the instantiation policy for the\n\t// supplied chaincode (or the channel's default if none was specified)\n\tGetInstantiationPolicy(channel string, ccpack ccprovider.CCPackage) ([]byte, error)\n\n\t// CheckInstantiationPolicy checks whether the supplied signed proposal\n\t// complies with the supplied instantiation policy\n\tCheckInstantiationPolicy(signedProposal *pb.SignedProposal, chainName string, instantiationPolicy []byte) error\n}\n```\nFilesystemSupport contains functions that LSCC requires to execute its tasks\n\n```go\ntype IdenticalVersionErr string\n```\nIdenticalVersionErr trying to upgrade to same version of Chaincode\n\n```go\nfunc (f IdenticalVersionErr) Error() string\n```\n\n```go\ntype InstantiationPolicyMissing string\n```\nInstantiationPolicyMissing when no existing instantiation policy is found when upgrading CC\n\n```go\nfunc (f InstantiationPolicyMissing) Error() string\n```\n\n```go\ntype InvalidArgsLenErr int\n```\nInvalidArgsLenErr invalid arguments length error\n\n```go\nfunc (i InvalidArgsLenErr) Error() string\n```\n\n```go\ntype InvalidCCOnFSError string\n```\nInvalidCCOnFSError error due to mismatch between fingerprint on lscc and installed CC\n\n```go\nfunc (f InvalidCCOnFSError) Error() string\n```\n\n```go\ntype InvalidChaincodeNameErr string\n```\nInvalidChaincodeNameErr invalid chaincode name error\n\n```go\nfunc (f InvalidChaincodeNameErr) Error() string\n```\n\n```go\ntype InvalidChannelNameErr string\n```\nInvalidChannelNameErr invalid channel name error\n\n```go\nfunc (f InvalidChannelNameErr) Error() string\n```\n\n```go\ntype InvalidDeploymentSpecErr string\n```\nInvalidDeploymentSpecErr invalid chaincode deployment spec error\n\n```go\nfunc (f InvalidDeploymentSpecErr) Error() string\n```\n\n```go\ntype InvalidFunctionErr string\n```\nInvalidFunctionErr invalid function error\n\n```go\nfunc (f InvalidFunctionErr) Error() string\n```\n\n```go\ntype InvalidStatedbArtifactsErr string\n```\nInvalidStatedbArtifactsErr invalid state database artifacts error\n\n```go\nfunc (f InvalidStatedbArtifactsErr) Error() string\n```\n\n```go\ntype InvalidVersionErr string\n```\nInvalidVersionErr invalid version error\n\n```go\nfunc (f InvalidVersionErr) Error() string\n```\n\n```go\ntype LifeCycleSysCC struct {\n\t// aclProvider is responsible for access control evaluation\n\tACLProvider aclmgmt.ACLProvider\n\n\t// SCCProvider is the interface which is passed into system chaincodes\n\t// to access other parts of the system\n\tSCCProvider sysccprovider.SystemChaincodeProvider\n\n\t// PolicyChecker is the interface used to perform\n\t// access control\n\tPolicyChecker policy.PolicyChecker\n\n\t// Support provides the implementation of several\n\t// static functions\n\tSupport FilesystemSupport\n\n\tPlatformRegistry *platforms.Registry\n}\n```\nLifeCycleSysCC implements chaincode lifecycle and policies around it\n\n```go\nfunc New(sccp sysccprovider.SystemChaincodeProvider, ACLProvider aclmgmt.ACLProvider, platformRegistry *platforms.Registry) *LifeCycleSysCC\n```\nNew creates a new instance of the LSCC Typically there is only one of these per peer\n\n```go\nfunc (lscc *LifeCycleSysCC) Chaincode() shim.Chaincode\n```\n\n```go\nfunc (lscc *LifeCycleSysCC) ChaincodeContainerInfo(chaincodeName string, qe ledger.QueryExecutor) (*ccprovider.ChaincodeContainerInfo, error)\n```\n\n```go\nfunc (lscc *LifeCycleSysCC) ChaincodeDefinition(chaincodeName string, qe ledger.QueryExecutor) (ccprovider.ChaincodeDefinition, error)\n```\n\n```go\nfunc (lscc *LifeCycleSysCC) Enabled() bool\n```\n\n```go\nfunc (lscc *LifeCycleSysCC) Init(stub shim.ChaincodeStubInterface) pb.Response\n```\nInit is mostly useless for SCC\n\n```go\nfunc (lscc *LifeCycleSysCC) InitArgs() [][]byte\n```\n\n```go\nfunc (lscc *LifeCycleSysCC) InvokableCC2CC() bool\n```\n\n```go\nfunc (lscc *LifeCycleSysCC) InvokableExternal() bool\n```\n\n```go\nfunc (lscc *LifeCycleSysCC) Invoke(stub shim.ChaincodeStubInterface) pb.Response\n```\nInvoke implements lifecycle functions \"deploy\", \"start\", \"stop\", \"upgrade\". Deploy's arguments -  {\\[]byte(\"deploy\"), \\[]byte(\\\u003cchainname\u003e), \\\u003cunmarshalled pb.ChaincodeDeploymentSpec\u003e}\n\nInvoke also implements some query-like functions Get chaincode arguments -  {\\[]byte(\"getid\"), \\[]byte(\\\u003cchainname\u003e), \\[]byte(\\\u003cchaincodename\u003e)}\n\n```go\nfunc (lscc *LifeCycleSysCC) Name() string\n```\n\n```go\nfunc (lscc *LifeCycleSysCC) Path() string\n```\n\n```go\ntype MarshallErr string\n```\nMarshallErr error marshaling/unmarshalling\n\n```go\nfunc (m MarshallErr) Error() string\n```\n\n```go\ntype NotFoundErr string\n```\nNotFoundErr chaincode not registered with LSCC error\n\n```go\nfunc (t NotFoundErr) Error() string\n```\n\n```go\ntype PrivateChannelDataNotAvailable string\n```\nPrivateChannelDataNotAvailable when V1\\_2 or later capability is not enabled\n\n```go\nfunc (f PrivateChannelDataNotAvailable) Error() string\n```\n\n```go\ntype TXNotFoundErr string\n```\nTXNotFoundErr transaction not found error\n\n```go\nfunc (t TXNotFoundErr) Error() string\n```\n\n","path":"github.com/eric-erki/https-hyperledger.org/core/scc/lscc","name":"lscc","synopsis":"","isRedistributable":true}
