redis

package
v0.0.0-...-1814500 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enable bool   `conf:"enable"`
	URL    string `conf:"url"`
}

type Redis

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

func New

func New(ctx context.Context, cfg Config) (*Redis, error)

func (Redis) Decrement

func (rdb Redis) Decrement(ctx context.Context, key string, val int64) error

func (Redis) Delete

func (rdb Redis) Delete(ctx context.Context, key string) error

func (Redis) Expire

func (rdb Redis) Expire(ctx context.Context, key string, exp time.Duration) error

func (Redis) GetBytes

func (rdb Redis) GetBytes(ctx context.Context, key string) ([]byte, error)

func (Redis) GetInt

func (rdb Redis) GetInt(ctx context.Context, key string) (int, error)

func (Redis) GetUint

func (rdb Redis) GetUint(ctx context.Context, key string) (uint, error)

func (Redis) GobGet

func (rdb Redis) GobGet(ctx context.Context, key string, v any) error

func (Redis) GobSet

func (rdb Redis) GobSet(ctx context.Context, key string, v any, exp time.Duration) error

func (Redis) Increment

func (rdb Redis) Increment(ctx context.Context, key string, val int64) error

func (Redis) Set

func (rdb Redis) Set(ctx context.Context, key string, val any, exp time.Duration) error

Jump to

Keyboard shortcuts

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