Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICacheLike ¶
type ICacheLike interface {
AsyncStorage() //异步入库
}
func NewStorage ¶
func NewStorage(redisKey string, action IStorageAction) ICacheLike
入库操作方法 传入IStorageAction进行mysql入库操作
type ILike ¶
type ILike interface { Like(likeId string, userId string) (err error) UnLike(likeId string, userId string) (err error) IsLike(likeId string, userId string) (flag bool, err error) Count(likeId string) (count int64, err error) }
点赞接口
type IStorageAction ¶
type IStorageAction interface { Like(insertList []InsertData) //入库为赞的操作 UnLike(delData DelData) //入库为取消赞时的操作 InsOrUpCount(likeId string, count int64) //入库修改数量 }
type InsertData ¶
Click to show internal directories.
Click to hide internal directories.