client

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: MIT Imports: 3 Imported by: 0

README

redis-client

made-with-Go Go-Version PkgGoDev Build and Test Go Report Card codecov Release

example

goredis_test.go

generator_test.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewRedisClient

func NewRedisClient(address, password string, db int) (*Client, error)

func (*Client) Exists

func (c *Client) Exists(key string) (bool, error)

func (*Client) Expire

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

func (*Client) Get

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

func (*Client) GetClient

func (c *Client) GetClient() (*redis.Client, error)

func (*Client) Incr

func (c *Client) Incr(key string) (int64, error)

func (*Client) IncrByExpiration

func (c *Client) IncrByExpiration(key string, expiration time.Duration) (result int64, err error)

func (*Client) Set

func (c *Client) Set(key, value string) error

func (*Client) SetByExpiration

func (c *Client) SetByExpiration(key, value string, expiration time.Duration) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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