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

Multiple storage types #837

Merged
merged 7 commits into from Dec 7, 2021
Merged

Conversation

alexcos20
Copy link
Member

Support for multiple storage types

@alexcos20 alexcos20 self-assigned this Dec 3, 2021
@netlify
Copy link

netlify bot commented Dec 3, 2021

✔️ Deploy Preview for docs-oceanprotocol ready!

🔨 Explore the source changes: 0160fdd

🔍 Inspect the deploy log: https://app.netlify.com/sites/docs-oceanprotocol/deploys/61af32351a82e500076c0ab4

😎 Browse the preview: https://deploy-preview-837--docs-oceanprotocol.netlify.app

@alexcos20 alexcos20 changed the title Multiple storage type Multiple storage types Dec 3, 2021

```json
[
{
"type": "url",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we need this on the market or if it's needed what would it be useful to ? or do we need that info in another component ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most likely, storage types are going to expose different information types. For instance, sql will probably not have a contentType or event contentLenght

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aa got it 😃 thanks

"ipfs": {
"hash": "XXXX"
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if can find a more generic way of representing the file info object and have some proper typings for it. As it looks like it would be really though since we are going to support storage types like ipfs or sql

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or we could have something like:

[
      {       "type": "url",
               "url":  "https://xx",
               "method": "POST"
     }, 
      {       "type": "ipfs",
               "hash":  "XXXX"
     }
]

it would make typings more clear

Copy link
Contributor

@mihaisc mihaisc Dec 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree with the proposed structure

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also opting for the structure proposed above, easier to extend and we can have method/has/..etc optional in the typings

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to match the last proposed structure

@alexcos20
Copy link
Member Author

@bogdanfazakas @mihaisc - all good? can we merge it ?

@bogdanfazakas
Copy link
Member

@bogdanfazakas @mihaisc - all good? can we merge it ?

all good from my point of view

@alexcos20 alexcos20 merged commit 70aa72a into feature/ddo_v4 Dec 7, 2021
@alexcos20 alexcos20 deleted the feature/v4_multiple_storage branch December 7, 2021 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants