db

package
v0.0.0-...-678a821 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StopIterating = stopper("STOP_ITERATING!")

The Each* methods stop iterating when the function passed to it returns an error, and will return that error. StopIterating stops the iteration, but the function will return nil.

Functions

func PeriodicallyRunGC

func PeriodicallyRunGC(ctx context.Context)

func SetupTestDB

func SetupTestDB()

func TearDownTestDB

func TearDownTestDB()

Types

type KeyNotFoundError

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

func (KeyNotFoundError) Error

func (e KeyNotFoundError) Error() string

type Store

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

func GetStore

func GetStore(name string) Store

func (Store) Delete

func (s Store) Delete(key string) error

func (Store) EachKeyAfter

func (s Store) EachKeyAfter(start string, ptr interface{}, f func(key string) error) error

func (Store) EachKeyBefore

func (s Store) EachKeyBefore(end string, ptr interface{}, f func(key string) error) error

func (Store) EachKeyNoValues

func (s Store) EachKeyNoValues(prefix string, f func(key string) error) error

func (Store) EachKeyWithPrefix

func (s Store) EachKeyWithPrefix(prefix string, ptr interface{}, f func(key string) error) error

func (Store) Get

func (s Store) Get(key string, ptr interface{}) error

func (Store) GetExpiration

func (s Store) GetExpiration(key string) (time.Duration, error)

func (Store) Set

func (s Store) Set(key string, value interface{}) error

func (Store) SetWithExpiration

func (s Store) SetWithExpiration(key string, value interface{}, expires time.Duration) error

Jump to

Keyboard shortcuts

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