Documentation ¶
Index ¶
- Variables
- func ArrayElemKey(name string, index uint32) kv.Key
- func MapElemKey(name string, key []byte) kv.Key
- type Array
- type ArrayReadOnly
- type ImmutableMap
- func (m *ImmutableMap) GetAt(key []byte) []byte
- func (m *ImmutableMap) HasAt(key []byte) bool
- func (m *ImmutableMap) Iterate(f func(elemKey []byte, value []byte) bool)
- func (m *ImmutableMap) IterateKeys(f func(elemKey []byte) bool)
- func (m *ImmutableMap) Keys() [][]byte
- func (m *ImmutableMap) Len() uint32
- func (m *ImmutableMap) Name() string
- type Map
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrArrayOverflow = errors.New("Array overflow")
Functions ¶
Types ¶
type Array ¶
type Array struct { *ArrayReadOnly // contains filtered or unexported fields }
Array represents a dynamic array stored in a kv.KVStore
func (*Array) Extend ¶
func (a *Array) Extend(other *ArrayReadOnly)
func (*Array) Immutable ¶
func (a *Array) Immutable() *ArrayReadOnly
type ArrayReadOnly ¶ added in v1.0.3
type ArrayReadOnly struct {
// contains filtered or unexported fields
}
ArrayReadOnly provides read-only access to an Array in a kv.KVStoreReader.
func NewArrayReadOnly ¶
func NewArrayReadOnly(kvReader kv.KVStoreReader, name string) *ArrayReadOnly
func (*ArrayReadOnly) GetAt ¶ added in v1.0.3
func (a *ArrayReadOnly) GetAt(index uint32) []byte
func (*ArrayReadOnly) Len ¶ added in v1.0.3
func (a *ArrayReadOnly) Len() uint32
Len == 0/empty/non-existent are equivalent
type ImmutableMap ¶
type ImmutableMap struct {
// contains filtered or unexported fields
}
ImmutableMap provides read-only access to a Map in a kv.KVStoreReader.
func NewMapReadOnly ¶
func NewMapReadOnly(kvReader kv.KVStoreReader, name string) *ImmutableMap
func (*ImmutableMap) GetAt ¶
func (m *ImmutableMap) GetAt(key []byte) []byte
func (*ImmutableMap) HasAt ¶
func (m *ImmutableMap) HasAt(key []byte) bool
func (*ImmutableMap) Iterate ¶
func (m *ImmutableMap) Iterate(f func(elemKey []byte, value []byte) bool)
Iterate non-deterministic
func (*ImmutableMap) IterateKeys ¶
func (m *ImmutableMap) IterateKeys(f func(elemKey []byte) bool)
IterateKeys non-deterministic
func (*ImmutableMap) Keys ¶ added in v1.0.3
func (m *ImmutableMap) Keys() [][]byte
func (*ImmutableMap) Len ¶
func (m *ImmutableMap) Len() uint32
func (*ImmutableMap) Name ¶
func (m *ImmutableMap) Name() string
type Map ¶
type Map struct { *ImmutableMap // contains filtered or unexported fields }
Map represents a dynamic key-value collection in a kv.KVStore.
func (*Map) Immutable ¶
func (m *Map) Immutable() *ImmutableMap
Click to show internal directories.
Click to hide internal directories.