redis_client

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HMDto

type HMDto struct {
	Field interface{}
	Value interface{}
}

type RedisClient

type RedisClient struct {
	MaxIdle      int
	MaxActive    int
	Network      string
	Address      string
	Password     string
	Db           int
	Username     string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	IdleTimeout  time.Duration
	// contains filtered or unexported fields
}

func (*RedisClient) Del

func (c *RedisClient) Del(key ...string) (int, error)

func (*RedisClient) Get

func (c *RedisClient) Get(key string) (string, error)

func (*RedisClient) GetPool

func (c *RedisClient) GetPool() *redis.Pool

func (*RedisClient) HDel

func (c *RedisClient) HDel(key string, fields ...interface{}) (int, error)

func (*RedisClient) HMGet

func (c *RedisClient) HMGet(key string, fields ...interface{}) (map[string]string, error)

func (*RedisClient) HMGetOne

func (c *RedisClient) HMGetOne(key string, field string) (string, error)

func (*RedisClient) HMSet

func (c *RedisClient) HMSet(key string, fields ...HMDto) (bool, error)

func (*RedisClient) SAdd

func (c *RedisClient) SAdd(key string, member ...interface{}) (int, error)

func (*RedisClient) SMembers

func (c *RedisClient) SMembers(key string) ([]string, error)

func (*RedisClient) SRem

func (c *RedisClient) SRem(key string, member ...interface{}) (int, error)

func (*RedisClient) SetEx

func (c *RedisClient) SetEx(key string, value string, ttl int) (bool, error)

Jump to

Keyboard shortcuts

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