redis

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost = "localhost"
	DefaultPort = 6379
	DefaultDB   = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func New

func New(log *logger.Service, host string, port int, user, pass string, db int) *Service

func (*Service) Close

func (c *Service) Close() error

func (*Service) Delete

func (c *Service) Delete(ctx context.Context, keys ...string) error

func (*Service) DeletePattern

func (c *Service) DeletePattern(ctx context.Context, pattern string) error

func (*Service) Exists

func (s *Service) Exists(ctx context.Context, key string) bool

func (*Service) Flush

func (c *Service) Flush(ctx context.Context) (string, error)

func (*Service) Get

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

func (*Service) GetBytes

func (s *Service) GetBytes(ctx context.Context, key string) ([]byte, error)

func (*Service) GetFloat

func (s *Service) GetFloat(ctx context.Context, key string) (float64, error)

func (*Service) GetInt

func (s *Service) GetInt(ctx context.Context, key string) (int, error)

func (*Service) GetString

func (s *Service) GetString(ctx context.Context, key string) (string, error)

func (*Service) Keys

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

func (*Service) Set

func (c *Service) Set(ctx context.Context, key string, value any, expiration time.Duration) error

Jump to

Keyboard shortcuts

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