Documentation ¶
Index ¶
- Variables
- func AssertKeyAtLeastLength(bz []byte, length int)
- func AssertKeyLength(bz []byte, length int)
- type Element
- type List
- func (l *List) Back() *Element
- func (l *List) Front() *Element
- func (l *List) Init() *List
- func (l *List) InsertAfter(v *Pair, mark *Element) *Element
- func (l *List) InsertBefore(v *Pair, mark *Element) *Element
- func (l *List) Len() int
- func (l *List) MoveAfter(e, mark *Element)
- func (l *List) MoveBefore(e, mark *Element)
- func (l *List) MoveToBack(e *Element)
- func (l *List) MoveToFront(e *Element)
- func (l *List) PushBack(v *Pair) *Element
- func (l *List) PushBackList(other *List)
- func (l *List) PushFront(v *Pair) *Element
- func (l *List) PushFrontList(other *List)
- func (l *List) Remove(e *Element) *Pair
- type Pair
- func (*Pair) Descriptor() ([]byte, []int)
- func (m *Pair) GetKey() []byte
- func (m *Pair) GetValue() []byte
- func (m *Pair) Marshal() (dAtA []byte, err error)
- func (m *Pair) MarshalTo(dAtA []byte) (int, error)
- func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Pair) ProtoMessage()
- func (m *Pair) Reset()
- func (m *Pair) Size() (n int)
- func (m *Pair) String() string
- func (m *Pair) Unmarshal(dAtA []byte) error
- func (m *Pair) XXX_DiscardUnknown()
- func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pair) XXX_Merge(src proto.Message)
- func (m *Pair) XXX_Size() int
- func (m *Pair) XXX_Unmarshal(b []byte) error
- type Pairs
- func (*Pairs) Descriptor() ([]byte, []int)
- func (m *Pairs) GetPairs() []Pair
- func (kvs Pairs) Len() int
- func (kvs Pairs) Less(i, j int) bool
- func (m *Pairs) Marshal() (dAtA []byte, err error)
- func (m *Pairs) MarshalTo(dAtA []byte) (int, error)
- func (m *Pairs) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Pairs) ProtoMessage()
- func (m *Pairs) Reset()
- func (m *Pairs) Size() (n int)
- func (kvs Pairs) Sort()
- func (m *Pairs) String() string
- func (kvs Pairs) Swap(i, j int)
- func (m *Pairs) Unmarshal(dAtA []byte) error
- func (m *Pairs) XXX_DiscardUnknown()
- func (m *Pairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pairs) XXX_Merge(src proto.Message)
- func (m *Pairs) XXX_Size() int
- func (m *Pairs) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AssertKeyAtLeastLength ¶ added in v0.46.0
AssertKeyAtLeastLength panics when store key length is less than the given length.
func AssertKeyLength ¶ added in v0.46.0
AssertKeyLength panics when store key length is not equal to the given length.
Types ¶
type Element ¶ added in v0.45.0
type Element struct { // The value stored with this element. Value *Pair // contains filtered or unexported fields }
Element is an element of a linked list.
type List ¶ added in v0.45.0
type List struct {
// contains filtered or unexported fields
}
List represents a doubly linked list. The zero value for List is an empty list ready to use.
func (*List) Back ¶ added in v0.45.0
Back returns the last element of list l or nil if the list is empty.
func (*List) Front ¶ added in v0.45.0
Front returns the first element of list l or nil if the list is empty.
func (*List) InsertAfter ¶ added in v0.45.0
InsertAfter inserts a new element e with value v immediately after mark and returns e. If mark is not an element of l, the list is not modified. The mark must not be nil.
func (*List) InsertBefore ¶ added in v0.45.0
InsertBefore inserts a new element e with value v immediately before mark and returns e. If mark is not an element of l, the list is not modified. The mark must not be nil.
func (*List) Len ¶ added in v0.45.0
Len returns the number of elements of list l. The complexity is O(1).
func (*List) MoveAfter ¶ added in v0.45.0
MoveAfter moves element e to its new position after mark. If e or mark is not an element of l, or e == mark, the list is not modified. The element and mark must not be nil.
func (*List) MoveBefore ¶ added in v0.45.0
MoveBefore moves element e to its new position before mark. If e or mark is not an element of l, or e == mark, the list is not modified. The element and mark must not be nil.
func (*List) MoveToBack ¶ added in v0.45.0
MoveToBack moves element e to the back of list l. If e is not an element of l, the list is not modified. The element must not be nil.
func (*List) MoveToFront ¶ added in v0.45.0
MoveToFront moves element e to the front of list l. If e is not an element of l, the list is not modified. The element must not be nil.
func (*List) PushBack ¶ added in v0.45.0
PushBack inserts a new element e with value v at the back of list l and returns e.
func (*List) PushBackList ¶ added in v0.45.0
PushBackList inserts a copy of another list at the back of list l. The lists l and other may be the same. They must not be nil.
func (*List) PushFront ¶ added in v0.45.0
PushFront inserts a new element e with value v at the front of list l and returns e.
func (*List) PushFrontList ¶ added in v0.45.0
PushFrontList inserts a copy of another list at the front of list l. The lists l and other may be the same. They must not be nil.
type Pair ¶
type Pair struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
Pair defines a key/value bytes tuple.
func (*Pair) Descriptor ¶
func (*Pair) ProtoMessage ¶
func (*Pair) ProtoMessage()
func (*Pair) XXX_DiscardUnknown ¶
func (m *Pair) XXX_DiscardUnknown()
func (*Pair) XXX_Unmarshal ¶
type Pairs ¶
type Pairs struct {
Pairs []Pair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"`
}
Pairs defines a repeated slice of Pair objects.
func (*Pairs) Descriptor ¶
func (*Pairs) ProtoMessage ¶
func (*Pairs) ProtoMessage()
func (*Pairs) XXX_DiscardUnknown ¶
func (m *Pairs) XXX_DiscardUnknown()