Versions in this module Expand all Collapse all v0 v0.0.2 Oct 29, 2021 v0.0.1 Oct 29, 2021 Changes in this version + type BinaryCodec struct + func (BinaryCodec) Marshal(val interface{}) ([]byte, error) + func (BinaryCodec) Unmarshal(data []byte, val interface{}) error + type BoltStorage struct + DB *DB + func NewBoltStorage(path string) (*BoltStorage, error) + func (b *BoltStorage) Close() error + func (b *BoltStorage) GetBlockInfo(ctx context.Context, blockID model.Base58) (info *model.BlockInfo, err error) + func (b *BoltStorage) UpdateBlockInfo(ctx context.Context, info *model.BlockInfo) error + type Bucket struct + func (b *Bucket) Bucket(name []byte) *Bucket + func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) + func (b *Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) + func (b *Bucket) Cursor() *Cursor + func (b *Bucket) Delete(key interface{}) error + func (b *Bucket) DeleteBucket(key []byte) error + func (b *Bucket) ForEach(fn interface{}) error + func (b *Bucket) Get(key, value interface{}) (bool, error) + func (b *Bucket) NextSequence() (uint64, error) + func (b *Bucket) Put(key, value interface{}) error + func (b *Bucket) Sequence() uint64 + func (b *Bucket) SetSequence(v uint64) error + func (b *Bucket) Stats() bolt.BucketStats + func (b *Bucket) Tx() *Tx + func (b *Bucket) Writable() bool + type Codec interface + Marshal func(v interface{}) ([]byte, error) + Unmarshal func(data []byte, v interface{}) error + type Codecs struct + Key Codec + Value Codec + type Cursor struct + func (c *Cursor) Bucket() *Bucket + func (c *Cursor) Delete() error + func (c *Cursor) First(key, value interface{}) (bool, error) + func (c *Cursor) Last(key, value interface{}) (bool, error) + func (c *Cursor) Next(key, value interface{}) (bool, error) + func (c *Cursor) Prev(key, value interface{}) (bool, error) + func (c *Cursor) Seek(seek, key, value interface{}) (bool, error) + type DB struct + func Open(path string, mode os.FileMode, options *bolt.Options, codecs *Codecs) (*DB, error) + func (db *DB) Batch(fn func(*Tx) error) error + func (db *DB) Begin(writable bool) (*Tx, error) + func (db *DB) Update(fn func(*Tx) error) error + func (db *DB) View(fn func(*Tx) error) error + type GobCodec struct + func (GobCodec) Marshal(val interface{}) ([]byte, error) + func (GobCodec) Unmarshal(data []byte, val interface{}) error + type Tx struct + func (tx *Tx) Bucket(name []byte) *Bucket + func (tx *Tx) CreateBucket(name []byte) (*Bucket, error) + func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) + func (tx *Tx) Cursor() *Cursor + func (tx *Tx) DB() *DB + func (tx *Tx) ForEach(fn func(name []byte, b *Bucket) error) error v0.0.1-rc2 Oct 27, 2021 v0.0.1-rc1 Oct 27, 2021