Versions in this module Expand all Collapse all v1 v1.4.9 Jul 22, 2021 Changes in this version + const ChaincodePackageMetadataFile + type ChaincodeMetadata struct + Name string + Version string + type ChaincodePackage struct + CodePackage []byte + Metadata *ChaincodePackageMetadata + type ChaincodePackageMetadata struct + Path string + Type string + type ChaincodePackageParser struct + func (ccpp ChaincodePackageParser) Parse(source []byte) (*ChaincodePackage, error) + type CodePackageNotFoundErr struct + Name string + Version string + func (e *CodePackageNotFoundErr) Error() string + type FilesystemIO struct + func (f *FilesystemIO) ReadDir(dirname string) ([]os.FileInfo, error) + func (f *FilesystemIO) ReadFile(filename string) ([]byte, error) + func (f *FilesystemIO) Remove(name string) error + func (f *FilesystemIO) Stat(name string) (os.FileInfo, error) + func (f *FilesystemIO) WriteFile(filename string, data []byte, perm os.FileMode) error + type IOReadWriter interface + ReadDir func(string) ([]os.FileInfo, error) + ReadFile func(string) ([]byte, error) + Remove func(name string) error + Stat func(string) (os.FileInfo, error) + WriteFile func(string, []byte, os.FileMode) error + type LegacyPackageProvider interface + GetChaincodeCodePackage func(name, version string) (codePackage []byte, err error) + ListInstalledChaincodes func(dir string, de ccprovider.DirEnumerator, ce ccprovider.ChaincodeExtractor) ([]chaincode.InstalledChaincode, error) + type PackageParser interface + Parse func(data []byte) (*ChaincodePackage, error) + type PackageProvider struct + LegacyPP LegacyPackageProvider + Parser PackageParser + Store StorePackageProvider + func (p *PackageProvider) GetChaincodeCodePackage(name, version string) ([]byte, error) + func (p *PackageProvider) ListInstalledChaincodes() ([]chaincode.InstalledChaincode, error) + type Store struct + Path string + ReadWriter IOReadWriter + func (s *Store) GetChaincodeInstallPath() string + func (s *Store) ListInstalledChaincodes() ([]chaincode.InstalledChaincode, error) + func (s *Store) Load(hash []byte) (ccInstallPkg []byte, name, version string, err error) + func (s *Store) LoadMetadata(path string) (name, version string, err error) + func (s *Store) RetrieveHash(name string, version string) ([]byte, error) + func (s *Store) Save(name, version string, ccInstallPkg []byte) ([]byte, error) + type StorePackageProvider interface + GetChaincodeInstallPath func() string + ListInstalledChaincodes func() ([]chaincode.InstalledChaincode, error) + Load func(hash []byte) (codePackage []byte, name, version string, err error) + RetrieveHash func(name, version string) (hash []byte, err error)