(_protocol: &str, allow: L7AllowDef)
| 497 | } |
| 498 | |
| 499 | fn allow_def_to_proto(_protocol: &str, allow: L7AllowDef) -> L7Allow { |
| 500 | let params = flatten_param_matchers(params_with_tool(allow.params, allow.tool)); |
| 501 | L7Allow { |
| 502 | method: allow.method, |
| 503 | path: allow.path, |
| 504 | command: allow.command, |
| 505 | operation_type: allow.operation_type, |
| 506 | operation_name: allow.operation_name, |
| 507 | fields: allow.fields, |
| 508 | query: allow |
| 509 | .query |
| 510 | .into_iter() |
| 511 | .map(|(key, matcher)| (key, matcher_def_to_proto(matcher))) |
| 512 | .collect(), |
| 513 | params: params |
| 514 | .into_iter() |
| 515 | .map(|(key, matcher)| (key, matcher_def_to_proto(matcher))) |
| 516 | .collect(), |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | fn deny_def_to_proto(_protocol: &str, deny: L7DenyRuleDef) -> L7DenyRule { |
| 521 | let params = flatten_param_matchers(params_with_tool(deny.params, deny.tool)); |
no test coverage detected