From 1dbd0faa5122823295ccd08e4936fb74aa6fa589 Mon Sep 17 00:00:00 2001 From: Gianmaria Del Monte <39946305+gmgigi96@users.noreply.github.com> Date: Tue, 28 Feb 2023 19:04:56 +0100 Subject: [PATCH] Get OCM share by token (#205) --- cs3/gateway/v1beta1/gateway_api.proto | 3 + cs3/sharing/ocm/v1beta1/ocm_api.proto | 18 ++++ docs/index.html | 117 ++++++++++++++++++++++---- 3 files changed, 122 insertions(+), 16 deletions(-) diff --git a/cs3/gateway/v1beta1/gateway_api.proto b/cs3/gateway/v1beta1/gateway_api.proto index 7749675..503e62b 100644 --- a/cs3/gateway/v1beta1/gateway_api.proto +++ b/cs3/gateway/v1beta1/gateway_api.proto @@ -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. diff --git a/cs3/sharing/ocm/v1beta1/ocm_api.proto b/cs3/sharing/ocm/v1beta1/ocm_api.proto index d6d3d7e..04c82d7 100644 --- a/cs3/sharing/ocm/v1beta1/ocm_api.proto +++ b/cs3/sharing/ocm/v1beta1/ocm_api.proto @@ -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. @@ -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. diff --git a/docs/index.html b/docs/index.html index 6a471db..d2976f3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1434,6 +1434,14 @@
Gets share information for a single share by its unlisted token. +MUST return CODE_NOT_FOUND if the share does not exist.
Field | Type | Label | Description |
token | +string | ++ | REQUIRED. +The unlisted token to identify the public share. |
+
Field | Type | Label | Description |
status | +cs3.rpc.v1beta1.Status | ++ | REQUIRED. +The response status. |
+
share | +Share | ++ | REQUIRED. +The share. |
+
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
OPTIONAL. -This field represents the pagination token to retrieve the next page of results. -If the value is "", 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 "", it means no further results for the request. see https://cloud.google.com/apis/design/design_patterns#list_pagination
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
OPTIONAL. -This field represents the pagination token to retrieve the next page of results. -If the value is "", 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 "", it means no further results for the request. see https://cloud.google.com/apis/design/design_patterns#list_pagination
The update mask applies to the resource. For the `FieldMask` definition, -see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
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.
Gets share information for a single share by its unlisted token. +MUST return CODE_NOT_FOUND if the share does not exist.