redis

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	Client *goredis.Client
	Prefix string
}

func New

func New(client *goredis.Client, prefix string) *Store

func (*Store) Close

func (r *Store) Close() error

func (*Store) Del

func (r *Store) Del(ctx context.Context, keys ...string) error

func (*Store) Delete

func (r *Store) Delete(ctx context.Context, keys []string) error

func (*Store) Exists

func (r *Store) Exists(ctx context.Context, keys ...string) (int64, error)

func (*Store) Expire

func (r *Store) Expire(ctx context.Context, key string, ttl time.Duration) error

func (*Store) Get

func (r *Store) Get(ctx context.Context, key string) (string, error)

func (*Store) Gets

func (r *Store) Gets(ctx context.Context, keys []string) (map[string]string, []string)

func (*Store) Incr

func (r *Store) Incr(ctx context.Context, key string) (int64, error)

func (*Store) Set

func (r *Store) Set(ctx context.Context, key, value string, ttl time.Duration) error

func (*Store) Sets

func (r *Store) Sets(ctx context.Context, values map[string]string, ttl time.Duration) error

func (*Store) TTL

func (r *Store) TTL(ctx context.Context, key string) (time.Duration, error)

Jump to

Keyboard shortcuts

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