redis

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	RedisClient *redis.Client
}

func NewClient

func NewClient(redisIp, redisPassword string, db int) (redisClient *Client, err error)

func (*Client) Delete

func (client *Client) Delete(key string) error

Delete 删除

func (*Client) DeleteHashKey

func (client *Client) DeleteHashKey(hashKey string, keys ...string) error

* 删除 hash key 删除其中的key

func (*Client) Expire

func (client *Client) Expire(key string, expiration time.Duration)

设置TTL

func (*Client) GetHashInt64

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

* hash key in key get value (int64)

func (*Client) GetHashString

func (client *Client) GetHashString(hashKey, key string) (ret string, err error)

** hash key in key get value (string)

func (*Client) GetString

func (client *Client) GetString(key string) (value string, err error)

通过key获取value getType String

func (*Client) SetHash

func (client *Client) SetHash(hashKey, key string, value interface{}) (err error)

设置值hash

func (*Client) SetString

func (client *Client) SetString(key string, value interface{}) error

SetString 添加string 类型

Jump to

Keyboard shortcuts

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