Documentation ¶
Index ¶
- func ValidateKeywords(keywords []string) error
- func ValidateRegex(regex map[string]string) error
- func ValidateRegexVars(regex map[string]string, body ...string) error
- func ValidateVerifyEndpoint(endpoint string, unsafe bool) error
- func ValidateVerifyHeaders(headers []string) error
- func ValidateVerifyRanges(ranges []string) error
- type CustomRegexWebhook
- func (c *CustomRegexWebhook) FromData(ctx context.Context, verify bool, data []byte) (results []detectors.Result, err error)
- func (c *CustomRegexWebhook) IsFalsePositive(_ detectors.Result) (bool, string)
- func (c *CustomRegexWebhook) Keywords() []string
- func (c *CustomRegexWebhook) Type() detectorspb.DetectorType
- type RegexVarString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateKeywords ¶
func ValidateRegex ¶
func ValidateVerifyEndpoint ¶
func ValidateVerifyHeaders ¶
func ValidateVerifyRanges ¶
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) 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
func (c *CustomRegexWebhook) Type() detectorspb.DetectorType
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
Click to show internal directories.
Click to hide internal directories.