middlewares

package
v0.0.0-...-5fa593d Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbCheck

func DbCheck(next echo.HandlerFunc) echo.HandlerFunc

func RateLimitMiddleware

func RateLimitMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func ValidateJWT

func ValidateJWT(next echo.HandlerFunc) echo.HandlerFunc

Types

type RateLimiter

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

func NewRateLimiter

func NewRateLimiter(rate time.Duration, cleanupInterval time.Duration) *RateLimiter

func (*RateLimiter) IsAllowed

func (r *RateLimiter) IsAllowed(ip string) bool

func (*RateLimiter) StartCleanup

func (r *RateLimiter) StartCleanup()

Jump to

Keyboard shortcuts

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