Documentation
¶
Overview ¶
Package kv provides key/value database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmpty = errors.New("database empty") ErrInactive = errors.New("database stopped") ErrUnsupported = errors.New("unsupported on this OS") )
package errors
Functions ¶
Types ¶
type Bucket ¶
type Bucket interface {
Get([]byte) []byte
Put([]byte, []byte) error
Delete([]byte) error
ForEach(func(bkey, data []byte) error) error
Cursor() Cursor
}
Bucket decouples bbolt.Bucket from key-val operations
type Cursor ¶
type Cursor interface {
First() ([]byte, []byte)
Next() ([]byte, []byte)
Seek([]byte) ([]byte, []byte)
}
Cursor decouples bbolt.Cursor from key-val operations
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB represents a key-value database
Click to show internal directories.
Click to hide internal directories.