Skip to content

Commit

Permalink
Added an endpoint in AppProvider to create new files
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Sep 17, 2021
1 parent 3f84706 commit 192c90b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
30 changes: 29 additions & 1 deletion cs3/app/provider/v1beta1/provider_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,39 @@ import "cs3/types/v1beta1/types.proto";
// Any method MAY return UNKNOWN.
// Any method MAY return UNAUTHENTICATED.
service ProviderAPI {
// Returns the App provider URL
// Creates a new file to be opened by an app. The new file MAY be either
// empty or generated out of a template if the AppProvider has such capability.
rpc CreateFileForApp(CreateFileForAppRequest) returns (CreateFileForAppResponse);
// Returns the App URL and all necessary info to open a resource in an online editor.
// MUST return CODE_NOT_FOUND if the resource does not exist.
rpc OpenInApp(OpenInAppRequest) returns (OpenInAppResponse);
}


message CreateFileForAppRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The target container where the file has to be created.
cs3.types.v1beta1.Reference ref = 2;
// REQUIRED.
// The file name of the created file.
string filename = 2;
}

message CreateFileForAppResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// The resourceInfo of the file that was created.
storage.provider.v1beta1.ResourceInfo resource_info = 3;
}

message OpenInAppRequest {
// OPTIONAL.
// Opaque information.
Expand Down
6 changes: 5 additions & 1 deletion cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ service GatewayAPI {
// ************************ APP PROVIDER ********************/
// *****************************************************************/

// Returns the App provider URL, which allows the user to open a resource in an online editor.
// Creates a new file to be opened by an app. The new file MAY be either
// empty or generated out of a template if the AppProvider has such capability.
rpc CreateFileForApp(cs3.app.provider.v1beta1.CreateFileForAppRequest) returns (cs3.app.provider.v1beta1.CreateFileForAppResponse);
// Returns the App URL and all necessary info to open a resource in an online editor.
// MUST return CODE_NOT_FOUND if the resource does not exist.
rpc OpenInApp(OpenInAppRequest) returns (cs3.app.provider.v1beta1.OpenInAppResponse);
// *****************************************************************/
// ************************ USER SHARE PROVIDER ********************/
Expand Down

0 comments on commit 192c90b

Please sign in to comment.