rule

package
v1.45.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRules

func CheckRules(ruleIds []string, r *http.Request) (*object.Action, string, error)

Types

type CompoundRule added in v1.33.0

type CompoundRule struct{}

type IpRateLimiter added in v1.29.0

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

func NewIpRateLimiter added in v1.29.0

func NewIpRateLimiter(r rate.Limit, b int) *IpRateLimiter

NewIpRateLimiter .

func (*IpRateLimiter) AddIP added in v1.29.0

func (i *IpRateLimiter) AddIP(ip string) *rate.Limiter

AddIP creates a new rate limiter and adds it to the ips map, using the IP address as the key

func (*IpRateLimiter) GetLimiter added in v1.29.0

func (i *IpRateLimiter) GetLimiter(ip string) *rate.Limiter

GetLimiter returns the rate limiter for the provided IP address if it exists. Otherwise, calls AddIP to add IP address to the map

type IpRateRule added in v1.29.0

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

type IpRule added in v1.18.0

type IpRule struct{}

type Rule

type Rule interface {
	// contains filtered or unexported methods
}

type UaRule

type UaRule struct{}

type WafRule added in v1.20.0

type WafRule struct{}

Jump to

Keyboard shortcuts

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