Versions in this module Expand all Collapse all v0 v0.0.4 Aug 3, 2020 Changes in this version type Bucket + func (b *Bucket) Init() error type DB + func (d *DB) Init(buckets ...string) error + type GobSerializer struct + func (g GobSerializer) Marshal(v interface{}) ([]byte, error) + func (g GobSerializer) Unmarshal(data []byte, v interface{}) error v0.0.3 Jul 21, 2020 Changes in this version type Bucket + func (b *Bucket) PutWithKey(key, val interface{}) error type DB + func (d *DB) PutWithKey(bucket string, key, val interface{}) error v0.0.2 Jul 20, 2020 Changes in this version + var DefaultOptions = &Options + type Bucket struct + DB *DB + Name string + func (b *Bucket) Count() (int, error) + func (b *Bucket) Get(seq uint64, val interface{}) error + func (b *Bucket) Put(val Sequencer) error + func (b *Bucket) UpdateEach(fn EachFunc) error + func (b *Bucket) ViewEach(fn EachFunc) error + type DB struct + Bolt *bbolt.DB + Serializer Serializer + func Open(path string, mode os.FileMode, options *Options) (*DB, error) + func (d *DB) Bucket(name string) *Bucket + func (d *DB) Count(bucket string) (int, error) + func (d *DB) Get(bucket string, seq uint64, val interface{}) error + func (d *DB) Put(bucket string, val Sequencer) error + func (d *DB) UpdateEach(bucket string, fn EachFunc) error + func (d *DB) ViewEach(bucket string, fn EachFunc) error + type EachFunc func(seq, serial []byte) error + type JSONSerializer struct + func (j JSONSerializer) Marshal(v interface{}) ([]byte, error) + func (j JSONSerializer) Unmarshal(data []byte, v interface{}) error + type Options struct + Bolt *bbolt.Options + Serializer Serializer + type Sequencer interface + AssignSeq func(uint64) + type Serializer interface + Marshal func(v interface{}) ([]byte, error) + Unmarshal func(data []byte, v interface{}) error