Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Dec 23, 2023
1 parent a6b0371 commit e614096
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions object_store/src/gcp/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,17 @@ impl From<Error> for crate::Error {
}
}

/// Configure a connection to Google Cloud Storage using the specified
/// credentials.
/// Configure a connection to Google Cloud Storage.
///
/// If no credentials are explicitly provided, they will be sourced
/// from the environment as documented [here](https://cloud.google.com/docs/authentication/application-default-credentials).
///
/// # Example
/// ```
/// # let BUCKET_NAME = "foo";
/// # let SERVICE_ACCOUNT_PATH = "/tmp/foo.json";
/// # use object_store::gcp::GoogleCloudStorageBuilder;
/// let gcs = GoogleCloudStorageBuilder::new()
/// .with_service_account_path(SERVICE_ACCOUNT_PATH)
/// .with_bucket_name(BUCKET_NAME)
/// .build();
/// let gcs = GoogleCloudStorageBuilder::from_env().build();
/// ```
#[derive(Debug, Clone)]
pub struct GoogleCloudStorageBuilder {
Expand All @@ -107,7 +106,7 @@ pub struct GoogleCloudStorageBuilder {
retry_config: RetryConfig,
/// Client options
client_options: ClientOptions,
/// Credentials. Uses instance metadata credentials if not provided
/// Credentials
credentials: Option<GcpCredentialProvider>,
}

Expand Down Expand Up @@ -393,6 +392,7 @@ impl GoogleCloudStorageBuilder {
self
}

/// Set the credential provider overriding any other options
pub fn with_credentials(mut self, credentials: GcpCredentialProvider) -> Self {
self.credentials = Some(credentials);
self
Expand Down

0 comments on commit e614096

Please sign in to comment.