Versions in this module Expand all Collapse all v0 v0.1.0 Jun 14, 2020 Changes in this version + var ErrKeyAlreadyExist = errors.New("key already exist in the key value store") + type Backend struct + func NewBadgerBackend(dir string) (*Backend, error) + func (b *Backend) Close() error + func (b *Backend) Configured() bool + func (b *Backend) CreateIfExists(ctx context.Context, condKey, key string, value []byte) error + func (b *Backend) CreateOnly(ctx context.Context, key string, value []byte) (bool, error) + func (b *Backend) Decode(in string) ([]byte, error) + func (b *Backend) Delete(ctx context.Context, key string) error + func (b *Backend) DeletePrefix(ctx context.Context, path string) error + func (b *Backend) Encode(in []byte) string + func (b *Backend) Exists(ctx context.Context, key string) (bool, error) + func (b *Backend) Get(ctx context.Context, key string) (*types.Value, error) + func (b *Backend) GetName() string + func (b *Backend) GetPrefix(ctx context.Context, path string) (string, *types.Value, error) + func (b *Backend) KeyDoesNotExistError(err error) bool + func (b *Backend) ListPrefix(ctx context.Context, path string) (types.KeyValuePairs, error) + func (b *Backend) ListPrefixKeys(ctx context.Context, path string) ([]string, error) + func (b *Backend) PrefixScanWithFunction(ctx context.Context, key string, f types.KVPairStructFunc) + func (b *Backend) Set(ctx context.Context, key string, value []byte) error + func (b *Backend) Status() (string, error)