Versions in this module Expand all Collapse all v2 v2.3.2 Nov 21, 2021 Changes in this version + type CouchDBTestEnv struct + func (env *CouchDBTestEnv) Cleanup() + func (env *CouchDBTestEnv) GetDBHandle(id string) *DB + func (env *CouchDBTestEnv) GetName() string + func (env *CouchDBTestEnv) GetProvider() *DBProvider + func (env *CouchDBTestEnv) Init(t testing.TB) + func (env *CouchDBTestEnv) StartExternalResource() + func (env *CouchDBTestEnv) StopExternalResource() + type DB struct + func NewDB(vdb statedb.VersionedDB, ledgerid string, metadataHint *metadataHint) (*DB, error) + func (s *DB) ApplyPrivacyAwareUpdates(updates *UpdateBatch, height *version.Height) error + func (s *DB) ApplyUpdates(batch *statedb.UpdateBatch, height *version.Height) error + func (s *DB) ChaincodeDeployDone(succeeded bool) + func (s *DB) ClearCachedVersions() + func (s *DB) ExportPubStateAndPvtStateHashes(dir string, newHashFunc snapshot.NewHashFunc) (map[string][]byte, error) + func (s *DB) GetCachedKeyHashVersion(namespace, collection string, keyHash []byte) (*version.Height, bool) + func (s *DB) GetChaincodeEventListener() cceventmgmt.ChaincodeLifecycleEventListener + func (s *DB) GetKeyHashVersion(namespace, collection string, keyHash []byte) (*version.Height, error) + func (s *DB) GetPrivateData(namespace, collection, key string) (*statedb.VersionedValue, error) + func (s *DB) GetPrivateDataHash(namespace, collection, key string) (*statedb.VersionedValue, error) + func (s *DB) GetPrivateDataMetadataByHash(namespace, collection string, keyHash []byte) ([]byte, error) + func (s *DB) GetPrivateDataMultipleKeys(namespace, collection string, keys []string) ([]*statedb.VersionedValue, error) + func (s *DB) GetPrivateDataRangeScanIterator(namespace, collection, startKey, endKey string) (statedb.ResultsIterator, error) + func (s *DB) GetStateMetadata(namespace, key string) ([]byte, error) + func (s *DB) GetValueHash(namespace, collection string, keyHash []byte) (*statedb.VersionedValue, error) + func (s *DB) HandleChaincodeDeploy(chaincodeDefinition *cceventmgmt.ChaincodeDefinition, dbArtifactsTar []byte) error + func (s *DB) IsBulkOptimizable() bool + func (s *DB) LoadCommittedVersionsOfPubAndHashedKeys(pubKeys []*statedb.CompositeKey, hashedKeys []*HashedCompositeKey) error + func (s DB) ExecuteQueryOnPrivateData(namespace, collection, query string) (statedb.ResultsIterator, error) + type DBProvider struct + HealthCheckRegistry ledger.HealthCheckRegistry + VersionedDBProvider statedb.VersionedDBProvider + func NewDBProvider(bookkeeperProvider *bookkeeping.Provider, metricsProvider metrics.Provider, ...) (*DBProvider, error) + func (p *DBProvider) Close() + func (p *DBProvider) Drop(ledgerid string) error + func (p *DBProvider) GetDBHandle(id string, chInfoProvider channelInfoProvider) (*DB, error) + func (p *DBProvider) ImportFromSnapshot(dbname string, savepoint *version.Height, snapshotDir string, ...) error + func (p *DBProvider) RegisterHealthChecker() error + type HashedCompositeKey struct + CollectionName string + KeyHash string + Namespace string + func (hck *HashedCompositeKey) String() string + type HashedUpdateBatch struct + func NewHashedUpdateBatch() *HashedUpdateBatch + func (h HashedUpdateBatch) Contains(ns, coll string, keyHash []byte) bool + func (h HashedUpdateBatch) Delete(ns, coll string, key []byte, version *version.Height) + func (h HashedUpdateBatch) Put(ns, coll string, key []byte, value []byte, version *version.Height) + func (h HashedUpdateBatch) PutValHashAndMetadata(ns, coll string, key []byte, value []byte, metadata []byte, ...) + func (h HashedUpdateBatch) ToCompositeKeyMap() map[HashedCompositeKey]*statedb.VersionedValue + type LevelDBTestEnv struct + func (env *LevelDBTestEnv) Cleanup() + func (env *LevelDBTestEnv) GetDBHandle(id string) *DB + func (env *LevelDBTestEnv) GetName() string + func (env *LevelDBTestEnv) GetProvider() *DBProvider + func (env *LevelDBTestEnv) Init(t testing.TB) + func (env *LevelDBTestEnv) StartExternalResource() + func (env *LevelDBTestEnv) StopExternalResource() + type NsBatch struct + func (nsb NsBatch) GetCollectionNames() []string + func (nsb NsBatch) GetCollectionUpdates(collName string) map[string]*statedb.VersionedValue + type PubUpdateBatch struct + func NewPubUpdateBatch() *PubUpdateBatch + type PvtKVWrite struct + IsDelete bool + Key string + Value []byte + Version *version.Height + type PvtUpdateBatch struct + func NewPvtUpdateBatch() *PvtUpdateBatch + func (p PvtUpdateBatch) ToCompositeKeyMap() PvtdataCompositeKeyMap + type PvtdataCompositeKey struct + CollectionName string + Key string + Namespace string + type PvtdataCompositeKeyMap map[PvtdataCompositeKey]*statedb.VersionedValue + type SnapshotPvtdataHashesConsumer interface + ConsumeSnapshotData func(namespace, coll string, keyHash []byte, valueHash []byte, ...) error + Done func() error + type SnapshotRecord struct + Key []byte + Metadata []byte + Value []byte + Version []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*SnapshotRecord) Descriptor() ([]byte, []int) + func (*SnapshotRecord) ProtoMessage() + func (m *SnapshotRecord) GetKey() []byte + func (m *SnapshotRecord) GetMetadata() []byte + func (m *SnapshotRecord) GetValue() []byte + func (m *SnapshotRecord) GetVersion() []byte + func (m *SnapshotRecord) Reset() + func (m *SnapshotRecord) String() string + func (m *SnapshotRecord) XXX_DiscardUnknown() + func (m *SnapshotRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SnapshotRecord) XXX_Merge(src proto.Message) + func (m *SnapshotRecord) XXX_Size() int + func (m *SnapshotRecord) XXX_Unmarshal(b []byte) error + type StateDBConfig struct + LevelDBPath string + type TestEnv interface + Cleanup func() + GetDBHandle func(id string) *DB + GetName func() string + GetProvider func() *DBProvider + Init func(t testing.TB) + StartExternalResource func() + StopExternalResource func() + type UpdateBatch struct + HashUpdates *HashedUpdateBatch + PubUpdates *PubUpdateBatch + PvtUpdates *PvtUpdateBatch + func NewUpdateBatch() *UpdateBatch + type UpdateMap map[string]NsBatch + func (b UpdateMap) Contains(ns, coll, key string) bool + func (b UpdateMap) Delete(ns, coll, key string, version *version.Height) + func (b UpdateMap) Get(ns, coll, key string) *statedb.VersionedValue + func (b UpdateMap) GetUpdatedNamespaces() []string + func (b UpdateMap) IsEmpty() bool + func (b UpdateMap) Put(ns, coll, key string, value []byte, version *version.Height) + func (b UpdateMap) PutValAndMetadata(ns, coll, key string, value []byte, metadata []byte, version *version.Height) Other modules containing this package github.com/waszqt/fabric