kvs

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToNumber

func AddToNumber[T maths.Number](store feature.KeyValueStore, key interface{}, increment T) (updated T, err error)

func AppendToFlatList

func AppendToFlatList[T comparable](store feature.KeyValueStore, key string, value T) (err error)

func AppendToSlice

func AppendToSlice[T Variables](store feature.KeyValueStore, key interface{}, values ...T) (err error)

func AppendToStringSlice added in v0.2.11

func AppendToStringSlice(store feature.KeyValueStore, key interface{}, values ...string) (err error)

func CountDistinctFlatListValues added in v0.2.11

func CountDistinctFlatListValues[T comparable](store feature.KeyValueStore, key string) (count uint64)

func CountFlatList added in v0.2.11

func CountFlatList(store feature.KeyValueStore, key string) (count uint64)

func CountFlatListValues added in v0.2.11

func CountFlatListValues[T comparable](store feature.KeyValueStore, key string) (counts map[T]uint64)

func DecodeKeyValue added in v0.2.11

func DecodeKeyValue(valueKey string) (value interface{}, err error)

func DecodeValue added in v0.5.0

func DecodeValue[T interface{}](encoded string) (value T, err error)

func EncodeKeyValue added in v0.2.11

func EncodeKeyValue(value interface{}) (valueKey string, err error)

func FirstInFlatList added in v0.5.0

func FirstInFlatList[T comparable](store feature.KeyValueStore, key string) (value T, ok bool)

func FlatListEmpty added in v0.2.11

func FlatListEmpty(store feature.KeyValueStore, key string) (empty bool)

func GetFlatList

func GetFlatList[T interface{}](store feature.KeyValueStore, key string) (values []T)

func GetSlice

func GetSlice[T Variables](store feature.KeyValueStore, key interface{}) (values []T, err error)

func GetStringSlice added in v0.2.11

func GetStringSlice(store feature.KeyValueStore, key interface{}) (values []string, err error)

func GetValue

func GetValue[T interface{}](store feature.KeyValueStore, key interface{}) (value T)

func LastInFlatList added in v0.5.0

func LastInFlatList[T comparable](store feature.KeyValueStore, key string) (value T, ok bool)

func MakeFlatListKey

func MakeFlatListKey(key string, suffixes ...string) (name string)

func NewKVSA

func NewKVSA(kvs feature.KeyValueStore) (kvsa feature.KeyValueStoreAny)

func RemoveFromFlatList added in v0.5.0

func RemoveFromFlatList[T comparable](store feature.KeyValueStore, key string, value T) (err error)

func RemoveFromSlice

func RemoveFromSlice[T Variables](store feature.KeyValueStore, key interface{}, values ...T) (err error)

func ResetFlatList added in v0.5.0

func ResetFlatList(store feature.KeyValueStore, key string) (reset bool)

func ResetFlatListIfEmpty added in v0.5.0

func ResetFlatListIfEmpty(store feature.KeyValueStore, key string) (reset bool)

func SetSlice added in v0.5.0

func SetSlice[T Variables](store feature.KeyValueStore, key interface{}, values []T) (err error)

func StringSliceEmpty added in v0.2.11

func StringSliceEmpty(store feature.KeyValueStore, key interface{}) (empty bool)

func YieldFlatList

func YieldFlatList[T interface{}](store feature.KeyValueStore, key string) (yield chan T)

Types

type Variables

type Variables interface {
	maths.Number | byte | string
}

Jump to

Keyboard shortcuts

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