- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ValidateAttribute (0.26 sec)
-
pkg/config/security/security_test.go
{ key: "experimental.envoy.filters.a.b.x", values: []string{"value"}, wantError: true, }, } for _, c := range cases { err := security.ValidateAttribute(c.key, c.values) if c.wantError == (err == nil) { t.Fatalf("ValidateAttribute(%s): want error (%v) but got (%v)", c.key, c.wantError, err) } } } func TestCheckValidPathTemplate(t *testing.T) { cases := []struct { name string
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Apr 20 01:58:53 UTC 2024 - 8.3K bytes - Viewed (0) -
pkg/config/security/security.go
func ContainsPathTemplate(value string) bool { return strings.Contains(value, MatchOneTemplate) || strings.Contains(value, MatchAnyTemplate) } func ValidateAttribute(key string, values []string) error { if err := CheckEmptyValues(key, values); err != nil { return err } switch { case hasPrefix(key, attrRequestHeader): return validateMapKey(key)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jun 07 04:43:34 UTC 2024 - 9.4K bytes - Viewed (0) -
pkg/config/validation/validation.go
key)) } else { if err := security.ValidateAttribute(key, condition.GetValues()); err != nil { errs = appendErrors(errs, fmt.Errorf("invalid `value` for `key` %s: %v", key, err)) } if err := security.ValidateAttribute(key, condition.GetNotValues()); err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 12 04:03:33 UTC 2024 - 107.2K bytes - Viewed (0)