Versions in this module Expand all Collapse all v0 v0.20.2 Jun 1, 2022 Changes in this version + func DisableLog() + func RegisterDriver(driver Driver) error + func SupportedDrivers() []string + func UseLogger(logger btclog.Logger) + type BlockRegion struct + Hash *chainhash.Hash + Len uint32 + Offset uint32 + type Bucket interface + Bucket func(key []byte) Bucket + CreateBucket func(key []byte) (Bucket, error) + CreateBucketIfNotExists func(key []byte) (Bucket, error) + Cursor func() Cursor + Delete func(key []byte) error + DeleteBucket func(key []byte) error + ForEach func(func(k, v []byte) error) error + ForEachBucket func(func(k []byte) error) error + Get func(key []byte) []byte + Put func(key, value []byte) error + Writable func() bool + type Cursor interface + Bucket func() Bucket + Delete func() error + First func() bool + Key func() []byte + Last func() bool + Next func() bool + Prev func() bool + Seek func(seek []byte) bool + Value func() []byte + type DB interface + Begin func(writable bool) (Tx, error) + Close func() error + Type func() string + Update func(fn func(tx Tx) error) error + View func(fn func(tx Tx) error) error + func Create(dbType string, args ...interface{}) (DB, error) + func Open(dbType string, args ...interface{}) (DB, error) + type Driver struct + Create func(args ...interface{}) (DB, error) + DbType string + Open func(args ...interface{}) (DB, error) + UseLogger func(logger btclog.Logger) + type Error struct + Description string + Err error + ErrorCode ErrorCode + func (e Error) Error() string + type ErrorCode int + const ErrBlockExists + const ErrBlockNotFound + const ErrBlockRegionInvalid + const ErrBucketExists + const ErrBucketNameRequired + const ErrBucketNotFound + const ErrCorruption + const ErrDbAlreadyOpen + const ErrDbDoesNotExist + const ErrDbExists + const ErrDbNotOpen + const ErrDbTypeRegistered + const ErrDbUnknownType + const ErrDriverSpecific + const ErrIncompatibleValue + const ErrInvalid + const ErrKeyRequired + const ErrKeyTooLarge + const ErrTxClosed + const ErrTxNotWritable + const ErrValueTooLarge + func (e ErrorCode) String() string + type Tx interface + Commit func() error + FetchBlock func(hash *chainhash.Hash) ([]byte, error) + FetchBlockHeader func(hash *chainhash.Hash) ([]byte, error) + FetchBlockHeaders func(hashes []chainhash.Hash) ([][]byte, error) + FetchBlockRegion func(region *BlockRegion) ([]byte, error) + FetchBlockRegions func(regions []BlockRegion) ([][]byte, error) + FetchBlocks func(hashes []chainhash.Hash) ([][]byte, error) + HasBlock func(hash *chainhash.Hash) (bool, error) + HasBlocks func(hashes []chainhash.Hash) ([]bool, error) + Metadata func() Bucket + Rollback func() error + StoreBlock func(block *ltcutil.Block) error