Skip to content

Commit

Permalink
remove publication field from source
Browse files Browse the repository at this point in the history
  • Loading branch information
imor committed Aug 29, 2024
1 parent 2fb746f commit bca76ee
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
5 changes: 0 additions & 5 deletions api/src/db/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ pub enum SourceConfig {

/// Postgres slot name
slot_name: String,

/// Postgres publication name
publication: String,
},
}

Expand All @@ -38,7 +35,6 @@ impl Debug for SourceConfig {
username,
password: _,
slot_name,
publication,
} => f
.debug_struct("Postgres")
.field("host", host)
Expand All @@ -47,7 +43,6 @@ impl Debug for SourceConfig {
.field("username", username)
.field("password", &"REDACTED")
.field("slot_name", slot_name)
.field("publication", publication)
.finish(),
}
}
Expand Down
2 changes: 0 additions & 2 deletions api/tests/api/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ fn new_source_config() -> SourceConfig {
username: "postgres".to_string(),
password: Some("postgres".to_string()),
slot_name: "slot".to_string(),
publication: "publication".to_string(),
}
}

Expand All @@ -29,7 +28,6 @@ fn updated_source_config() -> SourceConfig {
username: "sergtsop".to_string(),
password: Some("sergtsop".to_string()),
slot_name: "tols".to_string(),
publication: "noitacilbup".to_string(),
}
}

Expand Down
6 changes: 1 addition & 5 deletions cli/src/api_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ pub enum SourceConfig {

/// Postgres slot name
slot_name: String,

/// Postgres publication name
publication: String,
},
}

Expand All @@ -43,11 +40,10 @@ impl Display for SourceConfig {
username,
password,
slot_name,
publication,
} = self;
write!(
f,
"host: {host}, port: {port}, name: {name}, username: {username}, password: {password:?}, slot_name: {slot_name}, publication: {publication}",
"host: {host}, port: {port}, name: {name}, username: {username}, password: {password:?}, slot_name: {slot_name}",
)
}
}
Expand Down
2 changes: 0 additions & 2 deletions cli/src/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ fn get_source_config(editor: &mut DefaultEditor) -> Result<SourceConfig, CliErro
Some(password)
};
let slot_name = get_string(editor, "enter slot name: ")?;
let publication = get_string(editor, "enter publication: ")?;

Ok(SourceConfig::Postgres {
host,
Expand All @@ -95,7 +94,6 @@ fn get_source_config(editor: &mut DefaultEditor) -> Result<SourceConfig, CliErro
username,
password,
slot_name,
publication,
})
}

Expand Down

0 comments on commit bca76ee

Please sign in to comment.