Documentation
¶
Index ¶
- func ChaincodePackageExists(ccname string, ccversion string) (bool, error)
- func ExtractFileEntries(tarBytes []byte, databaseType string) (map[string][]*TarFileEntry, error)
- func ExtractStatedbArtifactsForChaincode(ccNameVersion string) (installed bool, statedbArtifactsTar []byte, err error)
- func ExtractStatedbArtifactsFromCCPackage(ccpackage CCPackage) (statedbArtifactsTar []byte, err error)
- func GetChaincodePackageFromPath(ccNameVersion string, ccInstallPath string) ([]byte, error)
- func GetInstalledChaincodes() (*pb.ChaincodeQueryResponse, error)
- func IsChaincodeDeployed(chainid, ccName, ccVersion string, ccHash []byte, ...) (bool, error)
- func MetadataAsTarEntries(code []byte) ([]byte, error)
- func NewCCInfoCache(cs CCCacheSupport) *ccInfoCacheImpl
- func SetChaincodesPath(path string)
- type CCCacheSupport
- type CCInfoFSImpl
- func (cifs *CCInfoFSImpl) GetChaincode(ccNameVersion string) (CCPackage, error)
- func (cifs *CCInfoFSImpl) GetChaincodeCodePackage(ccNameVersion string) ([]byte, error)
- func (cifs *CCInfoFSImpl) GetChaincodeDepSpec(ccNameVersion string) (*pb.ChaincodeDeploymentSpec, error)
- func (cifs *CCInfoFSImpl) GetChaincodeFromPath(ccNameVersion string, path string) (CCPackage, error)
- func (*CCInfoFSImpl) GetChaincodeInstallPath() string
- func (cifs *CCInfoFSImpl) ListInstalledChaincodes(dir string, ls DirEnumerator, ccFromPath ChaincodeExtractor) ([]chaincode.InstalledChaincode, error)
- func (cifs *CCInfoFSImpl) PutChaincode(depSpec *pb.ChaincodeDeploymentSpec) (CCPackage, error)
- type CCPackage
- type CDSData
- type CDSPackage
- func (ccpack *CDSPackage) GetChaincodeData() *ChaincodeData
- func (ccpack *CDSPackage) GetDepSpec() *pb.ChaincodeDeploymentSpec
- func (ccpack *CDSPackage) GetDepSpecBytes() []byte
- func (ccpack *CDSPackage) GetId() []byte
- func (ccpack *CDSPackage) GetPackageObject() proto.Message
- func (ccpack *CDSPackage) InitFromBuffer(buf []byte) (*ChaincodeData, error)
- func (ccpack *CDSPackage) InitFromFS(ccNameVersion string) ([]byte, *pb.ChaincodeDeploymentSpec, error)
- func (ccpack *CDSPackage) InitFromPath(ccNameVersion string, path string) ([]byte, *pb.ChaincodeDeploymentSpec, error)
- func (ccpack *CDSPackage) PutChaincodeToFS() error
- func (ccpack *CDSPackage) ValidateCC(ccdata *ChaincodeData) error
- type ChaincodeData
- type ChaincodeExtractor
- type DirEnumerator
- type GetHasher
- type PersistenceAdapter
- type SignedCDSData
- type SignedCDSPackage
- func (ccpack *SignedCDSPackage) GetChaincodeData() *ChaincodeData
- func (ccpack *SignedCDSPackage) GetDepSpec() *pb.ChaincodeDeploymentSpec
- func (ccpack *SignedCDSPackage) GetDepSpecBytes() []byte
- func (ccpack *SignedCDSPackage) GetId() []byte
- func (ccpack *SignedCDSPackage) GetInstantiationPolicy() []byte
- func (ccpack *SignedCDSPackage) GetPackageObject() proto.Message
- func (ccpack *SignedCDSPackage) InitFromBuffer(buf []byte) (*ChaincodeData, error)
- func (ccpack *SignedCDSPackage) InitFromFS(ccNameVersion string) ([]byte, *pb.ChaincodeDeploymentSpec, error)
- func (ccpack *SignedCDSPackage) InitFromPath(ccNameVersion string, path string) ([]byte, *pb.ChaincodeDeploymentSpec, error)
- func (ccpack *SignedCDSPackage) PutChaincodeToFS() error
- func (ccpack *SignedCDSPackage) ValidateCC(ccdata *ChaincodeData) error
- type TarFileEntry
- type TransactionParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChaincodePackageExists ¶
func ExtractFileEntries ¶
func ExtractFileEntries(tarBytes []byte, databaseType string) (map[string][]*TarFileEntry, error)
func GetInstalledChaincodes ¶
func GetInstalledChaincodes() (*pb.ChaincodeQueryResponse, error)
func IsChaincodeDeployed ¶
func IsChaincodeDeployed(chainid, ccName, ccVersion string, ccHash []byte, sccp sysccprovider.SystemChaincodeProvider) (bool, error)
func MetadataAsTarEntries ¶
func NewCCInfoCache ¶
func NewCCInfoCache(cs CCCacheSupport) *ccInfoCacheImpl
func SetChaincodesPath ¶
func SetChaincodesPath(path string)
Types ¶
type CCCacheSupport ¶
type CCInfoFSImpl ¶
type CCInfoFSImpl struct {
GetHasher GetHasher
}
func (*CCInfoFSImpl) GetChaincode ¶
func (cifs *CCInfoFSImpl) GetChaincode(ccNameVersion string) (CCPackage, error)
func (*CCInfoFSImpl) GetChaincodeCodePackage ¶
func (cifs *CCInfoFSImpl) GetChaincodeCodePackage(ccNameVersion string) ([]byte, error)
func (*CCInfoFSImpl) GetChaincodeDepSpec ¶
func (cifs *CCInfoFSImpl) GetChaincodeDepSpec(ccNameVersion string) (*pb.ChaincodeDeploymentSpec, error)
func (*CCInfoFSImpl) GetChaincodeFromPath ¶
func (cifs *CCInfoFSImpl) GetChaincodeFromPath(ccNameVersion string, path string) (CCPackage, error)
func (*CCInfoFSImpl) GetChaincodeInstallPath ¶
func (*CCInfoFSImpl) GetChaincodeInstallPath() string
func (*CCInfoFSImpl) ListInstalledChaincodes ¶
func (cifs *CCInfoFSImpl) ListInstalledChaincodes(dir string, ls DirEnumerator, ccFromPath ChaincodeExtractor) ([]chaincode.InstalledChaincode, error)
func (*CCInfoFSImpl) PutChaincode ¶
func (cifs *CCInfoFSImpl) PutChaincode(depSpec *pb.ChaincodeDeploymentSpec) (CCPackage, error)
type CCPackage ¶
type CCPackage interface {
InitFromBuffer(buf []byte) (*ChaincodeData, error)
PutChaincodeToFS() error
GetDepSpec() *pb.ChaincodeDeploymentSpec
GetDepSpecBytes() []byte
ValidateCC(ccdata *ChaincodeData) error
GetPackageObject() proto.Message
GetChaincodeData() *ChaincodeData
GetId() []byte
}
func GetChaincodeFromFS ¶
type CDSData ¶
type CDSData struct {
CodeHash []byte `protobuf:"bytes,1,opt,name=codehash,proto3"`
MetaDataHash []byte `protobuf:"bytes,2,opt,name=metadatahash,proto3"`
}
func (*CDSData) ProtoMessage ¶
func (*CDSData) ProtoMessage()
type CDSPackage ¶
type CDSPackage struct {
GetHasher GetHasher
// contains filtered or unexported fields
}
func (*CDSPackage) GetChaincodeData ¶
func (ccpack *CDSPackage) GetChaincodeData() *ChaincodeData
func (*CDSPackage) GetDepSpec ¶
func (ccpack *CDSPackage) GetDepSpec() *pb.ChaincodeDeploymentSpec
func (*CDSPackage) GetDepSpecBytes ¶
func (ccpack *CDSPackage) GetDepSpecBytes() []byte
func (*CDSPackage) GetId ¶
func (ccpack *CDSPackage) GetId() []byte
func (*CDSPackage) GetPackageObject ¶
func (ccpack *CDSPackage) GetPackageObject() proto.Message
func (*CDSPackage) InitFromBuffer ¶
func (ccpack *CDSPackage) InitFromBuffer(buf []byte) (*ChaincodeData, error)
func (*CDSPackage) InitFromFS ¶
func (ccpack *CDSPackage) InitFromFS(ccNameVersion string) ([]byte, *pb.ChaincodeDeploymentSpec, error)
func (*CDSPackage) InitFromPath ¶
func (ccpack *CDSPackage) InitFromPath(ccNameVersion string, path string) ([]byte, *pb.ChaincodeDeploymentSpec, error)
func (*CDSPackage) PutChaincodeToFS ¶
func (ccpack *CDSPackage) PutChaincodeToFS() error
func (*CDSPackage) ValidateCC ¶
func (ccpack *CDSPackage) ValidateCC(ccdata *ChaincodeData) error
type ChaincodeData ¶
type ChaincodeData struct {
Name string `protobuf:"bytes,1,opt,name=name"`
Version string `protobuf:"bytes,2,opt,name=version"`
Escc string `protobuf:"bytes,3,opt,name=escc"`
Vscc string `protobuf:"bytes,4,opt,name=vscc"`
Policy []byte `protobuf:"bytes,5,opt,name=policy,proto3"`
Data []byte `protobuf:"bytes,6,opt,name=data,proto3"`
Id []byte `protobuf:"bytes,7,opt,name=id,proto3"`
InstantiationPolicy []byte `protobuf:"bytes,8,opt,name=instantiation_policy,proto3"`
}
func GetChaincodeData ¶
func GetChaincodeData(ccNameVersion string) (*ChaincodeData, error)
func (*ChaincodeData) ChaincodeID ¶
func (cd *ChaincodeData) ChaincodeID() string
func (*ChaincodeData) ProtoMessage ¶
func (*ChaincodeData) ProtoMessage()
func (*ChaincodeData) Reset ¶
func (cd *ChaincodeData) Reset()
func (*ChaincodeData) String ¶
func (cd *ChaincodeData) String() string
type ChaincodeExtractor ¶
type PersistenceAdapter ¶
func (PersistenceAdapter) GetDBArtifacts ¶
func (pa PersistenceAdapter) GetDBArtifacts(codePackage []byte) ([]byte, error)
type SignedCDSData ¶
type SignedCDSData struct {
CodeHash []byte `protobuf:"bytes,1,opt,name=hash"`
MetaDataHash []byte `protobuf:"bytes,2,opt,name=metadatahash"`
SignatureHash []byte `protobuf:"bytes,3,opt,name=signaturehash"`
}
func (*SignedCDSData) Equals ¶
func (data *SignedCDSData) Equals(other *SignedCDSData) bool
func (*SignedCDSData) ProtoMessage ¶
func (*SignedCDSData) ProtoMessage()
func (*SignedCDSData) Reset ¶
func (data *SignedCDSData) Reset()
func (*SignedCDSData) String ¶
func (data *SignedCDSData) String() string
type SignedCDSPackage ¶
type SignedCDSPackage struct {
GetHasher GetHasher
// contains filtered or unexported fields
}
func (*SignedCDSPackage) GetChaincodeData ¶
func (ccpack *SignedCDSPackage) GetChaincodeData() *ChaincodeData
func (*SignedCDSPackage) GetDepSpec ¶
func (ccpack *SignedCDSPackage) GetDepSpec() *pb.ChaincodeDeploymentSpec
func (*SignedCDSPackage) GetDepSpecBytes ¶
func (ccpack *SignedCDSPackage) GetDepSpecBytes() []byte
func (*SignedCDSPackage) GetId ¶
func (ccpack *SignedCDSPackage) GetId() []byte
func (*SignedCDSPackage) GetInstantiationPolicy ¶
func (ccpack *SignedCDSPackage) GetInstantiationPolicy() []byte
func (*SignedCDSPackage) GetPackageObject ¶
func (ccpack *SignedCDSPackage) GetPackageObject() proto.Message
func (*SignedCDSPackage) InitFromBuffer ¶
func (ccpack *SignedCDSPackage) InitFromBuffer(buf []byte) (*ChaincodeData, error)
func (*SignedCDSPackage) InitFromFS ¶
func (ccpack *SignedCDSPackage) InitFromFS(ccNameVersion string) ([]byte, *pb.ChaincodeDeploymentSpec, error)
func (*SignedCDSPackage) InitFromPath ¶
func (ccpack *SignedCDSPackage) InitFromPath(ccNameVersion string, path string) ([]byte, *pb.ChaincodeDeploymentSpec, error)
func (*SignedCDSPackage) PutChaincodeToFS ¶
func (ccpack *SignedCDSPackage) PutChaincodeToFS() error
func (*SignedCDSPackage) ValidateCC ¶
func (ccpack *SignedCDSPackage) ValidateCC(ccdata *ChaincodeData) error
type TarFileEntry ¶
type TransactionParams ¶
type TransactionParams struct {
TxID string
ChannelID string
NamespaceID string
SignedProp *pb.SignedProposal
Proposal *pb.Proposal
TXSimulator ledger.TxSimulator
HistoryQueryExecutor ledger.HistoryQueryExecutor
CollectionStore privdata.CollectionStore
IsInitTransaction bool
ProposalDecorations map[string][]byte
}
Click to show internal directories.
Click to hide internal directories.