Documentation
¶
Overview ¶
Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
- type Config
- type DBNotFoundErr
- type LevelDB
- func (l *LevelDB) Close() error
- func (l *LevelDB) Commit(dbsUpdates map[string]*worldstate.DBUpdates, blockNumber uint64) error
- func (l *LevelDB) Exist(dbName string) bool
- func (l *LevelDB) Get(dbName string, key string) ([]byte, *types.Metadata, error)
- func (l *LevelDB) GetACL(dbName, key string) (*types.AccessControl, error)
- func (l *LevelDB) GetConfig() (*types.ClusterConfig, *types.Metadata, error)
- func (l *LevelDB) GetDBsSnapshot(dbNames []string) (worldstate.DBsSnapshot, error)
- func (l *LevelDB) GetIndexDefinition(dbName string) ([]byte, *types.Metadata, error)
- func (l *LevelDB) GetIterator(dbName string, startKey, endKey string) (worldstate.Iterator, error)
- func (l *LevelDB) GetVersion(dbName string, key string) (*types.Version, error)
- func (l *LevelDB) Has(dbName, key string) (bool, error)
- func (l *LevelDB) Height() (uint64, error)
- func (l *LevelDB) ListDBs() []string
- func (l *LevelDB) ValidDBName(dbName string) bool
- type Snapshots
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DBRootDir string Logger *logger.SugarLogger }
type DBNotFoundErr ¶
type DBNotFoundErr struct {
// contains filtered or unexported fields
}
DBNotFoundErr denotes that the given dbName is not present in the database
func (*DBNotFoundErr) Error ¶
func (e *DBNotFoundErr) Error() string
type LevelDB ¶
type LevelDB struct {
// contains filtered or unexported fields
}
LevelDB holds information about all created database
func (*LevelDB) Exist ¶
Exist returns true if the given database exist. Otherwise, it returns false.
func (*LevelDB) GetACL ¶
func (l *LevelDB) GetACL(dbName, key string) (*types.AccessControl, error)
GetACL returns the access control rule for the given key present in the database
func (*LevelDB) GetDBsSnapshot ¶
func (l *LevelDB) GetDBsSnapshot(dbNames []string) (worldstate.DBsSnapshot, error)
func (*LevelDB) GetIndexDefinition ¶
GetIndexDefinition returns the index definition of a given database
func (*LevelDB) GetIterator ¶
GetIterator returns an iterator to fetch values associated with a range of keys startKey is inclusive while the endKey is exclusive. An empty startKey (i.e., "") denotes that the caller wants from the first key in the database (lexicographic order). An empty endKey (i.e., "") denotes that the caller wants till the last key in the database (lexicographic order).
func (*LevelDB) GetVersion ¶
GetVersion returns the version of the key present in the database
func (*LevelDB) Height ¶
Height returns the block height of the state database. In other words, it returns the last committed block number
func (*LevelDB) ValidDBName ¶
ValidDBName returns true if the given dbName is valid