diff --git a/cs3/appprovider/v0alpha/appprovider.proto b/cs3/app/provider/v1beta1/provider_api.proto similarity index 79% rename from cs3/appprovider/v0alpha/appprovider.proto rename to cs3/app/provider/v1beta1/provider_api.proto index 62b6bb90..b09199c9 100644 --- a/cs3/appprovider/v0alpha/appprovider.proto +++ b/cs3/app/provider/v1beta1/provider_api.proto @@ -18,21 +18,21 @@ syntax = "proto3"; -package cs3.appproviderv0alpha; +package cs3.app.provider.v1beta1; -option csharp_namespace = "CS3.AppProviderV0Alpha"; -option go_package = "appproviderv0alphapb"; +option csharp_namespace = "Cs3.App.Provider.V1Beta1"; +option go_package = "providerv1beta1"; option java_multiple_files = true; -option java_outer_classname = "AppproviderProto"; -option java_package = "com.cs3.appproviderv0alpha"; -option objc_class_prefix = "CBOXAB"; -option php_namespace = "CS3\\AppProviderV0Alpha"; +option java_outer_classname = "ProviderApiProto"; +option java_package = "com.cs3.app.provider.v1beta1"; +option objc_class_prefix = "CAP"; +option php_namespace = "Cs3\\App\\Provider\\V1Beta1"; -import "cs3/rpc/status.proto"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/types/types.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/storage/provider/v1beta1/resources.proto"; +import "cs3/types/v1beta1/types.proto"; -//import "cs3/appprovider/v0alpha/resources.proto"; +//import "cs3/appprovider/v1beta1/resources.proto"; // App Provider API // @@ -51,7 +51,7 @@ import "cs3/types/types.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service AppProviderService { +service ProviderAPI { // Returns the iframe url // MUST return CODE_NOT_FOUND if the resource does not exist. rpc Open(OpenRequest) returns (OpenResponse); @@ -60,10 +60,10 @@ service AppProviderService { message OpenRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The resource information. - cs3.storageproviderv0alpha.ResourceInfo resource_info = 2; + storage.provider.v1beta1.ResourceInfo resource_info = 2; // REQUIRED. // The access token this application provider will use when contacting // the storage provider to read and write. @@ -79,10 +79,10 @@ message OpenRequest { message OpenResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The url that user agents will render to clients. // Usually the rendering happens by using HTML iframes, diff --git a/cs3/appregistry/v0alpha/appregistry.proto b/cs3/app/registry/v1beta1/registry_api.proto similarity index 75% rename from cs3/appregistry/v0alpha/appregistry.proto rename to cs3/app/registry/v1beta1/registry_api.proto index c8762b4d..30075bad 100644 --- a/cs3/appregistry/v0alpha/appregistry.proto +++ b/cs3/app/registry/v1beta1/registry_api.proto @@ -18,20 +18,20 @@ syntax = "proto3"; -package cs3.appregistryv0alpha; +package cs3.app.registry.v1beta1; -option csharp_namespace = "CS3.AppRegistryV0Alpha"; -option go_package = "appregistryv0alphapb"; +option csharp_namespace = "Cs3.App.Registry.V1Beta1"; +option go_package = "registryv1beta1"; option java_multiple_files = true; -option java_outer_classname = "AppregistryProto"; -option java_package = "com.cs3.appregistryv0alpha"; -option objc_class_prefix = "CBOXAPPREGISTRY"; -option php_namespace = "CS3\\AppRegistryV0Alpha"; +option java_outer_classname = "RegistryApiProto"; +option java_package = "com.cs3.app.registry.v1beta1"; +option objc_class_prefix = "CAR"; +option php_namespace = "Cs3\\App\\Registry\\V1Beta1"; -import "cs3/appregistry/v0alpha/resources.proto"; -import "cs3/rpc/status.proto"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/types/types.proto"; +import "cs3/app/registry/v1beta1/resources.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/storage/provider/v1beta1/resources.proto"; +import "cs3/types/v1beta1/types.proto"; // App Registry API // @@ -49,7 +49,7 @@ import "cs3/types/types.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service AppRegistryService { +service RegistryAPI { // Returns the app providers that are capable of handling this resource info. // MUST return CODE_NOT_FOUND if no providers are available. rpc GetAppProviders(GetAppProvidersRequest) returns (GetAppProvidersResponse); @@ -60,19 +60,19 @@ service AppRegistryService { message GetAppProvidersRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The resource information. - cs3.storageproviderv0alpha.ResourceInfo resource_info = 2; + storage.provider.v1beta1.ResourceInfo resource_info = 2; } message GetAppProvidersResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The app providers available for the given resource info. repeated ProviderInfo providers = 3; @@ -81,7 +81,7 @@ message GetAppProvidersResponse { message ListAppProvidersRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // TODO(labkode): maybe add some filter? } @@ -89,10 +89,10 @@ message ListAppProvidersRequest { message ListAppProvidersResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of app providers this registry knows about. repeated ProviderInfo providers = 3; diff --git a/cs3/appregistry/v0alpha/resources.proto b/cs3/app/registry/v1beta1/resources.proto similarity index 80% rename from cs3/appregistry/v0alpha/resources.proto rename to cs3/app/registry/v1beta1/resources.proto index 116f73f5..73ac1af4 100644 --- a/cs3/appregistry/v0alpha/resources.proto +++ b/cs3/app/registry/v1beta1/resources.proto @@ -18,23 +18,23 @@ syntax = "proto3"; -package cs3.appregistryv0alpha; +package cs3.app.registry.v1beta1; -option csharp_namespace = "CS3.AppRegistryV0Alpha"; -option go_package = "appregistryv0alphapb"; +option csharp_namespace = "Cs3.App.Registry.V1Beta1"; +option go_package = "registryv1beta1"; option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; -option java_package = "com.cs3.appregistryv0alpha"; -option objc_class_prefix = "CBOXAPPREGISTRY"; -option php_namespace = "CS3\\AppRegistryV0Alpha"; +option java_package = "com.cs3.app.registry.v1beta1"; +option objc_class_prefix = "CAR"; +option php_namespace = "Cs3\\App\\Registry\\V1Beta1"; -import "cs3/types/types.proto"; +import "cs3/types/v1beta1/types.proto"; // Represents the information of the app provider. message ProviderInfo { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The mimetypes handled by this provider. repeated string mime_types = 2; diff --git a/cs3/auth/provider/v1beta1/provider_api.proto b/cs3/auth/provider/v1beta1/provider_api.proto new file mode 100644 index 00000000..e82b6521 --- /dev/null +++ b/cs3/auth/provider/v1beta1/provider_api.proto @@ -0,0 +1,64 @@ +// Copyright 2018-2019 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +syntax = "proto3"; + +package cs3.auth.provider.v1beta1; + +option csharp_namespace = "Cs3.Auth.Provider.V1Beta1"; +option go_package = "providerv1beta1"; +option java_multiple_files = true; +option java_outer_classname = "ProviderApiProto"; +option java_package = "com.cs3.auth.provider.v1beta1"; +option objc_class_prefix = "CAP"; +option php_namespace = "Cs3\\Auth\\Provider\\V1Beta1"; + +import "cs3/identity/user/v1beta1/resources.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/types/v1beta1/types.proto"; + +// Auth Provider API +// +// The Auth Provider API is meant to authenticate a client. +// +// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL +// NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and +// "OPTIONAL" in this document are to be interpreted as described in +// RFC 2119. +// +// The following are global requirements that apply to all methods: +// Any method MUST return CODE_OK on a succesful operation. +// Any method MAY return NOT_IMPLEMENTED. +// Any method MAY return INTERNAL. +// Any method MAY return UNKNOWN. +// Any method MAY return UNAUTHENTICATED. +service ProviderAPI { + // Authenticate authenticates a client. + rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse); +} + +message AuthenticateRequest { + cs3.types.v1beta1.Opaque opaque = 1; + string client_id = 2; + string client_secret = 3; +} + +message AuthenticateResponse { + cs3.rpc.v1beta1.Status status = 1; + cs3.identity.user.v1beta1.User user = 2; +} diff --git a/cs3/authregistry/v0alpha/authregistry.proto b/cs3/auth/registry/v1beta1/registry_api.proto similarity index 78% rename from cs3/authregistry/v0alpha/authregistry.proto rename to cs3/auth/registry/v1beta1/registry_api.proto index 64977fe6..bd8401b3 100644 --- a/cs3/authregistry/v0alpha/authregistry.proto +++ b/cs3/auth/registry/v1beta1/registry_api.proto @@ -18,19 +18,19 @@ syntax = "proto3"; -package cs3.authregistryv0alpha; +package cs3.auth.registry.v1beta1; -option csharp_namespace = "CS3.AuthRegistryV0Alpha"; -option go_package = "authregistryv0alphapb"; +option csharp_namespace = "Cs3.Auth.Registry.V1Beta1"; +option go_package = "registryv1beta1"; option java_multiple_files = true; -option java_outer_classname = "AuthregistryProto"; -option java_package = "com.cs3.authregistryv0alpha"; -option objc_class_prefix = "CBOXAUTHREGISTRY"; -option php_namespace = "CS3\\AuthRegistryV0Alpha"; +option java_outer_classname = "RegistryApiProto"; +option java_package = "com.cs3.auth.registry.v1beta1"; +option objc_class_prefix = "CAR"; +option php_namespace = "Cs3\\Auth\\Registry\\V1Beta1"; -import "cs3/authregistry/v0alpha/resources.proto"; -import "cs3/rpc/status.proto"; -import "cs3/types/types.proto"; +import "cs3/auth/registry/v1beta1/resources.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/types/v1beta1/types.proto"; // Auth Registry API // @@ -49,7 +49,7 @@ import "cs3/types/types.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service AuthRegistryService { +service RegistryAPI { // Returns the auth provider that is reponsible for the given // resource reference. // MUST return CODE_NOT_FOUND if the reference does not exist. @@ -61,7 +61,7 @@ service AuthRegistryService { message GetAuthProviderRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The type of authentication provider. string type = 2; @@ -70,10 +70,10 @@ message GetAuthProviderRequest { message GetAuthProviderResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The auth provider handling the requested auth call. ProviderInfo provider = 3; @@ -82,7 +82,7 @@ message GetAuthProviderResponse { message ListAuthProvidersRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // TODO(labkode): maybe add some filter? } @@ -90,10 +90,10 @@ message ListAuthProvidersRequest { message ListAuthProvidersResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of auth providers this registry knows about. repeated ProviderInfo providers = 3; diff --git a/cs3/authregistry/v0alpha/resources.proto b/cs3/auth/registry/v1beta1/resources.proto similarity index 79% rename from cs3/authregistry/v0alpha/resources.proto rename to cs3/auth/registry/v1beta1/resources.proto index 8e0d9fbb..dc3bb0bd 100644 --- a/cs3/authregistry/v0alpha/resources.proto +++ b/cs3/auth/registry/v1beta1/resources.proto @@ -18,23 +18,24 @@ syntax = "proto3"; -package cs3.authregistryv0alpha; +package cs3.auth.registry.v1beta1; -option csharp_namespace = "CS3.AuthRegistryV0Alpha"; -option go_package = "authregistryv0alphapb"; +option csharp_namespace = "Cs3.Auth.Registry.V1Beta1"; +option go_package = "registryv1beta1"; option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; -option java_package = "com.cs3.authregistryv0alpha"; -option objc_class_prefix = "CBOXAUTHREGISTRY"; -option php_namespace = "CS3\\AuthRegistryV0Alpha"; +option java_package = "com.cs3.auth.registry.v1beta1"; +option objc_class_prefix = "CAR"; +option php_namespace = "Cs3\\Auth\\Registry\\V1Beta1"; -import "cs3/types/types.proto"; +import "cs3/types/v1beta1/types.proto"; +// ProviderInfo provides the information about an authentication provider. message ProviderInfo { // OPTIONAL. // Opaque information (containing storage-specific information). // For example, additional metadata attached to the resource. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The storage provider id that will become part of the // resource id. diff --git a/cs3/authprovider/v0alpha/authprovider.proto b/cs3/authprovider/v0alpha/authprovider.proto deleted file mode 100644 index 6af30ae2..00000000 --- a/cs3/authprovider/v0alpha/authprovider.proto +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2018-2019 CERN -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// In applying this license, CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -syntax = "proto3"; - -package cs3.authproviderv0alpha; - -option csharp_namespace = "CS3.AuthProviderV0Alpha"; -option go_package = "authproviderv0alphapb"; -option java_multiple_files = true; -option java_outer_classname = "AuthproviderProto"; -option java_package = "com.cs3.authproviderv0alpha"; -option objc_class_prefix = "CBOXAB"; -option php_namespace = "CS3\\AuthProviderV0Alpha"; - -import "cs3/rpc/status.proto"; -import "cs3/types/types.proto"; - -service AuthProviderService { - rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse); -} - -message AuthenticateRequest { - cs3.types.Opaque opaque = 1; - string client_id = 2; - string client_secret = 3; -} - -message AuthenticateResponse { - cs3.rpc.Status status = 1; - cs3.types.UserId user_id = 2; -} diff --git a/cs3/authregistry/v0alpha/1 b/cs3/authregistry/v0alpha/1 deleted file mode 100644 index 9bb490aa..00000000 --- a/cs3/authregistry/v0alpha/1 +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2018-2019 CERN -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// In applying this license, CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -syntax = "proto3"; - -package cs3.authregistryv0alpha; - -option csharp_namespace = "CS3.AuthRegistryV0Alpha"; -option go_package = "authregistryv0alphapb"; -option java_multiple_files = true; -option java_outer_classname = "AuthregistryProto"; -option java_package = "com.cs3.authregistryv0alpha"; -option objc_class_prefix = "CBOXAUTHREGISTRY"; -option php_namespace = "CS3\\AuthRegistryV0Alpha"; - -import "cs3/rpc/status.proto"; -import "cs3/authprovider/v0alpha/resources.proto"; -import "cs3/types/types.proto"; - -// Auth Registry API -// -// The Auth Registry API is meant to as registry to obtain -// information of available auth providers. -// For example, to use OIDC or Kerberos for authentication. -// -// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL -// NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and -// "OPTIONAL" in this document are to be interpreted as described in -// RFC 2119. -// -// The following are global requirements that apply to all methods: -// Any method MUST return CODE_OK on a succesful operation. -// Any method MAY return NOT_IMPLEMENTED. -// Any method MAY return INTERNAL. -// Any method MAY return UNKNOWN. -// Any method MAY return UNAUTHENTICATED. -service AuthRegistryService { - // Returns the auth provider that is reponsible for the given - // resource reference. - // MUST return CODE_NOT_FOUND if the reference does not exist. - rpc GetAuthProvider(GetAuthProviderRequest) returns (GetAuthProviderResponse); - // Returns a list of the available auth providers known by this registry. - rpc ListAuthProviders(ListAuthProvidersRequest) returns (ListAuthProvidersResponse); -} - -message GetAuthProviderRequest { - // OPTIONAL. - // Opaque information. - cs3.types.Opaque opaque = 1; - // REQUIRED. - // The type of authentication provider. - string type = 2; -} - -message GetAuthProviderResponse { - // REQUIRED. - // The response status. - cs3.rpc.Status status = 1; - // OPTIONAL. - // Opaque information. - cs3.types.Opaque opaque = 2; - // REQUIRED. - // The auth provider handling the requested auth call. - ProviderInfo provider = 3; -} - -message ListAuthProvidersRequest { - // OPTIONAL. - // Opaque information. - cs3.types.Opaque opaque = 1; - // TODO(labkode): maybe add some filter? - -} - -message ListAuthProvidersResponse { - // REQUIRED. - // The response status. - cs3.rpc.Status status = 1; - // OPTIONAL. - // Opaque information. - cs3.types.Opaque opaque = 2; - // REQUIRED. - // The list of auth providers this registry knows about. - repeated ProviderInfo providers = 3; -} - diff --git a/cs3/gateway/v0alpha/gateway.proto b/cs3/gateway/v1beta1/gateway_api.proto similarity index 62% rename from cs3/gateway/v0alpha/gateway.proto rename to cs3/gateway/v1beta1/gateway_api.proto index 7d384d7f..762aeb7a 100644 --- a/cs3/gateway/v0alpha/gateway.proto +++ b/cs3/gateway/v1beta1/gateway_api.proto @@ -18,29 +18,29 @@ syntax = "proto3"; -package cs3.gatewayv0alpha; +package cs3.gateway.v1beta1; -option csharp_namespace = "CS3.GatewayV0Alpha"; -option go_package = "gatewayv0alphapb"; +option csharp_namespace = "Cs3.Gateway.V1Beta1"; +option go_package = "gatewayv1beta1"; option java_multiple_files = true; -option java_outer_classname = "GatewayProto"; -option java_package = "com.cs3.gatewayv0alpha"; -option objc_class_prefix = "CBOXAB"; -option php_namespace = "CS3\\GatewayV0Alpha"; +option java_outer_classname = "GatewayApiProto"; +option java_package = "com.cs3.gateway.v1beta1"; +option objc_class_prefix = "CGX"; +option php_namespace = "Cs3\\Gateway\\V1Beta1"; -import "cs3/appregistry/v0alpha/appregistry.proto"; -import "cs3/authregistry/v0alpha/authregistry.proto"; -import "cs3/ocmshareprovider/v0alpha/ocmshareprovider.proto"; -import "cs3/preferences/v0alpha/preferences.proto"; -import "cs3/publicshareprovider/v0alpha/publicshareprovider.proto"; -import "cs3/rpc/status.proto"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/storageprovider/v0alpha/storageprovider.proto"; -import "cs3/storageregistry/v0alpha/storageregistry.proto"; -import "cs3/types/types.proto"; -import "cs3/userprovider/v0alpha/resources.proto"; -import "cs3/userprovider/v0alpha/userprovider.proto"; -import "cs3/usershareprovider/v0alpha/usershareprovider.proto"; +import "cs3/app/registry/v1beta1/registry_api.proto"; +import "cs3/auth/registry/v1beta1/registry_api.proto"; +import "cs3/identity/user/v1beta1/resources.proto"; +import "cs3/identity/user/v1beta1/user_api.proto"; +import "cs3/preferences/v1beta1/preferences_api.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/sharing/collaboration/v1beta1/collaboration_api.proto"; +import "cs3/sharing/link/v1beta1/link_api.proto"; +import "cs3/sharing/ocm/v1beta1/ocm_api.proto"; +import "cs3/storage/provider/v1beta1/provider_api.proto"; +import "cs3/storage/provider/v1beta1/resources.proto"; +import "cs3/storage/registry/v1beta1/registry_api.proto"; +import "cs3/types/v1beta1/types.proto"; // Gateway API // @@ -59,206 +59,218 @@ import "cs3/usershareprovider/v0alpha/usershareprovider.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service GatewayService { +service GatewayAPI { // *****************************************************************/ // ************************ AUTH ******** **************************/ // *****************************************************************/ + + // Authenticates a user. rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse); + // WhoAmI returns the information for a user. rpc WhoAmI(WhoAmIRequest) returns (WhoAmIResponse); // *****************************************************************/ // ************************ STORAGE PROVIDER ***********************/ // *****************************************************************/ + // Creates a new resource of type container. // MUST return CODE_PRECONDITION_FAILED if the container // cannot be created at the specified reference. - rpc CreateContainer(cs3.storageproviderv0alpha.CreateContainerRequest) returns (cs3.storageproviderv0alpha.CreateContainerResponse); + rpc CreateContainer(cs3.storage.provider.v1beta1.CreateContainerRequest) returns (cs3.storage.provider.v1beta1.CreateContainerResponse); // Deletes a resource. // If a resource specifies the non-empty container (directory, ...), // then the entire directory is deleted recursively. // If a resource specifies a reference or symlink type, only the reference is removed (not the target). // MUST return CODE_NOT_FOUND if the reference does not exist. - rpc Delete(cs3.storageproviderv0alpha.DeleteRequest) returns (cs3.storageproviderv0alpha.DeleteResponse); + rpc Delete(cs3.storage.provider.v1beta1.DeleteRequest) returns (cs3.storage.provider.v1beta1.DeleteResponse); // Returns the path reference for // the provided resource id reference. // MUST return CODE_NOT_FOUND if the reference does not exist - rpc GetPath(cs3.storageproviderv0alpha.GetPathRequest) returns (cs3.storageproviderv0alpha.GetPathResponse); + rpc GetPath(cs3.storage.provider.v1beta1.GetPathRequest) returns (cs3.storage.provider.v1beta1.GetPathResponse); // Returns the quota available under the provided // reference. // MUST return CODE_NOT_FOUND if the reference does not exist // MUST return CODE_RESOURCE_EXHAUSTED on exceeded quota limits. - rpc GetQuota(GetQuotaRequest) returns (cs3.storageproviderv0alpha.GetQuotaResponse); + rpc GetQuota(GetQuotaRequest) returns (cs3.storage.provider.v1beta1.GetQuotaResponse); // Initiates the download of a file using an // out-of-band data transfer mechanism. - rpc InitiateFileDownload(cs3.storageproviderv0alpha.InitiateFileDownloadRequest) returns (InitiateFileDownloadResponse); + rpc InitiateFileDownload(cs3.storage.provider.v1beta1.InitiateFileDownloadRequest) returns (InitiateFileDownloadResponse); // Initiates the upload of a file using an // out-of-band data transfer mechanism. - rpc InitiateFileUpload(cs3.storageproviderv0alpha.InitiateFileUploadRequest) returns (InitiateFileUploadResponse); + rpc InitiateFileUpload(cs3.storage.provider.v1beta1.InitiateFileUploadRequest) returns (InitiateFileUploadResponse); // Returns a stream of resource informations // for the provided reference. // MUST return CODE_NOT_FOUND if the reference does not exists. - rpc ListContainerStream(cs3.storageproviderv0alpha.ListContainerStreamRequest) returns (stream cs3.storageproviderv0alpha.ListContainerStreamResponse); + rpc ListContainerStream(cs3.storage.provider.v1beta1.ListContainerStreamRequest) returns (stream cs3.storage.provider.v1beta1.ListContainerStreamResponse); // Returns a list of resource information // for the provided reference. // MUST return CODE_NOT_FOUND if the reference does not exists. - rpc ListContainer(cs3.storageproviderv0alpha.ListContainerRequest) returns (cs3.storageproviderv0alpha.ListContainerResponse); + rpc ListContainer(cs3.storage.provider.v1beta1.ListContainerRequest) returns (cs3.storage.provider.v1beta1.ListContainerResponse); // Returns a list of the versions for a resource of // type file at the provided reference. // MUST return CODE_NOT_FOUND if the reference does not exist. // MUST return CODE_OK and MUST return an empty list if no versions are available. // TODO: What code if resource not of type file? - rpc ListFileVersions(cs3.storageproviderv0alpha.ListFileVersionsRequest) returns (cs3.storageproviderv0alpha.ListFileVersionsResponse); + rpc ListFileVersions(cs3.storage.provider.v1beta1.ListFileVersionsRequest) returns (cs3.storage.provider.v1beta1.ListFileVersionsResponse); // Returns a stream of recycle items for this storage provider. - rpc ListRecycleStream(ListRecycleStreamRequest) returns (stream cs3.storageproviderv0alpha.ListRecycleStreamResponse); + rpc ListRecycleStream(ListRecycleStreamRequest) returns (stream cs3.storage.provider.v1beta1.ListRecycleStreamResponse); // Returns a list of recycle items for this storage provider. // MUST return CODE_OK and MUST return an empty list if no recycle items are available. - rpc ListRecycle(ListRecycleRequest) returns (cs3.storageproviderv0alpha.ListRecycleResponse); + rpc ListRecycle(ListRecycleRequest) returns (cs3.storage.provider.v1beta1.ListRecycleResponse); // Moves a resource from one reference to another. // MUST return CODE_NOT_FOUND if any of the references do not exist. // MUST return CODE_PRECONDITION_FAILED if the source reference // cannot be moved to the destination reference. - rpc Move(cs3.storageproviderv0alpha.MoveRequest) returns (cs3.storageproviderv0alpha.MoveResponse); + rpc Move(cs3.storage.provider.v1beta1.MoveRequest) returns (cs3.storage.provider.v1beta1.MoveResponse); // Permanently removes a recycle item from the recycle. // This operation is irrevocable. // MUST return CODE_NOT_FOUND if the recycle item id does not exist. - rpc PurgeRecycle(PurgeRecycleRequest) returns (cs3.storageproviderv0alpha.PurgeRecycleResponse); + rpc PurgeRecycle(PurgeRecycleRequest) returns (cs3.storage.provider.v1beta1.PurgeRecycleResponse); // Restores a file version for the provided reference. // MUST return CODE_NOT_FOUND if the reference does not exist. // MUST return CODE_NOT_FOUND if the version does not exist. - rpc RestoreFileVersion(cs3.storageproviderv0alpha.RestoreFileVersionRequest) returns (cs3.storageproviderv0alpha.RestoreFileVersionResponse); + rpc RestoreFileVersion(cs3.storage.provider.v1beta1.RestoreFileVersionRequest) returns (cs3.storage.provider.v1beta1.RestoreFileVersionResponse); // Restores a recycle item from the recycle. // MUST return CODE_NOT_FOUND if the recycle item id does not exist. // MUST return CODE_PRECONDITION_FAILED if the restore_path is non-empty // and the recycle item cannot be restored to the restore_path. - rpc RestoreRecycleItem(cs3.storageproviderv0alpha.RestoreRecycleItemRequest) returns (cs3.storageproviderv0alpha.RestoreRecycleItemResponse); + rpc RestoreRecycleItem(cs3.storage.provider.v1beta1.RestoreRecycleItemRequest) returns (cs3.storage.provider.v1beta1.RestoreRecycleItemResponse); // Returns the resource information at the provided reference. // MUST return CODE_NOT_FOUND if the reference does not exist. - rpc Stat(cs3.storageproviderv0alpha.StatRequest) returns (cs3.storageproviderv0alpha.StatResponse); + rpc Stat(cs3.storage.provider.v1beta1.StatRequest) returns (cs3.storage.provider.v1beta1.StatResponse); // Sets arbitrary metadata into a storage resource. - // Arbitrary metadata is returned in a cs3.storageproviderv0alpha.ResourceInfo. - rpc SetArbitraryMetadata(cs3.storageproviderv0alpha.SetArbitraryMetadataRequest) returns (cs3.storageproviderv0alpha.SetArbitraryMetadataResponse); + // Arbitrary metadata is returned in a cs3.storage.provider.v1beta1.ResourceInfo. + rpc SetArbitraryMetadata(cs3.storage.provider.v1beta1.SetArbitraryMetadataRequest) returns (cs3.storage.provider.v1beta1.SetArbitraryMetadataResponse); // Unsets arbitrary metdata into a storage resource. - // Arbitrary metadata is returned in a cs3.storageproviderv0alpha.ResourceInfo. - rpc UnsetArbitraryMetadata(cs3.storageproviderv0alpha.UnsetArbitraryMetadataRequest) returns (cs3.storageproviderv0alpha.UnsetArbitraryMetadataResponse); + // Arbitrary metadata is returned in a cs3.storage.provider.v1beta1.ResourceInfo. + rpc UnsetArbitraryMetadata(cs3.storage.provider.v1beta1.UnsetArbitraryMetadataRequest) returns (cs3.storage.provider.v1beta1.UnsetArbitraryMetadataResponse); // *****************************************************************/ // ************************ USER SHARE PROVIDER ********************/ // *****************************************************************/ + // Creates a new share. // MUST return CODE_NOT_FOUND if the resource reference does not exist. // MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of // (owner, shared_resource, grantee). // New shares MUST be created in the state SHARE_STATE_PENDING. - rpc CreateShare(cs3.usershareproviderv0alpha.CreateShareRequest) returns (cs3.usershareproviderv0alpha.CreateShareResponse); + rpc CreateShare(cs3.sharing.collaboration.v1beta1.CreateShareRequest) returns (cs3.sharing.collaboration.v1beta1.CreateShareResponse); // Removes a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc RemoveShare(cs3.usershareproviderv0alpha.RemoveShareRequest) returns (cs3.usershareproviderv0alpha.RemoveShareResponse); + rpc RemoveShare(cs3.sharing.collaboration.v1beta1.RemoveShareRequest) returns (cs3.sharing.collaboration.v1beta1.RemoveShareResponse); // Gets share information for a single share. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc GetShare(cs3.usershareproviderv0alpha.GetShareRequest) returns (cs3.usershareproviderv0alpha.GetShareResponse); + rpc GetShare(cs3.sharing.collaboration.v1beta1.GetShareRequest) returns (cs3.sharing.collaboration.v1beta1.GetShareResponse); // List the shares the authproviderenticated principal has created, // both as owner and creator. If a filter is specified, only // shares satisfying the filter MUST be returned. - rpc ListShares(cs3.usershareproviderv0alpha.ListSharesRequest) returns (cs3.usershareproviderv0alpha.ListSharesResponse); + rpc ListShares(cs3.sharing.collaboration.v1beta1.ListSharesRequest) returns (cs3.sharing.collaboration.v1beta1.ListSharesResponse); // Updates a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc UpdateShare(cs3.usershareproviderv0alpha.UpdateShareRequest) returns (cs3.usershareproviderv0alpha.UpdateShareResponse); + rpc UpdateShare(cs3.sharing.collaboration.v1beta1.UpdateShareRequest) returns (cs3.sharing.collaboration.v1beta1.UpdateShareResponse); // List all shares the authproviderenticated principal has received. - rpc ListReceivedShares(cs3.usershareproviderv0alpha.ListReceivedSharesRequest) returns (cs3.usershareproviderv0alpha.ListReceivedSharesResponse); + rpc ListReceivedShares(cs3.sharing.collaboration.v1beta1.ListReceivedSharesRequest) returns (cs3.sharing.collaboration.v1beta1.ListReceivedSharesResponse); // Update the received share to change the share state or the display name. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc UpdateReceivedShare(cs3.usershareproviderv0alpha.UpdateReceivedShareRequest) returns (cs3.usershareproviderv0alpha.UpdateReceivedShareResponse); + rpc UpdateReceivedShare(cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest) returns (cs3.sharing.collaboration.v1beta1.UpdateReceivedShareResponse); // Get the information for the given received share reference. // MUST return CODE_NOT_FOUND if the received share reference does not exist. - rpc GetReceivedShare(cs3.usershareproviderv0alpha.GetReceivedShareRequest) returns (cs3.usershareproviderv0alpha.GetReceivedShareResponse); + rpc GetReceivedShare(cs3.sharing.collaboration.v1beta1.GetReceivedShareRequest) returns (cs3.sharing.collaboration.v1beta1.GetReceivedShareResponse); // *****************************************************************/ // ************************ PREFERENCES ***************************/ // *****************************************************************/ + // Maps the key-value pair. - rpc SetKey(cs3.preferencesv0alpha.SetKeyRequest) returns (cs3.preferencesv0alpha.SetKeyResponse); + rpc SetKey(cs3.preferences.v1beta1.SetKeyRequest) returns (cs3.preferences.v1beta1.SetKeyResponse); // Returns the value associated with the // requested key. - rpc GetKey(cs3.preferencesv0alpha.GetKeyRequest) returns (cs3.preferencesv0alpha.GetKeyResponse); + rpc GetKey(cs3.preferences.v1beta1.GetKeyRequest) returns (cs3.preferences.v1beta1.GetKeyResponse); // *****************************************************************/ // ************************ PUBLIC SHARE ***************************/ // *****************************************************************/ + // Creates a new share. // MUST return CODE_NOT_FOUND if the resource reference does not exist. // MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of // (owner, shared_resource, grantee). // New shares MUST be created in the state SHARE_STATE_PENDING. - rpc CreatePublicShare(cs3.publicshareproviderv0alpha.CreatePublicShareRequest) returns (cs3.publicshareproviderv0alpha.CreatePublicShareResponse); + rpc CreatePublicShare(cs3.sharing.link.v1beta1.CreatePublicShareRequest) returns (cs3.sharing.link.v1beta1.CreatePublicShareResponse); // Removes a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc RemovePublicShare(cs3.publicshareproviderv0alpha.RemovePublicShareRequest) returns (cs3.publicshareproviderv0alpha.RemovePublicShareResponse); + rpc RemovePublicShare(cs3.sharing.link.v1beta1.RemovePublicShareRequest) returns (cs3.sharing.link.v1beta1.RemovePublicShareResponse); // Gets share information for a single share. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc GetPublicShare(cs3.publicshareproviderv0alpha.GetPublicShareRequest) returns (cs3.publicshareproviderv0alpha.GetPublicShareResponse); + rpc GetPublicShare(cs3.sharing.link.v1beta1.GetPublicShareRequest) returns (cs3.sharing.link.v1beta1.GetPublicShareResponse); // Gets share information for a single share by its unlisted token. // MUST return CODE_NOT_FOUND if the share does not exist. - rpc GetPublicShareByToken(cs3.publicshareproviderv0alpha.GetPublicShareByTokenRequest) returns (cs3.publicshareproviderv0alpha.GetPublicShareByTokenResponse); + rpc GetPublicShareByToken(cs3.sharing.link.v1beta1.GetPublicShareByTokenRequest) returns (cs3.sharing.link.v1beta1.GetPublicShareByTokenResponse); // List the shares the authproviderenticated principal has created, // both as owner and creator. If a filter is specified, only // shares satisfying the filter MUST be returned. - rpc ListPublicShares(cs3.publicshareproviderv0alpha.ListPublicSharesRequest) returns (cs3.publicshareproviderv0alpha.ListPublicSharesResponse); + rpc ListPublicShares(cs3.sharing.link.v1beta1.ListPublicSharesRequest) returns (cs3.sharing.link.v1beta1.ListPublicSharesResponse); // Updates a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc UpdatePublicShare(cs3.publicshareproviderv0alpha.UpdatePublicShareRequest) returns (cs3.publicshareproviderv0alpha.UpdatePublicShareResponse); + rpc UpdatePublicShare(cs3.sharing.link.v1beta1.UpdatePublicShareRequest) returns (cs3.sharing.link.v1beta1.UpdatePublicShareResponse); // *****************************************************************/ // ************************ OCM SHARE PROVIDER *********************/ // *****************************************************************/ + // Creates a new ocm share. // MUST return CODE_NOT_FOUND if the resource reference does not exist. // MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of // (owner, shared_resource, grantee). // New shares MUST be created in the state SHARE_STATE_PENDING. - rpc CreateOCMShare(cs3.ocmshareproviderv0alpha.CreateOCMShareRequest) returns (cs3.ocmshareproviderv0alpha.CreateOCMShareResponse); + rpc CreateOCMShare(cs3.sharing.ocm.v1beta1.CreateOCMShareRequest) returns (cs3.sharing.ocm.v1beta1.CreateOCMShareResponse); // Removes a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc RemoveOCMShare(cs3.ocmshareproviderv0alpha.RemoveOCMShareRequest) returns (cs3.ocmshareproviderv0alpha.RemoveOCMShareResponse); + rpc RemoveOCMShare(cs3.sharing.ocm.v1beta1.RemoveOCMShareRequest) returns (cs3.sharing.ocm.v1beta1.RemoveOCMShareResponse); // Gets share information for a single share. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc GetOCMShare(cs3.ocmshareproviderv0alpha.GetOCMShareRequest) returns (cs3.ocmshareproviderv0alpha.GetOCMShareResponse); + rpc GetOCMShare(cs3.sharing.ocm.v1beta1.GetOCMShareRequest) returns (cs3.sharing.ocm.v1beta1.GetOCMShareResponse); // List the shares the authproviderenticated principal has created, // both as owner and creator. If a filter is specified, only // shares satisfying the filter MUST be returned. - rpc ListOCMShares(cs3.ocmshareproviderv0alpha.ListOCMSharesRequest) returns (cs3.ocmshareproviderv0alpha.ListOCMSharesResponse); + rpc ListOCMShares(cs3.sharing.ocm.v1beta1.ListOCMSharesRequest) returns (cs3.sharing.ocm.v1beta1.ListOCMSharesResponse); // Updates a share. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc UpdateOCMShare(cs3.ocmshareproviderv0alpha.UpdateOCMShareRequest) returns (cs3.ocmshareproviderv0alpha.UpdateOCMShareResponse); + rpc UpdateOCMShare(cs3.sharing.ocm.v1beta1.UpdateOCMShareRequest) returns (cs3.sharing.ocm.v1beta1.UpdateOCMShareResponse); // List all shares the authproviderenticated principal has received. - rpc ListReceivedOCMShares(cs3.ocmshareproviderv0alpha.ListReceivedOCMSharesRequest) returns (cs3.ocmshareproviderv0alpha.ListReceivedOCMSharesResponse); + rpc ListReceivedOCMShares(cs3.sharing.ocm.v1beta1.ListReceivedOCMSharesRequest) returns (cs3.sharing.ocm.v1beta1.ListReceivedOCMSharesResponse); // Update the received share to change the share state or the display name. // MUST return CODE_NOT_FOUND if the share reference does not exist. - rpc UpdateReceivedOCMShare(cs3.ocmshareproviderv0alpha.UpdateReceivedOCMShareRequest) returns (cs3.ocmshareproviderv0alpha.UpdateReceivedOCMShareResponse); + rpc UpdateReceivedOCMShare(cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest) returns (cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareResponse); // *****************************************************************/ // ************************ APP REGISTRY ****************************/ // *****************************************************************/ + // Returns the app providers that are capable of handling this resource info. // MUST return CODE_NOT_FOUND if no providers are available. - rpc GetAppProviders(cs3.appregistryv0alpha.GetAppProvidersRequest) returns (cs3.appregistryv0alpha.GetAppProvidersResponse); + rpc GetAppProviders(cs3.app.registry.v1beta1.GetAppProvidersRequest) returns (cs3.app.registry.v1beta1.GetAppProvidersResponse); // Returns a list of the available app providers known by this registry. - rpc ListAppProviders(cs3.appregistryv0alpha.ListAppProvidersRequest) returns (cs3.appregistryv0alpha.ListAppProvidersResponse); + rpc ListAppProviders(cs3.app.registry.v1beta1.ListAppProvidersRequest) returns (cs3.app.registry.v1beta1.ListAppProvidersResponse); // *****************************************************************/ // ************************ USER PROVIDER **************************/ // *****************************************************************/ + // Gets the information about an user by its user id. - rpc GetUser(cs3.userproviderv0alpha.GetUserRequest) returns (cs3.userproviderv0alpha.GetUserResponse); + rpc GetUser(cs3.identity.user.v1beta1.GetUserRequest) returns (cs3.identity.user.v1beta1.GetUserResponse); // Gets the groups of a user. - rpc GetUserGroups(cs3.userproviderv0alpha.GetUserGroupsRequest) returns (cs3.userproviderv0alpha.GetUserGroupsResponse); + rpc GetUserGroups(cs3.identity.user.v1beta1.GetUserGroupsRequest) returns (cs3.identity.user.v1beta1.GetUserGroupsResponse); // Tells if the user is in a certain group. - rpc IsInGroup(cs3.userproviderv0alpha.IsInGroupRequest) returns (cs3.userproviderv0alpha.IsInGroupResponse); + rpc IsInGroup(cs3.identity.user.v1beta1.IsInGroupRequest) returns (cs3.identity.user.v1beta1.IsInGroupResponse); // Finds users by any attribute of the user? // TODO(labkode): to define the filters that make more sense. - rpc FindUsers(cs3.userproviderv0alpha.FindUsersRequest) returns (cs3.userproviderv0alpha.FindUsersResponse); + rpc FindUsers(cs3.identity.user.v1beta1.FindUsersRequest) returns (cs3.identity.user.v1beta1.FindUsersResponse); // *****************************************************************/ // ************************ AUTH REGISTRY **************************/ // *****************************************************************/ + // Returns a list of the available auth providers known by this registry. - rpc ListAuthProviders(cs3.authregistryv0alpha.ListAuthProvidersRequest) returns (ListAuthProvidersResponse); + rpc ListAuthProviders(cs3.auth.registry.v1beta1.ListAuthProvidersRequest) returns (ListAuthProvidersResponse); // ************************ STORAGE REGISTRY ** ********************/ // *****************************************************************/ + // Returns the home path for the given authenticated user. // When a user has access to multiple storage providers, one of them is the home. - rpc GetHome(cs3.storageregistryv0alpha.GetHomeRequest) returns (cs3.storageregistryv0alpha.GetHomeResponse); + rpc GetHome(cs3.storage.registry.v1beta1.GetHomeRequest) returns (cs3.storage.registry.v1beta1.GetHomeResponse); } // CAUTION: @@ -267,7 +279,7 @@ service GatewayService { message AuthenticateRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The type of authentication to use. string type = 2; @@ -285,22 +297,22 @@ message AuthenticateRequest { message AuthenticateResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The access token. string token = 3; // REQUIRED. - // The user id. - cs3.types.UserId user_id = 4; + // The user. + cs3.identity.user.v1beta1.User user = 4; } message WhoAmIRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The access token. string token = 2; @@ -309,78 +321,78 @@ message WhoAmIRequest { message WhoAmIResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The user information. - cs3.userproviderv0alpha.User user = 3; + cs3.identity.user.v1beta1.User user = 3; } message GetQuotaRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. - cs3.storageproviderv0alpha.Reference ref = 2; + cs3.storage.provider.v1beta1.Reference ref = 2; } message ListRecycleRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. - cs3.storageproviderv0alpha.Reference ref = 2; + cs3.storage.provider.v1beta1.Reference ref = 2; // OPTIONAL. // SHOULD be specified. // The start time range to query for recycle items. // The value is the Unix Epoch timestamp in seconds. - cs3.types.Timestamp from_ts = 3; + cs3.types.v1beta1.Timestamp from_ts = 3; // OPTIONAL. // SHOULD be specified. // The end time range to query for recycle items. // The value is Unix Epoch timestamp in seconds. - cs3.types.Timestamp to_ts = 4; + cs3.types.v1beta1.Timestamp to_ts = 4; } message ListRecycleStreamRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. - cs3.storageproviderv0alpha.Reference ref = 2; + cs3.storage.provider.v1beta1.Reference ref = 2; // OPTIONAL. // SHOULD be specified. // The start time range to query for recycle items. // The value is the Unix Epoch timestamp in seconds. - cs3.types.Timestamp from_ts = 3; + cs3.types.v1beta1.Timestamp from_ts = 3; // OPTIONAL. // SHOULD be specified. // The end time range to query for recycle items. // The value is Unix Epoch timestamp in seconds. - cs3.types.Timestamp to_ts = 4; + cs3.types.v1beta1.Timestamp to_ts = 4; } message PurgeRecycleRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. - cs3.storageproviderv0alpha.Reference ref = 2; + cs3.storage.provider.v1beta1.Reference ref = 2; } message InitiateFileDownloadResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The endpoint where to downooad the data. // The value MUST be a Uniform Resource Identifier (URI) @@ -398,10 +410,10 @@ message InitiateFileDownloadResponse { message InitiateFileUploadResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The endpoint where to upload the data. // The value MUST be a Uniform Resource Identifier (URI) @@ -411,7 +423,7 @@ message InitiateFileUploadResponse { // List of available checksums // the client can use when sending // the file. - repeated cs3.storageproviderv0alpha.ResourceChecksumPriority available_checksums = 4; + repeated cs3.storage.provider.v1beta1.ResourceChecksumPriority available_checksums = 4; // OPTIONAL. // A token that MUST be validated by the data gateway for the upload. // Only makes sense for uploads passing through the data gateway. @@ -421,10 +433,10 @@ message InitiateFileUploadResponse { message ListAuthProvidersResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of auth types. // TODO(labkode): maybe add description? diff --git a/cs3/userprovider/v0alpha/resources.proto b/cs3/identity/user/v1beta1/resources.proto similarity index 54% rename from cs3/userprovider/v0alpha/resources.proto rename to cs3/identity/user/v1beta1/resources.proto index cc6cb54d..1bba438d 100644 --- a/cs3/userprovider/v0alpha/resources.proto +++ b/cs3/identity/user/v1beta1/resources.proto @@ -18,25 +18,36 @@ syntax = "proto3"; -package cs3.userproviderv0alpha; +package cs3.identity.user.v1beta1; -option csharp_namespace = "CS3.UserProviderV0Alpha"; -option go_package = "userproviderv0alphapb"; +option csharp_namespace = "Cs3.Identity.User.V1Beta1"; +option go_package = "userv1beta1"; option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; -option java_package = "com.cs3.userproviderv0alpha"; -option objc_class_prefix = "CBOXUSERPROVIDER"; -option php_namespace = "CS3\\UserProviderV0Alpha"; +option java_package = "com.cs3.identity.user.v1beta1"; +option objc_class_prefix = "CIU"; +option php_namespace = "Cs3\\Identity\\User\\V1Beta1"; -import "cs3/types/types.proto"; +import "cs3/types/v1beta1/types.proto"; +// A UserId represents a user. +message UserId { + // REQUIRED. + // The identity provider for the user. + string idp = 1; + // REQUIRED. + // the unique identifier for the user in the scope of + // the identity provider. + string opaque_id = 2; +} + +// Represents an user of the system. message User { - cs3.types.UserId id = 1; - string issuer = 2; - string subject = 3; - string username = 4; - string mail = 5; - string display_name = 6; - repeated string groups = 7; - cs3.types.Opaque opaque = 8; + UserId id = 1; + string username = 2; + string mail = 3; + bool mail_verified = 4; + string display_name = 5; + repeated string groups = 6; + cs3.types.v1beta1.Opaque opaque = 7; } diff --git a/cs3/userprovider/v0alpha/userprovider.proto b/cs3/identity/user/v1beta1/user_api.proto similarity index 74% rename from cs3/userprovider/v0alpha/userprovider.proto rename to cs3/identity/user/v1beta1/user_api.proto index 38cdc58e..1ab6a686 100644 --- a/cs3/userprovider/v0alpha/userprovider.proto +++ b/cs3/identity/user/v1beta1/user_api.proto @@ -18,19 +18,19 @@ syntax = "proto3"; -package cs3.userproviderv0alpha; +package cs3.identity.user.v1beta1; -option csharp_namespace = "CS3.UserProviderV0Alpha"; -option go_package = "userproviderv0alphapb"; +option csharp_namespace = "Cs3.Identity.User.V1Beta1"; +option go_package = "userv1beta1"; option java_multiple_files = true; -option java_outer_classname = "UserproviderProto"; -option java_package = "com.cs3.userproviderv0alpha"; -option objc_class_prefix = "CBOXUSERPROVIDER"; -option php_namespace = "CS3\\UserProviderV0Alpha"; +option java_outer_classname = "UserApiProto"; +option java_package = "com.cs3.identity.user.v1beta1"; +option objc_class_prefix = "CIU"; +option php_namespace = "Cs3\\Identity\\User\\V1Beta1"; -import "cs3/rpc/status.proto"; -import "cs3/types/types.proto"; -import "cs3/userprovider/v0alpha/resources.proto"; +import "cs3/identity/user/v1beta1/resources.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/types/v1beta1/types.proto"; // UserProvider API. // @@ -49,7 +49,8 @@ import "cs3/userprovider/v0alpha/resources.proto"; // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service UserProviderService { +// Provides an API for managing users. +service UserAPI { // Gets the information about an user by its user id. rpc GetUser(GetUserRequest) returns (GetUserResponse); // Gets the groups of a user. @@ -64,19 +65,19 @@ service UserProviderService { message GetUserRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The id of the user. - cs3.types.UserId user_id = 2; + cs3.identity.user.v1beta1.UserId user_id = 2; } message GetUserResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The user information. User user = 3; @@ -85,19 +86,19 @@ message GetUserResponse { message GetUserGroupsRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The id of the user. - cs3.types.UserId user_id = 2; + cs3.identity.user.v1beta1.UserId user_id = 2; } message GetUserGroupsResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The groups for the user. repeated string groups = 3; @@ -106,10 +107,10 @@ message GetUserGroupsResponse { message IsInGroupRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The id of the user. - cs3.types.UserId user_id = 2; + cs3.identity.user.v1beta1.UserId user_id = 2; // REQUIRED. // The group to check. string group = 3; @@ -118,10 +119,10 @@ message IsInGroupRequest { message IsInGroupResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // Tells if the user belongs to the group. bool ok = 3; @@ -130,7 +131,7 @@ message IsInGroupResponse { message FindUsersRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. TODO(labkode): create propper filters for most common searchs. // The filter to apply. string filter = 2; @@ -139,10 +140,10 @@ message FindUsersRequest { message FindUsersResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The groups for the user. repeated User users = 3; diff --git a/cs3/preferences/v0alpha/preferences.proto b/cs3/preferences/v1beta1/preferences_api.proto similarity index 81% rename from cs3/preferences/v0alpha/preferences.proto rename to cs3/preferences/v1beta1/preferences_api.proto index 6a935d23..244f1306 100644 --- a/cs3/preferences/v0alpha/preferences.proto +++ b/cs3/preferences/v1beta1/preferences_api.proto @@ -18,17 +18,17 @@ syntax = "proto3"; -package cs3.preferencesv0alpha; +package cs3.preferences.v1beta1; -option csharp_namespace = "CS3.PreferencesV0Alpha"; -option go_package = "preferencesv0alphapb"; +option csharp_namespace = "Cs3.Preferences.V1Beta1"; +option go_package = "preferencesv1beta1"; option java_multiple_files = true; -option java_outer_classname = "PreferencesProto"; -option java_package = "com.cs3.preferencesv0alpha"; -option objc_class_prefix = "CBOXPREFERENCES"; -option php_namespace = "CS3\\PreferencesV0Alpha"; +option java_outer_classname = "PreferencesApiProto"; +option java_package = "com.cs3.preferences.v1beta1"; +option objc_class_prefix = "CPX"; +option php_namespace = "Cs3\\Preferences\\V1Beta1"; -import "cs3/rpc/status.proto"; +import "cs3/rpc/v1beta1/status.proto"; // Preferences API. // @@ -46,7 +46,7 @@ import "cs3/rpc/status.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service PreferencesService { +service PreferencesAPI { // Maps the key-value pair. rpc SetKey(SetKeyRequest) returns (SetKeyResponse); // Returns the value associated with the @@ -65,7 +65,7 @@ message SetKeyRequest { message SetKeyResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; } message GetKeyRequest { @@ -76,7 +76,7 @@ message GetKeyRequest { message GetKeyResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // REQUIRED. // The value associated with the key. string val = 2; diff --git a/cs3/rpc/code.proto b/cs3/rpc/v1beta1/code.proto similarity index 97% rename from cs3/rpc/code.proto rename to cs3/rpc/v1beta1/code.proto index c255a071..2567c6c3 100644 --- a/cs3/rpc/code.proto +++ b/cs3/rpc/v1beta1/code.proto @@ -18,14 +18,15 @@ syntax = "proto3"; -package cs3.rpc; +package cs3.rpc.v1beta1; -option go_package = "rpcpb"; +option csharp_namespace = "Cs3.Rpc.V1Beta1"; +option go_package = "rpcv1beta1"; option java_multiple_files = true; option java_outer_classname = "CodeProto"; -option java_package = "com.cs3.rpc"; -option objc_class_prefix = "CBOXRPC"; -option php_namespace = "CS3\\RPC"; +option java_package = "com.cs3.rpc.v1beta1"; +option objc_class_prefix = "CRX"; +option php_namespace = "Cs3\\Rpc\\V1Beta1"; // These are the canonical error codes used by CS3 APIs. // diff --git a/cs3/rpc/status.proto b/cs3/rpc/v1beta1/status.proto similarity index 87% rename from cs3/rpc/status.proto rename to cs3/rpc/v1beta1/status.proto index 6bf63bf0..f45741a9 100644 --- a/cs3/rpc/status.proto +++ b/cs3/rpc/v1beta1/status.proto @@ -18,16 +18,17 @@ syntax = "proto3"; -package cs3.rpc; +package cs3.rpc.v1beta1; -option go_package = "rpcpb"; +option csharp_namespace = "Cs3.Rpc.V1Beta1"; +option go_package = "rpcv1beta1"; option java_multiple_files = true; option java_outer_classname = "StatusProto"; -option java_package = "com.cs3.rpc"; -option objc_class_prefix = "CBOXRPC"; -option php_namespace = "CS3\\RPC"; +option java_package = "com.cs3.rpc.v1beta1"; +option objc_class_prefix = "CRX"; +option php_namespace = "Cs3\\Rpc\\V1Beta1"; -import "cs3/rpc/code.proto"; +import "cs3/rpc/v1beta1/code.proto"; // The `Status` message contains two pieces of data: error code and error message. // The error code should be an enum value of [cs3.rpc.code]. diff --git a/cs3/usershareprovider/v0alpha/usershareprovider.proto b/cs3/sharing/collaboration/v1beta1/collaboration_api.proto similarity index 76% rename from cs3/usershareprovider/v0alpha/usershareprovider.proto rename to cs3/sharing/collaboration/v1beta1/collaboration_api.proto index e37233de..3585c998 100644 --- a/cs3/usershareprovider/v0alpha/usershareprovider.proto +++ b/cs3/sharing/collaboration/v1beta1/collaboration_api.proto @@ -18,20 +18,21 @@ syntax = "proto3"; -package cs3.usershareproviderv0alpha; +package cs3.sharing.collaboration.v1beta1; -option csharp_namespace = "CS3.UserShareProviderV0Alpha"; -option go_package = "usershareproviderv0alphapb"; +option csharp_namespace = "Cs3.Sharing.Collaboration.V1Beta1"; +option go_package = "collaborationv1beta1"; option java_multiple_files = true; -option java_outer_classname = "UsershareproviderProto"; -option java_package = "com.cs3.usershareproviderv0alpha"; -option objc_class_prefix = "CBOXUSERSHAREPROVIDER"; -option php_namespace = "CS3\\UserShareProviderV0Alpha"; +option java_outer_classname = "CollaborationApiProto"; +option java_package = "com.cs3.sharing.collaboration.v1beta1"; +option objc_class_prefix = "CSC"; +option php_namespace = "Cs3\\Sharing\\Collaboration\\V1Beta1"; -import "cs3/rpc/status.proto"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/types/types.proto"; -import "cs3/usershareprovider/v0alpha/resources.proto"; +import "cs3/identity/user/v1beta1/resources.proto"; +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"; // User Share Provider API // @@ -51,7 +52,7 @@ import "cs3/usershareprovider/v0alpha/resources.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service UserShareProviderService { +service CollaborationAPI { // Creates a new share. // MUST return CODE_NOT_FOUND if the resource reference does not exist. // MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of @@ -84,10 +85,10 @@ service UserShareProviderService { message CreateShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The information of the resource to be shared. - cs3.storageproviderv0alpha.ResourceInfo resource_info = 2; + storage.provider.v1beta1.ResourceInfo resource_info = 2; // REQUIRED. // The share grant for the share. ShareGrant grant = 3; @@ -96,10 +97,10 @@ message CreateShareRequest { message CreateShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The created share. Share share = 3; @@ -108,10 +109,11 @@ message CreateShareResponse { message UpdateShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. ShareReference ref = 2; + // REQUIRED. message UpdateField { // One of the update fields MUST be specified. oneof field { @@ -121,36 +123,40 @@ message UpdateShareRequest { string display_name = 3; } } + // REQUIRED. UpdateField field = 3; } message UpdateShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message ListSharesRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. // represents a filter to apply to the request. message Filter { + // The filter to apply. enum Type { - LIST_SHARES_REQUEST_FILTER_TYPE_INVALID = 0; - LIST_SHARES_REQUEST_FILTER_TYPE_NO_FILTER = 1; - LIST_SHARES_REQUEST_FILTER_TYPE_RESOURCE_ID = 2; - LIST_SHARES_REQUEST_FILTER_TYPE_OWNER = 3; - LIST_SHARES_REQUEST_FILTER_TYPE_CREATOR = 4; + TYPE_INVALID = 0; + TYPE_NO = 1; + TYPE_RESOURCE_ID = 2; + TYPE_OWNER = 3; + TYPE_CREATOR = 4; } + // REQUIRED. Type type = 2; oneof term { - cs3.storageproviderv0alpha.ResourceId resource_id = 3; - cs3.types.UserId owner = 4; - cs3.types.UserId creator = 5; + storage.provider.v1beta1.ResourceId resource_id = 3; + cs3.identity.user.v1beta1.UserId owner = 4; + cs3.identity.user.v1beta1.UserId creator = 5; } } // OPTIONAL. @@ -161,10 +167,10 @@ message ListSharesRequest { message ListSharesResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of shares. repeated Share shares = 3; @@ -173,7 +179,7 @@ message ListSharesResponse { message RemoveShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. ShareReference ref = 2; @@ -182,16 +188,16 @@ message RemoveShareRequest { message RemoveShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message GetShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. ShareReference ref = 2; @@ -200,10 +206,10 @@ message GetShareRequest { message GetShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The share. Share share = 3; @@ -212,16 +218,16 @@ message GetShareResponse { message ListReceivedSharesRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; } message ListReceivedSharesResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of received shares. repeated ReceivedShare shares = 3; @@ -231,9 +237,11 @@ message ListReceivedSharesResponse { message UpdateReceivedShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + 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 { @@ -249,16 +257,16 @@ message UpdateReceivedShareRequest { message UpdateReceivedShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message GetReceivedShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference of the received share. ShareReference ref = 2; @@ -267,10 +275,10 @@ message GetReceivedShareRequest { message GetReceivedShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The share. ReceivedShare share = 3; diff --git a/cs3/usershareprovider/v0alpha/resources.proto b/cs3/sharing/collaboration/v1beta1/resources.proto similarity index 81% rename from cs3/usershareprovider/v0alpha/resources.proto rename to cs3/sharing/collaboration/v1beta1/resources.proto index bc25fd54..2d1370f3 100644 --- a/cs3/usershareprovider/v0alpha/resources.proto +++ b/cs3/sharing/collaboration/v1beta1/resources.proto @@ -18,18 +18,19 @@ syntax = "proto3"; -package cs3.usershareproviderv0alpha; +package cs3.sharing.collaboration.v1beta1; -option csharp_namespace = "CS3.UserShareProviderV0Alpha"; -option go_package = "usershareproviderv0alphapb"; +option csharp_namespace = "Cs3.Sharing.Collaboration.V1Beta1"; +option go_package = "collaborationv1beta1"; option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; -option java_package = "com.cs3.usershareproviderv0alpha"; -option objc_class_prefix = "CBOXUSERSHAREPROVIDER"; -option php_namespace = "CS3\\UserShareProviderV0Alpha"; +option java_package = "com.cs3.sharing.collaboration.v1beta1"; +option objc_class_prefix = "CSC"; +option php_namespace = "Cs3\\Sharing\\Collaboration\\V1Beta1"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/types/types.proto"; +import "cs3/identity/user/v1beta1/resources.proto"; +import "cs3/storage/provider/v1beta1/resources.proto"; +import "cs3/types/v1beta1/types.proto"; // Shares are relationships between a resource owner // (usually the authenticated user) who grants permissions to a recipient (grantee) @@ -40,37 +41,37 @@ message Share { ShareId id = 1; // REQUIRED. // Unique identifier of the shared resource. - cs3.storageproviderv0alpha.ResourceId resource_id = 2; + storage.provider.v1beta1.ResourceId resource_id = 2; // REQUIRED. // Permissions for the grantee to use // the resource. SharePermissions permissions = 3; // REQUIRED. // The receiver of the share, like a user, group ... - cs3.storageproviderv0alpha.Grantee grantee = 4; + storage.provider.v1beta1.Grantee grantee = 4; // REQUIRED. // Uniquely identifies the owner of the share // (the resource owner at the time of creating the share). // In case the ownership of the underlying resource changes // the share owner field MAY change to reflect the change of ownsership. - cs3.types.UserId owner = 5; + cs3.identity.user.v1beta1.UserId owner = 5; // REQUIRED. // Uniquely identifies a principal who initiates the share creation. // A creator can create shares on behalf of the owner (because of re-sharing, // because belonging to special groups, ...). // Creator and owner often result in being the same principal. - cs3.types.UserId creator = 6; + cs3.identity.user.v1beta1.UserId creator = 6; // REQUIRED. // Creation time of the share. - cs3.types.Timestamp ctime = 7; + cs3.types.v1beta1.Timestamp ctime = 7; // REQUIRED. // Last modification time of the share. - cs3.types.Timestamp mtime = 8; + cs3.types.v1beta1.Timestamp mtime = 8; } // The permissions for a share. message SharePermissions { - cs3.storageproviderv0alpha.ResourcePermissions permissions = 1; + storage.provider.v1beta1.ResourcePermissions permissions = 1; // TODO(labkode): additional permissions for shares like re-sharing } @@ -119,11 +120,11 @@ enum ShareState { // 4) The grantee for the share = Grantee("type" = "user", "" => "Bob") message ShareKey { // REQUIRED. - cs3.types.UserId owner = 2; + cs3.identity.user.v1beta1.UserId owner = 2; // REQUIRED. - cs3.storageproviderv0alpha.ResourceId resource_id = 3; + storage.provider.v1beta1.ResourceId resource_id = 3; // REQUIRED. - cs3.storageproviderv0alpha.Grantee grantee = 4; + storage.provider.v1beta1.Grantee grantee = 4; } // A share id identifies uniquely a // share in the share provider namespace. @@ -131,7 +132,7 @@ message ShareKey { message ShareId { // REQUIRED. // The internal id used by service implementor to - // uniquely identity the share in the internal + // uniquely Collaboration the share in the internal // implementation of the service. string opaque_id = 2; } @@ -155,7 +156,7 @@ message ShareReference { message ShareGrant { // REQUIRED. // The grantee of the grant. - cs3.storageproviderv0alpha.Grantee grantee = 1; + storage.provider.v1beta1.Grantee grantee = 1; // REQUIRED. // The share permissions for the grant. SharePermissions permissions = 2; diff --git a/cs3/publicshareprovider/v0alpha/publicshareprovider.proto b/cs3/sharing/link/v1beta1/link_api.proto similarity index 71% rename from cs3/publicshareprovider/v0alpha/publicshareprovider.proto rename to cs3/sharing/link/v1beta1/link_api.proto index 77eec7bc..8573f593 100644 --- a/cs3/publicshareprovider/v0alpha/publicshareprovider.proto +++ b/cs3/sharing/link/v1beta1/link_api.proto @@ -18,20 +18,21 @@ syntax = "proto3"; -package cs3.publicshareproviderv0alpha; +package cs3.sharing.link.v1beta1; -option csharp_namespace = "CS3.PublicShareProviderV0Alpha"; -option go_package = "publicshareproviderv0alphapb"; +option csharp_namespace = "Cs3.Sharing.Link.V1Beta1"; +option go_package = "linkv1beta1"; option java_multiple_files = true; -option java_outer_classname = "PublicshareproviderProto"; -option java_package = "com.cs3.publicshareproviderv0alpha"; -option objc_class_prefix = "CBOXPSP"; -option php_namespace = "CS3\\PublicShareProviderV0Alpha"; +option java_outer_classname = "LinkApiProto"; +option java_package = "com.cs3.sharing.link.v1beta1"; +option objc_class_prefix = "CSL"; +option php_namespace = "Cs3\\Sharing\\Link\\V1Beta1"; -import "cs3/publicshareprovider/v0alpha/resources.proto"; -import "cs3/rpc/status.proto"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/types/types.proto"; +import "cs3/identity/user/v1beta1/resources.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/sharing/link/v1beta1/resources.proto"; +import "cs3/storage/provider/v1beta1/resources.proto"; +import "cs3/types/v1beta1/types.proto"; // PublicShare Provider API // @@ -49,7 +50,7 @@ import "cs3/types/types.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service PublicShareProviderService { +service LinkAPI { // Creates a new share. // MUST return CODE_NOT_FOUND if the resource reference does not exist. // MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of @@ -77,35 +78,22 @@ service PublicShareProviderService { message CreatePublicShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The unique identifier for the shared storage resource. - cs3.storageproviderv0alpha.ResourceInfo resource_info = 2; + storage.provider.v1beta1.ResourceInfo resource_info = 2; // REQUIRED. // The restrictions to apply to the share. Grant grant = 3; } -// Defines the restrictions for the public share; -message Grant { - // REQUIRED. - // The permissions for the share. - PublicSharePermissions permissions = 1; - // OPTIONAL. - // A password to protect the access to the public share. - string password = 2; - // OPTIONAL. - // An expiration date to protect the access to the public share. - cs3.types.Timestamp expiration = 3; -} - message CreatePublicShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The created share. PublicShare share = 3; @@ -114,7 +102,7 @@ message CreatePublicShareResponse { message UpdatePublicShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // REQUIRED. @@ -122,12 +110,14 @@ message UpdatePublicShareRequest { PublicShareReference ref = 2; // Available fields to update. + // REQUIRED. message Update { + // REQUIRED. enum Type { - UPDATE_PUBLIC_SHARE_REQUEST_UPDATE_TYPE_INVALID = 0; - UPDATE_PUBLIC_SHARE_REQUEST_UPDATE_TYPE_PERMISSIONS = 1; - UPDATE_PUBLIC_SHARE_REQUEST_UPDATE_TYPE_PASSWORD = 2; - UPDATE_PUBLIC_SHARE_REQUEST_UPDATE_TYPE_EXPIRATION = 3; + TYPE_INVALID = 0; + TYPE_PERMISSIONS = 1; + TYPE_PASSWORD = 2; + TYPE_EXPIRATION = 3; } // REQUIRED. // Defines the field to update @@ -141,10 +131,10 @@ message UpdatePublicShareRequest { message UpdatePublicShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The updated public share. PublicShare share = 3; @@ -153,20 +143,22 @@ message UpdatePublicShareResponse { message ListPublicSharesRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. // represents a filter to apply to the request. message Filter { + // REQUIRED. enum Type { - LIST_PUBLIC_SHARES_REQUEST_FILTER_TYPE_INVALID = 0; - LIST_PUBLIC_SHARES_REQUEST_FILTER_TYPE_RESOURCE_ID = 1; - LIST_PUBLIC_SHARES_REQUEST_FILTER_TYPE_OWNER = 2; - LIST_PUBLIC_SHARES_REQUEST_FILTER_TYPE_CREATOR = 3; + TYPE_INVALID = 0; + TYPE_RESOURCE_ID = 1; + TYPE_OWNER = 2; + TYPE_CREATOR = 3; } Type type = 2; oneof term { - cs3.storageproviderv0alpha.ResourceId resource_id = 3; - cs3.types.UserId owner = 4; - cs3.types.UserId creator = 5; + storage.provider.v1beta1.ResourceId resource_id = 3; + cs3.identity.user.v1beta1.UserId owner = 4; + cs3.identity.user.v1beta1.UserId creator = 5; } } // OPTIONAL. @@ -177,10 +169,10 @@ message ListPublicSharesRequest { message ListPublicSharesResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of shares. repeated PublicShare share = 3; @@ -189,7 +181,7 @@ message ListPublicSharesResponse { message RemovePublicShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. PublicShareReference ref = 2; @@ -198,16 +190,16 @@ message RemovePublicShareRequest { message RemovePublicShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message GetPublicShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. PublicShareReference ref = 2; @@ -216,10 +208,10 @@ message GetPublicShareRequest { message GetPublicShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The share. PublicShare share = 3; @@ -228,7 +220,7 @@ message GetPublicShareResponse { message GetPublicShareByTokenRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The unlisted token to identify the public share. string token = 2; @@ -237,10 +229,10 @@ message GetPublicShareByTokenRequest { message GetPublicShareByTokenResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The share. PublicShare share = 3; diff --git a/cs3/publicshareprovider/v0alpha/resources.proto b/cs3/sharing/link/v1beta1/resources.proto similarity index 77% rename from cs3/publicshareprovider/v0alpha/resources.proto rename to cs3/sharing/link/v1beta1/resources.proto index 1992eece..8f2d9f7a 100644 --- a/cs3/publicshareprovider/v0alpha/resources.proto +++ b/cs3/sharing/link/v1beta1/resources.proto @@ -18,18 +18,19 @@ syntax = "proto3"; -package cs3.publicshareproviderv0alpha; +package cs3.sharing.link.v1beta1; -option csharp_namespace = "CS3.PublicShareProviderV0Alpha"; -option go_package = "publicshareproviderv0alphapb"; +option csharp_namespace = "Cs3.Sharing.Link.V1Beta1"; +option go_package = "linkv1beta1"; option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; -option java_package = "com.cs3.publicshareproviderv0alpha"; -option objc_class_prefix = "CBOXPUBLICSHARE"; -option php_namespace = "CS3\\PublicShareProviderV0Alpha"; +option java_package = "com.cs3.sharing.link.v1beta1"; +option objc_class_prefix = "CSL"; +option php_namespace = "Cs3\\Sharing\\Link\\V1Beta1"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/types/types.proto"; +import "cs3/identity/user/v1beta1/resources.proto"; +import "cs3/storage/provider/v1beta1/resources.proto"; +import "cs3/types/v1beta1/types.proto"; // //message PublicShare { @@ -61,7 +62,7 @@ message PublicShare { string token = 2; // REQUIRED. // Unique identifier of the shared resource. - cs3.storageproviderv0alpha.ResourceId resource_id = 3; + storage.provider.v1beta1.ResourceId resource_id = 3; // REQUIRED. // Permissions for the grantee to use // the resource. @@ -71,25 +72,25 @@ message PublicShare { // (the resource owner at the time of creating the share). // In case the ownership of the underlying resource changes // the share owner field MAY change to reflect the change of ownsership. - cs3.types.UserId owner = 5; + cs3.identity.user.v1beta1.UserId owner = 5; // REQUIRED. // Uniquely identifies a principal who initiates the share creation. // A creator can create shares on behalf of the owner (because of re-sharing, // because belonging to special groups, ...). // Creator and owner often result in being the same principal. - cs3.types.UserId creator = 6; + cs3.identity.user.v1beta1.UserId creator = 6; // REQUIRED. // Creation time of the share. - cs3.types.Timestamp ctime = 7; + cs3.types.v1beta1.Timestamp ctime = 7; // REQUIRED. // Last modification time of the share. - cs3.types.Timestamp mtime = 8; + cs3.types.v1beta1.Timestamp mtime = 8; // REQUIRED. // Determines if the public share is password protected or not. bool password_protected = 9; // OPTIONAL. // The expiration time for the public share. - cs3.types.Timestamp expiration = 10; + cs3.types.v1beta1.Timestamp expiration = 10; // OPTIONAL. // Display name for the shared resource (such as file, directory basename or any // user defined name). @@ -101,7 +102,7 @@ message PublicShare { // The permissions for a share. message PublicSharePermissions { - cs3.storageproviderv0alpha.ResourcePermissions permissions = 1; + storage.provider.v1beta1.ResourcePermissions permissions = 1; // TODO(labkode): additional permissions for shares like re-sharing } @@ -128,3 +129,16 @@ message PublicShareReference { string token = 2; } } + +// Defines the restrictions for the public share. +message Grant { + // REQUIRED. + // The permissions for the share. + PublicSharePermissions permissions = 1; + // OPTIONAL. + // A password to protect the access to the public share. + string password = 2; + // OPTIONAL. + // An expiration date to protect the access to the public share. + cs3.types.v1beta1.Timestamp expiration = 3; +} diff --git a/cs3/ocmshareprovider/v0alpha/ocmshareprovider.proto b/cs3/sharing/ocm/v1beta1/ocm_api.proto similarity index 76% rename from cs3/ocmshareprovider/v0alpha/ocmshareprovider.proto rename to cs3/sharing/ocm/v1beta1/ocm_api.proto index 37a9ced5..743e7e38 100644 --- a/cs3/ocmshareprovider/v0alpha/ocmshareprovider.proto +++ b/cs3/sharing/ocm/v1beta1/ocm_api.proto @@ -18,20 +18,21 @@ syntax = "proto3"; -package cs3.ocmshareproviderv0alpha; +package cs3.sharing.ocm.v1beta1; -option csharp_namespace = "CS3.OCMShareProviderV0Alpha"; -option go_package = "ocmshareproviderv0alphapb"; +option csharp_namespace = "Cs3.Sharing.Ocm.V1Beta1"; +option go_package = "ocmv1beta1"; option java_multiple_files = true; -option java_outer_classname = "OcmshareproviderProto"; -option java_package = "com.cs3.ocmshareproviderv0alpha"; -option objc_class_prefix = "CBOXOCMSHAREPROVIDER"; -option php_namespace = "CS3\\OCMShareProviderV0Alpha"; +option java_outer_classname = "OcmApiProto"; +option java_package = "com.cs3.sharing.ocm.v1beta1"; +option objc_class_prefix = "CSO"; +option php_namespace = "Cs3\\Sharing\\Ocm\\V1Beta1"; -import "cs3/ocmshareprovider/v0alpha/resources.proto"; -import "cs3/rpc/status.proto"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/types/types.proto"; +import "cs3/identity/user/v1beta1/resources.proto"; +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"; // OCM Share Provider API // @@ -50,7 +51,7 @@ import "cs3/types/types.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service OCMShareProviderService { +service OcmAPI { // Creates a new ocm share. // MUST return CODE_NOT_FOUND if the resource reference does not exist. // MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of @@ -80,10 +81,10 @@ service OCMShareProviderService { message CreateOCMShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The unique identifier for the shared storage resource. - cs3.storageproviderv0alpha.ResourceId resource_id = 2; + storage.provider.v1beta1.ResourceId resource_id = 2; // REQUIRED. // The share grant for the share. ShareGrant grant = 3; @@ -92,10 +93,10 @@ message CreateOCMShareRequest { message CreateOCMShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The created share. Share share = 3; @@ -104,10 +105,12 @@ message CreateOCMShareResponse { message UpdateOCMShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. + // REQUIRED. ShareReference ref = 2; + // REQUIRED. message UpdateField { // One of the update fields MUST be specified. oneof field { @@ -123,32 +126,36 @@ message UpdateOCMShareRequest { message UpdateOCMShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message ListOCMSharesRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. // represents a filter to apply to the request. message Filter { + // REQUIRED. + // The filter to apply. enum Type { - LIST_OCM_SHARES_REQUEST_FILTER_TYPE_INVALID = 0; - LIST_OCM_SHARES_REQUEST_FILTER_TYPE_NO_FILTER = 1; - LIST_OCM_SHARES_REQUEST_FILTER_TYPE_RESOURCE_ID = 2; - LIST_OCM_SHARES_REQUEST_FILTER_TYPE_OWNER = 3; - LIST_OCM_SHARES_REQUEST_FILTER_TYPE_CREATOR = 4; - LIST_OCM_SHARES_REQUEST_FILTER_TYPE_OWNER_PROVIDER = 5; - LIST_OCM_SHARES_REQUEST_FILTER_TYPE_CREATOR_PROVIDER = 6; + TYPE_INVALID = 0; + TYPE_NO = 1; + TYPE_RESOURCE_ID = 2; + TYPE_OWNER = 3; + TYPE_CREATOR = 4; + TYPE_OWNER_PROVIDER = 5; + TYPE_CREATOR_PROVIDER = 6; } + // REQUIRED. Type type = 2; oneof term { - cs3.storageproviderv0alpha.ResourceId resource_id = 3; - cs3.types.UserId owner = 4; - cs3.types.UserId creator = 5; + storage.provider.v1beta1.ResourceId resource_id = 3; + cs3.identity.user.v1beta1.UserId owner = 4; + cs3.identity.user.v1beta1.UserId creator = 5; } } // OPTIONAL. @@ -159,10 +166,10 @@ message ListOCMSharesRequest { message ListOCMSharesResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of shares. repeated Share shares = 3; @@ -171,7 +178,7 @@ message ListOCMSharesResponse { message RemoveOCMShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. ShareReference ref = 2; @@ -180,16 +187,16 @@ message RemoveOCMShareRequest { message RemoveOCMShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message GetOCMShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. ShareReference ref = 2; @@ -198,10 +205,10 @@ message GetOCMShareRequest { message GetOCMShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The share. Share share = 3; @@ -210,16 +217,16 @@ message GetOCMShareResponse { message ListReceivedOCMSharesRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; } message ListReceivedOCMSharesResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of received shares. repeated ReceivedShare shares = 3; @@ -229,9 +236,10 @@ message ListReceivedOCMSharesResponse { message UpdateReceivedOCMShareRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. ShareReference ref = 2; + // REQUIRED. message UpdateField { // One of the update fields MUST be specified. oneof field { @@ -247,8 +255,8 @@ message UpdateReceivedOCMShareRequest { message UpdateReceivedOCMShareResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } diff --git a/cs3/ocmshareprovider/v0alpha/resources.proto b/cs3/sharing/ocm/v1beta1/resources.proto similarity index 83% rename from cs3/ocmshareprovider/v0alpha/resources.proto rename to cs3/sharing/ocm/v1beta1/resources.proto index 5d5c56b8..e4366f44 100644 --- a/cs3/ocmshareprovider/v0alpha/resources.proto +++ b/cs3/sharing/ocm/v1beta1/resources.proto @@ -18,18 +18,19 @@ syntax = "proto3"; -package cs3.ocmshareproviderv0alpha; +package cs3.sharing.ocm.v1beta1; -option csharp_namespace = "CS3.ocmshareproviderV0Alpha"; -option go_package = "ocmshareproviderv0alphapb"; +option csharp_namespace = "Cs3.Sharing.Ocm.V1Beta1"; +option go_package = "ocmv1beta1"; option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; -option java_package = "com.cs3.ocmshareproviderv0alpha"; -option objc_class_prefix = "CBOXocmshareprovider"; -option php_namespace = "CS3\\ocmshareproviderV0Alpha"; +option java_package = "com.cs3.sharing.ocm.v1beta1"; +option objc_class_prefix = "CSO"; +option php_namespace = "Cs3\\Sharing\\Ocm\\V1Beta1"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/types/types.proto"; +import "cs3/identity/user/v1beta1/resources.proto"; +import "cs3/storage/provider/v1beta1/resources.proto"; +import "cs3/types/v1beta1/types.proto"; // Shares are relationships between a resource owner // (usually the authenticated user) who grants permissions to a recipient (grantee) @@ -40,37 +41,37 @@ message Share { ShareId id = 1; // REQUIRED. // Unique identifier of the shared resource. - cs3.storageproviderv0alpha.ResourceId resource_id = 2; + storage.provider.v1beta1.ResourceId resource_id = 2; // REQUIRED. // Permissions for the grantee to use // the resource. SharePermissions permissions = 3; // REQUIRED. // The receiver of the share, like a user, group ... - cs3.storageproviderv0alpha.Grantee grantee = 4; + storage.provider.v1beta1.Grantee grantee = 4; // REQUIRED. // Uniquely identifies the owner of the share // (the resource owner at the time of creating the share). // In case the ownership of the underlying resource changes // the share owner field MAY change to reflect the change of ownsership. - cs3.types.UserId owner = 5; + cs3.identity.user.v1beta1.UserId owner = 5; // REQUIRED. // Uniquely identifies a principal who initiates the share creation. // A creator can create shares on behalf of the owner (because of re-sharing, // because belonging to special groups, ...). // Creator and owner often result in being the same principal. - cs3.types.UserId creator = 6; + cs3.identity.user.v1beta1.UserId creator = 6; // REQUIRED. // Creation time of the share. - cs3.types.Timestamp ctime = 7; + cs3.types.v1beta1.Timestamp ctime = 7; // REQUIRED. // Last modification time of the share. - cs3.types.Timestamp mtime = 8; + cs3.types.v1beta1.Timestamp mtime = 8; } // The permissions for a share. message SharePermissions { - cs3.storageproviderv0alpha.ResourcePermissions permissions = 1; + storage.provider.v1beta1.ResourcePermissions permissions = 1; bool reshare = 2; } @@ -118,11 +119,11 @@ enum ShareState { // 4) The grantee for the share = Grantee("type" = "user", "" => "Bob") message ShareKey { // REQUIRED. - cs3.types.UserId owner = 2; + cs3.identity.user.v1beta1.UserId owner = 2; // REQUIRED. - cs3.storageproviderv0alpha.ResourceId resource_id = 3; + storage.provider.v1beta1.ResourceId resource_id = 3; // REQUIRED. - cs3.storageproviderv0alpha.Grantee grantee = 4; + storage.provider.v1beta1.Grantee grantee = 4; } // A share id identifies uniquely a // share in the share provider namespace. @@ -154,7 +155,7 @@ message ShareReference { message ShareGrant { // REQUIRED. // The grantee of the grant. - cs3.storageproviderv0alpha.Grantee grantee = 1; + storage.provider.v1beta1.Grantee grantee = 1; // REQUIRED. // The share permissions for the grant. SharePermissions permissions = 2; diff --git a/cs3/storageprovider/v0alpha/storageprovider.proto b/cs3/storage/provider/v1beta1/provider_api.proto similarity index 83% rename from cs3/storageprovider/v0alpha/storageprovider.proto rename to cs3/storage/provider/v1beta1/provider_api.proto index b5b52972..39eed29b 100644 --- a/cs3/storageprovider/v0alpha/storageprovider.proto +++ b/cs3/storage/provider/v1beta1/provider_api.proto @@ -18,20 +18,19 @@ syntax = "proto3"; -package cs3.storageproviderv0alpha; +package cs3.storage.provider.v1beta1; -option csharp_namespace = "CS3.StorageProviderV0Alpha"; -option go_package = "storageproviderv0alphapb"; +option csharp_namespace = "Cs3.Storage.Provider.V1Beta1"; +option go_package = "providerv1beta1"; option java_multiple_files = true; -option java_outer_classname = "StorageproviderProto"; -option java_package = "com.cs3.storageproviderv0alpha"; -option objc_class_prefix = "CBOXAB"; -option php_namespace = "CS3\\StorageProviderV0Alpha"; +option java_outer_classname = "ProviderApiProto"; +option java_package = "com.cs3.storage.provider.v1beta1"; +option objc_class_prefix = "CSP"; +option php_namespace = "Cs3\\Storage\\Provider\\V1Beta1"; -import "cs3/rpc/status.proto"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/storagetypes/storagetypes.proto"; -import "cs3/types/types.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/storage/provider/v1beta1/resources.proto"; +import "cs3/types/v1beta1/types.proto"; // Storage Provider API // @@ -49,7 +48,7 @@ import "cs3/types/types.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service StorageProviderService { +service ProviderAPI { // Adds a new grant for the provided reference. // MUST return CODE_NOT_FOUND if the reference does not exist rpc AddGrant(AddGrantRequest) returns (AddGrantResponse); @@ -63,8 +62,6 @@ service StorageProviderService { // If a resource specifies a reference or symlink type, only the reference is removed (not the target). // MUST return CODE_NOT_FOUND if the reference does not exist. rpc Delete(DeleteRequest) returns (DeleteResponse); - // Returns the information for this provider. - rpc GetProvider(GetProviderRequest) returns (GetProviderResponse); // Returns the path reference for // the provided resource id reference. // MUST return CODE_NOT_FOUND if the reference does not exist @@ -136,17 +133,17 @@ service StorageProviderService { // The references resource can be accessed by the protocol specificied in the request message. rpc CreateReference(CreateReferenceRequest) returns (CreateReferenceResponse); // Sets arbitrary metadata into a storage resource. - // Arbitrary metadata is returned in a cs3.storageproviderv0alpha.ResourceInfo. + // Arbitrary metadata is returned in a cs3.storageprovider.v1beta1.ResourceInfo. rpc SetArbitraryMetadata(SetArbitraryMetadataRequest) returns (SetArbitraryMetadataResponse); // Unsets arbitrary metdata into a storage resource. - // Arbitrary metadata is returned in a cs3.storageproviderv0alpha.ResourceInfo. + // Arbitrary metadata is returned in a cs3.storageprovider.v1beta1.ResourceInfo. rpc UnsetArbitraryMetadata(UnsetArbitraryMetadataRequest) returns (UnsetArbitraryMetadataResponse); } message AddGrantRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -158,16 +155,16 @@ message AddGrantRequest { message AddGrantResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message CreateContainerRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -176,16 +173,16 @@ message CreateContainerRequest { message CreateContainerResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message DeleteRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -194,34 +191,16 @@ message DeleteRequest { message DeleteResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; -} - -message GetProviderRequest { - // OPTIONAL. - // Opaque information. - cs3.types.Opaque opaque = 1; -} - -message GetProviderResponse { - // REQUIRED. - // The response status. - cs3.rpc.Status status = 1; - // OPTIONAL. - // Opaque information. - cs3.types.Opaque opaque = 2; - // REQUIRED. - // The information for the storage provider. - cs3.storagetypes.ProviderInfo info = 3; + cs3.types.v1beta1.Opaque opaque = 2; } message GetPathRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The resource id of the resource. ResourceId resource_id = 2; @@ -230,10 +209,10 @@ message GetPathRequest { message GetPathResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The path of the resource. string path = 3; @@ -242,16 +221,16 @@ message GetPathResponse { message GetQuotaRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; } message GetQuotaResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The total available bytes. uint64 total_bytes = 3; @@ -263,7 +242,7 @@ message GetQuotaResponse { message InitiateFileUploadRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -272,10 +251,10 @@ message InitiateFileUploadRequest { message InitiateFileUploadResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The endpoint where to upload the data. // The value MUST be a Uniform Resource Identifier (URI) @@ -294,7 +273,7 @@ message InitiateFileUploadResponse { message InitiateFileDownloadRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -303,10 +282,10 @@ message InitiateFileDownloadRequest { message InitiateFileDownloadResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The endpoint where to downooad the data. // The value MUST be a Uniform Resource Identifier (URI) @@ -320,7 +299,7 @@ message InitiateFileDownloadResponse { message ListGrantsRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -329,10 +308,10 @@ message ListGrantsRequest { message ListGrantsResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The grants. repeated Grant grants = 3; @@ -341,7 +320,7 @@ message ListGrantsResponse { message ListContainerStreamRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -354,10 +333,10 @@ message ListContainerStreamRequest { message ListContainerStreamResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The resource information. ResourceInfo info = 3; @@ -366,7 +345,7 @@ message ListContainerStreamResponse { message ListContainerRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -379,10 +358,10 @@ message ListContainerRequest { message ListContainerResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of resource informations. repeated ResourceInfo infos = 3; @@ -391,7 +370,7 @@ message ListContainerResponse { message ListFileVersionsRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -400,10 +379,10 @@ message ListFileVersionsRequest { message ListFileVersionsResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of file versions. repeated FileVersion versions = 3; @@ -412,26 +391,26 @@ message ListFileVersionsResponse { message ListRecycleRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // OPTIONAL. // SHOULD be specified. // The start time range to query for recycle items. // The value is the Unix Epoch timestamp in seconds. - cs3.types.Timestamp from_ts = 2; + cs3.types.v1beta1.Timestamp from_ts = 2; // OPTIONAL. // SHOULD be specified. // The end time range to query for recycle items. // The value is Unix Epoch timestamp in seconds. - cs3.types.Timestamp to_ts = 3; + cs3.types.v1beta1.Timestamp to_ts = 3; } message ListRecycleResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of recycle items. repeated RecycleItem recycle_items = 3; @@ -440,26 +419,26 @@ message ListRecycleResponse { message ListRecycleStreamRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // OPTIONAL. // SHOULD be specified. // The start time range to query for recycle items. // The value is the Unix Epoch timestamp in seconds. - cs3.types.Timestamp from_ts = 2; + cs3.types.v1beta1.Timestamp from_ts = 2; // OPTIONAL. // SHOULD be specified. // The end time range to query for recycle items. // The value is Unix Epoch timestamp in seconds. - cs3.types.Timestamp to_ts = 3; + cs3.types.v1beta1.Timestamp to_ts = 3; } message ListRecycleStreamResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The recycle items. RecycleItem recycle_item = 3; @@ -468,7 +447,7 @@ message ListRecycleStreamResponse { message MoveRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The source reference the resource is moved from. Reference source = 2; @@ -480,16 +459,16 @@ message MoveRequest { message MoveResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message PurgeRecycleRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -498,16 +477,16 @@ message PurgeRecycleRequest { message PurgeRecycleResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message RestoreFileVersionRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -519,17 +498,17 @@ message RestoreFileVersionRequest { message RestoreFileVersionResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } // TODO: restore to original location if not specified as OPTIONAL? message RestoreRecycleItemRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -548,16 +527,16 @@ message RestoreRecycleItemRequest { message RestoreRecycleItemResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message RemoveGrantRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -569,16 +548,16 @@ message RemoveGrantRequest { message RemoveGrantResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message StatRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -591,10 +570,10 @@ message StatRequest { message StatResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The resource information. ResourceInfo info = 3; @@ -603,7 +582,7 @@ message StatResponse { message UpdateGrantRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -615,16 +594,16 @@ message UpdateGrantRequest { message UpdateGrantResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message CreateReferenceRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The location where to store the reference. string path = 2; @@ -636,16 +615,16 @@ message CreateReferenceRequest { message CreateReferenceResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message SetArbitraryMetadataRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -657,16 +636,16 @@ message SetArbitraryMetadataRequest { message SetArbitraryMetadataResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } message UnsetArbitraryMetadataRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference to which the action should be performed. Reference ref = 2; @@ -678,8 +657,8 @@ message UnsetArbitraryMetadataRequest { message UnsetArbitraryMetadataResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; } diff --git a/cs3/storageprovider/v0alpha/resources.proto b/cs3/storage/provider/v1beta1/resources.proto similarity index 92% rename from cs3/storageprovider/v0alpha/resources.proto rename to cs3/storage/provider/v1beta1/resources.proto index db0295b0..149845a4 100644 --- a/cs3/storageprovider/v0alpha/resources.proto +++ b/cs3/storage/provider/v1beta1/resources.proto @@ -18,24 +18,25 @@ syntax = "proto3"; -package cs3.storageproviderv0alpha; +package cs3.storage.provider.v1beta1; -option csharp_namespace = "CS3.StorageProviderV0Alpha"; -option go_package = "storageproviderv0alphapb"; +option csharp_namespace = "Cs3.Storage.Provider.V1Beta1"; +option go_package = "providerv1beta1"; option java_multiple_files = true; option java_outer_classname = "ResourcesProto"; -option java_package = "com.cs3.storageproviderv0alpha"; -option objc_class_prefix = "CBOXAB"; -option php_namespace = "CS3\\StorageProviderV0Alpha"; +option java_package = "com.cs3.storage.provider.v1beta1"; +option objc_class_prefix = "CSP"; +option php_namespace = "Cs3\\Storage\\Provider\\V1Beta1"; -import "cs3/types/types.proto"; +import "cs3/identity/user/v1beta1/resources.proto"; +import "cs3/types/v1beta1/types.proto"; // Represents the information (metadata) about // a storage resource organized in a hierarchical namespace (file, directory/container, reference, symlink, ...). message ResourceInfo { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The type of the resource (container, file, ...) // See the enum ResourceType for all possible types. @@ -60,7 +61,7 @@ message ResourceInfo { // REQUIRED. // Last modification time (mtime) of file or directory contents. // For reference types this is NOT the mtime of the target. - cs3.types.Timestamp mtime = 7; + cs3.types.v1beta1.Timestamp mtime = 7; // REQUIRED. // The path for the resource. // It MUST start with the slash character (/). @@ -76,7 +77,7 @@ message ResourceInfo { uint64 size = 10; // REQUIRED: // Identifier of the owner of the resource. - cs3.types.UserId owner = 11; + cs3.identity.user.v1beta1.UserId owner = 11; // OPTIONAL. // Additional metadata attached to the resource. // If resource type is RESOURCE_TYPE_REFERENCE it MUST @@ -105,6 +106,7 @@ message CanonicalMetadata { } +// Arbitrary metadata than can be set to the resource. message ArbitraryMetadata { map metadata = 1; } @@ -253,7 +255,7 @@ message Grantee { GranteeType type = 1; // The unique id for the grantee. // For example, a group name, user name or uuid. - cs3.types.UserId id = 2; + cs3.identity.user.v1beta1.UserId id = 2; } // The type of the grantee. @@ -270,7 +272,7 @@ enum GranteeType { message FileVersion { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // MUST the specified. // The key to identify the version. string key = 3; @@ -287,7 +289,7 @@ message FileVersion { message RecycleItem { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The type of the resource. ResourceType type = 2; @@ -303,5 +305,5 @@ message RecycleItem { // REQUIRED. // The deletion time of the resource // in Unix Epoch timestamp in seconds. - cs3.types.Timestamp deletion_time = 6; + cs3.types.v1beta1.Timestamp deletion_time = 6; } diff --git a/cs3/storageregistry/v0alpha/storageregistry.proto b/cs3/storage/registry/v1beta1/registry_api.proto similarity index 75% rename from cs3/storageregistry/v0alpha/storageregistry.proto rename to cs3/storage/registry/v1beta1/registry_api.proto index 084b9d8d..862b987c 100644 --- a/cs3/storageregistry/v0alpha/storageregistry.proto +++ b/cs3/storage/registry/v1beta1/registry_api.proto @@ -18,20 +18,20 @@ syntax = "proto3"; -package cs3.storageregistryv0alpha; +package cs3.storage.registry.v1beta1; -option csharp_namespace = "CS3.StorageRegistryV0Alpha"; -option go_package = "storageregistryv0alphapb"; +option csharp_namespace = "Cs3.Storage.Registry.V1Beta1"; +option go_package = "registryv1beta1"; option java_multiple_files = true; -option java_outer_classname = "StorageregistryProto"; -option java_package = "com.cs3.storageregistryv0alpha"; -option objc_class_prefix = "CBOXSTORAGEREGISTRY"; -option php_namespace = "CS3\\StorageRegistryV0Alpha"; +option java_outer_classname = "RegistryApiProto"; +option java_package = "com.cs3.storage.registry.v1beta1"; +option objc_class_prefix = "CSR"; +option php_namespace = "Cs3\\Storage\\Registry\\V1Beta1"; -import "cs3/rpc/status.proto"; -import "cs3/storageprovider/v0alpha/resources.proto"; -import "cs3/storagetypes/storagetypes.proto"; -import "cs3/types/types.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/storage/provider/v1beta1/resources.proto"; +import "cs3/storage/registry/v1beta1/resources.proto"; +import "cs3/types/v1beta1/types.proto"; // Storage Registry API // @@ -49,7 +49,7 @@ import "cs3/types/types.proto"; // Any method MAY return INTERNAL. // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. -service StorageRegistryService { +service RegistryAPI { // Returns the storage provider that is reponsible for the given // resource reference. // MUST return CODE_NOT_FOUND if the reference does not exist. @@ -67,28 +67,28 @@ service StorageRegistryService { message GetStorageProviderRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The reference for the resource. - cs3.storageproviderv0alpha.Reference ref = 2; + cs3.storage.provider.v1beta1.Reference ref = 2; } message GetStorageProviderResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The storage provider handling the requested storage resource. - cs3.storagetypes.ProviderInfo provider = 3; + cs3.storage.registry.v1beta1.ProviderInfo provider = 3; } message ListStorageProvidersRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // TODO(labkode): maybe add some filter? } @@ -96,28 +96,28 @@ message ListStorageProvidersRequest { message ListStorageProvidersResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The list of storage providers this registry knows about. - repeated cs3.storagetypes.ProviderInfo providers = 3; + repeated cs3.storage.registry.v1beta1.ProviderInfo providers = 3; } message GetHomeRequest { // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; } message GetHomeResponse { // REQUIRED. // The response status. - cs3.rpc.Status status = 1; + cs3.rpc.v1beta1.Status status = 1; // OPTIONAL. // Opaque information. - cs3.types.Opaque opaque = 2; + cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. // The path to the home in a storage provider. // For example /eos/user/h/hugo in the storage provider with root path /eos/user/. diff --git a/cs3/storagetypes/storagetypes.proto b/cs3/storage/registry/v1beta1/resources.proto similarity index 82% rename from cs3/storagetypes/storagetypes.proto rename to cs3/storage/registry/v1beta1/resources.proto index d3c83b03..38d0f49c 100644 --- a/cs3/storagetypes/storagetypes.proto +++ b/cs3/storage/registry/v1beta1/resources.proto @@ -18,25 +18,24 @@ syntax = "proto3"; -// This package contains common types -// used for sharing. -package cs3.storagetypes; +package cs3.storage.registry.v1beta1; -option csharp_namespace = "CS3.StorageTypes"; -option go_package = "storagetypespb"; +option csharp_namespace = "Cs3.Storage.Registry.V1Beta1"; +option go_package = "registryv1beta1"; option java_multiple_files = true; -option java_outer_classname = "StoragetypesProto"; -option java_package = "com.cs3.storagetypes"; -option objc_class_prefix = "CBOXSHARETYPES"; -option php_namespace = "CS3\\StorageTypes"; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.cs3.storage.registry.v1beta1"; +option objc_class_prefix = "CSR"; +option php_namespace = "Cs3\\Storage\\Registry\\V1Beta1"; -import "cs3/types/types.proto"; +import "cs3/types/v1beta1/types.proto"; +// The information for the storage provider. message ProviderInfo { // OPTIONAL. // Opaque information (containing storage-specific information). // For example, additional metadata attached to the resource. - cs3.types.Opaque opaque = 1; + cs3.types.v1beta1.Opaque opaque = 1; // REQUIRED. // The storage provider id that will become part of the // resource id. diff --git a/cs3/types/types.proto b/cs3/types/v1beta1/types.proto similarity index 85% rename from cs3/types/types.proto rename to cs3/types/v1beta1/types.proto index b2550f0f..9ce7ea4e 100644 --- a/cs3/types/types.proto +++ b/cs3/types/v1beta1/types.proto @@ -18,14 +18,15 @@ syntax = "proto3"; -package cs3.types; +package cs3.types.v1beta1; -option go_package = "typespb"; +option csharp_namespace = "Cs3.Types.V1Beta1"; +option go_package = "typesv1beta1"; option java_multiple_files = true; option java_outer_classname = "TypesProto"; -option java_package = "com.cs3.types"; -option objc_class_prefix = "CBOXTYPES"; -option php_namespace = "CS3\\TYPES"; +option java_package = "com.cs3.types.v1beta1"; +option objc_class_prefix = "CTX"; +option php_namespace = "Cs3\\Types\\V1Beta1"; // Opaque represents opaque information // in a form on a map. @@ -71,14 +72,3 @@ message Timestamp { // inclusive. uint32 nanos = 2; } - -// A UserId represents a user. -message UserId { - // REQUIRED. - // The identity provider for the user. - string idp = 1; - // REQUIRED. - // the unique identifier for the user in the scope of - // the identity provider. - string opaque_id = 2; -} diff --git a/docs/index.html b/docs/index.html index 6b58037f..19eb897f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -175,102 +175,58 @@

Table of Contents

  • - cs3/rpc/code.proto + cs3/gateway/v1beta1/gateway_api.proto -
  • - - -
  • - cs3/rpc/status.proto - -
  • - - -
  • - cs3/storagetypes/storagetypes.proto - -
  • - - -
  • - cs3/types/types.proto - -
  • - - -
  • - cs3/appprovider/v0alpha/appprovider.proto - @@ -278,30 +234,30 @@

    Table of Contents

  • - cs3/appregistry/v0alpha/appregistry.proto + cs3/preferences/v1beta1/preferences_api.proto @@ -309,8836 +265,576 @@

    Table of Contents

  • - cs3/appregistry/v0alpha/resources.proto + cs3/rpc/v1beta1/code.proto
  • - cs3/authprovider/v0alpha/authprovider.proto + cs3/rpc/v1beta1/status.proto
  • - cs3/authregistry/v0alpha/authregistry.proto + cs3/types/v1beta1/types.proto
  • - -
  • - cs3/authregistry/v0alpha/resources.proto - + + + + +
    +

    cs3/gateway/v1beta1/gateway_api.proto

    Top +
    +

    + + +

    AuthenticateRequest

    +

    + + + + + + + -
  • - MProviderInfo -
  • + + + + + + + + + + + + + + + + + + + + + + + + - - - + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    typestring

    REQUIRED. +The type of authentication to use.

    client_idstring

    OPTIONAL. +The id of the client. +For basic authentication with username and password +both client_id and client_secret are expected to be filled. +However, for example, for OIDC only a token is necessary.

    client_secretstring

    OPTIONAL. +The secret of the client.

    + -
  • - cs3/gateway/v0alpha/gateway.proto -