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

Match multiple storage providers in registry #116

Merged
merged 1 commit into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cs3/gateway/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ option java_package = "com.cs3.gateway.v1beta1";
option objc_class_prefix = "CGX";
option php_namespace = "Cs3\\Gateway\\V1Beta1";

import "cs3/rpc/v1beta1/status.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";

Expand Down
1 change: 0 additions & 1 deletion cs3/ocm/invite/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ option objc_class_prefix = "COI";
option php_namespace = "Cs3\\Ocm\\Invite\\V1Beta1";

import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";

// InviteToken is used to invite users and groups from other sync'n'share
Expand Down
10 changes: 5 additions & 5 deletions cs3/storage/registry/v1beta1/registry_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ service RegistryAPI {
// Returns the storage provider that is reponsible for the given
// resource reference.
// MUST return CODE_NOT_FOUND if the reference does not exist.
rpc GetStorageProvider(GetStorageProviderRequest) returns (GetStorageProviderResponse);
rpc GetStorageProviders(GetStorageProvidersRequest) returns (GetStorageProvidersResponse);
// Returns a list of the available storage providers known by this registry.
rpc ListStorageProviders(ListStorageProvidersRequest) returns (ListStorageProvidersResponse);
// Gets the user home storage provider.
Expand Down Expand Up @@ -81,7 +81,7 @@ message GetHomeResponse {
cs3.storage.registry.v1beta1.ProviderInfo provider = 3;
}

message GetStorageProviderRequest {
message GetStorageProvidersRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
Expand All @@ -90,16 +90,16 @@ message GetStorageProviderRequest {
cs3.storage.provider.v1beta1.Reference ref = 2;
}

message GetStorageProviderResponse {
message GetStorageProvidersResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// The storage provider handling the requested storage resource.
cs3.storage.registry.v1beta1.ProviderInfo provider = 3;
// The storage providers handling the requested storage resource.
repeated cs3.storage.registry.v1beta1.ProviderInfo providers = 3;
}

message ListStorageProvidersRequest {
Expand Down
20 changes: 10 additions & 10 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1635,11 +1635,11 @@ <h2>Table of Contents</h2>
</li>

<li>
<a href="#cs3.storage.registry.v1beta1.GetStorageProviderRequest"><span class="badge">M</span>GetStorageProviderRequest</a>
<a href="#cs3.storage.registry.v1beta1.GetStorageProvidersRequest"><span class="badge">M</span>GetStorageProvidersRequest</a>
</li>

<li>
<a href="#cs3.storage.registry.v1beta1.GetStorageProviderResponse"><span class="badge">M</span>GetStorageProviderResponse</a>
<a href="#cs3.storage.registry.v1beta1.GetStorageProvidersResponse"><span class="badge">M</span>GetStorageProvidersResponse</a>
</li>

<li>
Expand Down Expand Up @@ -14353,7 +14353,7 @@ <h3 id="cs3.storage.registry.v1beta1.GetHomeResponse">GetHomeResponse</h3>



<h3 id="cs3.storage.registry.v1beta1.GetStorageProviderRequest">GetStorageProviderRequest</h3>
<h3 id="cs3.storage.registry.v1beta1.GetStorageProvidersRequest">GetStorageProvidersRequest</h3>
<p></p>


Expand Down Expand Up @@ -14386,7 +14386,7 @@ <h3 id="cs3.storage.registry.v1beta1.GetStorageProviderRequest">GetStorageProvid



<h3 id="cs3.storage.registry.v1beta1.GetStorageProviderResponse">GetStorageProviderResponse</h3>
<h3 id="cs3.storage.registry.v1beta1.GetStorageProvidersResponse">GetStorageProvidersResponse</h3>
<p></p>


Expand All @@ -14413,11 +14413,11 @@ <h3 id="cs3.storage.registry.v1beta1.GetStorageProviderResponse">GetStorageProvi
</tr>

<tr>
<td>provider</td>
<td>providers</td>
<td><a href="#cs3.storage.registry.v1beta1.ProviderInfo">ProviderInfo</a></td>
<td></td>
<td>repeated</td>
<td><p>REQUIRED.
The storage provider handling the requested storage resource. </p></td>
The storage providers handling the requested storage resource. </p></td>
</tr>

</tbody>
Expand Down Expand Up @@ -14510,9 +14510,9 @@ <h3 id="cs3.storage.registry.v1beta1.RegistryAPI">RegistryAPI</h3>
<tbody>

<tr>
<td>GetStorageProvider</td>
<td><a href="#cs3.storage.registry.v1beta1.GetStorageProviderRequest">GetStorageProviderRequest</a></td>
<td><a href="#cs3.storage.registry.v1beta1.GetStorageProviderResponse">GetStorageProviderResponse</a></td>
<td>GetStorageProviders</td>
<td><a href="#cs3.storage.registry.v1beta1.GetStorageProvidersRequest">GetStorageProvidersRequest</a></td>
<td><a href="#cs3.storage.registry.v1beta1.GetStorageProvidersResponse">GetStorageProvidersResponse</a></td>
<td><p>Returns the storage provider that is reponsible for the given
resource reference.
MUST return CODE_NOT_FOUND if the reference does not exist.</p></td>
Expand Down
36 changes: 23 additions & 13 deletions proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1461,9 +1461,6 @@
}
],
"imports": [
{
"path": "cs3/rpc/v1beta1/status.proto"
},
{
"path": "cs3/storage/provider/v1beta1/resources.proto"
},
Expand Down Expand Up @@ -2709,9 +2706,6 @@
{
"path": "cs3/identity/user/v1beta1/resources.proto"
},
{
"path": "cs3/storage/provider/v1beta1/resources.proto"
},
{
"path": "cs3/types/v1beta1/types.proto"
}
Expand Down Expand Up @@ -4344,6 +4338,11 @@
"id": 3,
"name": "share",
"type": "PublicShare"
},
{
"id": 4,
"name": "password_hash",
"type": "string"
}
]
},
Expand Down Expand Up @@ -4384,6 +4383,11 @@
"id": 3,
"name": "share",
"type": "PublicShare"
},
{
"id": 4,
"name": "password_hash",
"type": "string"
}
]
}
Expand Down Expand Up @@ -7089,6 +7093,11 @@
"id": 5,
"name": "mtime",
"type": "uint64"
},
{
"id": 6,
"name": "etag",
"type": "string"
}
]
},
Expand Down Expand Up @@ -7340,7 +7349,7 @@
]
},
{
"name": "GetStorageProviderRequest",
"name": "GetStorageProvidersRequest",
"fields": [
{
"id": 1,
Expand All @@ -7355,7 +7364,7 @@
]
},
{
"name": "GetStorageProviderResponse",
"name": "GetStorageProvidersResponse",
"fields": [
{
"id": 1,
Expand All @@ -7369,8 +7378,9 @@
},
{
"id": 3,
"name": "provider",
"type": "cs3.storage.registry.v1beta1.ProviderInfo"
"name": "providers",
"type": "cs3.storage.registry.v1beta1.ProviderInfo",
"is_repeated": true
}
]
},
Expand Down Expand Up @@ -7411,9 +7421,9 @@
"name": "RegistryAPI",
"rpcs": [
{
"name": "GetStorageProvider",
"in_type": "GetStorageProviderRequest",
"out_type": "GetStorageProviderResponse"
"name": "GetStorageProviders",
"in_type": "GetStorageProvidersRequest",
"out_type": "GetStorageProvidersResponse"
},
{
"name": "ListStorageProviders",
Expand Down