storage

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 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 RedisService

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

RedisService wraps the Redis client

func NewRedisService

func NewRedisService(ip, port, password string, db int) *RedisService

NewRedisService initializes a RedisService// NewRedisService initializes a RedisService

func (*RedisService) CreateRedisHash

func (r *RedisService) CreateRedisHash(ctx context.Context, key string) error

func (*RedisService) FetchFromRedisHash

func (r *RedisService) FetchFromRedisHash(ctx context.Context, key string) (map[string]string, error)

Fetch data from Redis hash set// Fetch data from Redis hash set

func (*RedisService) PushToList added in v1.1.6

func (r *RedisService) PushToList(ctx context.Context, key string, value interface{}, ttl time.Duration) error

func (*RedisService) SaveToRedisHash

func (r *RedisService) SaveToRedisHash(ctx context.Context, key string, data map[string]string, ttl time.Duration) error

Jump to

Keyboard shortcuts

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