pack

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToStr

func ToStr(value interface{}) (s string)

将interface转为string

Types

type IRedis

type IRedis interface {
	layer.IFlow
}

type Redis

type Redis struct {
	layer.Flow
	RedisClient puzzle.IRedis
}

func (*Redis) Append

func (entity *Redis) Append(key string, value interface{}) (int, error)

func (*Redis) Decr

func (entity *Redis) Decr(key string) (int64, error)

func (*Redis) DecrBy

func (entity *Redis) DecrBy(key string, value int64) (int64, error)

func (*Redis) Del

func (entity *Redis) Del(keys ...interface{}) (int64, error)

func (*Redis) Do

func (entity *Redis) Do(commandName string, args ...interface{}) (reply interface{}, err error)

func (*Redis) Exists

func (entity *Redis) Exists(key string) (bool, error)

func (*Redis) Expire

func (entity *Redis) Expire(key string, time int64, opt ...int) (bool, error)

func (*Redis) Get

func (entity *Redis) Get(key string) ([]byte, error)

func (*Redis) HExists

func (entity *Redis) HExists(key string, field string) (bool, error)

func (*Redis) HGet

func (entity *Redis) HGet(key, field string, opt ...int) ([]byte, error)

func (*Redis) HGetAll

func (entity *Redis) HGetAll(key string) ([][]byte, error)

func (*Redis) HIncrBy

func (entity *Redis) HIncrBy(key, field string, value int64) (int64, error)

func (*Redis) HKeys

func (entity *Redis) HKeys(key string) ([][]byte, error)

func (*Redis) HLen

func (entity *Redis) HLen(key string) (int64, error)

func (*Redis) HMGet

func (entity *Redis) HMGet(key string, fields ...string) ([][]byte, error)

func (*Redis) HMSet

func (entity *Redis) HMSet(key string, fvmap map[string]interface{}) error

HMSet 将一个map存到Redis hash

func (*Redis) HSet

func (entity *Redis) HSet(key, field string, val interface{}, opt ...int) (int, error)

func (*Redis) HVals

func (entity *Redis) HVals(key string) ([][]byte, error)

func (*Redis) Incr

func (entity *Redis) Incr(key string) (int64, error)

func (*Redis) IncrBy

func (entity *Redis) IncrBy(key string, value int64) (int64, error)

func (*Redis) IncrByFloat

func (entity *Redis) IncrByFloat(key string, value float64) (float64, error)

func (*Redis) MGet

func (entity *Redis) MGet(keys ...string) [][]byte

func (*Redis) MSet

func (entity *Redis) MSet(values ...interface{}) error

func (*Redis) PreUse

func (entity *Redis) PreUse(args ...interface{})

默认第一个参数为db,可利用该特性批量处理事务

func (*Redis) Pttl

func (entity *Redis) Pttl(key string) (int64, error)

func (*Redis) Set

func (entity *Redis) Set(key string, value interface{}, expire ...int64) error

func (*Redis) SetDebug

func (entity *Redis) SetDebug(commandName string, args ...interface{})

func (*Redis) SetEx

func (entity *Redis) SetEx(key string, value interface{}, expire int64) error

func (*Redis) Ttl

func (entity *Redis) Ttl(key string) (int64, error)

Jump to

Keyboard shortcuts

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