Documentation ¶
Index ¶
- func DoGet(bk Bucket, key []byte) ([]byte, error)
- func DoGetWithBucketID(dbase Database, bid BucketID, key []byte) ([]byte, error)
- func GetFlag(database Database, name string) interface{}
- func GetSupportedTypes() []string
- func NewNullDB() *nullDB
- func NewProxyDB() *proxyDB
- func RegisterHasher(bk BucketID, hasher Hasher)
- func RegisteredBackendTypes() []string
- type BackendType
- type Bucket
- type BucketID
- type CodedBucket
- type Context
- type ContextBuilder
- type Database
- type Flags
- type GoLevelDB
- type Hasher
- type LayerDB
- type Raw
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoGetWithBucketID ¶ added in v0.9.8
func GetSupportedTypes ¶ added in v1.1.1
func GetSupportedTypes() []string
func NewProxyDB ¶
func NewProxyDB() *proxyDB
func RegisterHasher ¶ added in v1.2.9
func RegisteredBackendTypes ¶ added in v0.9.10
func RegisteredBackendTypes() []string
Types ¶
type BackendType ¶
type BackendType string
const GoLevelDBBackend BackendType = "goleveldb"
const MapDBBackend BackendType = "mapdb"
type Bucket ¶
type Bucket interface { Get(key []byte) ([]byte, error) Has(key []byte) (bool, error) Set(key []byte, value []byte) error Delete(key []byte) error }
Bucket
type BucketID ¶
type BucketID string
const ( // MerkleTrie maps RLP encoded data from sha3(data) MerkleTrie BucketID = "" // BytesByHash maps data except merkle trie nodes from sha3(data) BytesByHash BucketID = "S" // TransactionLocatorByHash maps transaction locator from transaction hash. TransactionLocatorByHash BucketID = "T" // BlockHeaderHashByHeight maps hash of encoded block header from height. BlockHeaderHashByHeight BucketID = "H" // ChainProperty is general key value map for chain property. ChainProperty BucketID = "C" )
Bucket ID
type CodedBucket ¶ added in v0.9.6
type CodedBucket struct {
// contains filtered or unexported fields
}
func NewCodedBucket ¶ added in v0.9.6
func NewCodedBucketFromBucket ¶ added in v0.9.7
func NewCodedBucketFromBucket(bk Bucket, hasher Hasher, c codec.Codec) *CodedBucket
func (*CodedBucket) Get ¶ added in v0.9.6
func (b *CodedBucket) Get(key interface{}, value interface{}) error
func (*CodedBucket) GetBytes ¶ added in v0.9.6
func (b *CodedBucket) GetBytes(key interface{}) ([]byte, error)
func (*CodedBucket) Put ¶ added in v0.9.6
func (b *CodedBucket) Put(value interface{}) error
func (*CodedBucket) Set ¶ added in v0.9.6
func (b *CodedBucket) Set(key interface{}, value interface{}) error
type Context ¶ added in v0.9.4
type Context interface { Database ContextBuilder GetFlag(n string) interface{} Flags() Flags }
type ContextBuilder ¶ added in v0.9.4
type GoLevelDB ¶
type GoLevelDB struct {
// contains filtered or unexported fields
}
func NewGoLevelDBWithOpts ¶
type LayerDB ¶
func NewLayerDB ¶
Click to show internal directories.
Click to hide internal directories.