Documentation ¶
Index ¶
- type Border
- type Element
- type Level
- type LexBorder
- type ScoreBorder
- type SortedSet
- func (sortedSet *SortedSet) Add(member string, score float64) bool
- func (sortedSet *SortedSet) ForEach(min Border, max Border, offset int64, limit int64, desc bool, ...)
- func (sortedSet *SortedSet) ForEachByRank(start int64, stop int64, desc bool, consumer func(element *Element) bool)
- func (sortedSet *SortedSet) Get(member string) (element *Element, ok bool)
- func (sortedSet *SortedSet) GetRank(member string, desc bool) (rank int64)
- func (sortedSet *SortedSet) Len() int64
- func (sortedSet *SortedSet) PopMin(count int) []*Element
- func (sortedSet *SortedSet) Range(min Border, max Border, offset int64, limit int64, desc bool) []*Element
- func (sortedSet *SortedSet) RangeByRank(start int64, stop int64, desc bool) []*Element
- func (sortedSet *SortedSet) RangeCount(min Border, max Border) int64
- func (sortedSet *SortedSet) Remove(member string) bool
- func (sortedSet *SortedSet) RemoveByRank(start int64, stop int64) int64
- func (sortedSet *SortedSet) RemoveRange(min Border, max Border) int64
- func (sortedSet *SortedSet) ZSetScan(cursor int, count int, pattern string) ([][]byte, int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Border ¶
type Border interface {
// contains filtered or unexported methods
}
func ParseLexBorder ¶
ParseLexBorder creates LexBorder from redis arguments
func ParseScoreBorder ¶
ParseScoreBorder creates ScoreBorder from redis arguments
type ScoreBorder ¶
ScoreBorder represents range of a float value, including: <, <=, >, >=, +inf, -inf
type SortedSet ¶
type SortedSet struct {
// contains filtered or unexported fields
}
SortedSet is a set which keys sorted by bound score
func (*SortedSet) ForEach ¶
func (sortedSet *SortedSet) ForEach(min Border, max Border, offset int64, limit int64, desc bool, consumer func(element *Element) bool)
ForEach visits members which score or member within the given border
func (*SortedSet) ForEachByRank ¶
func (sortedSet *SortedSet) ForEachByRank(start int64, stop int64, desc bool, consumer func(element *Element) bool)
ForEachByRank visits each member which rank within [start, stop), sort by ascending order, rank starts from 0
func (*SortedSet) GetRank ¶
GetRank returns the rank of the given member, sort by ascending order, rank starts from 0
func (*SortedSet) Range ¶
func (sortedSet *SortedSet) Range(min Border, max Border, offset int64, limit int64, desc bool) []*Element
Range returns members which score or member within the given border param limit: <0 means no limit
func (*SortedSet) RangeByRank ¶
RangeByRank returns members which rank within [start, stop), sort by ascending order, rank starts from 0
func (*SortedSet) RangeCount ¶
RangeCount returns the number of members which score or member within the given border
func (*SortedSet) RemoveByRank ¶
RemoveByRank removes member ranking within [start, stop) sort by ascending order and rank starts from 0
func (*SortedSet) RemoveRange ¶
RemoveRange removes members which score or member within the given border