Documentation ¶
Index ¶
- Constants
- func Close()
- func GetCommunityPostIds(communityKey string, orderType int8, page, pageSize int64) ([]string, error)
- func GetKeyCommunityPost(communityId string) string
- func GetKeyPostScore() string
- func GetKeyPostTime() string
- func GetKeyPostVoted(postId string) string
- func GetPostIdsByScore(start, stop int64) []string
- func GetPostIdsByTime(start, stop int64) []string
- func GetPostPublishTime(postId string) float64
- func GetPostVoteNums(postIds []string) ([]int64, error)
- func GetPostVoteUser(postId int64, userId string) float64
- func Init(redisConf *settings.RedisConf)
- func RemUserVoteRecord(postId, userId int64) error
- func SaveCommunityPost(communityId string, postId int64) error
- func SavePostPublishTime(postId int64) error
- func SaveUserVoteRecord(postId, userId int64, direction float64) error
- func SetPostScore(postId string, score float64) error
Constants ¶
View Source
const ( KeyPrefix = "bluebell:" KeyPostTime = "post:time" //zset; postId:publishTime,eg: 12347:11889901 KeyPostScore = "post:score" //zset; postId:voteNum,eg:12347:1000 KeyPostVoted = "post:voted:%s" //zset; 参数为 postId KeyCommunityPost = "post:community:%s" //set 参数为社区id )
Variables ¶
This section is empty.
Functions ¶
func GetCommunityPostIds ¶
func GetCommunityPostIds(communityKey string, orderType int8, page, pageSize int64) ([]string, error)
GetCommunityPostIds 根据社区筛选postId
func GetKeyCommunityPost ¶
GetKeyPostVoted 获取文章下用户投票记录
func GetPostIdsByScore ¶
GetPostIdsByScore 根据分数获取帖子指定范围的ids
func GetPostIdsByTime ¶
GetPostIdsByTime 根据时间获取帖子指定范围的ids
func GetPostPublishTime ¶
GetPostPublishTime 获取文章发布时间
func GetPostVoteNums ¶
GetPostVoteNums 获取帖子投赞成票的数量
func GetPostVoteUser ¶
GetPostVoteUser 获取文章投票记录
func RemUserVoteRecord ¶
RemUserVoteRecord 移除用户投票记录
func SaveCommunityPost ¶
SaveCommunityPost 保存社区下的帖子数据
func SavePostPublishTime ¶
SavePostPublishTime 保存帖子发布时间
func SaveUserVoteRecord ¶
SaveUserVoteRecord 保存用户投票记录
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.