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

Define abstract interface for storage backends #113

Closed
m90 opened this issue Jun 23, 2022 · 0 comments
Closed

Define abstract interface for storage backends #113

m90 opened this issue Jun 23, 2022 · 0 comments

Comments

@m90
Copy link
Member

m90 commented Jun 23, 2022

@m90 Great! Quick question: there is quite a bit of similar code for the different types of storages. Would you be open to generalize the code a bit? In a OOP language I would create a common abstract class with with abstract functions like listFiles, uploadFile, removeFile, and so on. Then it's simply a matter of implementing each storage in its own class. This would allow, for instance, to have a single purge function. I'm guessing the go equivalent would be something similar to this.

I know that it's a bit out of scope for this issue, but I'd like to hear your thoughts on this. Also, there to consider the possibility that a single storage jack-of-all-trades like rclone will be the way to go in the future (as per #65); in this case abstracting the current storages like this will probably be a waste of time.

Originally posted by @MMauro94 in #94 (comment)

@m90 m90 added enhancement New feature or request maintenance and removed enhancement New feature or request labels Jun 23, 2022
@m90 m90 closed this as completed Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant