kv

package
v0.0.0-...-52be9fe Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVStore

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

func NewKVStore

func NewKVStore(cfg *viper.Viper) *KVStore

func (*KVStore) GetInt64

func (k *KVStore) GetInt64(bucket string, key string) (value int64, found bool, err error)

GetInt64 returns the int64 value if found or an error for the given bucket, key.

func (*KVStore) GetString

func (k *KVStore) GetString(bucket string, key string) (value string, found bool, err error)

GetString returns the string value if found or an error for the given bucket, key.

func (*KVStore) Inc

func (k *KVStore) Inc(bucket string, key string) (value int64, found bool, err error)

Inc increments the int64 value for the given bucket/key. It return the new value if found or an error.

func (*KVStore) SetInt64

func (k *KVStore) SetInt64(bucket string, key string, value int64) error

SetInt64 stores the int64 value for the given bucket/key.

func (*KVStore) SetString

func (k *KVStore) SetString(bucket string, key string, value string) error

SetString stores the string value for the given bucket/key.

Jump to

Keyboard shortcuts

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