Skip to content

Commit

Permalink
try to use the google protobuf field mask
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Sep 8, 2021
1 parent 63c2cee commit b2faa03
Show file tree
Hide file tree
Showing 9 changed files with 378 additions and 17,247 deletions.
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 share to update.
Share 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 share to update.
Share 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
Loading

0 comments on commit b2faa03

Please sign in to comment.