Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New layout and compliant with Uber V2 Style Guide #48

Merged
merged 6 commits into from
Nov 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand All @@ -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);
Expand All @@ -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.
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand All @@ -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);
Expand All @@ -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;
Expand All @@ -81,18 +81,18 @@ message GetAppProvidersResponse {
message ListAppProvidersRequest {
// OPTIONAL.
// Opaque information.
cs3.types.Opaque opaque = 1;
cs3.types.v1beta1.Opaque opaque = 1;
// TODO(labkode): maybe add some filter?

}

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
64 changes: 64 additions & 0 deletions cs3/auth/provider/v1beta1/provider_api.proto
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand All @@ -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.
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -82,18 +82,18 @@ message GetAuthProviderResponse {
message ListAuthProvidersRequest {
// OPTIONAL.
// Opaque information.
cs3.types.Opaque opaque = 1;
cs3.types.v1beta1.Opaque opaque = 1;
// TODO(labkode): maybe add some filter?

}

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading