middleware

package
v0.0.0-...-f6cc6f7 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IpThrottle

func IpThrottle(limiter *Limiter) func(http.Handler) http.Handler

IpThrottle is a middleware function that applies rate limiting to incoming requests on a per-IP address basis.

func Jwt

func Jwt() func(http.Handler) http.Handler

Types

type Limiter

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

func NewLimiter

func NewLimiter(limit int64, interval time.Duration) *Limiter

Jump to

Keyboard shortcuts

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