common

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERR_TOO_MANY_REQUESTS = errors.New("err_limit_exceeded")
)

Functions

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

func LimiterMiddleware

func LimiterMiddleware(limit int, period string, ipRateWhitelist *map[string]struct{}) gin.HandlerFunc

LimiterMiddleware period: "S"<Second>,"M"<Minute>,"H"<Hour>,"D"<Day>; limit: limit frequency

func NewMetricServer added in v1.0.6

func NewMetricServer()

func SandboxMiddleware added in v1.0.8

func SandboxMiddleware() gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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