engine

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Field string
	Value interface{}
}

type GoRedisClient

type GoRedisClient struct {
	*redis.Client
}

func (*GoRedisClient) GET

func (c *GoRedisClient) GET(ctx context.Context, key string) (string, error)

func (*GoRedisClient) HGET

func (c *GoRedisClient) HGET(ctx context.Context, key string, field string) (string, error)

func (*GoRedisClient) HGETALL

func (c *GoRedisClient) HGETALL(ctx context.Context, key string) (map[string]string, error)

func (*GoRedisClient) HSET

func (c *GoRedisClient) HSET(ctx context.Context, key string, fields map[string]string) error

func (*GoRedisClient) SET

func (c *GoRedisClient) SET(ctx context.Context, key string, val interface{}, exp time.Duration) error

type Interface

type Interface interface {
	GET(ctx context.Context, key string) (string, error)
	SET(ctx context.Context, key string, val interface{}, exp time.Duration) error
	HSET(ctx context.Context, key string, fields map[string]string) error
	HGET(ctx context.Context, key string, field string) (string, error)
	HGETALL(ctx context.Context, key string) (map[string]string, error)
}

func NewGoRedisClient

func NewGoRedisClient(opt *redis.Options) (Interface, error)

Jump to

Keyboard shortcuts

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