redis

package
v0.0.0-...-46fdcb5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedis

func NewRedis(url string) *redis.Client

Types

type Cache

type Cache struct {
	model.Auth
	CreatedAt time.Time
}

type Client

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

func NewClient

func NewClient(url string) *Client

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, key string) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, key string) (model.Auth, error)

func (*Client) Set

func (c *Client) Set(ctx context.Context, key string, val model.Auth) error

type Redis

type Redis[T any] struct{}

func New

func New[T any]() *Redis[T]

func (*Redis[T]) Of

func (rds *Redis[T]) Of(
	client *redis.Client,
) (*kvs.KVS[T], error)

Jump to

Keyboard shortcuts

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