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

refactor: Passing OpXxxx instead of content_type, cache_control,... in functions #3064

Closed
13 tasks done
Xuanwo opened this issue Sep 14, 2023 · 18 comments
Closed
13 tasks done
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Sep 14, 2023

OpenDAL used to passing content_type, cache_control directly like the following:

pub fn azblob_put_blob_request(
    &self,
    path: &str,
    size: Option<u64>,
    content_type: Option<&str>,
    cache_control: Option<&str>,
    body: AsyncBody,
) -> Result<Request<AsyncBody>> {}

It's not good and hard to maintain, sometimes clippy will raising warning for our code. So it's time for us to migrate code like this to passing OpXxx. For example, we can change the previous code to:

pub fn azblob_put_blob_request(
    &self,
    path: &str,
    size: Option<u64>,
-   content_type: Option<&str>,
-   cache_control: Option<&str>,
+   args: &OpWrite,
    body: AsyncBody,
) -> Result<Request<AsyncBody>> {}

Tasks

@Xuanwo Xuanwo added good first issue Good for newcomers help wanted Extra attention is needed labels Sep 14, 2023
@cxorm
Copy link
Member

cxorm commented Sep 14, 2023

Hi @Xuanwo ,
If you don't mind,
could I take this issue and I would take some time to investigate it?

@Xuanwo
Copy link
Member Author

Xuanwo commented Sep 14, 2023

Could I take this issue and I would take some time to investigate it if you don't mind ?

How about selecting a service that allows others to work concurrently with you?

@cxorm
Copy link
Member

cxorm commented Sep 14, 2023

Could I take this issue and I would take some time to investigate it if you don't mind ?

How about selecting a service that allows others to work concurrently with you?

Thank you for the reminder,
I want to do webhdfs first.

@Xuanwo
Copy link
Member Author

Xuanwo commented Sep 14, 2023

I want to do webhdfs first.

Great, I have marked webhdfs for you. Have fun!

@miroim
Copy link
Contributor

miroim commented Sep 14, 2023

Hi, @Xuanwo
May I have a try the http.

@sunheyi6
Copy link
Contributor

Hi,@Xuanwo
I want to s3

@Xuanwo
Copy link
Member Author

Xuanwo commented Sep 14, 2023

@miroim & @sunheyi6, DONE.

@ImSingee
Copy link
Contributor

So interesting form! I want to try dropbox

@acehinnnqru
Copy link
Contributor

I want to try: azblob

@dqhl76
Copy link
Member

dqhl76 commented Sep 14, 2023

I want to try: azblob

Cool, have fun!

@liul85
Copy link
Contributor

liul85 commented Sep 14, 2023

Hi @Xuanwo I will take azdls

@sysu-yunz
Copy link
Contributor

Can I have a chance to contribute? I want to try oss.

@acehinnnqru
Copy link
Contributor

I want to try: azblob

I also done: cos

@hanxuanliang
Copy link
Contributor

Hi, @Xuanwo
May I have a try the obs.

@realtaobo
Copy link
Contributor

I want to try: gcs @Xuanwo

@laipz8200
Copy link
Contributor

This doesn't look hard, I'm new to Rust, so could you let me try refactoring Webdav?

@Xuanwo
Copy link
Member Author

Xuanwo commented Sep 14, 2023

This doesn't look hard, I'm new to Rust, so could you let me try refactoring Webdav?

Of course, have fun!

@Xuanwo
Copy link
Member Author

Xuanwo commented Sep 18, 2023

Thank you all! It's my honor to work with you 🫶

@Xuanwo Xuanwo closed this as completed Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests