Skip to content

Commit

Permalink
Get OCM share by token (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 authored Feb 28, 2023
1 parent f2ea1c7 commit 1dbd0fa
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 16 deletions.
3 changes: 3 additions & 0 deletions cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ service GatewayAPI {
// Gets share information for a single share.
// MUST return CODE_NOT_FOUND if the share reference does not exist.
rpc GetOCMShare(cs3.sharing.ocm.v1beta1.GetOCMShareRequest) returns (cs3.sharing.ocm.v1beta1.GetOCMShareResponse);
// Gets share information for a single share by its unlisted token.
// MUST return CODE_NOT_FOUND if the share does not exist.
rpc GetOCMShareByToken(cs3.sharing.ocm.v1beta1.GetOCMShareByTokenRequest) returns (cs3.sharing.ocm.v1beta1.GetOCMShareByTokenResponse);
// List the shares the authproviderenticated principal has created,
// both as owner and creator. If a filter is specified, only
// shares satisfying the filter MUST be returned.
Expand Down
18 changes: 18 additions & 0 deletions cs3/sharing/ocm/v1beta1/ocm_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ service OcmAPI {
// Gets share information for a single share.
// MUST return CODE_NOT_FOUND if the share reference does not exist.
rpc GetOCMShare(GetOCMShareRequest) returns (GetOCMShareResponse);
// Gets share information for a single share by its unlisted token.
// MUST return CODE_NOT_FOUND if the share does not exist.
rpc GetOCMShareByToken(GetOCMShareByTokenRequest) returns (GetOCMShareByTokenResponse);
// List the shares the authenticated principal has created,
// both as owner and creator. If a filter is specified, only
// shares satisfying the filter MUST be returned.
Expand Down Expand Up @@ -244,6 +247,21 @@ message GetOCMShareResponse {
Share share = 3;
}

message GetOCMShareByTokenRequest {
// REQUIRED.
// The unlisted token to identify the public share.
string token = 1;
}

message GetOCMShareByTokenResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// REQUIRED.
// The share.
Share share = 2;
}

message ListReceivedOCMSharesRequest {
// OPTIONAL.
// Opaque information.
Expand Down
117 changes: 101 additions & 16 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,14 @@ <h2>Table of Contents</h2>
<a href="#cs3.sharing.ocm.v1beta1.CreateOCMShareResponse"><span class="badge">M</span>CreateOCMShareResponse</a>
</li>

<li>
<a href="#cs3.sharing.ocm.v1beta1.GetOCMShareByTokenRequest"><span class="badge">M</span>GetOCMShareByTokenRequest</a>
</li>

<li>
<a href="#cs3.sharing.ocm.v1beta1.GetOCMShareByTokenResponse"><span class="badge">M</span>GetOCMShareByTokenResponse</a>
</li>

<li>
<a href="#cs3.sharing.ocm.v1beta1.GetOCMShareRequest"><span class="badge">M</span>GetOCMShareRequest</a>
</li>
Expand Down Expand Up @@ -3022,6 +3030,14 @@ <h3 id="cs3.gateway.v1beta1.GatewayAPI">GatewayAPI</h3>
MUST return CODE_NOT_FOUND if the share reference does not exist.</p></td>
</tr>

<tr>
<td>GetOCMShareByToken</td>
<td><a href="#cs3.sharing.ocm.v1beta1.GetOCMShareByTokenRequest">.cs3.sharing.ocm.v1beta1.GetOCMShareByTokenRequest</a></td>
<td><a href="#cs3.sharing.ocm.v1beta1.GetOCMShareByTokenResponse">.cs3.sharing.ocm.v1beta1.GetOCMShareByTokenResponse</a></td>
<td><p>Gets share information for a single share by its unlisted token.
MUST return CODE_NOT_FOUND if the share does not exist.</p></td>
</tr>

<tr>
<td>ListOCMShares</td>
<td><a href="#cs3.sharing.ocm.v1beta1.ListOCMSharesRequest">.cs3.sharing.ocm.v1beta1.ListOCMSharesRequest</a></td>
Expand Down Expand Up @@ -12647,6 +12663,64 @@ <h3 id="cs3.sharing.ocm.v1beta1.CreateOCMShareResponse">CreateOCMShareResponse</



<h3 id="cs3.sharing.ocm.v1beta1.GetOCMShareByTokenRequest">GetOCMShareByTokenRequest</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>token</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The unlisted token to identify the public share. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.sharing.ocm.v1beta1.GetOCMShareByTokenResponse">GetOCMShareByTokenResponse</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>status</td>
<td><a href="#cs3.rpc.v1beta1.Status">cs3.rpc.v1beta1.Status</a></td>
<td></td>
<td><p>REQUIRED.
The response status. </p></td>
</tr>

<tr>
<td>share</td>
<td><a href="#cs3.sharing.ocm.v1beta1.Share">Share</a></td>
<td></td>
<td><p>REQUIRED.
The share. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.sharing.ocm.v1beta1.GetOCMShareRequest">GetOCMShareRequest</h3>
<p></p>

Expand Down Expand Up @@ -12826,10 +12900,11 @@ <h3 id="cs3.sharing.ocm.v1beta1.ListOCMSharesRequest">ListOCMSharesRequest</h3>
<td><a href="#int32">int32</a></td>
<td></td>
<td><p>OPTIONAL.
Clients use this field to specify the maximum number of results to be returned by the server.
The server may further constrain the maximum number of results returned in a single page.
If the page_size is 0, the server will decide the number of results to be returned.
see https://cloud.google.com/apis/design/design_patterns#list_pagination </p></td>
Clients use this field to specify the maximum number of results to be
returned by the server. The server may further constrain the maximum number
of results returned in a single page. If the page_size is 0, the server
will decide the number of results to be returned. see
https://cloud.google.com/apis/design/design_patterns#list_pagination </p></td>
</tr>

<tr>
Expand Down Expand Up @@ -12931,8 +13006,8 @@ <h3 id="cs3.sharing.ocm.v1beta1.ListOCMSharesResponse">ListOCMSharesResponse</h3
<td><a href="#string">string</a></td>
<td></td>
<td><p>OPTIONAL.
This field represents the pagination token to retrieve the next page of results.
If the value is &#34;&#34;, it means no further results for the request.
This field represents the pagination token to retrieve the next page of
results. If the value is &#34;&#34;, it means no further results for the request.
see https://cloud.google.com/apis/design/design_patterns#list_pagination </p></td>
</tr>

Expand Down Expand Up @@ -12966,10 +13041,11 @@ <h3 id="cs3.sharing.ocm.v1beta1.ListReceivedOCMSharesRequest">ListReceivedOCMSha
<td><a href="#int32">int32</a></td>
<td></td>
<td><p>OPTIONAL.
Clients use this field to specify the maximum number of results to be returned by the server.
The server may further constrain the maximum number of results returned in a single page.
If the page_size is 0, the server will decide the number of results to be returned.
see https://cloud.google.com/apis/design/design_patterns#list_pagination </p></td>
Clients use this field to specify the maximum number of results to be
returned by the server. The server may further constrain the maximum number
of results returned in a single page. If the page_size is 0, the server
will decide the number of results to be returned. see
https://cloud.google.com/apis/design/design_patterns#list_pagination </p></td>
</tr>

<tr>
Expand Down Expand Up @@ -13026,8 +13102,8 @@ <h3 id="cs3.sharing.ocm.v1beta1.ListReceivedOCMSharesResponse">ListReceivedOCMSh
<td><a href="#string">string</a></td>
<td></td>
<td><p>OPTIONAL.
This field represents the pagination token to retrieve the next page of results.
If the value is &#34;&#34;, it means no further results for the request.
This field represents the pagination token to retrieve the next page of
results. If the value is &#34;&#34;, it means no further results for the request.
see https://cloud.google.com/apis/design/design_patterns#list_pagination </p></td>
</tr>

Expand Down Expand Up @@ -13240,7 +13316,8 @@ <h3 id="cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest">UpdateReceivedOCM
<td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
<td><p>The update mask applies to the resource. For the `FieldMask` definition,
see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask </p></td>
see
https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask </p></td>
</tr>

</tbody>
Expand Down Expand Up @@ -13356,9 +13433,9 @@ <h3 id="cs3.sharing.ocm.v1beta1.OcmAPI">OcmAPI</h3>
<td><a href="#cs3.sharing.ocm.v1beta1.CreateOCMShareResponse">CreateOCMShareResponse</a></td>
<td><p>Creates a new ocm share.
MUST return CODE_NOT_FOUND if the resource reference does not exist.
MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of
(owner, shared_resource, grantee).
New shares MUST be created in the state SHARE_STATE_PENDING.</p></td>
MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple
consisting of (owner, shared_resource, grantee). New shares MUST be created
in the state SHARE_STATE_PENDING.</p></td>
</tr>

<tr>
Expand All @@ -13377,6 +13454,14 @@ <h3 id="cs3.sharing.ocm.v1beta1.OcmAPI">OcmAPI</h3>
MUST return CODE_NOT_FOUND if the share reference does not exist.</p></td>
</tr>

<tr>
<td>GetOCMShareByToken</td>
<td><a href="#cs3.sharing.ocm.v1beta1.GetOCMShareByTokenRequest">GetOCMShareByTokenRequest</a></td>
<td><a href="#cs3.sharing.ocm.v1beta1.GetOCMShareByTokenResponse">GetOCMShareByTokenResponse</a></td>
<td><p>Gets share information for a single share by its unlisted token.
MUST return CODE_NOT_FOUND if the share does not exist.</p></td>
</tr>

<tr>
<td>ListOCMShares</td>
<td><a href="#cs3.sharing.ocm.v1beta1.ListOCMSharesRequest">ListOCMSharesRequest</a></td>
Expand Down

0 comments on commit 1dbd0fa

Please sign in to comment.