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

try to use the google protobuf field mask #144

Merged
merged 1 commit into from
Oct 4, 2021
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
19 changes: 6 additions & 13 deletions cs3/sharing/collaboration/v1beta1/collaboration_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import "cs3/rpc/v1beta1/status.proto";
import "cs3/sharing/collaboration/v1beta1/resources.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";
import "google/protobuf/field_mask.proto";

// User Share Provider API
//
Expand Down Expand Up @@ -225,19 +226,11 @@ message UpdateReceivedShareRequest {
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
ShareReference ref = 2;
// REQUIRED.
// The field to update.
message UpdateField {
// One of the update fields MUST be specified.
oneof field {
// Update the display name.
string display_name = 1;
// Update the share state
ShareState state = 2;
}
}
UpdateField field = 3;
// The received share to update.
ReceivedShare share = 2;
// The update mask applies to the resource. For the `FieldMask` definition,
// see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
google.protobuf.FieldMask update_mask = 3;
}

message UpdateReceivedShareResponse {
Expand Down
7 changes: 5 additions & 2 deletions cs3/sharing/collaboration/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,17 @@ message SharePermissions {
// A received share is the share that a grantee will receive.
// It expands the original share by adding state to the share,
// a display name from the perspective of the grantee and a
// resource mount path in case the share will be mounted
// in a path in a storage provider.
// resource mount point in case the share will be mounted
// in a storage provider.
message ReceivedShare {
// REQUIRED.
Share share = 1;
// REQUIRED.
// The state of the share.
ShareState state = 2;
// REQUIRED.
// The mount point of the share.
storage.provider.v1beta1.Reference mount_point = 3;
}

// The state of the share.
Expand Down
18 changes: 6 additions & 12 deletions cs3/sharing/ocm/v1beta1/ocm_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import "cs3/rpc/v1beta1/status.proto";
import "cs3/sharing/ocm/v1beta1/resources.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/types/v1beta1/types.proto";
import "google/protobuf/field_mask.proto";

// OCM Share Provider API
//
Expand Down Expand Up @@ -245,18 +246,11 @@ message UpdateReceivedOCMShareRequest {
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
ShareReference ref = 2;
// REQUIRED.
message UpdateField {
// One of the update fields MUST be specified.
oneof field {
// Update the display name.
string display_name = 1;
// Update the share state
ShareState state = 2;
}
}
UpdateField field = 3;
// The received share to update.
ReceivedShare share = 2;
// The update mask applies to the resource. For the `FieldMask` definition,
// see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
google.protobuf.FieldMask update_mask = 3;
}

message UpdateReceivedOCMShareResponse {
Expand Down
7 changes: 5 additions & 2 deletions cs3/sharing/ocm/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,17 @@ message SharePermissions {
// A received share is the share that a grantee will receive.
// It expands the original share by adding state to the share,
// a display name from the perspective of the grantee and a
// resource mount path in case the share will be mounted
// in a path in a storage provider.
// resource mount point in case the share will be mounted
// in a storage provider.
message ReceivedShare {
// REQUIRED.
Share share = 1;
// REQUIRED.
// The state of the share.
ShareState state = 2;
// REQUIRED.
// The mount point of the share.
storage.provider.v1beta1.Reference mount_point = 3;
}

// The state of the share.
Expand Down
118 changes: 34 additions & 84 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1168,10 +1168,6 @@ <h2>Table of Contents</h2>
<a href="#cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest"><span class="badge">M</span>UpdateReceivedShareRequest</a>
</li>

<li>
<a href="#cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest.UpdateField"><span class="badge">M</span>UpdateReceivedShareRequest.UpdateField</a>
</li>

<li>
<a href="#cs3.sharing.collaboration.v1beta1.UpdateReceivedShareResponse"><span class="badge">M</span>UpdateReceivedShareResponse</a>
</li>
Expand Down Expand Up @@ -1440,10 +1436,6 @@ <h2>Table of Contents</h2>
<a href="#cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest"><span class="badge">M</span>UpdateReceivedOCMShareRequest</a>
</li>

<li>
<a href="#cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest.UpdateField"><span class="badge">M</span>UpdateReceivedOCMShareRequest.UpdateField</a>
</li>

<li>
<a href="#cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareResponse"><span class="badge">M</span>UpdateReceivedOCMShareResponse</a>
</li>
Expand Down Expand Up @@ -9833,48 +9825,19 @@ <h3 id="cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest">UpdateRece
</tr>

<tr>
<td>ref</td>
<td><a href="#cs3.sharing.collaboration.v1beta1.ShareReference">ShareReference</a></td>
<td></td>
<td><p>REQUIRED. </p></td>
</tr>

<tr>
<td>field</td>
<td><a href="#cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest.UpdateField">UpdateReceivedShareRequest.UpdateField</a></td>
<td></td>
<td><p> </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest.UpdateField">UpdateReceivedShareRequest.UpdateField</h3>
<p>REQUIRED.</p><p>The field to update.</p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>display_name</td>
<td><a href="#string">string</a></td>
<td>share</td>
<td><a href="#cs3.sharing.collaboration.v1beta1.ReceivedShare">ReceivedShare</a></td>
<td></td>
<td><p>Update the display name. </p></td>
<td><p>REQUIRED.
The received share to update. </p></td>
</tr>

<tr>
<td>state</td>
<td><a href="#cs3.sharing.collaboration.v1beta1.ShareState">ShareState</a></td>
<td>update_mask</td>
<td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
<td><p>Update the share state </p></td>
<td><p>The update mask applies to the resource. For the `FieldMask` definition,
see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask </p></td>
</tr>

</tbody>
Expand Down Expand Up @@ -10184,7 +10147,7 @@ <h3 id="cs3.sharing.collaboration.v1beta1.Filter">Filter</h3>


<h3 id="cs3.sharing.collaboration.v1beta1.ReceivedShare">ReceivedShare</h3>
<p>A received share is the share that a grantee will receive.</p><p>It expands the original share by adding state to the share,</p><p>a display name from the perspective of the grantee and a</p><p>resource mount path in case the share will be mounted</p><p>in a path in a storage provider.</p>
<p>A received share is the share that a grantee will receive.</p><p>It expands the original share by adding state to the share,</p><p>a display name from the perspective of the grantee and a</p><p>resource mount point in case the share will be mounted</p><p>in a storage provider.</p>


<table class="field-table">
Expand All @@ -10208,6 +10171,14 @@ <h3 id="cs3.sharing.collaboration.v1beta1.ReceivedShare">ReceivedShare</h3>
The state of the share. </p></td>
</tr>

<tr>
<td>mount_point</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">cs3.storage.provider.v1beta1.Reference</a></td>
<td></td>
<td><p>REQUIRED.
The mount point of the share. </p></td>
</tr>

</tbody>
</table>

Expand Down Expand Up @@ -12260,48 +12231,19 @@ <h3 id="cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest">UpdateReceivedOCM
</tr>

<tr>
<td>ref</td>
<td><a href="#cs3.sharing.ocm.v1beta1.ShareReference">ShareReference</a></td>
<td></td>
<td><p>REQUIRED. </p></td>
</tr>

<tr>
<td>field</td>
<td><a href="#cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest.UpdateField">UpdateReceivedOCMShareRequest.UpdateField</a></td>
<td></td>
<td><p> </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest.UpdateField">UpdateReceivedOCMShareRequest.UpdateField</h3>
<p>REQUIRED.</p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>display_name</td>
<td><a href="#string">string</a></td>
<td>share</td>
<td><a href="#cs3.sharing.ocm.v1beta1.ReceivedShare">ReceivedShare</a></td>
<td></td>
<td><p>Update the display name. </p></td>
<td><p>REQUIRED.
The received share to update. </p></td>
</tr>

<tr>
<td>state</td>
<td><a href="#cs3.sharing.ocm.v1beta1.ShareState">ShareState</a></td>
<td>update_mask</td>
<td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
<td></td>
<td><p>Update the share state </p></td>
<td><p>The update mask applies to the resource. For the `FieldMask` definition,
see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask </p></td>
</tr>

</tbody>
Expand Down Expand Up @@ -12491,7 +12433,7 @@ <h2 id="cs3/sharing/ocm/v1beta1/resources.proto">cs3/sharing/ocm/v1beta1/resourc


<h3 id="cs3.sharing.ocm.v1beta1.ReceivedShare">ReceivedShare</h3>
<p>A received share is the share that a grantee will receive.</p><p>It expands the original share by adding state to the share,</p><p>a display name from the perspective of the grantee and a</p><p>resource mount path in case the share will be mounted</p><p>in a path in a storage provider.</p>
<p>A received share is the share that a grantee will receive.</p><p>It expands the original share by adding state to the share,</p><p>a display name from the perspective of the grantee and a</p><p>resource mount point in case the share will be mounted</p><p>in a storage provider.</p>


<table class="field-table">
Expand All @@ -12515,6 +12457,14 @@ <h3 id="cs3.sharing.ocm.v1beta1.ReceivedShare">ReceivedShare</h3>
The state of the share. </p></td>
</tr>

<tr>
<td>mount_point</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">cs3.storage.provider.v1beta1.Reference</a></td>
<td></td>
<td><p>REQUIRED.
The mount point of the share. </p></td>
</tr>

</tbody>
</table>

Expand Down
Loading