Documentation ¶
Index ¶
- Variables
- type KeyValue
- type Lexicon
- func (lex *Lexicon) ClearRange(start orderedlist.Comparable, end orderedlist.Comparable)
- func (lex *Lexicon) Get(key orderedlist.Comparable) (interface{}, error)
- func (lex *Lexicon) GetRange(start orderedlist.Comparable, end orderedlist.Comparable) (kv []KeyValue)
- func (lex *Lexicon) Remove(key orderedlist.Comparable)
- func (lex *Lexicon) Set(key orderedlist.Comparable, value interface{})
- func (lex *Lexicon) SetMany(kv map[orderedlist.Comparable]interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotPresent = errors.New("lexicon: key not present")
Functions ¶
This section is empty.
Types ¶
type KeyValue ¶ added in v0.3.0
type KeyValue struct { Key orderedlist.Comparable Value interface{} }
type Lexicon ¶
type Lexicon struct {
// contains filtered or unexported fields
}
Lexicon is an ordered key-value store.
func (*Lexicon) ClearRange ¶ added in v0.3.0
func (lex *Lexicon) ClearRange(start orderedlist.Comparable, end orderedlist.Comparable)
ClearRange removes a range of key-value pairs. The range is from [start, end).
func (*Lexicon) Get ¶
func (lex *Lexicon) Get(key orderedlist.Comparable) (interface{}, error)
Get returns a value at the given key.
func (*Lexicon) GetRange ¶
func (lex *Lexicon) GetRange(start orderedlist.Comparable, end orderedlist.Comparable) (kv []KeyValue)
GetRange returns a slice of KeyValue structs. The range is from [start, end).
func (*Lexicon) Remove ¶
func (lex *Lexicon) Remove(key orderedlist.Comparable)
Remove deletes a key-value pair.
func (*Lexicon) Set ¶
func (lex *Lexicon) Set(key orderedlist.Comparable, value interface{})
Set sets a key to a value.
func (*Lexicon) SetMany ¶ added in v0.3.0
func (lex *Lexicon) SetMany(kv map[orderedlist.Comparable]interface{})
SetMany sets multiple key-value pairs.
Click to show internal directories.
Click to hide internal directories.