From 29c88d1b7e3a5e22234edf1a687124be2b5ef031 Mon Sep 17 00:00:00 2001 From: Jonathan Solomon Date: Wed, 25 Jun 2025 17:11:59 -0700 Subject: [PATCH] Add operator field to SearchIndex query struct --- examples/rekor/search_index/main.rs | 1 + src/rekor/models/search_index.rs | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/examples/rekor/search_index/main.rs b/examples/rekor/search_index/main.rs index 9e1c91be44..118dc1965b 100644 --- a/examples/rekor/search_index/main.rs +++ b/examples/rekor/search_index/main.rs @@ -109,6 +109,7 @@ async fn main() { .unwrap_or(&HASH.to_string()) .to_owned(), ), + operator: None, }; let configuration = Configuration::default(); diff --git a/src/rekor/models/search_index.rs b/src/rekor/models/search_index.rs index 63586fddac..4f848fee45 100644 --- a/src/rekor/models/search_index.rs +++ b/src/rekor/models/search_index.rs @@ -18,6 +18,8 @@ pub struct SearchIndex { pub public_key: Option, #[serde(rename = "hash", skip_serializing_if = "Option::is_none")] pub hash: Option, + #[serde(rename = "operator", skip_serializing_if = "Option::is_none")] + pub operator: Option, } impl SearchIndex { @@ -26,6 +28,15 @@ impl SearchIndex { email: None, public_key: None, hash: None, + operator: None, } } } + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Operator { + #[serde(rename = "and")] + And, + #[serde(rename = "or")] + Or, +}