Versions in this module Expand all Collapse all v1 v1.0.0 Dec 20, 2023 Changes in this version + var ErrKeyNotFound = errors.New("store: key not found") + var ErrReaderIsNil = errors.New("store: reader is nil") + var ErrWriterIsNil = errors.New("store: writer is nil") + type BoltStore struct + func (bs *BoltStore) Close() error + func (bs *BoltStore) Delete(key string) error + func (bs *BoltStore) Dump(w io.Writer) (err error) + func (bs *BoltStore) ForEach(f func(string, []byte) error) error + func (bs *BoltStore) ForEachPrefix(prefix string, f func(string, []byte) error) error + func (bs *BoltStore) Get(key string, v any) (err error) + func (bs *BoltStore) Restore(r io.Reader) (err error) + func (bs *BoltStore) Set(key string, v any) error + type Dumper interface + Dump func(io.Writer) error + type Marshaler interface + Marshal func(v any) ([]byte, error) + Unmarshal func(data []byte, v any) error + func NewGOB() Marshaler + type Restorer interface + Restore func(io.Reader) error + type Store interface + Close func() error + Delete func(string) error + ForEach func(func(string, []byte) error) error + ForEachPrefix func(string, func(string, []byte) error) error + Get func(string, any) error + Set func(string, any) error + func NewBoltStore(file string, m Marshaler) (Store, error)