Documentation ¶
Index ¶
- Variables
- func GetNullableInt(value *RedisReplyValue) (null.Int, error)
- func GetNullableString(value *RedisReplyValue) null.String
- type Option
- type RedisArrayReplyReader
- func (r *RedisArrayReplyReader) ForEach(action func(i int, v *RedisReplyValue) error) error
- func (r *RedisArrayReplyReader) GetLength() int
- func (r *RedisArrayReplyReader) HasNext() bool
- func (r *RedisArrayReplyReader) ReadArray() *RedisArrayReplyReader
- func (r *RedisArrayReplyReader) ReadFloat64(defaultValue float64) (float64, error)
- func (r *RedisArrayReplyReader) ReadInt32(defaultValue int32) (int32, error)
- func (r *RedisArrayReplyReader) ReadInt64(defaultValue int64) (int64, error)
- func (r *RedisArrayReplyReader) ReadString() string
- func (r *RedisArrayReplyReader) ReadValue() *RedisReplyValue
- func (r *RedisArrayReplyReader) SkipValue()
- type RedisReplyValue
- func (v *RedisReplyValue) AsFloat64(defaultValue float64) (float64, error)
- func (v *RedisReplyValue) AsInt32(defaultValue int32) (int32, error)
- func (v *RedisReplyValue) AsInt64(defaultValue int64) (int64, error)
- func (v *RedisReplyValue) AsString() string
- func (v *RedisReplyValue) IsNil() bool
- func (v *RedisReplyValue) ToArrayReplyReader() *RedisArrayReplyReader
- func (v *RedisReplyValue) Value() interface{}
- type ScriptDescriptor
- type Scriptor
- func FastInit(host string, port int, Password string, db int, poolSize int, scriptDB int, ...) (*Scriptor, error)
- func New(client *redis.Client, scriptDB int, redisScriptDefinition string, ...) (*Scriptor, error)
- func NewDB(opt *Option, scriptDB int, redisScriptDefinition string, ...) (*Scriptor, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyRedisReplyValue = &RedisReplyValue{value: nil}
EmptyRedisReplyValue -
Functions ¶
func GetNullableInt ¶
func GetNullableInt(value *RedisReplyValue) (null.Int, error)
GetNullableInt -
func GetNullableString ¶
func GetNullableString(value *RedisReplyValue) null.String
GetNullableString -
Types ¶
type Option ¶
type Option struct { Host string Port int Password string DB int PoolSize int ScriptDefinition string }
Option - Redis Option
type RedisArrayReplyReader ¶
type RedisArrayReplyReader struct {
// contains filtered or unexported fields
}
RedisArrayReplyReader -
func NewRedisArrayReplyReader ¶
func NewRedisArrayReplyReader(redisReply []interface{}) *RedisArrayReplyReader
NewRedisArrayReplyReader -
func (*RedisArrayReplyReader) ForEach ¶
func (r *RedisArrayReplyReader) ForEach(action func(i int, v *RedisReplyValue) error) error
ForEach -
func (*RedisArrayReplyReader) GetLength ¶
func (r *RedisArrayReplyReader) GetLength() int
GetLength -
func (*RedisArrayReplyReader) ReadArray ¶
func (r *RedisArrayReplyReader) ReadArray() *RedisArrayReplyReader
ReadArray -
func (*RedisArrayReplyReader) ReadFloat64 ¶
func (r *RedisArrayReplyReader) ReadFloat64(defaultValue float64) (float64, error)
ReadFloat64 -
func (*RedisArrayReplyReader) ReadInt32 ¶
func (r *RedisArrayReplyReader) ReadInt32(defaultValue int32) (int32, error)
ReadInt32 -
func (*RedisArrayReplyReader) ReadInt64 ¶
func (r *RedisArrayReplyReader) ReadInt64(defaultValue int64) (int64, error)
ReadInt64 -
func (*RedisArrayReplyReader) ReadString ¶
func (r *RedisArrayReplyReader) ReadString() string
ReadString -
func (*RedisArrayReplyReader) ReadValue ¶
func (r *RedisArrayReplyReader) ReadValue() *RedisReplyValue
ReadValue -
type RedisReplyValue ¶
type RedisReplyValue struct {
// contains filtered or unexported fields
}
RedisReplyValue -
func NewRedisReplyValue ¶
func NewRedisReplyValue(value interface{}) *RedisReplyValue
NewRedisReplyValue -
func (*RedisReplyValue) AsFloat64 ¶
func (v *RedisReplyValue) AsFloat64(defaultValue float64) (float64, error)
AsFloat64 -
func (*RedisReplyValue) AsInt32 ¶
func (v *RedisReplyValue) AsInt32(defaultValue int32) (int32, error)
AsInt32 -
func (*RedisReplyValue) AsInt64 ¶
func (v *RedisReplyValue) AsInt64(defaultValue int64) (int64, error)
AsInt64 -
func (*RedisReplyValue) ToArrayReplyReader ¶
func (v *RedisReplyValue) ToArrayReplyReader() *RedisArrayReplyReader
ToArrayReplyReader -
type ScriptDescriptor ¶
type ScriptDescriptor struct { Scripts map[string]string // contains filtered or unexported fields }
Script is a script descriptor
func NewScriptDescriptor ¶
func NewScriptDescriptor(ctx context.Context, client *redis.Client, scripts *map[string]string, redisScriptDefinition string, db int) (*ScriptDescriptor, error)
NewScriptDescriptor creates a new script descriptor
func (*ScriptDescriptor) LoadScripts ¶
func (scriptDescriptor *ScriptDescriptor) LoadScripts(ctx context.Context, client *redis.Client, redisScriptDefinition string, db int) error
LoadScripts loads the scripts
type Scriptor ¶
type Scriptor struct { Client *redis.Client CTX context.Context // contains filtered or unexported fields }
Scriptor - the script manager
func FastInit ¶ added in v0.0.51
func FastInit(host string, port int, Password string, db int, poolSize int, scriptDB int, redisScriptDefinition string, scripts *map[string]string) (*Scriptor, error)
FastInit - create a new Scriptor with a new redis client
func New ¶
func New(client *redis.Client, scriptDB int, redisScriptDefinition string, scripts *map[string]string) (*Scriptor, error)
New - create a new scriptor with the redis client
func NewDB ¶
func NewDB(opt *Option, scriptDB int, redisScriptDefinition string, scripts *map[string]string) (*Scriptor, error)
NewDB - create a new Scriptor with a new redis client
Click to show internal directories.
Click to hide internal directories.