redis

package
v0.0.0-...-258f086 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

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

func New

func New(conf *redis.Options) *Redis

func (*Redis) Close

func (r *Redis) Close() error

func (*Redis) Del

func (r *Redis) Del(key string) (int64, error)

func (*Redis) Get

func (r *Redis) Get(key string) (string, error)

func (*Redis) HDel

func (r *Redis) HDel(key string, fields ...string) (int64, error)

func (*Redis) HExists

func (r *Redis) HExists(key string, field string) bool

func (*Redis) HGet

func (r *Redis) HGet(key string, field string, result interface{}) error

func (*Redis) HGetAll

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

func (*Redis) HGetString

func (r *Redis) HGetString(key string, field string) (string, error)

func (*Redis) HSet

func (r *Redis) HSet(key string, value interface{}) (int64, error)

func (*Redis) Has

func (r *Redis) Has(key string) (int64, error)

func (*Redis) Keys

func (r *Redis) Keys(pattern string) ([]string, error)

func (*Redis) LLen

func (r *Redis) LLen(key string) (int64, error)

func (*Redis) LPos

func (r *Redis) LPos(key, element string) (int64, error)

func (*Redis) LRange

func (r *Redis) LRange(key string) ([]string, error)

func (*Redis) LRangeWithStartAndMAx

func (r *Redis) LRangeWithStartAndMAx(key string, start int64, max int64) ([]string, error)

func (*Redis) ListPopCount

func (r *Redis) ListPopCount(key string, count int) ([]string, error)

func (*Redis) ListRange

func (r *Redis) ListRange(key string, start, stop int64) ([]string, error)

func (*Redis) RPush

func (r *Redis) RPush(key string, value string) (int64, error)

func (*Redis) RPushArray

func (r *Redis) RPushArray(key string, value ...interface{}) (int64, error)

func (*Redis) Set

func (r *Redis) Set(key string, value interface{}, expiration ...int) (string, error)

func (*Redis) SetContext

func (r *Redis) SetContext(ctx2 context.Context)

Jump to

Keyboard shortcuts

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