boltdb

package
v0.0.0-...-5caafa1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBucketNotExist = errors.New("bucket not exist")
)

Functions

This section is empty.

Types

type KV

type KV struct {
	// contains filtered or unexported fields
}

func New

func New(db *bolt.DB) *KV

func (KV) Close

func (kv KV) Close() error

func (KV) Update

func (kv KV) Update(fn func(kv.Update) error) error

func (KV) View

func (kv KV) View(fn func(kv.View) error) error

type KeyspaceUpdate

type KeyspaceUpdate KeyspaceView

func (KeyspaceUpdate) Delete

func (u KeyspaceUpdate) Delete(_ context.Context, k []byte) error

func (KeyspaceUpdate) Get

func (u KeyspaceUpdate) Get(ctx context.Context, opts kv.GetOptions) ([]kv.Item, error)

func (KeyspaceUpdate) Put

func (u KeyspaceUpdate) Put(_ context.Context, k, v []byte) error

func (KeyspaceUpdate) Range

func (u KeyspaceUpdate) Range(ctx context.Context, opts ...kv.RangeOption) ([]kv.Item, error)

type KeyspaceView

type KeyspaceView struct {
	// contains filtered or unexported fields
}

func (KeyspaceView) Get

func (k KeyspaceView) Get(_ context.Context, opts kv.GetOptions) (items []kv.Item, err error)

func (KeyspaceView) Range

func (k KeyspaceView) Range(_ context.Context, opts ...kv.RangeOption) (items []kv.Item, err error)

type Update

type Update struct {
	// contains filtered or unexported fields
}

func (Update) CreateKeyspace

func (u Update) CreateKeyspace(key []byte) error

func (Update) Keyspace

func (u Update) Keyspace(key []byte) (_ kv.KeyspaceUpdate, err error)

type View

type View struct {
	// contains filtered or unexported fields
}

func (View) Keyspace

func (v View) Keyspace(key []byte) (_ kv.KeyspaceView, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL