Versions in this module Expand all Collapse all v1 v1.0.0 Jun 2, 2022 Changes in this version + const Version + var ErrMissingIndex = errors.New("at least one index must be defined") + var ErrMissingRecord = errors.New("missing record for valid index") + var ErrNotOpen = errors.New("database is not open") + var ErrRecNotFound = errors.New("record not found") + type DB struct + func Create(path string, mode os.FileMode, options Options) (db *DB, err error) + func Open(path string, mode os.FileMode, options Options) (db *DB, err error) + func (db *DB) Add(recPtr Record, f func() bool) (putErr error) + func (db *DB) AddRec(recPtr Record) (err error) + func (db *DB) Close() (err error) + func (db *DB) Delete(recPtr Record, f func() bool) (delErr error) + func (db *DB) DeleteRec(recPtr Record) (err error) + func (db *DB) Get(recPtr Record, idx uint8, f func() bool) (getErr error) + func (db *DB) GetRec(recPtr Record, idx uint8) (err error) + func (db *DB) HexDump(wr io.Writer) + func (db *DB) Put(recPtr Record, f func() bool) (putErr error) + func (db *DB) PutRec(recPtr Record) (err error) + func (db *DB) Wrap() (wdb *WrapDB) + type Options struct + BoltOpt bbolt.Options + type Record interface + IndexCount func() uint8 + Key func(idx uint8) (key []byte, err error) + Name func() string + New func() Record + NextID func(uint64) + type WrapDB struct + func (wdb *WrapDB) Add(recPtr Record, f func() bool) + func (wdb *WrapDB) AddRec(recPtr Record) + func (wdb *WrapDB) Delete(recPtr Record, f func() bool) + func (wdb *WrapDB) DeleteRec(recPtr Record) + func (wdb *WrapDB) Error() error + func (wdb *WrapDB) ErrorClear() (err error) + func (wdb *WrapDB) ErrorSet(err error) + func (wdb *WrapDB) Get(recPtr Record, idx uint8, f func() bool) + func (wdb *WrapDB) GetRec(recPtr Record, idx uint8) + func (wdb *WrapDB) HexDump(wr io.Writer) + func (wdb *WrapDB) Put(recPtr Record, f func() bool) + func (wdb *WrapDB) PutRec(recPtr Record)