Skip to content

Commit

Permalink
test: Cleanup and test completed for getter migration use cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinodsathyaseelan committed Oct 17, 2024
1 parent df66b32 commit 012f12d
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 272 deletions.
1 change: 0 additions & 1 deletion core/main/src/broker/endpoint_broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,6 @@ fn apply_filter(broker_request: &BrokerRequest, result: &Value, rpc_request: &Rp
&filter,
format!("{}_event filter", rpc_request.ctx.method),
) {
println!("apply_filter: {:?}", r);
if r.is_null() {
return false;
} else {
Expand Down
6 changes: 6 additions & 0 deletions core/main/src/broker/rules_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,21 @@ pub struct Rule {
// Not every rule needs transform
#[serde(default)]
pub transform: RuleTransform,
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint: Option<String>,
}

#[derive(Debug, Clone, Deserialize, Default, Serialize)]
pub struct RuleTransform {
#[serde(skip_serializing_if = "Option::is_none")]
pub request: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub response: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub event: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub event_decorator_method: Option<String>,
}

Expand Down
Loading

0 comments on commit 012f12d

Please sign in to comment.