Documentation ¶
Index ¶
- func AddToNumber[T Numbers](store KeyValueStore, key interface{}, increment T) (updated T, err error)
- func AppendToFlatList[T interface{}](store KeyValueStore, key string, value T) (err error)
- func AppendToSlice[T Variables](store KeyValueStore, key interface{}, values ...T) (err error)
- func GetFlatList[T interface{}](store KeyValueStore, key string, value T) (values []T)
- func GetSlice[T Variables](store KeyValueStore, key interface{}) (values []T, err error)
- func GetValue[T interface{}](store KeyValueStore, key interface{}) (value T)
- func MakeFlatListKey(key string, suffixes ...string) (name string)
- func RemoveFromSlice[T Variables](store KeyValueStore, key interface{}, values ...T) (err error)
- func YieldFlatList[T interface{}](store KeyValueStore, key string) (yield chan T)
- type Contents
- type KeyValueCache
- type KeyValueCaches
- type KeyValueStore
- type KeyValueStoreAny
- type Numbers
- type Variables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToNumber ¶
func AddToNumber[T Numbers](store KeyValueStore, key interface{}, increment T) (updated T, err error)
func AppendToFlatList ¶
func AppendToFlatList[T interface{}](store KeyValueStore, key string, value T) (err error)
func AppendToSlice ¶
func AppendToSlice[T Variables](store KeyValueStore, key interface{}, values ...T) (err error)
func GetFlatList ¶
func GetFlatList[T interface{}](store KeyValueStore, key string, value T) (values []T)
func GetSlice ¶
func GetSlice[T Variables](store KeyValueStore, key interface{}) (values []T, err error)
func GetValue ¶
func GetValue[T interface{}](store KeyValueStore, key interface{}) (value T)
func MakeFlatListKey ¶
func RemoveFromSlice ¶
func RemoveFromSlice[T Variables](store KeyValueStore, key interface{}, values ...T) (err error)
func YieldFlatList ¶
func YieldFlatList[T interface{}](store KeyValueStore, key string) (yield chan T)
Types ¶
type KeyValueCache ¶
type KeyValueCache interface { // Bucket returns the named bucket or adds a new bucket and returns that Bucket(name string) (kvs KeyValueStore, err error) // MustBucket uses Bucket and log.FatalDF on error MustBucket(name string) (kvs KeyValueStore) // AddBucket adds and returns a new bucket, errors if already exists AddBucket(name string) (kvs KeyValueStore, err error) // GetBucket returns a new bucket, errors if not found GetBucket(name string) (kvs KeyValueStore, err error) }
type KeyValueCaches ¶
type KeyValueCaches interface {
Get(name string) (kvs KeyValueCache, err error)
}
type KeyValueStore ¶
type KeyValueStoreAny ¶
type KeyValueStoreAny interface { Get(key interface{}) (value interface{}, ok bool) Set(key interface{}, value interface{}) }
func NewKVSA ¶
func NewKVSA(kvs KeyValueStore) (kvsa KeyValueStoreAny)
Click to show internal directories.
Click to hide internal directories.