-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathrouter_zset.go
More file actions
38 lines (20 loc) · 861 Bytes
/
router_zset.go
File metadata and controls
38 lines (20 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package nutshttp
func (s *NutsHTTPServer) initZSetRouter() {
sr := s.r.Group("/zset").Use(JWT())
sr.POST("/zadd/:bucket/:key", s.ZAdd)
sr.GET("/zcard/:bucket/:key", s.ZCard)
sr.GET("/zcount/:bucket/:key", s.ZCount)
sr.GET("/zgetbykey/:bucket/:key", s.ZGetByKey)
sr.GET("/zmembers/:bucket/:key", s.ZMembers)
sr.GET("/zpeekmax/:bucket/:key", s.ZPeekMax)
sr.GET("/zpeekmin/:bucket/:key", s.ZPeekMin)
sr.DELETE("/zpopmax/:bucket/:key", s.ZPopMax)
sr.DELETE("/zpopmin/:bucket/:key", s.ZPopMin)
sr.GET("/zrangebyrank/:bucket/:key", s.ZRangeByRank)
sr.GET("/zrangebyscore/:bucket/:key", s.ZRangeByScore)
sr.GET("/zrank/:bucket/:key", s.ZRank)
sr.GET("/zrevrank/:bucket/:key", s.ZRevRank)
sr.DELETE("/zrem/:bucket/:key", s.ZRem)
sr.DELETE("/zremrangebyrank/:bucket/:key", s.ZRemRangeByRank)
sr.GET("/zscore/:bucket/:key", s.ZScore)
}