Skip to content

Commit

Permalink
add protocol fields to ocm share
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Jan 30, 2023
1 parent 22e2269 commit 4c92b80
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 96 deletions.
6 changes: 3 additions & 3 deletions cs3/ocm/core/v1beta1/ocm_core_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ option objc_class_prefix = "COC";
option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";

import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/ocm/core/v1beta1/resources.proto";
import "cs3/storage/provider/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
import "cs3/types/v1beta1/types.proto";
import "cs3/sharing/ocm/v1beta1/resources.proto";

// OCM Core API
//
Expand Down Expand Up @@ -85,10 +85,10 @@ message CreateOCMCoreShareRequest {
cs3.storage.provider.v1beta1.ResourceType resource_type = 8;
// REQUIRED.
// Recipient share type.
ShareType share_type = 9;
cs3.sharing.ocm.v1beta1.ShareType share_type = 9;
// REQUIRED.
// The protocols which are used to establish synchronisation.
repeated Protocol protocols = 10;
repeated cs3.sharing.ocm.v1beta1.Protocol protocols = 10;
}

message CreateOCMCoreShareResponse {
Expand Down
84 changes: 0 additions & 84 deletions cs3/ocm/core/v1beta1/resources.proto

This file was deleted.

67 changes: 58 additions & 9 deletions cs3/sharing/ocm/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,12 @@ message Share {
// REQUIRED.
// Last modification time of the share.
cs3.types.v1beta1.Timestamp mtime = 9;
// Defines the type of share based on its origin.
enum ShareType {
SHARE_TYPE_INVALID = 0;
// A regular file or folder share.
SHARE_TYPE_REGULAR = 1;
// A file or folder transfer.
SHARE_TYPE_TRANSFER = 2;
}
// Specifies the type of the share.
// REQUIRED.
// Recipient share type.
ShareType share_type = 10;
// REQUIRED.
// The protocols which are used to establish synchronisation.
repeated Protocol protocols = 11;
}

// The permissions for a share.
Expand Down Expand Up @@ -176,3 +172,56 @@ message ShareGrant {
// The share permissions for the grant.
SharePermissions permissions = 2;
}

// Defines the type of share based on its recipient.
enum ShareType {
// Share of type user.
SHARE_TYPE_USER = 0;
// Share of type group.
SHARE_TYPE_GROUP = 1;
}


// The protocol which is used to establish synchronisation.
message Protocol {
// REQUIRED.
oneof term {
WebDAVProtocol webdap_options = 1;
WebappProtocol webapp_options = 2;
DatatxProtocol datatx_oprions = 3;
cs3.types.v1beta1.Opaque generic_options = 4;
}
}

// Defines the options for the WebDAV protocol.
message WebDAVProtocol {
// REQUIRED.
// Secret used to access the resource.
string shared_secret = 1;
// REQUIRED.
// Permissions of the shared resource.
cs3.sharing.ocm.v1beta1.SharePermissions permissions = 2;
// REQUIRED.
// WebDAV URI used to access the resource.
string uri = 3;
}

// Defines the options for the Webapp protocol.
message WebappProtocol {
// REQUIRED.
// Template URI to open the resource with a remote app.
string uriTemplate = 1;
}

// Defines the options for the Datatx protocol.
message DatatxProtocol {
// REQUIRED.
// Secret used to access the source of the data transfer.
string shared_secret = 1;
// REQUIRED.
// Source URI for the data transfer.
string source_uri = 2;
// REQUIRED.
// Size in bytes of the source.
uint64 size = 3;
}

0 comments on commit 4c92b80

Please sign in to comment.