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

Add key parameter to recycle bin methods #152

Merged
merged 2 commits into from
Oct 18, 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
53 changes: 3 additions & 50 deletions cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ service GatewayAPI {
// TODO: What code if resource not of type file?
rpc ListFileVersions(cs3.storage.provider.v1beta1.ListFileVersionsRequest) returns (cs3.storage.provider.v1beta1.ListFileVersionsResponse);
// Returns a stream of recycle items for this storage provider.
rpc ListRecycleStream(ListRecycleStreamRequest) returns (stream cs3.storage.provider.v1beta1.ListRecycleStreamResponse);
rpc ListRecycleStream(cs3.storage.provider.v1beta1.ListRecycleStreamRequest) returns (stream cs3.storage.provider.v1beta1.ListRecycleStreamResponse);
// Returns a list of recycle items for this storage provider.
// MUST return CODE_OK and MUST return an empty list if no recycle items are available.
rpc ListRecycle(ListRecycleRequest) returns (cs3.storage.provider.v1beta1.ListRecycleResponse);
rpc ListRecycle(cs3.storage.provider.v1beta1.ListRecycleRequest) returns (cs3.storage.provider.v1beta1.ListRecycleResponse);
// Moves a resource from one reference to another.
// MUST return CODE_NOT_FOUND if any of the references do not exist.
// MUST return CODE_PRECONDITION_FAILED if the source reference
Expand All @@ -144,7 +144,7 @@ service GatewayAPI {
// Permanently removes a recycle item from the recycle.
// This operation is irrevocable.
// MUST return CODE_NOT_FOUND if the recycle item id does not exist.
rpc PurgeRecycle(PurgeRecycleRequest) returns (cs3.storage.provider.v1beta1.PurgeRecycleResponse);
rpc PurgeRecycle(cs3.storage.provider.v1beta1.PurgeRecycleRequest) returns (cs3.storage.provider.v1beta1.PurgeRecycleResponse);
// Restores a file version for the provided reference.
// MUST return CODE_NOT_FOUND if the reference does not exist.
// MUST return CODE_NOT_FOUND if the version does not exist.
Expand Down Expand Up @@ -446,53 +446,6 @@ message GetQuotaRequest {
cs3.storage.provider.v1beta1.Reference ref = 2;
}

message ListRecycleRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The reference to which the action should be performed.
cs3.storage.provider.v1beta1.Reference ref = 2;
// OPTIONAL.
// SHOULD be specified.
// The start time range to query for recycle items.
// The value is the Unix Epoch timestamp in seconds.
cs3.types.v1beta1.Timestamp from_ts = 3;
// OPTIONAL.
// SHOULD be specified.
// The end time range to query for recycle items.
// The value is Unix Epoch timestamp in seconds.
cs3.types.v1beta1.Timestamp to_ts = 4;
}

message ListRecycleStreamRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The reference to which the action should be performed.
cs3.storage.provider.v1beta1.Reference ref = 2;
// OPTIONAL.
// SHOULD be specified.
// The start time range to query for recycle items.
// The value is the Unix Epoch timestamp in seconds.
cs3.types.v1beta1.Timestamp from_ts = 3;
// OPTIONAL.
// SHOULD be specified.
// The end time range to query for recycle items.
// The value is Unix Epoch timestamp in seconds.
cs3.types.v1beta1.Timestamp to_ts = 4;
}

message PurgeRecycleRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The reference to which the action should be performed.
cs3.storage.provider.v1beta1.Reference ref = 2;
}

message InitiateFileDownloadResponse {
// REQUIRED.
// The response status.
Expand Down
11 changes: 11 additions & 0 deletions cs3/storage/provider/v1beta1/provider_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ message ListRecycleRequest {
// OPTIONAL.
// The reference to which the action should be performed.
Reference ref = 4;
// OPTIONAL.
// The key for a recycle item to be listed.
// If provided, the item corresponding to the key will be listed.
string key = 5;
}

message ListRecycleResponse {
Expand Down Expand Up @@ -496,6 +500,10 @@ message ListRecycleStreamRequest {
// OPTIONAL.
// The reference to which the action should be performed.
Reference ref = 4;
// OPTIONAL.
// The key for a recycle item to be listed.
// If provided, the item corresponding to the key will be listed.
string key = 5;
}

message ListRecycleStreamResponse {
Expand Down Expand Up @@ -538,6 +546,9 @@ message PurgeRecycleRequest {
// REQUIRED.
// The reference to which the action should be performed.
Reference ref = 2;
// REQUIRED.
// The key corresponding to the item to be purged..
string key = 3;
}

message PurgeRecycleResponse {
Expand Down
183 changes: 29 additions & 154 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,22 +202,10 @@ <h2>Table of Contents</h2>
<a href="#cs3.gateway.v1beta1.ListAuthProvidersResponse"><span class="badge">M</span>ListAuthProvidersResponse</a>
</li>

<li>
<a href="#cs3.gateway.v1beta1.ListRecycleRequest"><span class="badge">M</span>ListRecycleRequest</a>
</li>

<li>
<a href="#cs3.gateway.v1beta1.ListRecycleStreamRequest"><span class="badge">M</span>ListRecycleStreamRequest</a>
</li>

<li>
<a href="#cs3.gateway.v1beta1.OpenInAppRequest"><span class="badge">M</span>OpenInAppRequest</a>
</li>

<li>
<a href="#cs3.gateway.v1beta1.PurgeRecycleRequest"><span class="badge">M</span>PurgeRecycleRequest</a>
</li>

<li>
<a href="#cs3.gateway.v1beta1.WhoAmIRequest"><span class="badge">M</span>WhoAmIRequest</a>
</li>
Expand Down Expand Up @@ -2195,112 +2183,6 @@ <h3 id="cs3.gateway.v1beta1.ListAuthProvidersResponse">ListAuthProvidersResponse



<h3 id="cs3.gateway.v1beta1.ListRecycleRequest">ListRecycleRequest</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>opaque</td>
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

<tr>
<td>ref</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">cs3.storage.provider.v1beta1.Reference</a></td>
<td></td>
<td><p>REQUIRED.
The reference to which the action should be performed. </p></td>
</tr>

<tr>
<td>from_ts</td>
<td><a href="#cs3.types.v1beta1.Timestamp">cs3.types.v1beta1.Timestamp</a></td>
<td></td>
<td><p>OPTIONAL.
SHOULD be specified.
The start time range to query for recycle items.
The value is the Unix Epoch timestamp in seconds. </p></td>
</tr>

<tr>
<td>to_ts</td>
<td><a href="#cs3.types.v1beta1.Timestamp">cs3.types.v1beta1.Timestamp</a></td>
<td></td>
<td><p>OPTIONAL.
SHOULD be specified.
The end time range to query for recycle items.
The value is Unix Epoch timestamp in seconds. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.gateway.v1beta1.ListRecycleStreamRequest">ListRecycleStreamRequest</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>opaque</td>
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

<tr>
<td>ref</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">cs3.storage.provider.v1beta1.Reference</a></td>
<td></td>
<td><p>REQUIRED.
The reference to which the action should be performed. </p></td>
</tr>

<tr>
<td>from_ts</td>
<td><a href="#cs3.types.v1beta1.Timestamp">cs3.types.v1beta1.Timestamp</a></td>
<td></td>
<td><p>OPTIONAL.
SHOULD be specified.
The start time range to query for recycle items.
The value is the Unix Epoch timestamp in seconds. </p></td>
</tr>

<tr>
<td>to_ts</td>
<td><a href="#cs3.types.v1beta1.Timestamp">cs3.types.v1beta1.Timestamp</a></td>
<td></td>
<td><p>OPTIONAL.
SHOULD be specified.
The end time range to query for recycle items.
The value is Unix Epoch timestamp in seconds. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.gateway.v1beta1.OpenInAppRequest">OpenInAppRequest</h3>
<p></p>

Expand Down Expand Up @@ -2353,39 +2235,6 @@ <h3 id="cs3.gateway.v1beta1.OpenInAppRequest">OpenInAppRequest</h3>



<h3 id="cs3.gateway.v1beta1.PurgeRecycleRequest">PurgeRecycleRequest</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>opaque</td>
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

<tr>
<td>ref</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">cs3.storage.provider.v1beta1.Reference</a></td>
<td></td>
<td><p>REQUIRED.
The reference to which the action should be performed. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.gateway.v1beta1.WhoAmIRequest">WhoAmIRequest</h3>
<p></p>

Expand Down Expand Up @@ -2646,14 +2495,14 @@ <h3 id="cs3.gateway.v1beta1.GatewayAPI">GatewayAPI</h3>

<tr>
<td>ListRecycleStream</td>
<td><a href="#cs3.gateway.v1beta1.ListRecycleStreamRequest">ListRecycleStreamRequest</a></td>
<td><a href="#cs3.storage.provider.v1beta1.ListRecycleStreamRequest">.cs3.storage.provider.v1beta1.ListRecycleStreamRequest</a></td>
<td><a href="#cs3.storage.provider.v1beta1.ListRecycleStreamResponse">.cs3.storage.provider.v1beta1.ListRecycleStreamResponse</a> stream</td>
<td><p>Returns a stream of recycle items for this storage provider.</p></td>
</tr>

<tr>
<td>ListRecycle</td>
<td><a href="#cs3.gateway.v1beta1.ListRecycleRequest">ListRecycleRequest</a></td>
<td><a href="#cs3.storage.provider.v1beta1.ListRecycleRequest">.cs3.storage.provider.v1beta1.ListRecycleRequest</a></td>
<td><a href="#cs3.storage.provider.v1beta1.ListRecycleResponse">.cs3.storage.provider.v1beta1.ListRecycleResponse</a></td>
<td><p>Returns a list of recycle items for this storage provider.
MUST return CODE_OK and MUST return an empty list if no recycle items are available.</p></td>
Expand All @@ -2671,7 +2520,7 @@ <h3 id="cs3.gateway.v1beta1.GatewayAPI">GatewayAPI</h3>

<tr>
<td>PurgeRecycle</td>
<td><a href="#cs3.gateway.v1beta1.PurgeRecycleRequest">PurgeRecycleRequest</a></td>
<td><a href="#cs3.storage.provider.v1beta1.PurgeRecycleRequest">.cs3.storage.provider.v1beta1.PurgeRecycleRequest</a></td>
<td><a href="#cs3.storage.provider.v1beta1.PurgeRecycleResponse">.cs3.storage.provider.v1beta1.PurgeRecycleResponse</a></td>
<td><p>Permanently removes a recycle item from the recycle.
This operation is irrevocable.
Expand Down Expand Up @@ -14228,6 +14077,15 @@ <h3 id="cs3.storage.provider.v1beta1.ListRecycleRequest">ListRecycleRequest</h3>
The reference to which the action should be performed. </p></td>
</tr>

<tr>
<td>key</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>OPTIONAL.
The key for a recycle item to be listed.
If provided, the item corresponding to the key will be listed. </p></td>
</tr>

</tbody>
</table>

Expand Down Expand Up @@ -14322,6 +14180,15 @@ <h3 id="cs3.storage.provider.v1beta1.ListRecycleStreamRequest">ListRecycleStream
The reference to which the action should be performed. </p></td>
</tr>

<tr>
<td>key</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>OPTIONAL.
The key for a recycle item to be listed.
If provided, the item corresponding to the key will be listed. </p></td>
</tr>

</tbody>
</table>

Expand Down Expand Up @@ -14588,6 +14455,14 @@ <h3 id="cs3.storage.provider.v1beta1.PurgeRecycleRequest">PurgeRecycleRequest</h
The reference to which the action should be performed. </p></td>
</tr>

<tr>
<td>key</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The key corresponding to the item to be purged.. </p></td>
</tr>

</tbody>
</table>

Expand Down
Loading