Documentation
¶
Index ¶
Constants ¶
View Source
const (
// NamespaceTerminator is the uint8 that terminates a namespace.
NamespaceTerminator = 0x00
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Namespaced ¶
type Namespaced struct {
// contains filtered or unexported fields
}
Namespaced defines a higher level storage layer that saves bytes in a prefix.
func NewNamespaced ¶
func NewNamespaced(namespace string) Namespaced
NewNamespaced generates a new Namespaced instance given a unique namespace.
func (Namespaced) Get ¶
func (s Namespaced) Get(storage std.Storage, key []byte) []byte
Get gets the given key after prepending the namespace prefix.
func (Namespaced) Range ¶
Range ranges over the given start to end range after prepending the namespace prefix.
type NamespacedIterator ¶
type NamespacedIterator struct {
// contains filtered or unexported fields
}
NamespacedIterator is the std.Iterator of namespaced storage.
func (NamespacedIterator) Next ¶
func (n NamespacedIterator) Next() (key, value []byte, err error)
Next returns the next key value combo in the iterator, it removes the namespace prefix from key.
Click to show internal directories.
Click to hide internal directories.