From 1b8c6886f6d22f9c61e978b42d066dce91e334dc Mon Sep 17 00:00:00 2001 From: rtkay123 Date: Thu, 14 Aug 2025 18:05:07 +0200 Subject: feat(config): rule grpc --- crates/configuration/src/state/rule.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 crates/configuration/src/state/rule.rs (limited to 'crates/configuration/src/state/rule.rs') diff --git a/crates/configuration/src/state/rule.rs b/crates/configuration/src/state/rule.rs new file mode 100644 index 0000000..4038865 --- /dev/null +++ b/crates/configuration/src/state/rule.rs @@ -0,0 +1,24 @@ +use uuid::Uuid; +use warden_core::configuration::rule::{RuleConfiguration, RuleConfigurationRequest}; + +use crate::state::cache_key::CacheKey; + +mod mutate_rule; +mod query_rule; + +#[allow(dead_code)] +pub struct RuleRow { + pub uuid: Uuid, + pub id: Option, + pub version: Option, + pub configuration: sqlx::types::Json, +} + +impl<'a> From<&'a RuleConfigurationRequest> for CacheKey<'a> { + fn from(value: &'a RuleConfigurationRequest) -> Self { + Self::Rule { + id: &value.id, + version: &value.version, + } + } +} -- cgit v1.2.3