Versions in this module Expand all Collapse all v2 v2.3.2 Nov 21, 2021 Changes in this version + const CodePackageFile + const MetadataFile + var LabelRegexp = regexp.MustCompile(`^[[:alnum:]][[:alnum:]_.+-]*$`) + func CCFileName(packageID string) string + func ValidateLabel(label string) error + type ChaincodePackage struct + CodePackage []byte + DBArtifacts []byte + Metadata *ChaincodePackageMetadata + type ChaincodePackageLocator struct + ChaincodeDir string + func (cpl *ChaincodePackageLocator) ChaincodePackageStreamer(packageID string) *ChaincodePackageStreamer + type ChaincodePackageMetadata struct + Label string + Path string + Type string + type ChaincodePackageParser struct + MetadataProvider MetadataProvider + func (ccpp ChaincodePackageParser) Parse(source []byte) (*ChaincodePackage, error) + type ChaincodePackageStreamer struct + PackagePath string + func (cps *ChaincodePackageStreamer) Code() (*TarFileStream, error) + func (cps *ChaincodePackageStreamer) Exists() bool + func (cps *ChaincodePackageStreamer) File(name string) (tarFileStream *TarFileStream, err error) + func (cps *ChaincodePackageStreamer) Metadata() (*ChaincodePackageMetadata, error) + func (cps *ChaincodePackageStreamer) MetadataBytes() ([]byte, error) + type CodePackageNotFoundErr struct + PackageID string + func (e CodePackageNotFoundErr) Error() string + type FallbackPackageLocator struct + ChaincodePackageLocator *ChaincodePackageLocator + LegacyCCPackageLocator LegacyCCPackageLocator + func (fpl *FallbackPackageLocator) GetChaincodePackage(packageID string) (*ChaincodePackageMetadata, []byte, io.ReadCloser, error) + type FilesystemIO struct + func (*FilesystemIO) Exists(path string) (bool, error) + func (f *FilesystemIO) MakeDir(dirname string, mode os.FileMode) error + 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) WriteFile(path, name string, data []byte) error + type IOReadWriter interface + Exists func(path string) (bool, error) + MakeDir func(string, os.FileMode) error + ReadDir func(string) ([]os.FileInfo, error) + ReadFile func(string) ([]byte, error) + Remove func(name string) error + WriteFile func(string, string, []byte) error + type LegacyCCPackageLocator interface + GetChaincodeDepSpec func(nameVersion string) (*pb.ChaincodeDeploymentSpec, error) + type MetadataProvider interface + GetDBArtifacts func(codePackage []byte) ([]byte, error) + type Store struct + Path string + ReadWriter IOReadWriter + func NewStore(path string) *Store + func (s *Store) Delete(packageID string) error + func (s *Store) GetChaincodeInstallPath() string + func (s *Store) Initialize() + func (s *Store) ListInstalledChaincodes() ([]chaincode.InstalledChaincode, error) + func (s *Store) Load(packageID string) ([]byte, error) + func (s *Store) Save(label string, ccInstallPkg []byte) (string, error) + type TarFileStream struct + FileStream io.Closer + TarFile io.Reader + func (tfs *TarFileStream) Close() error + func (tfs *TarFileStream) Read(p []byte) (int, error) Other modules containing this package github.com/waszqt/fabric