storage

package
v0.0.0-...-deac0d6 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT 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(options *redis.Options) (*RedisClient, error)

func (*RedisClient) GetRequestCount

func (r *RedisClient) GetRequestCount(identifier string) (int, error)

func (*RedisClient) IncrementRequestCount

func (r *RedisClient) IncrementRequestCount(identifier string, expiry time.Duration) (int, error)

type StorageInterface

type StorageInterface interface {
	IncrementRequestCount(identifier string, expiry time.Duration) (int, error)
	GetRequestCount(identifier string) (int, error)
}

Jump to

Keyboard shortcuts

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