store

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisStore added in v1.0.2

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

func NewRedisStore

func NewRedisStore(client *redis.Client) *RedisStore

func (*RedisStore) Delete added in v1.0.2

func (s *RedisStore) Delete(ctx context.Context, keys ...string) error

func (*RedisStore) Get added in v1.0.2

func (s *RedisStore) Get(ctx context.Context, key string, dest any) error

func (*RedisStore) Keys added in v1.0.2

func (s *RedisStore) Keys(ctx context.Context, pattern string) ([]string, error)

func (*RedisStore) Scan added in v1.0.2

func (s *RedisStore) Scan(ctx context.Context, pattern string, count int64) ([]string, error)

func (*RedisStore) Set added in v1.0.2

func (s *RedisStore) Set(ctx context.Context, key string, value any, expIn time.Duration) error

type Store

type Store interface {
	Set(ctx context.Context, key string, value any, expIn time.Duration) error
	Get(ctx context.Context, key string, dest any) error
	Keys(ctx context.Context, pattern string) ([]string, error)
	Scan(ctx context.Context, pattern string, count int64) ([]string, error)
	Delete(ctx context.Context, keys ...string) error
}

Jump to

Keyboard shortcuts

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