From 97ac49dedd6514d97d27d82f86cfd34a14926623 Mon Sep 17 00:00:00 2001
From: Ishank Arora
Date: Wed, 13 Oct 2021 12:11:44 +0200
Subject: [PATCH 1/2] Add key to list recycle requests
---
cs3/gateway/v1beta1/gateway_api.proto | 53 +-----
.../provider/v1beta1/provider_api.proto | 8 +
docs/index.html | 175 +++---------------
proto.lock | 91 +++------
4 files changed, 55 insertions(+), 272 deletions(-)
diff --git a/cs3/gateway/v1beta1/gateway_api.proto b/cs3/gateway/v1beta1/gateway_api.proto
index a572c483..a1831efe 100644
--- a/cs3/gateway/v1beta1/gateway_api.proto
+++ b/cs3/gateway/v1beta1/gateway_api.proto
@@ -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
@@ -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.
@@ -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.
diff --git a/cs3/storage/provider/v1beta1/provider_api.proto b/cs3/storage/provider/v1beta1/provider_api.proto
index cbceafbc..93c77e10 100644
--- a/cs3/storage/provider/v1beta1/provider_api.proto
+++ b/cs3/storage/provider/v1beta1/provider_api.proto
@@ -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 {
@@ -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 {
diff --git a/docs/index.html b/docs/index.html
index 2376d6b6..867470b2 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -202,22 +202,10 @@ Table of Contents
MListAuthProvidersResponse
-
- MListRecycleRequest
-
-
-
- MListRecycleStreamRequest
-
-
MOpenInAppRequest
-
- MPurgeRecycleRequest
-
-
MWhoAmIRequest
@@ -2195,112 +2183,6 @@ ListAuthProvidersResponse
- ListRecycleRequest
-
-
-
-
-
- Field | Type | Label | Description |
-
-
-
-
- opaque |
- cs3.types.v1beta1.Opaque |
- |
- OPTIONAL.
-Opaque information. |
-
-
-
- ref |
- cs3.storage.provider.v1beta1.Reference |
- |
- REQUIRED.
-The reference to which the action should be performed. |
-
-
-
- from_ts |
- cs3.types.v1beta1.Timestamp |
- |
- OPTIONAL.
-SHOULD be specified.
-The start time range to query for recycle items.
-The value is the Unix Epoch timestamp in seconds. |
-
-
-
- to_ts |
- cs3.types.v1beta1.Timestamp |
- |
- OPTIONAL.
-SHOULD be specified.
-The end time range to query for recycle items.
-The value is Unix Epoch timestamp in seconds. |
-
-
-
-
-
-
-
-
-
- ListRecycleStreamRequest
-
-
-
-
-
- Field | Type | Label | Description |
-
-
-
-
- opaque |
- cs3.types.v1beta1.Opaque |
- |
- OPTIONAL.
-Opaque information. |
-
-
-
- ref |
- cs3.storage.provider.v1beta1.Reference |
- |
- REQUIRED.
-The reference to which the action should be performed. |
-
-
-
- from_ts |
- cs3.types.v1beta1.Timestamp |
- |
- OPTIONAL.
-SHOULD be specified.
-The start time range to query for recycle items.
-The value is the Unix Epoch timestamp in seconds. |
-
-
-
- to_ts |
- cs3.types.v1beta1.Timestamp |
- |
- OPTIONAL.
-SHOULD be specified.
-The end time range to query for recycle items.
-The value is Unix Epoch timestamp in seconds. |
-
-
-
-
-
-
-
-
-
OpenInAppRequest
@@ -2353,39 +2235,6 @@ OpenInAppRequest
- PurgeRecycleRequest
-
-
-
-
-
-
-
-
-
WhoAmIRequest
@@ -2646,14 +2495,14 @@ GatewayAPI
ListRecycleStream |
- ListRecycleStreamRequest |
+ .cs3.storage.provider.v1beta1.ListRecycleStreamRequest |
.cs3.storage.provider.v1beta1.ListRecycleStreamResponse stream |
Returns a stream of recycle items for this storage provider. |
ListRecycle |
- ListRecycleRequest |
+ .cs3.storage.provider.v1beta1.ListRecycleRequest |
.cs3.storage.provider.v1beta1.ListRecycleResponse |
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. |
@@ -2671,7 +2520,7 @@ GatewayAPI
PurgeRecycle |
- PurgeRecycleRequest |
+ .cs3.storage.provider.v1beta1.PurgeRecycleRequest |
.cs3.storage.provider.v1beta1.PurgeRecycleResponse |
Permanently removes a recycle item from the recycle.
This operation is irrevocable.
@@ -14228,6 +14077,15 @@ ListRecycleRequest
The reference to which the action should be performed. |
+
+ key |
+ string |
+ |
+ OPTIONAL.
+The key for a recycle item to be listed.
+If provided, the item corresponding to the key will be listed. |
+
+
@@ -14322,6 +14180,15 @@ ListRecycleStream
The reference to which the action should be performed.
+
+ key |
+ string |
+ |
+ OPTIONAL.
+The key for a recycle item to be listed.
+If provided, the item corresponding to the key will be listed. |
+
+
diff --git a/proto.lock b/proto.lock
index 528774c3..0ecac4b9 100644
--- a/proto.lock
+++ b/proto.lock
@@ -950,6 +950,11 @@
"id": 7,
"name": "icon",
"type": "string"
+ },
+ {
+ "id": 8,
+ "name": "allow_creation",
+ "type": "bool"
}
]
}
@@ -1864,71 +1869,6 @@
}
]
},
- {
- "name": "ListRecycleRequest",
- "fields": [
- {
- "id": 1,
- "name": "opaque",
- "type": "cs3.types.v1beta1.Opaque"
- },
- {
- "id": 2,
- "name": "ref",
- "type": "cs3.storage.provider.v1beta1.Reference"
- },
- {
- "id": 3,
- "name": "from_ts",
- "type": "cs3.types.v1beta1.Timestamp"
- },
- {
- "id": 4,
- "name": "to_ts",
- "type": "cs3.types.v1beta1.Timestamp"
- }
- ]
- },
- {
- "name": "ListRecycleStreamRequest",
- "fields": [
- {
- "id": 1,
- "name": "opaque",
- "type": "cs3.types.v1beta1.Opaque"
- },
- {
- "id": 2,
- "name": "ref",
- "type": "cs3.storage.provider.v1beta1.Reference"
- },
- {
- "id": 3,
- "name": "from_ts",
- "type": "cs3.types.v1beta1.Timestamp"
- },
- {
- "id": 4,
- "name": "to_ts",
- "type": "cs3.types.v1beta1.Timestamp"
- }
- ]
- },
- {
- "name": "PurgeRecycleRequest",
- "fields": [
- {
- "id": 1,
- "name": "opaque",
- "type": "cs3.types.v1beta1.Opaque"
- },
- {
- "id": 2,
- "name": "ref",
- "type": "cs3.storage.provider.v1beta1.Reference"
- }
- ]
- },
{
"name": "InitiateFileDownloadResponse",
"fields": [
@@ -2100,13 +2040,13 @@
},
{
"name": "ListRecycleStream",
- "in_type": "ListRecycleStreamRequest",
+ "in_type": "cs3.storage.provider.v1beta1.ListRecycleStreamRequest",
"out_type": "cs3.storage.provider.v1beta1.ListRecycleStreamResponse",
"out_streamed": true
},
{
"name": "ListRecycle",
- "in_type": "ListRecycleRequest",
+ "in_type": "cs3.storage.provider.v1beta1.ListRecycleRequest",
"out_type": "cs3.storage.provider.v1beta1.ListRecycleResponse"
},
{
@@ -2116,7 +2056,7 @@
},
{
"name": "PurgeRecycle",
- "in_type": "PurgeRecycleRequest",
+ "in_type": "cs3.storage.provider.v1beta1.PurgeRecycleRequest",
"out_type": "cs3.storage.provider.v1beta1.PurgeRecycleResponse"
},
{
@@ -6845,6 +6785,11 @@
"id": 1,
"name": "opaque",
"type": "cs3.types.v1beta1.Opaque"
+ },
+ {
+ "id": 2,
+ "name": "ref",
+ "type": "cs3.storage.provider.v1beta1.Reference"
}
]
},
@@ -7132,6 +7077,11 @@
"id": 4,
"name": "ref",
"type": "Reference"
+ },
+ {
+ "id": 5,
+ "name": "key",
+ "type": "string"
}
]
},
@@ -7178,6 +7128,11 @@
"id": 4,
"name": "ref",
"type": "Reference"
+ },
+ {
+ "id": 5,
+ "name": "key",
+ "type": "string"
}
]
},
From 0c4bd1639d04342a99cecb26cd07d8e7546da90a Mon Sep 17 00:00:00 2001
From: Ishank Arora
Date: Wed, 13 Oct 2021 17:00:08 +0200
Subject: [PATCH 2/2] Add key parameter to PurgeRecycleRequest
---
cs3/storage/provider/v1beta1/provider_api.proto | 3 +++
docs/index.html | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/cs3/storage/provider/v1beta1/provider_api.proto b/cs3/storage/provider/v1beta1/provider_api.proto
index 93c77e10..63b94d3f 100644
--- a/cs3/storage/provider/v1beta1/provider_api.proto
+++ b/cs3/storage/provider/v1beta1/provider_api.proto
@@ -546,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 {
diff --git a/docs/index.html b/docs/index.html
index 867470b2..0478d878 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -14455,6 +14455,14 @@ PurgeRecycleRequest
+
+ key |
+ string |
+ |
+ REQUIRED.
+The key corresponding to the item to be purged.. |
+
+