Skip to content

Commit

Permalink
feat(BE): Get list of schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewinci committed Sep 25, 2022
1 parent 7ce0a36 commit 549102e
Show file tree
Hide file tree
Showing 9 changed files with 290 additions and 14 deletions.
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ node_modules
target
yarn.lock
.husky
.prettierignore
.prettierignore
Cargo.lock
Cargo.toml
234 changes: 234 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ dirs = "4.0.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.1", features = ["api-all"] }
rdkafka = { version = "0.27", features = ["cmake-build", "ssl-vendored"] }

reqwest = { version = "0.11", features = ["json"] }
tokio = { version = "1", features = ["full"] }

[features]
# by default Tauri runs in production mode
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/configuration/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub enum Authentication {

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SchemaRegistry {
endpoint: String,
username: Option<String>,
password: Option<String>,
pub endpoint: String,
pub username: Option<String>,
pub password: Option<String>,
}
9 changes: 9 additions & 0 deletions src-tauri/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,13 @@ impl From<KafkaError> for TauriError {
message: error.to_string(),
}
}
}

impl From<reqwest::Error> for TauriError {
fn from(error: reqwest::Error) -> Self {
TauriError {
error_type: "HTTP client error".to_owned(),
message: error.to_string(),
}
}
}
Loading

0 comments on commit 549102e

Please sign in to comment.