redisutils

package
v0.0.0-...-7a64a06 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func AllAsType

func AllAsType[T interface{}](all []interface{}) ([]T, error)

func DefaultAddress

func DefaultAddress() string

Types

type Client

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

func NewClient

func NewClient(address string, password string, tls *tls.Config, timeout time.Duration) (*Client, error)

func (*Client) Delete

func (c *Client) Delete(key Key) error

func (*Client) Get

func (c *Client) Get(key Key, value interface{}) (bool, error)

func (*Client) GetAll

func (c *Client) GetAll(key Key, value interface{}) ([]interface{}, error)

func (*Client) Set

func (c *Client) Set(key Key, value interface{}, ttl time.Duration) error

func (*Client) SetNoTtl

func (c *Client) SetNoTtl(key Key, value interface{}, ttl time.Duration) error

type Key

type Key []string

func (*Key) String

func (k *Key) String() string

Jump to

Keyboard shortcuts

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