middleware

package
v0.0.0-...-1f40810 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlowLimit

func FlowLimit(maxRequestSleepNum, maxRequestNum int64, sleepTime []time.Duration) (func(ctx *gin.Context), func(int64, int64, []time.Duration))

func IpLimit

func IpLimit(num int64) (func(ctx *gin.Context), func(int64))

func RecoverAndSendMail

func RecoverAndSendMail(w io.Writer) func(ctx *gin.Context)

func SearchLimit

func SearchLimit(num int64) func(ctx *gin.Context)

func SetStaticFileCache

func SetStaticFileCache(c *gin.Context)

func ValidateServerNames

func ValidateServerNames() func(ctx *gin.Context)

Types

type IpLimitMap

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

Jump to

Keyboard shortcuts

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