custom_detectors

package
v3.88.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateKeywords

func ValidateKeywords(keywords []string) error

func ValidateRegex

func ValidateRegex(regex map[string]string) error

func ValidateRegexVars

func ValidateRegexVars(regex map[string]string, body ...string) error

func ValidateVerifyEndpoint

func ValidateVerifyEndpoint(endpoint string, unsafe bool) error

func ValidateVerifyHeaders

func ValidateVerifyHeaders(headers []string) error

func ValidateVerifyRanges

func ValidateVerifyRanges(ranges []string) error

Types

type CustomRegexWebhook added in v3.62.1

type CustomRegexWebhook struct {
	*custom_detectorspb.CustomRegex
}

CustomRegexWebhook is a CustomRegex with webhook validation that is guaranteed to be valid (assuming the data is not changed after initialization).

func NewWebhookCustomRegex added in v3.20.0

func NewWebhookCustomRegex(pb *custom_detectorspb.CustomRegex) (*CustomRegexWebhook, error)

NewWebhookCustomRegex initializes and validates a CustomRegexWebhook. An unexported type is intentionally returned here to ensure the values have been validated.

func (*CustomRegexWebhook) Description added in v3.82.4

func (c *CustomRegexWebhook) Description() string

func (*CustomRegexWebhook) FromData added in v3.62.1

func (c *CustomRegexWebhook) FromData(ctx context.Context, verify bool, data []byte) (results []detectors.Result, err error)

func (*CustomRegexWebhook) IsFalsePositive added in v3.75.0

func (c *CustomRegexWebhook) IsFalsePositive(_ detectors.Result) (bool, string)

func (*CustomRegexWebhook) Keywords added in v3.62.1

func (c *CustomRegexWebhook) Keywords() []string

func (*CustomRegexWebhook) Type added in v3.62.1

type RegexVarString

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

RegexVarString is a string with embedded {name.group} variables. A name may only contain alphanumeric, hyphen, and underscore characters. Group is optional but if provided it must be a non-negative integer. If the group is omitted it defaults to 0.

func NewRegexVarString

func NewRegexVarString(original string) RegexVarString

Jump to

Keyboard shortcuts

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