Documentation ¶
Index ¶
- Variables
- func ConsumerMessageList()
- func ConsumerMessageProList()
- func ConsumerPubSub()
- func ConsumerPubSubPro()
- func DeleteHashKey(hashKey string, keys ...string) error
- func DeleteRedis(key string) error
- func GetHashInt64(hashKey string, key string) (ret int64, err error)
- func GetHashString(hashKey string, key string) (ret string, err error)
- func GetStringByKey(key string) (value string, err error)
- func ProducerMessageList(id int64)
- func ProducerPubSub(id int64)
- func SetRedisHash(hashKey string, key string, value interface{}) (err error)
- func SetRedisString(key string, code interface{}) (err error)
- func SetRedisStringCode(key string, code interface{}, expiration time.Duration) (err error)
- func StartClient(redisIp, redisPassword string, db int) (*redis.Client, error)
- type ExampleUser
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 ConsumerPubSubPro ¶
func ConsumerPubSubPro()
func DeleteHashKey ¶
DeleteHashKey 删除 hash key 删除其中的key
func DeleteRedis ¶
func GetHashString ¶
GetHashString hash key in key get value (string)
func GetStringByKey ¶
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 ¶
SetRedisHash 设置值hash
func SetRedisString ¶
SetRedisString redis 保存验证码 时间为 60秒
func SetRedisStringCode ¶
SetRedisStringCode redis 保存验证码 时间为 60秒
func StartClient ¶
StartClient ... @Description: 初始化 ExampleClient 给出使用者最大权利 @param redisIp @param redisPassword @param db @return *redis.Client @return error
Types ¶
type ExampleUser ¶
Click to show internal directories.
Click to hide internal directories.