redis

package
v0.0.0-...-33fa9ae Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToStruct

func ConvertToStruct(v, out interface{}) error

func ToMap

func ToMap(s interface{}) (map[string]interface{}, error)

func ToStruct

func ToStruct(data interface{}, v interface{}) error

Types

type Client

type Client struct {
	Address      string
	Password     string
	DialTimeout  int
	ReadTimeout  int
	WriteTimeout int
	PoolSize     int
	// contains filtered or unexported fields
}

func NewClient

func NewClient(address, password string, dialTime, readTime, writeTime, poolSize int) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) Delete

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

func (*Client) Expire

func (c *Client) Expire(key string, expiration time.Duration) (bool, error)

func (*Client) Get

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

func (*Client) HDel

func (c *Client) HDel(key string, field string) error

func (*Client) HGetAll

func (c *Client) HGetAll(key string) (map[string]string, error)

func (*Client) HGetAllWithStruct

func (c *Client) HGetAllWithStruct(key string, value interface{}) error

func (*Client) HMGet

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

func (*Client) HMSet

func (c *Client) HMSet(key string, value interface{}) error

func (*Client) HMSetWithExpire

func (c *Client) HMSetWithExpire(key string, expire time.Duration, value interface{}) error

func (*Client) Open

func (c *Client) Open() error

func (*Client) SAdd

func (c *Client) SAdd(key string, members ...interface{}) error

func (*Client) SAddWithExpire

func (c *Client) SAddWithExpire(key string, expire time.Duration, members ...interface{}) error

func (*Client) SMembers

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

func (*Client) Set

func (c *Client) Set(key string, val interface{}, expiration time.Duration) error

func (*Client) SetNX

func (c *Client) SetNX(key string, val interface{}, expiration time.Duration) error

Jump to

Keyboard shortcuts

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