redisc

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExampleClient *redis.Client
)
View Source
var (
	ExampleLPushKeyList = "Cc:LPush:example"
)
View Source
var ExamplePublishKey = "Cc:publish:example"

Functions

func ConsumerMessageList

func ConsumerMessageList()

func ConsumerMessageProList

func ConsumerMessageProList()

func ConsumerPubSub

func ConsumerPubSub()

ConsumerPubSub 订阅者(消费者)

func ConsumerPubSubPro

func ConsumerPubSubPro()

func DeleteHashKey

func DeleteHashKey(hashKey string, keys ...string) error

DeleteHashKey 删除 hash key 删除其中的key

func DeleteRedis

func DeleteRedis(key string) error

func GetHashInt64

func GetHashInt64(hashKey string, key string) (ret int64, err error)

func GetHashString

func GetHashString(hashKey string, key string) (ret string, err error)

GetHashString hash key in key get value (string)

func GetStringByKey

func GetStringByKey(key string) (value string, err error)

GetStringByKey 通过key获取value (type String)

func ProducerMessageList

func ProducerMessageList(id int64)

ProducerMessageList ... @Description: 生产者 LPush Cc:LPush:example '{"Id":1659078721254276000,"Name":"Cc"}'

func ProducerPubSub

func ProducerPubSub(id int64)

ProducerPubSub 发布者(生产者) PUBLISH Cc:publish:example '{"Id":1659078721254276000,"Name":"Cc"}'

func SetRedisHash

func SetRedisHash(hashKey string, key string, value interface{}) (err error)

SetRedisHash 设置值hash

func SetRedisString

func SetRedisString(key string, code interface{}) (err error)

SetRedisString redis 保存验证码 时间为 60秒

func SetRedisStringCode

func SetRedisStringCode(key string, code interface{}, expiration time.Duration) (err error)

SetRedisStringCode redis 保存验证码 时间为 60秒

func StartClient

func StartClient(redisIp, redisPassword string, db int) (*redis.Client, error)

StartClient ... @Description: 初始化 ExampleClient 给出使用者最大权利 @param redisIp @param redisPassword @param db @return *redis.Client @return error

Types

type ExampleUser

type ExampleUser struct {
	Id   int64
	Name string
}

Jump to

Keyboard shortcuts

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