job_request.rs (1174B)
1 use crate::job::JobInputType; 2 3 #[cfg(not(feature = "std"))] 4 use alloc::{string::String, vec::Vec}; 5 6 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] 7 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 8 #[derive(Clone, Debug, PartialEq, Eq)] 9 pub struct RadrootsJobInput { 10 pub data: String, 11 pub input_type: JobInputType, 12 pub relay: Option<String>, 13 pub marker: Option<String>, 14 } 15 16 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] 17 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 18 #[derive(Clone, Debug, PartialEq, Eq)] 19 pub struct RadrootsJobParam { 20 pub key: String, 21 pub value: String, 22 } 23 24 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] 25 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 26 #[derive(Clone, Debug, PartialEq, Eq)] 27 pub struct RadrootsJobRequest { 28 pub kind: u16, 29 pub inputs: Vec<RadrootsJobInput>, 30 pub output: Option<String>, 31 pub params: Vec<RadrootsJobParam>, 32 pub bid_sat: Option<u32>, 33 pub relays: Vec<String>, 34 pub providers: Vec<String>, 35 pub topics: Vec<String>, 36 pub encrypted: bool, 37 }