redis

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotFound = errors.New("Redis does not contain key")
	ErrInvalidURL  = errors.New("Not a valid url")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config *Config) (*Client, error)

create redis client

func (*Client) Find

func (client *Client) Find(id string) (string, error)

find value pair by key

func (*Client) Set

func (client *Client) Set(url string) (string, error)

set key-value pair

type Config

type Config struct {
	Addr       string
	Password   string
	DB         int
	MaxRetries int
}

Custom config

Jump to

Keyboard shortcuts

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