cache

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LimiterKey = "limiter"
)

Variables

View Source
var RedisClient *redis.Client

Functions

func FollowAction

func FollowAction(ctx context.Context, uid, tid int64) error

func FollowCount

func FollowCount(ctx context.Context, uid int64) (int64, error)

func FollowListAction

func FollowListAction(ctx context.Context, uid int64) (*[]int64, error)

func FollowListKey

func FollowListKey(uid int64) string

func FollowerCount

func FollowerCount(ctx context.Context, uid int64) (int64, error)

func FollowerListAction

func FollowerListAction(ctx context.Context, uid int64) (*[]int64, error)

func FollowerListKey

func FollowerListKey(uid int64) string

func FriendListAction

func FriendListAction(ctx context.Context, uid int64) (*[]int64, error)

func Init

func Init()

func IsFollow

func IsFollow(ctx context.Context, uid, tid int64) (bool, error)

判断关注数据是否存在于redis

func Limit

func Limit(ctx context.Context, rate int, interval time.Duration) error

func UnFollowAction

func UnFollowAction(ctx context.Context, uid, tid int64) error

func UpdateFollowList

func UpdateFollowList(ctx context.Context, uid int64, followList *[]int64) error

func UpdateFollowerList

func UpdateFollowerList(ctx context.Context, uid int64, followerList *[]int64) error

func UpdateFriendList

func UpdateFriendList(ctx context.Context, uid int64, followList, followerList *[]int64) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL