redis

package
v1.2.4-beta1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close pool

func Delete

func Delete(key any) *redis.Cmd

func DeleteM

func DeleteM(key any) error

DeleteM delete like all *key* values

func Do

func Do(args ...any) *redis.Cmd

Do command

func ExpireKey

func ExpireKey(key any, seconds int64) *redis.Cmd

ExpireKey for key

func Get

func Get(key any) *redis.Cmd

func GetMarshal

func GetMarshal(key any, v any) error

func Keys

func Keys(keys any) *redis.Cmd

func OpenRedis

func OpenRedis(option *Options)

OpenRedis open once redis client

func Set

func Set(key any, value any) *redis.Cmd

func SetMarshal

func SetMarshal(key any, data any) error

Types

type Options

type Options struct {
	redis.Options
}

type Redis

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

Redis is RDS struct

func GetRedis

func GetRedis() *Redis

func NewRedis

func NewRedis(option *Options) *Redis

NewRedis new redis

func (*Redis) Close

func (r *Redis) Close() error

Close pool

func (*Redis) Delete

func (r *Redis) Delete(key any) *redis.Cmd

func (*Redis) DeleteM

func (r *Redis) DeleteM(key any) error

DeleteM delete like all *key* values

func (*Redis) Do

func (r *Redis) Do(args ...any) *redis.Cmd

Do command

func (*Redis) ExpireKey

func (r *Redis) ExpireKey(key any, seconds int64) *redis.Cmd

ExpireKey for key

func (*Redis) Get

func (r *Redis) Get(key any) *redis.Cmd

func (*Redis) GetMarshal

func (r *Redis) GetMarshal(key any, v any) error

func (*Redis) Keys

func (r *Redis) Keys(keys any) *redis.Cmd

func (*Redis) Set

func (r *Redis) Set(key any, value any) *redis.Cmd

func (*Redis) SetMarshal

func (r *Redis) SetMarshal(key any, data any) error

Jump to

Keyboard shortcuts

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