Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: fix typo customed should be customized #4847

Merged
merged 3 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions core/Cargo.lock

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

2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ sha1 = { version = "0.10.6", optional = true }
sha2 = { version = "0.10", optional = true }

# For http based services.
reqsign = { version = "0.15.2", default-features = false, optional = true }
reqsign = { version = "0.16", default-features = false, optional = true }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fine now @Xuanwo


# for services-atomic-server
atomic_lib = { version = "0.34.5", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion core/src/docs/rfcs/3197_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ pub struct S3Config {
pub struct S3Builder {
config: S3Config,

customed_credential_load: Option<Box<dyn AwsCredentialLoad>>,
customized_credential_load: Option<Box<dyn AwsCredentialLoad>>,
http_client: Option<HttpClient>,
}
```
Expand Down
12 changes: 6 additions & 6 deletions core/src/services/gcs/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub struct GcsBuilder {
config: GcsConfig,

http_client: Option<HttpClient>,
customed_token_loader: Option<Box<dyn GoogleTokenLoad>>,
customized_token_loader: Option<Box<dyn GoogleTokenLoad>>,
}

impl Debug for GcsBuilder {
Expand Down Expand Up @@ -189,9 +189,9 @@ impl GcsBuilder {
self
}

/// Specify the customed token loader used by this service.
pub fn customed_token_loader(&mut self, token_load: Box<dyn GoogleTokenLoad>) -> &mut Self {
self.customed_token_loader = Some(token_load);
/// Specify the customized token loader used by this service.
pub fn customized_token_loader(&mut self, token_load: Box<dyn GoogleTokenLoad>) -> &mut Self {
self.customized_token_loader = Some(token_load);
self
}

Expand Down Expand Up @@ -300,8 +300,8 @@ impl Builder for GcsBuilder {
if let Ok(Some(cred)) = cred_loader.load() {
token_loader = token_loader.with_credentials(cred)
}
if let Some(loader) = self.customed_token_loader.take() {
token_loader = token_loader.with_customed_token_loader(loader)
if let Some(loader) = self.customized_token_loader.take() {
token_loader = token_loader.with_customized_token_loader(loader)
}

let signer = GoogleSigner::new("storage");
Expand Down
2 changes: 1 addition & 1 deletion core/src/services/gcs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ OpenDAL supports the following authentication options:
4. Fetch access token from [VM metadata](https://cloud.google.com/docs/authentication/rest#metadata-server)
- Only works when running inside Google Cloud.
- If a non-default Service Account name is required, set with `service_account`. Otherwise, nothing need to be set.
5. A custom `TokenLoader` via `GcsBuilder.customed_token_loader()`
5. A custom `TokenLoader` via `GcsBuilder.customized_token_loader()`

Notes:

Expand Down
16 changes: 8 additions & 8 deletions core/src/services/s3/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl Debug for S3Config {
pub struct S3Builder {
config: S3Config,

customed_credential_load: Option<Box<dyn AwsCredentialLoad>>,
customized_credential_load: Option<Box<dyn AwsCredentialLoad>>,
http_client: Option<HttpClient>,
}

Expand Down Expand Up @@ -577,12 +577,12 @@ impl S3Builder {
self
}

/// Adding a customed credential load for service.
/// Adding a customized credential load for service.
///
/// If customed_credential_load has been set, we will ignore all other
/// If customized_credential_load has been set, we will ignore all other
/// credential load methods.
pub fn customed_credential_load(&mut self, cred: Box<dyn AwsCredentialLoad>) -> &mut Self {
self.customed_credential_load = Some(cred);
pub fn customized_credential_load(&mut self, cred: Box<dyn AwsCredentialLoad>) -> &mut Self {
self.customized_credential_load = Some(cred);
self
}

Expand Down Expand Up @@ -805,7 +805,7 @@ impl Builder for S3Builder {

S3Builder {
config,
customed_credential_load: None,
customized_credential_load: None,
http_client: None,
}
}
Expand Down Expand Up @@ -935,8 +935,8 @@ impl Builder for S3Builder {
}

let mut loader: Option<Box<dyn AwsCredentialLoad>> = None;
// If customed_credential_load is set, we will use it.
if let Some(v) = self.customed_credential_load.take() {
// If customized_credential_load is set, we will use it.
if let Some(v) = self.customized_credential_load.take() {
loader = Some(v);
}

Expand Down
Loading