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

Performance improvements #173

Merged
merged 3 commits into from
Jun 20, 2022
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
28 changes: 28 additions & 0 deletions cs3/sharing/collaboration/v1beta1/collaboration_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,15 @@ message ListSharesRequest {
// OPTIONAL.
// The list of filters to apply if any.
repeated Filter filters = 2;
// 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
int32 page_size = 3;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 4;
}

message ListSharesResponse {
Expand All @@ -158,6 +167,11 @@ message ListSharesResponse {
// REQUIRED.
// The list of shares.
repeated Share shares = 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 RemoveShareRequest {
Expand Down Expand Up @@ -206,6 +220,15 @@ message ListReceivedSharesRequest {
// OPTIONAL.
// The list of filters to apply if any.
repeated Filter filters = 3;
// 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
int32 page_size = 4;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 5;
}

message ListReceivedSharesResponse {
Expand All @@ -218,6 +241,11 @@ message ListReceivedSharesResponse {
// REQUIRED.
// The list of received shares.
repeated ReceivedShare shares = 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;
}

// TODO(labkode): clean up display_name ? we'll use storage links for that.
Expand Down
14 changes: 14 additions & 0 deletions cs3/sharing/link/v1beta1/link_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,15 @@ message ListPublicSharesRequest {
// OPTIONAL.
// If a signature should be included in the share.
bool sign = 3;
// 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
int32 page_size = 4;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 5;
}

message ListPublicSharesResponse {
Expand All @@ -188,6 +197,11 @@ message ListPublicSharesResponse {
// REQUIRED.
// The list of shares.
repeated PublicShare share = 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 RemovePublicShareRequest {
Expand Down
28 changes: 28 additions & 0 deletions cs3/sharing/ocm/v1beta1/ocm_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@ message ListOCMSharesRequest {
// OPTIONAL.
// The list of filters to apply if any.
repeated Filter filters = 2;
// 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
int32 page_size = 3;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 4;
}

message ListOCMSharesResponse {
Expand All @@ -181,6 +190,11 @@ message ListOCMSharesResponse {
// REQUIRED.
// The list of shares.
repeated Share shares = 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 RemoveOCMShareRequest {
Expand Down Expand Up @@ -226,6 +240,15 @@ message ListReceivedOCMSharesRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// 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
int32 page_size = 2;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 3;
}

message ListReceivedOCMSharesResponse {
Expand All @@ -238,6 +261,11 @@ message ListReceivedOCMSharesResponse {
// REQUIRED.
// The list of received shares.
repeated ReceivedShare shares = 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;
}

// TODO(labkode): clean up display_name ? we'll use storage links for that.
Expand Down
115 changes: 115 additions & 0 deletions cs3/storage/provider/v1beta1/provider_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";
import "google/protobuf/field_mask.proto";

// Storage Provider API
//
Expand Down Expand Up @@ -429,6 +430,15 @@ message ListGrantsRequest {
// REQUIRED.
// The reference to which the action should be performed.
Reference ref = 2;
// 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
int32 page_size = 3;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 4;
}

message ListGrantsResponse {
Expand All @@ -441,6 +451,11 @@ message ListGrantsResponse {
// REQUIRED.
// The grants.
repeated Grant grants = 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 ListContainerStreamRequest {
Expand All @@ -454,6 +469,19 @@ message ListContainerStreamRequest {
// Arbitrary metadata to be included with the resource.
// A key with the name '*' means to return all available arbitrary metadata.
repeated string arbitrary_metadata_keys = 3;
// OPTIONAL.
// The field mask applies to the resource. For the `FieldMask` definition,
// see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
google.protobuf.FieldMask field_mask = 4;
// 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
int32 page_size = 5;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 6;
}

message ListContainerStreamResponse {
Expand All @@ -466,6 +494,11 @@ message ListContainerStreamResponse {
// REQUIRED.
// The resource information.
ResourceInfo info = 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 ListContainerRequest {
Expand All @@ -479,6 +512,19 @@ message ListContainerRequest {
// Arbitrary metadata to be included with the resource.
// A key with the name '*' means to return all available arbitrary metadata.
repeated string arbitrary_metadata_keys = 3;
// OPTIONAL.
// The field mask applies to the resource. For the `FieldMask` definition,
// see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
google.protobuf.FieldMask field_mask = 4;
// 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
int32 page_size = 5;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 6;
}

message ListContainerResponse {
Expand All @@ -491,6 +537,11 @@ message ListContainerResponse {
// REQUIRED.
// The list of resource informations.
repeated ResourceInfo 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 ListFileVersionsRequest {
Expand All @@ -500,6 +551,15 @@ message ListFileVersionsRequest {
// REQUIRED.
// The reference to which the action should be performed.
Reference ref = 2;
// 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
int32 page_size = 3;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 4;
}

message ListFileVersionsResponse {
Expand All @@ -512,6 +572,11 @@ message ListFileVersionsResponse {
// REQUIRED.
// The list of file versions.
repeated FileVersion versions = 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 ListRecycleRequest {
Expand All @@ -535,6 +600,15 @@ message ListRecycleRequest {
// The key for a recycle item to be listed.
// If provided, the item corresponding to the key will be listed.
string key = 5;
// 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
int32 page_size = 6;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 7;
}

message ListRecycleResponse {
Expand All @@ -547,6 +621,11 @@ message ListRecycleResponse {
// REQUIRED.
// The list of recycle items.
repeated RecycleItem recycle_items = 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 ListRecycleStreamRequest {
Expand All @@ -570,6 +649,15 @@ message ListRecycleStreamRequest {
// The key for a recycle item to be listed.
// If provided, the item corresponding to the key will be listed.
string key = 5;
// 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
int32 page_size = 6;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 7;
}

message ListRecycleStreamResponse {
Expand All @@ -582,6 +670,11 @@ message ListRecycleStreamResponse {
// REQUIRED.
// The recycle items.
RecycleItem recycle_item = 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 MoveRequest {
Expand Down Expand Up @@ -724,6 +817,10 @@ message StatRequest {
// Arbitrary metadata be included with the resource.
// A key with the name '*' means to return all available arbitrary metadata.
repeated string arbitrary_metadata_keys = 3;
// OPTIONAL.
// The field mask applies to the resource. For the `FieldMask` definition,
// see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
google.protobuf.FieldMask field_mask = 4;
}

message StatResponse {
Expand Down Expand Up @@ -1010,6 +1107,19 @@ message ListStorageSpacesRequest {
// OPTIONAL.
// The list of filters to apply if any.
repeated Filter filters = 2;
// OPTIONAL.
// The field mask applies to the resource. For the `FieldMask` definition,
// see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
google.protobuf.FieldMask field_mask = 3;
// 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
int32 page_size = 4;
// OPTIONAL.
// The client uses this field to request a specific page of the list results.
string page_token = 5;
}

message ListStorageSpacesResponse {
Expand All @@ -1021,6 +1131,11 @@ message ListStorageSpacesResponse {
cs3.rpc.v1beta1.Status status = 2;
// REQUIRED.
repeated StorageSpace storage_spaces = 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 UpdateStorageSpaceRequest {
Expand Down
9 changes: 9 additions & 0 deletions cs3/storage/provider/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ message ResourceInfo {
// Reference to the container of this resource. If path is relative it MUST be specified, regardless the
// access restrictions to the resource: a subsequent Stat() on it MAY return access denied if appropriate.
ResourceId parent_id = 17;
// OPTIONAL
// The name of the resource.
string name = 18;
// OPTIONAL.
// StorageSpace where this resource is located.
StorageSpace space = 19;
}

// CanonicalMetadata contains extra metadata
Expand Down Expand Up @@ -454,6 +460,9 @@ message StorageSpace {
// OPTIONAL.
// Last modification time (mtime) of the root resource of this storage space.
cs3.types.v1beta1.Timestamp mtime = 8;
// OPTIONAL.
// Resource info for the storage space root.
ResourceInfo root_info = 9;
}

// The id of a storage space.
Expand Down
Loading