Skip to content

Commit

Permalink
update the storageprovider recycle api
Browse files Browse the repository at this point in the history
Added a reference for the target resource on which the action should be executed. This is necessary because we want to be able to perform actions for specific resources in the recycle file tree and not only on the root of a deleted tree.
  • Loading branch information
David Christofas committed Jun 29, 2021
1 parent 1a4ab6b commit 928f346
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 22 deletions.
17 changes: 10 additions & 7 deletions cs3/storage/provider/v1beta1/provider_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,18 @@ message ListRecycleRequest {
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// OPTIONAL.
// The reference to which the action should be performed.
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 = 2;
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 = 3;
cs3.types.v1beta1.Timestamp to_ts = 4;
}

message ListRecycleResponse {
Expand All @@ -454,15 +457,18 @@ message ListRecycleStreamRequest {
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// OPTIONAL.
// The reference to which the action should be performed.
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 = 2;
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 = 3;
cs3.types.v1beta1.Timestamp to_ts = 4;
}

message ListRecycleStreamResponse {
Expand Down Expand Up @@ -545,9 +551,6 @@ message RestoreRecycleItemRequest {
// REQUIRED.
// The reference to which the action should be performed.
Reference ref = 2;
// REQUIRED.
// The key for the recycle item to be restored.
string key = 3;
// OPTIONAL.
// An optional restore path for the deleted resource.
// It can be useful to restore to another location rather than
Expand Down
24 changes: 16 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13785,6 +13785,14 @@ <h3 id="cs3.storage.provider.v1beta1.ListRecycleRequest">ListRecycleRequest</h3>
Opaque information. </p></td>
</tr>

<tr>
<td>ref</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">Reference</a></td>
<td></td>
<td><p>OPTIONAL.
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>
Expand Down Expand Up @@ -13871,6 +13879,14 @@ <h3 id="cs3.storage.provider.v1beta1.ListRecycleStreamRequest">ListRecycleStream
Opaque information. </p></td>
</tr>

<tr>
<td>ref</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">Reference</a></td>
<td></td>
<td><p>OPTIONAL.
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>
Expand Down Expand Up @@ -14371,14 +14387,6 @@ <h3 id="cs3.storage.provider.v1beta1.RestoreRecycleItemRequest">RestoreRecycleIt
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 for the recycle item to be restored. </p></td>
</tr>

<tr>
<td>restore_ref</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">Reference</a></td>
Expand Down
19 changes: 12 additions & 7 deletions proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6922,11 +6922,16 @@
},
{
"id": 2,
"name": "ref",
"type": "Reference"
},
{
"id": 3,
"name": "from_ts",
"type": "cs3.types.v1beta1.Timestamp"
},
{
"id": 3,
"id": 4,
"name": "to_ts",
"type": "cs3.types.v1beta1.Timestamp"
}
Expand Down Expand Up @@ -6963,11 +6968,16 @@
},
{
"id": 2,
"name": "ref",
"type": "Reference"
},
{
"id": 3,
"name": "from_ts",
"type": "cs3.types.v1beta1.Timestamp"
},
{
"id": 3,
"id": 4,
"name": "to_ts",
"type": "cs3.types.v1beta1.Timestamp"
}
Expand Down Expand Up @@ -7106,11 +7116,6 @@
"name": "ref",
"type": "Reference"
},
{
"id": 3,
"name": "key",
"type": "string"
},
{
"id": 4,
"name": "restore_ref",
Expand Down

0 comments on commit 928f346

Please sign in to comment.