Versions in this module Expand all Collapse all v1 v1.20.1 Jan 15, 2020 Changes in this version + type DB struct + func Open(path string, opts ...Option) (*DB, error) + func WrapDB(db *buntdb.DB, opts ...Option) *DB + func (db *DB) Begin(writable bool) (*Tx, error) + func (db *DB) Update(fn func(tx *Tx) error) error + func (db *DB) View(fn func(tx *Tx) error) error + func (db *DB) WithContext(ctx context.Context) *DB + type Option func(cfg *config) + func WithAnalytics(on bool) Option + func WithAnalyticsRate(rate float64) Option + func WithContext(ctx context.Context) Option + func WithServiceName(serviceName string) Option + type Tx struct + func WrapTx(tx *buntdb.Tx, opts ...Option) *Tx + func (tx *Tx) Ascend(index string, iterator func(key, value string) bool) error + func (tx *Tx) AscendEqual(index, pivot string, iterator func(key, value string) bool) error + func (tx *Tx) AscendGreaterOrEqual(index, pivot string, iterator func(key, value string) bool) error + func (tx *Tx) AscendKeys(pattern string, iterator func(key, value string) bool) error + func (tx *Tx) AscendLessThan(index, pivot string, iterator func(key, value string) bool) error + func (tx *Tx) AscendRange(index, greaterOrEqual, lessThan string, iterator func(key, value string) bool) error + func (tx *Tx) CreateIndex(name, pattern string, less ...func(a, b string) bool) error + func (tx *Tx) CreateIndexOptions(name, pattern string, opts *buntdb.IndexOptions, ...) error + func (tx *Tx) CreateSpatialIndex(name, pattern string, rect func(item string) (min, max []float64)) error + func (tx *Tx) CreateSpatialIndexOptions(name, pattern string, opts *buntdb.IndexOptions, ...) error + func (tx *Tx) Delete(key string) (val string, err error) + func (tx *Tx) DeleteAll() error + func (tx *Tx) Descend(index string, iterator func(key, value string) bool) error + func (tx *Tx) DescendEqual(index, pivot string, iterator func(key, value string) bool) error + func (tx *Tx) DescendGreaterThan(index, pivot string, iterator func(key, value string) bool) error + func (tx *Tx) DescendKeys(pattern string, iterator func(key, value string) bool) error + func (tx *Tx) DescendLessOrEqual(index, pivot string, iterator func(key, value string) bool) error + func (tx *Tx) DescendRange(index, lessOrEqual, greaterThan string, iterator func(key, value string) bool) error + func (tx *Tx) DropIndex(name string) error + func (tx *Tx) Get(key string, ignoreExpired ...bool) (val string, err error) + func (tx *Tx) Indexes() ([]string, error) + func (tx *Tx) Intersects(index, bounds string, iterator func(key, value string) bool) error + func (tx *Tx) Len() (int, error) + func (tx *Tx) Nearby(index, bounds string, iterator func(key, value string, dist float64) bool) error + func (tx *Tx) Set(key, value string, opts *buntdb.SetOptions) (previousValue string, replaced bool, err error) + func (tx *Tx) TTL(key string) (time.Duration, error) + func (tx *Tx) WithContext(ctx context.Context) *Tx