tustvold commented on code in PR #4876:
URL: https://github.com/apache/arrow-rs/pull/4876#discussion_r1350210330


##########
object_store/Cargo.toml:
##########
@@ -45,6 +45,7 @@ walkdir = "2"
 
 # Cloud storage support
 base64 = { version = "0.21", default-features = false, features = ["std"], 
optional = true }
+http = { version = "0.2", default_features = false, optional = true }

Review Comment:
   FWIW reqwest re-exports `http::Method` which appears to be the only thing 
this is used for



##########
object_store/src/aws/mod.rs:
##########
@@ -209,6 +210,65 @@ impl AmazonS3 {
     pub fn credentials(&self) -> &AwsCredentialProvider {
         &self.client.config().credentials
     }
+
+    /// Create a full URL to the resource specified by `path` with this 
instance's configuration.
+    fn path_url(&self, path: &Path) -> String {
+        self.client.config().path_url(path)
+    }
+}
+
+#[async_trait]
+impl Signer for AmazonS3 {
+    /// Create a URL containing the relevant [AWS SigV4] query parameters that 
authorize a request
+    /// via `method` to the resource at `path` valid for the duration 
specified in `expires_in`.
+    ///
+    /// [AWS SigV4]: 
https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html
+    ///
+    /// # Example
+    ///
+    /// This example returns a URL that will enable a user to upload a file to
+    /// "some-folder/some-file.txt" in the next hour.
+    ///
+    /// ```
+    /// # async fn example() -> Result<(), Box<dyn std::error::Error>> {
+    /// use object_store::{aws::AmazonS3Builder, path::Path, signer::Signer};
+    /// use http::Method;
+    /// use std::time::Duration;
+    ///

Review Comment:
   ```suggestion
       /// # use object_store::{aws::AmazonS3Builder, path::Path, 
signer::Signer};
       /// # use http::Method;
       /// # use std::time::Duration;
       /// #
   ```



-- 
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]

Reply via email to