store

package
v0.0.0-...-f828163 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

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

func NewRedisClient

func NewRedisClient(settings config.RedisSettings) *RedisClient

func (*RedisClient) Close

func (r *RedisClient) Close() error

func (*RedisClient) Delete

func (r *RedisClient) Delete(key string) error

func (*RedisClient) Get

func (r *RedisClient) Get(key string) ([]byte, error)

func (*RedisClient) Reset

func (r *RedisClient) Reset() error

func (*RedisClient) Set

func (r *RedisClient) Set(key string, val []byte, exp time.Duration) error

type Storer

type Storer interface {
	Get(key string) ([]byte, error)
	Set(key string, val []byte, exp time.Duration) error
	Delete(key string) error
	Reset() error
	Close() error
}

an implementation of https://github.com/gofiber/storage

type Stores

type Stores struct {
	Limiter Storer
}

func ConfigureStores

func ConfigureStores(limiter config.RedisSettings) *Stores

Jump to

Keyboard shortcuts

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