Skip to content

Commit

Permalink
Remove FlowSyncMode from nexus
Browse files Browse the repository at this point in the history
Unused since we removed option
  • Loading branch information
serprex committed Mar 11, 2024
1 parent 921b157 commit 66078c9
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions nexus/pt/src/flow_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,6 @@ pub struct FlowJobTableMapping {
pub exclude: Vec<String>,
}

#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
pub enum FlowSyncMode {
Avro,
SQL,
}

impl FlowSyncMode {
pub fn parse_string(s: &str) -> Result<FlowSyncMode, String> {
match s {
"avro" => Ok(FlowSyncMode::Avro),
"sql" => Ok(FlowSyncMode::SQL),
_ => Err(format!("{} is not a valid FlowSyncMode", s)),
}
}
}

impl std::str::FromStr for FlowSyncMode {
type Err = String;

fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"avro" => Ok(FlowSyncMode::Avro),
"default" => Ok(FlowSyncMode::SQL),
_ => Err(format!("{} is not a valid FlowSyncMode", s)),
}
}
}

impl ToString for FlowSyncMode {
fn to_string(&self) -> String {
match self {
FlowSyncMode::Avro => "avro".to_string(),
FlowSyncMode::SQL => "default".to_string(),
}
}
}

#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone)]
pub struct FlowJob {
pub name: String,
Expand Down

0 comments on commit 66078c9

Please sign in to comment.