Documentation ¶
Index ¶
- type Dict
- func (d Dict) Clone() Dict
- func (d Dict) Del(key kv.Key)
- func (d Dict) Extend(from Dict)
- func (d Dict) ForEach(fun func(key kv.Key, value []byte) bool)
- func (d Dict) ForEachDeterministic(fun func(key kv.Key, value []byte) bool)
- func (d Dict) Get(key kv.Key) ([]byte, error)
- func (d Dict) Has(key kv.Key) (bool, error)
- func (d Dict) Hash() hashing.HashValue
- func (d Dict) IsEmpty() bool
- func (d Dict) Iterate(prefix kv.Key, f func(key kv.Key, value []byte) bool) error
- func (d Dict) IterateKeys(prefix kv.Key, f func(key kv.Key) bool) error
- func (d Dict) JSONDict() JSONDict
- func (d Dict) Keys() []kv.Key
- func (d Dict) KeysSorted() []kv.Key
- func (d Dict) MarshalJSON() ([]byte, error)
- func (d Dict) MustGet(key kv.Key) []byte
- func (d Dict) MustHas(key kv.Key) bool
- func (d Dict) MustIterate(prefix kv.Key, f func(key kv.Key, value []byte) bool)
- func (d Dict) MustIterateKeys(prefix kv.Key, f func(key kv.Key) bool)
- func (d Dict) Read(r io.Reader) error
- func (d Dict) Set(key kv.Key, value []byte)
- func (d Dict) String() string
- func (d *Dict) UnmarshalJSON(b []byte) error
- func (d Dict) Write(w io.Writer) error
- type Item
- type JSONDict
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dict ¶
Dict is an implementation kv.KVStore interface backed by an in-memory map. kv.KVStore represents a key-value store where both keys and values are arbitrary byte slices.
func FromKVStore ¶
FromKVStore convert (copy) any KVStore to dict
func (Dict) ForEachDeterministic ¶
ForEachDeterministic iterates in the order of alphabetically sorted keys
func (Dict) IterateKeys ¶
IterateKeys over keys with prefix
func (Dict) MarshalJSON ¶
func (Dict) MustIterate ¶
MustIterate iterated of key/value pairs. In general, non-deterministic
func (Dict) MustIterateKeys ¶
MustIterateKeys iterated of keys of the dictionary. In general, non-deterministic
func (*Dict) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.