pkg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(cfg RedisConfig) *redis.Client

func NewIdempotencyMiddleware

func NewIdempotencyMiddleware(redisClient *redis.Client, opt Option) echo.MiddlewareFunc

Types

type Config

type Config struct {
	Redis       RedisConfig
	Idempotency IdempotencyConfig
}

func LoadConfig

func LoadConfig(expirationTime int, headerKey string) Config

type IdempotencyConfig

type IdempotencyConfig struct {
	HeaderKey      string
	ExpirationTime time.Duration
}

type Option

type Option struct {
	HeaderKey      string
	ExpirationTime time.Duration
}

type RedisConfig

type RedisConfig struct {
	Address  string
	Password string
	DB       int
}

Jump to

Keyboard shortcuts

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