Skip to content

Commit

Permalink
Added more calls for listing all types of shares and include storage …
Browse files Browse the repository at this point in the history
…resource info
  • Loading branch information
glpatcern committed Aug 1, 2024
1 parent e78a2dd commit 012e962
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 5 deletions.
43 changes: 42 additions & 1 deletion cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ service GatewayAPI {
// both as owner and creator. If a filter is specified, only
// shares satisfying the filter MUST be returned.
rpc ListShares(cs3.sharing.collaboration.v1beta1.ListSharesRequest) returns (cs3.sharing.collaboration.v1beta1.ListSharesResponse);
// List all existing shares the authenticated principal has created,
// including their storage resource information.
rpc ListExistingShares(cs3.sharing.collaboration.v1beta1.ListSharesRequest) returns (ListExistingSharesResponse);
// Updates a share.
// MUST return CODE_NOT_FOUND if the share reference does not exist.
rpc UpdateShare(cs3.sharing.collaboration.v1beta1.UpdateShareRequest) returns (cs3.sharing.collaboration.v1beta1.UpdateShareResponse);
Expand Down Expand Up @@ -279,6 +282,10 @@ service GatewayAPI {
// both as owner and creator. If a filter is specified, only
// shares satisfying the filter MUST be returned.
rpc ListPublicShares(cs3.sharing.link.v1beta1.ListPublicSharesRequest) returns (cs3.sharing.link.v1beta1.ListPublicSharesResponse);
// List all existing shares the authenticated principal has created,
// both as owner and creator, including their storage resource information.
// If a filter is specified, only shares satisfying the filter MUST be returned.
rpc ListExistingPublicShares(cs3.sharing.collaboration.v1beta1.ListPublicShareRequest) returns (ListExistingPublicSharesResponse);
// Updates a share.
// MUST return CODE_NOT_FOUND if the share reference does not exist.
rpc UpdatePublicShare(cs3.sharing.link.v1beta1.UpdatePublicShareRequest) returns (cs3.sharing.link.v1beta1.UpdatePublicShareResponse);
Expand Down Expand Up @@ -538,6 +545,23 @@ message ListAuthProvidersResponse {
repeated string types = 3;
}

message ListExistingSharesResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// The shares encapsulating both the share metadata and the storage metadata.
repeated ShareResourceInfo share_infos = 3;
// 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.
// see https://cloud.google.com/apis/design/design_patterns#list_pagination
string next_page_token = 4;
}

message ListExistingReceivedSharesResponse {
// REQUIRED.
// The response status.
Expand All @@ -547,7 +571,24 @@ message ListExistingReceivedSharesResponse {
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// The shares encapsulating both the share metadata and the storage metadata.
repeated SharedResourceInfo shares = 3;
repeated ReceivedShareResourceInfo share_infos = 3;
// 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.
// see https://cloud.google.com/apis/design/design_patterns#list_pagination
string next_page_token = 4;
}

message ListExistingPublicSharesResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// The shares encapsulating both the share metadata and the storage metadata.
repeated PublicShareResourceInfo share_infos = 3;
// 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.
Expand Down
36 changes: 32 additions & 4 deletions cs3/gateway/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,43 @@ message FileDownloadProtocol {
string token = 4;
}

// A shared resource includes the sharing information
// and the storage-related information about a resource.
message SharedResourceInfo {
// ShareResourceInfo includes the sharing information
// and the storage-related information about a share resource.
message ShareResourceInfo {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The underlying share as returned by the collaboration service.
cs3.sharing.collaboration.v1beta1.ReceivedShare share = 2;
cs3.sharing.collaboration.v1beta1.Share share = 2;
// REQUIRED.
// The corresponding resource information as returned by the storage provider.
cs3.storage.provider.v1beta1.ResourceInfo resource_info = 3;
}

// ReceivedShareResourceInfo includes the sharing information
// and the storage-related information about a received share resource.
message ReceivedShareResourceInfo {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The underlying share as returned by the collaboration service.
cs3.sharing.collaboration.v1beta1.ReceivedShare received_share = 2;
// REQUIRED.
// The corresponding resource information as returned by the storage provider.
cs3.storage.provider.v1beta1.ResourceInfo resource_info = 3;
}

// PublicShareResourceInfo includes the sharing information
// and the storage-related information about a public share resource.
message PublicShareResourceInfo {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The underlying share as returned by the collaboration service.
cs3.sharing.collaboration.v1beta1.PublicShare public_share = 2;
// REQUIRED.
// The corresponding resource information as returned by the storage provider.
cs3.storage.provider.v1beta1.ResourceInfo resource_info = 3;
Expand Down

0 comments on commit 012e962

Please sign in to comment.