Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilFilterHandler when FilterHandler is empty ErrNilFilterHandler = errors.New("handler can't be nil") // ErrNotFound is returned by key-value storage methods // that could not find element by key. ErrNotFound = errors.New("key not found") )
View Source
var ErrIteratingAborted = errors.New("iteration aborted")
ErrIteratingAborted is returned by storage iterator after iteration has been interrupted.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket interface { Get(key []byte) ([]byte, error) Set(key, value []byte) error Del(key []byte) error Has(key []byte) bool Size() int64 List() ([][]byte, error) Iterate(FilterHandler) error // Steam can be implemented by badger.Stream, but not for now // Stream(ctx context.Context, key []byte, cb func(io.ReadWriter) error) error Close() error }
Bucket is sub-store interface.
type FilterHandler ¶
FilterHandler where you receive key/val in your closure.
Click to show internal directories.
Click to hide internal directories.