Documentation ¶
Index ¶
- Constants
- Variables
- func Close()
- func CreatePost(p *model.Post) error
- func GetPostByCommunityId(p *model.ParamOrder, cid int64) (ids []string, err error)
- func GetPostId(p *model.ParamOrder) (ids []string, err error)
- func GetVoteData(ids []string) (data []int64, err error)
- func Init()
- func VoteForPost(userId, postId string, value float64) error
Constants ¶
View Source
const ( KeyPreFix = "idea." KeyPostTimeZSet = "post.time" KeyPostScoreZSet = "post.score" KeyPostVoteZSetPreFix = "post.vote." KeyCommunityIdSet = "community." )
key设计,方便查询和拆分
View Source
const ( OrderTime = "time" OrderScore = "score" )
Variables ¶
View Source
var ( ErrVoteTimeExpire = ehandle.RedisVoteTimeExpire ErrReVote = ehandle.RedisReVote )
Functions ¶
func CreatePost ¶
func GetPostByCommunityId ¶
func GetPostByCommunityId(p *model.ParamOrder, cid int64) (ids []string, err error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.