godis

package module
Version: v0.0.0-...-3079f6c Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

README

godis

使用说明

获取 go get -u -v github.com/MWangxj/godis

package godis // import "github.com/MWangxj/godis"

func Dail(addr, passwd string, maxidle, maxac, db int, to time.Duration) *redis.Pool
func Del(key string) error
func Get(key string, v interface{}) error
func HDel(key, region string) error
func HGet(key, region string, v interface{}) error
func HGetAll(key string, v *map[string]string) error
func HSet(key, region string, v interface{}) error
func SAdd(key string, v interface{}) error
func SMembers(key string, v []string) error
func Set(key string, v interface{}) error
func SetKeyPrefix(prefix string)
func SetKeySubfix(subfix string)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dail

func Dail(addr, passwd string, maxidle, maxac, db int, to time.Duration) *redis.Pool

Dail 拨号

func Del

func Del(key string) error

Del 调用redis del 命令

func Expire

func Expire(key string, ttl int) error

func GetBool

func GetBool(key string) (bool, error)

GetBool

func GetInt

func GetInt(key string) (int, error)

GetInt

func GetObj

func GetObj(key string, v interface{}) error

GetObj 调用redis get 命令

func GetString

func GetString(key string) (string, error)

GetString

func HDel

func HDel(key, region string) error

HDel 删除哈希数据结构中的一个region

func HGet

func HGet(key, region string, v interface{}) error

HGet 获取哈希数据结构一个region的值

func HGetAll

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

HGetAll 获取该key下面所有哈希的集合,值以字符串表示

func HSet

func HSet(key, region string, v interface{}) error

HSet 调用redis hset 设置哈希数据结构

func LPop

func LPop(key string) (string, error)

func LPush

func LPush(key string, v ...string) error

func SAdd

func SAdd(key string, v interface{}) error

SAdd 向该key下面添加set散列

func SMembers

func SMembers(key string, v []string) error

SMembers 获取该key下面 所有set集合

func Set

func Set(key string, v interface{}) error

Set 调用redis set 命令

func SetKeyPrefix

func SetKeyPrefix(prefix string)

SetKeyPrefix 设置key前缀

func SetKeySubfix

func SetKeySubfix(subfix string)

SetKeySubfix 设置key后缀

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL