Documentation
¶
Index ¶
- func New(opts ...JsonDBOpts) (storage.Connection, error)
- type JsonDB
- func (j *JsonDB) Bucket(bucket ...string) *storage.Bucket
- func (j *JsonDB) Close()
- func (j *JsonDB) Delete(k string) error
- func (j *JsonDB) Encoding() encoding.Coder
- func (j *JsonDB) Exists(k string) bool
- func (j *JsonDB) Get(k string, v any) error
- func (j *JsonDB) Iter(ctx context.Context, pfx string) types.Iterator[string, []byte]
- func (j *JsonDB) Keys(pfx string) ([]string, error)
- func (j *JsonDB) Len(pfx string) (int, error)
- func (j *JsonDB) PrintDebug(pfx string) error
- func (j *JsonDB) Save() error
- func (j *JsonDB) Set(k string, v any, op ...storage.Option) error
- func (j *JsonDB) Tx(pfx string, fn func(tx storage.Transactioner) error) error
- func (j *JsonDB) Values(pfx string) ([][]byte, error)
- func (j *JsonDB) Watch(ctx context.Context, pfx string) types.Watcher[string, []byte]
- type JsonDBOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts ...JsonDBOpts) (storage.Connection, error)
Types ¶
type JsonDB ¶
type JsonDB struct {
// contains filtered or unexported fields
}
func (*JsonDB) PrintDebug ¶
type JsonDBOpts ¶ added in v0.1.1
func Dir ¶ added in v0.1.1
func Dir(dir string) JsonDBOpts
func File ¶ added in v0.1.1
func File(path string) JsonDBOpts
func Logger ¶ added in v0.1.1
func Logger(lg storage.Logger) JsonDBOpts
Click to show internal directories.
Click to hide internal directories.