Documentation
¶
Index ¶
- Variables
- func FindMonthDateByTime(date time.Time) (time.Time, time.Time, error)
- func FindWeekDateByTime(date time.Time) (time.Time, time.Time)
- type SortedSet
- func (z *SortedSet) Delete(key int64) (ok bool)
- func (z *SortedSet) GetData(key int64) (data interface{}, ok bool)
- func (z *SortedSet) GetDataByRank(rank int64, reverse bool) (key int64, score float64, data interface{})
- func (z *SortedSet) GetRank(key int64, reverse bool) (rank int64, score float64, data interface{})
- func (z *SortedSet) IncrBy(score float64, key int64) (float64, interface{})
- func (z *SortedSet) Length() int64
- func (z *SortedSet) Range(start, end int64, f func(float64, int64, interface{}))
- func (z *SortedSet) RevRange(start, end int64, f func(float64, int64, interface{}))
- func (z *SortedSet) Set(score float64, key int64, dat interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DateFormat = "2006-01-02" DateTimeFormat = "2006-01-02 15:04:05" )
Functions ¶
func FindMonthDateByTime ¶ added in v0.0.8
Types ¶
type SortedSet ¶
type SortedSet struct {
// contains filtered or unexported fields
}
SortedSet is the final exported sorted set we can use
func NewSortedSet ¶
func NewSortedSet() *SortedSet
NewSortedSet creates a new SortedSet and return its pointer
func (*SortedSet) GetDataByRank ¶
func (z *SortedSet) GetDataByRank(rank int64, reverse bool) (key int64, score float64, data interface{})
GetDataByRank returns the id,score and extra data of an element which found by position in the rank. The parameter rank is the position, reverse says if in the descend rank.
func (*SortedSet) GetRank ¶
GetRank returns position,score and extra data of an element which found by the parameter key. The parameter reverse determines the rank is descent or ascend, true means descend and false means ascend.
Click to show internal directories.
Click to hide internal directories.