blackmwk commented on code in PR #3106:
URL: https://github.com/apache/iceberg-rust/pull/3106#discussion_r4399440606
##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -181,72 +184,114 @@ impl RestCatalogBuilder {
}
}
-/// Rest catalog configuration.
-#[derive(Clone, TypedBuilder)]
-pub(crate) struct RestCatalogConfig {
- #[builder(default, setter(strip_option))]
- name: Option<String>,
-
+/// Typed REST catalog properties.
+#[derive(Clone, Properties, PartialEq, Eq)]
+pub(crate) struct RestCatalogProperties {
Review Comment:
I prefer to add getter for all fields.
##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -181,72 +184,114 @@ impl RestCatalogBuilder {
}
}
-/// Rest catalog configuration.
-#[derive(Clone, TypedBuilder)]
-pub(crate) struct RestCatalogConfig {
- #[builder(default, setter(strip_option))]
- name: Option<String>,
-
+/// Typed REST catalog properties.
+#[derive(Clone, Properties, PartialEq, Eq)]
+pub(crate) struct RestCatalogProperties {
+ /// Catalog URI.
+ #[property(key = REST_CATALOG_PROP_URI, default = "", getter)]
uri: String,
-
- #[builder(default, setter(strip_option(fallback = warehouse_opt)))]
+ #[property(key = REST_CATALOG_PROP_WAREHOUSE, default = None)]
warehouse: Option<String>,
+ #[property(key = "prefix", default = None)]
+ prefix: Option<String>,
+ #[property(key = REST_CATALOG_PROP_AUTH_TYPE, default = None)]
+ auth_type: Option<AuthType>,
+ /// Configured bearer token.
+ #[property(key = "token", default = None, parse_with =
parse_sensitive_string, getter)]
+ token: Option<SensitiveString>,
+ /// Configured OAuth2 client ID and secret.
+ #[property(key = "credential", default = None, parse_with =
parse_credential, getter)]
+ credential: Option<(Option<String>, SensitiveString)>,
Review Comment:
I want an inner struct for it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]