Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Complete Azure storage REST API #73

Open
1 of 15 tasks
MindFlavor opened this issue Aug 12, 2018 · 5 comments
Open
1 of 15 tasks

Complete Azure storage REST API #73

MindFlavor opened this issue Aug 12, 2018 · 5 comments

Comments

@MindFlavor
Copy link
Owner

MindFlavor commented Aug 12, 2018

This will be done after #61:

@mpbraendli
Copy link

Hello, I've been using your blob functionality successfully, although my usage was only storing blobs. I now need to use Copy Blob From URL

How can I help you implement this API into the SDK?

I guess the first step is to create a new request in "AzureSDKForRust/azure_sdk_storage_blob/src/blob/requests". Is it fine for you if I start looking into it?

@MindFlavor
Copy link
Owner Author

Yes of course, any help is appreciated! I might be able to take a break from the Cosmos create now (I've been focusing on than lately) and tackle this but I cannot guarantee on the timeline!

As for your question, in order to extend the crate you need:

  1. Create the corresponding request (in your case in blob/request). You can use the bpb tool if you want to start from the json and save yourself a lot of boilerplate code.
  2. Create the corresponding response (in your case in blob/responses). Check other responses for a template.
  3. Have the finalize function return a Result<your_response_from_point_2, AzureError>. Make sure to pass the mandatory and optional headers and construct the URI properly (that's the hard part).
  4. Add the signature to the correct trait (in your case Blob trait in lib.rs).
  5. Implement the trait function in the Client just returning the generator created at point 1.

After that you should be able to use your function in your code!

@MindFlavor
Copy link
Owner Author

This PR should give you the function you need: #258. It's almost done, I just need to fix the crate version and I will merge it.

@MindFlavor
Copy link
Owner Author

@mpbraendli
Copy link

Really cool, thank you so much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants