kvs

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 10 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 string, 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 string, values ...T) (err error)

func AppendToStringSlice added in v0.2.11

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

func AsExtended added in v0.5.6

func AsExtended(store feature.KeyValueStore) (extended feature.ExtendedKeyValueStore, 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 ExtendedBucket added in v0.5.6

func ExtendedBucket(cache feature.KeyValueCache, name string) (store feature.ExtendedKeyValueStore, 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 comparable](store feature.KeyValueStore, key string) (values []T)

func GetIsNil added in v0.5.6

func GetIsNil(store feature.KeyValueStore, key string) (isNil bool)

func GetSlice

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

func GetStringSlice added in v0.2.11

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

func GetUnmarshal added in v0.5.6

func GetUnmarshal[T interface{}](store feature.KeyValueStore, key string, value *T) (err error)

func GetValue

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

func IsSet added in v0.5.6

func IsSet(store feature.KeyValueStore, key string) (present bool)

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 Marshal added in v0.5.6

func Marshal(value interface{}) (data []byte, err error)

func MarshalConcrete added in v0.5.6

func MarshalConcrete(value interface{}) (data string, err error)

func MustAsExtended added in v0.5.6

func MustAsExtended(store feature.KeyValueStore) (extended feature.ExtendedKeyValueStore)

func MustExtendedBucket added in v0.5.6

func MustExtendedBucket(cache feature.KeyValueCache, name string) (store feature.ExtendedKeyValueStore)

func RangeFlatList added in v0.5.6

func RangeFlatList[T comparable](store feature.KeyValueStore, key string, fn func(item T) (stop bool))

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 string, 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 SetFlatList added in v0.5.6

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

func SetMarshal added in v0.5.6

func SetMarshal(store feature.KeyValueStore, key string, value interface{}) (err error)

func SetSlice added in v0.5.0

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

func StringSliceEmpty added in v0.2.11

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

func Unmarshal added in v0.5.6

func Unmarshal[T interface{}](data []byte, value *T) (err error)

func UnmarshalConcrete added in v0.5.6

func UnmarshalConcrete[V string | []byte](input V) (value interface{}, err error)

func YieldFlatList

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

Types

type ConcreteTag added in v0.5.6

type ConcreteTag uint8
const (
	StartConcreteTags ConcreteTag = iota + 1
	CString
	CFloat32
	CFloat64
	CInt
	CInt8
	CInt16
	CInt32
	CInt64
	CUint
	CUint8
	CUint16
	CUint32
	CUint64
	CTimeTime
	CTimeDuration
	CStringSlice
	CInterfaceSlice
	EndConcreteTags
)

func GetConcreteTag added in v0.5.6

func GetConcreteTag(value interface{}) (tag ConcreteTag)

func (ConcreteTag) String added in v0.5.6

func (t ConcreteTag) String() (value string)

func (ConcreteTag) Valid added in v0.5.6

func (t ConcreteTag) Valid() (valid bool)

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