- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for convertToPort (0.2 sec)
-
pilot/pkg/security/authz/model/util.go
matcherpb "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3" "istio.io/istio/pilot/pkg/security/authz/matcher" "istio.io/istio/pilot/pkg/xds/filters" ) // convertToPort converts a port string to a uint32. func convertToPort(v string) (uint32, error) { p, err := strconv.ParseUint(v, 10, 32) if err != nil || p > 65535 { return 0, fmt.Errorf("invalid port %s: %v", v, err) } return uint32(p), nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Mar 25 10:39:25 UTC 2024 - 3.4K bytes - Viewed (0) -
pilot/pkg/security/authz/model/util_test.go
V: "91234", Err: "invalid port 91234:", }, { Name: "valid port", V: "443", Expect: 443, }, } for _, tc := range testCases { actual, err := convertToPort(tc.V) if tc.Err != "" { if err == nil { t.Errorf("%s: expecting error %s but found no error", tc.Name, tc.Err) } else if !strings.HasPrefix(err.Error(), tc.Err) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Oct 30 00:00:33 UTC 2020 - 2.8K bytes - Viewed (0) -
pilot/pkg/security/authz/model/generator.go
return nil, fmt.Errorf("unimplemented") } type destPortGenerator struct{} func (destPortGenerator) permission(_, value string, _ bool) (*rbacpb.Permission, error) { portValue, err := convertToPort(value) if err != nil { return nil, err } return permissionDestinationPort(portValue), nil } func (destPortGenerator) principal(_, _ string, _ bool, _ bool) (*rbacpb.Principal, error) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri May 03 18:02:42 UTC 2024 - 14.1K bytes - Viewed (0)