This is an automated email from the ASF dual-hosted git repository.
isjarana pushed a commit to branch baremetal
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git
The following commit(s) were added to refs/heads/baremetal by this push:
new c620a9943 Move proto files to one location
new 68b1db865 Merge pull request #344 from isururanawaka/baremetal
c620a9943 is described below
commit c620a99433b2115e9a0d3dd7ddc5261b9e5e1962
Author: Isuru Ranawaka <[email protected]>
AuthorDate: Tue Feb 7 22:32:43 2023 -0500
Move proto files to one location
---
custos-grpc-data-models/proto/SharingModel.proto | 117 +++++++++++++++
custos-grpc-data-models/proto/SharingService.proto | 165 +++++++++++++++++++++
.../sharing-core-service-client-stub/pom.xml | 12 +-
3 files changed, 288 insertions(+), 6 deletions(-)
diff --git a/custos-grpc-data-models/proto/SharingModel.proto
b/custos-grpc-data-models/proto/SharingModel.proto
new file mode 100644
index 000000000..799b1b111
--- /dev/null
+++ b/custos-grpc-data-models/proto/SharingModel.proto
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+syntax = "proto3";
+
+option java_multiple_files = true;
+package org.apache.custos.sharing.core;
+
+option go_package = "./pb";
+
+enum SearchCondition {
+ EQUAL = 0;
+ LIKE = 1;
+ GTE = 2;
+ LTE = 3;
+ NOT = 4;
+}
+
+enum EntitySearchField {
+ NAME = 0;
+ DESCRIPTION = 1;
+ ID = 2;
+ FULL_TEXT = 3;
+ OWNER_ID = 4;
+ CREATED_AT = 5;
+ LAST_MODIFIED_AT = 6;
+ ENTITY_TYPE_ID = 7;
+ PARENT_ID = 8;
+ SHARED_COUNT = 9;
+ PERMISSION_TYPE_ID = 10;
+ SHARED_BY=11;
+ SHARED_WITH=12;
+}
+
+
+message EntityType {
+ string id = 1;
+ string name = 2;
+ string description = 3;
+ int64 created_at = 4;
+ int64 updated_at = 5;
+}
+
+message PermissionType {
+ string id = 1;
+ string name = 2;
+ string description = 3;
+ int64 created_at = 4;
+ int64 updated_at = 5;
+}
+
+message Entity {
+ string id = 1;
+ string type = 2;
+ string owner_id = 3;
+ string parent_id = 4;
+ string name = 5;
+ string description = 6;
+ bytes binary_data = 7;
+ string full_text = 8;
+ int64 original_creation_time = 9;
+ int64 created_at = 10;
+ int64 updated_at = 11;
+ int32 shared_count = 12;
+ SharingMetadata sharing_metadata = 13;
+}
+
+message SearchCriteria {
+ EntitySearchField search_field = 1;
+ string value = 2;
+ SearchCondition condition = 3;
+}
+
+//message Status {
+// bool status = 1;
+//}
+
+//message EntityTypes {
+// repeated EntityType types = 1;
+//}
+//
+//message PermissionTypes {
+// repeated PermissionType types = 1;
+//}
+//
+//message Entities {
+// repeated Entity entity_array = 1;
+//}
+//
+//message SharedOwners {
+// repeated string owner_ids = 1;
+//}
+
+message SharingMetadata {
+ Entity entity = 1;
+ string owner_id = 2;
+ string owner_type = 3;
+ repeated PermissionType permissions = 4;
+ string shared_by = 5;
+}
\ No newline at end of file
diff --git a/custos-grpc-data-models/proto/SharingService.proto
b/custos-grpc-data-models/proto/SharingService.proto
new file mode 100644
index 000000000..ddcaa201a
--- /dev/null
+++ b/custos-grpc-data-models/proto/SharingService.proto
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ *
+ */
+
+syntax = "proto3";
+
+option java_multiple_files = true;
+package org.apache.custos.sharing.service;
+
+import "SharingModel.proto";
+
+option go_package = "./pb";
+
+
+
+
+message EntityRequest {
+ string client_id = 1;
+ int64 tenant_id = 2;
+ org.apache.custos.sharing.core.Entity entity = 3;
+ string client_sec = 4;
+}
+
+message EntityTypeRequest {
+ string client_id = 1;
+ int64 tenant_id = 2;
+ org.apache.custos.sharing.core.EntityType entity_type = 3;
+ string client_sec = 4;
+}
+
+
+message PermissionTypeRequest {
+ string client_id = 1;
+ int64 tenant_id = 2;
+ org.apache.custos.sharing.core.PermissionType permission_type = 3;
+ string client_sec = 4;
+}
+
+
+
+
+message SearchRequest {
+ string client_id = 1;
+ int64 tenant_id = 2;
+ string owner_id = 3;
+ int32 offset = 4;
+ int32 limit = 5;
+ repeated org.apache.custos.sharing.core.SearchCriteria search_criteria = 6;
+ string client_sec = 7;
+ repeated string associating_ids = 8;
+ bool search_perm_bottom_up=9;
+}
+
+message PermissionRequest {
+ string client_id = 1;
+ int64 tenant_id = 2;
+ org.apache.custos.sharing.core.Entity entity = 3;
+ org.apache.custos.sharing.core.PermissionType permission_type = 4;
+ string client_sec = 5;
+}
+
+message SharingRequest {
+ string client_id = 1;
+ int64 tenant_id = 2;
+ org.apache.custos.sharing.core.Entity entity = 3;
+ org.apache.custos.sharing.core.PermissionType permission_type = 4;
+ repeated string owner_id = 5;
+ bool cascade = 6;
+ string client_sec = 7;
+ string shared_by = 8;
+}
+
+message SharesFilteringRequest {
+ string client_id = 1;
+ int64 tenant_id = 2;
+ repeated string owner_id = 5;
+ bool cascade = 6;
+ string client_sec = 7;
+}
+
+message Status {
+ bool status = 1;
+}
+
+message EntityTypes {
+ repeated org.apache.custos.sharing.core.EntityType types = 1;
+}
+
+message PermissionTypes {
+ repeated org.apache.custos.sharing.core.PermissionType types = 1;
+}
+
+message Entities {
+ repeated org.apache.custos.sharing.core.Entity entity_array = 1;
+}
+
+message SharedOwners {
+ repeated string owner_ids = 1;
+}
+
+message GetAllDirectSharingsResponse {
+ repeated org.apache.custos.sharing.core.SharingMetadata shared_data = 1;
+}
+
+message GetAllSharingsResponse {
+ repeated org.apache.custos.sharing.core.SharingMetadata shared_data = 1;
+}
+
+
+
+service SharingService {
+
+
+ rpc createEntityType (EntityTypeRequest) returns (Status);
+ rpc updateEntityType (EntityTypeRequest) returns (Status);
+ rpc deleteEntityType (EntityTypeRequest) returns (Status);
+ rpc getEntityType (EntityTypeRequest) returns
(org.apache.custos.sharing.core.EntityType);
+ rpc getEntityTypes (SearchRequest) returns (EntityTypes);
+
+ rpc createPermissionType (PermissionTypeRequest) returns (Status);
+ rpc updatePermissionType (PermissionTypeRequest) returns (Status);
+ rpc deletePermissionType (PermissionTypeRequest) returns (Status);
+ rpc getPermissionType (PermissionTypeRequest) returns
(org.apache.custos.sharing.core.PermissionType);
+ rpc getPermissionTypes (SearchRequest) returns (PermissionTypes);
+
+ rpc createEntity (EntityRequest) returns (Status);
+ rpc updateEntity (EntityRequest) returns (Status);
+ rpc isEntityExists (EntityRequest) returns (Status);
+ rpc getEntity (EntityRequest) returns
(org.apache.custos.sharing.core.Entity);
+ rpc deleteEntity (EntityRequest) returns (Status);
+ rpc searchEntities (SearchRequest) returns (Entities);
+
+
+
+ rpc getListOfSharedUsers (SharingRequest) returns (SharedOwners);
+ rpc getListOfDirectlySharedUsers (SharingRequest) returns (SharedOwners);
+ rpc getListOfSharedGroups (SharingRequest) returns (SharedOwners);
+ rpc getListOfDirectlySharedGroups (SharingRequest) returns (SharedOwners);
+ rpc getAllDirectSharings (SharingRequest) returns
(GetAllDirectSharingsResponse);
+ rpc getAllSharings (SharingRequest) returns (GetAllSharingsResponse);
+
+ rpc shareEntityWithUsers (SharingRequest) returns (Status);
+ rpc shareEntityWithGroups (SharingRequest) returns (Status);
+ rpc revokeEntitySharingFromUsers (SharingRequest) returns (Status);
+ rpc revokeEntitySharingFromGroups (SharingRequest) returns (Status);
+ rpc userHasAccess (SharingRequest) returns (Status);
+
+
+}
\ No newline at end of file
diff --git
a/custos-services/custos-core-services-client-stubs/sharing-core-service-client-stub/pom.xml
b/custos-services/custos-core-services-client-stubs/sharing-core-service-client-stub/pom.xml
index 830d1f78d..e29c626d4 100644
---
a/custos-services/custos-core-services-client-stubs/sharing-core-service-client-stub/pom.xml
+++
b/custos-services/custos-core-services-client-stubs/sharing-core-service-client-stub/pom.xml
@@ -58,11 +58,11 @@
<artifactId>custos-integration-core</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.custos</groupId>
- <artifactId>sharing-core-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
+<!-- <dependency>-->
+<!-- <groupId>org.apache.custos</groupId>-->
+<!-- <artifactId>sharing-core-impl</artifactId>-->
+<!-- <version>${project.version}</version>-->
+<!-- </dependency>-->
</dependencies>
<build>
@@ -80,7 +80,7 @@
<protocArtifact>com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.1:exe:${os.detected.classifier}</pluginArtifact>
-
<protoSourceRoot>../../custos-core-services/sharing-core-service/src/main/proto</protoSourceRoot>
+
<protoSourceRoot>../../../custos-grpc-data-models/proto</protoSourceRoot>
</configuration>
<executions>
<execution>