redisext

package
v0.0.0-...-5d03f69 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Client *redis.Client
}

API defined api type

func (*API) GetJSON

func (h *API) GetJSON(key string) (map[string]interface{}, error)

GetJSON get json data

func (*API) SetJSON

func (h *API) SetJSON(key string, value interface{}, expiration time.Duration) (*redis.StatusCmd, error)

SetJSON store json data

type Redis

type Redis struct {
	Client *redis.Client
	API    *API
}

Redis some common function

func New

func New() *Redis

New new redis instance

func (*Redis) Conf

func (r *Redis) Conf(opts *redis.Options) *Redis

Conf set e conf

func (*Redis) Init

func (r *Redis) Init(init func(*Redis)) *Redis

Init redis

Jump to

Keyboard shortcuts

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