badger

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVBadgerDriver

type KVBadgerDriver struct {
	Db *badger.DB
}

func GetKVBadgerDriver

func GetKVBadgerDriver(cfg *models.Config) (*KVBadgerDriver, error)

func (*KVBadgerDriver) AddToSets

func (k *KVBadgerDriver) AddToSets(ctx context.Context, key string, value string) error

func (*KVBadgerDriver) AddToSortedSets

func (k *KVBadgerDriver) AddToSortedSets(ctx context.Context, setName string, key string, exp time.Duration) error

func (*KVBadgerDriver) CheckKeyHashMap

func (k *KVBadgerDriver) CheckKeyHashMap(ctx context.Context, hash, key string) bool

func (*KVBadgerDriver) CheckRedisKey

func (k *KVBadgerDriver) CheckRedisKey(ctx context.Context, keys ...string) (bool, error)

func (*KVBadgerDriver) DelValue

func (k *KVBadgerDriver) DelValue(ctx context.Context, key string) error

func (*KVBadgerDriver) GetFromHashMap

func (k *KVBadgerDriver) GetFromHashMap(ctx context.Context, hash, key string) (string, error)

func (*KVBadgerDriver) GetFromSortedSets

func (k *KVBadgerDriver) GetFromSortedSets(ctx context.Context, setName string, key string) (float64, error)

func (*KVBadgerDriver) GetJSONObject

func (k *KVBadgerDriver) GetJSONObject(ctx context.Context, key string) (interface{}, error)

func (*KVBadgerDriver) GetValue

func (k *KVBadgerDriver) GetValue(ctx context.Context, key string) (string, error)

func (*KVBadgerDriver) RemoveSets

func (k *KVBadgerDriver) RemoveSets(ctx context.Context, key string, value string) error

func (*KVBadgerDriver) SetJSONObject

func (k *KVBadgerDriver) SetJSONObject(ctx context.Context, key string, value interface{}, expiration time.Duration) error

func (*KVBadgerDriver) SetToHashMap

func (k *KVBadgerDriver) SetToHashMap(ctx context.Context, hash, key string, value string) error

func (*KVBadgerDriver) SetValue

func (k *KVBadgerDriver) SetValue(ctx context.Context, key string, value string, expiration time.Duration) error

Jump to

Keyboard shortcuts

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