From 2d8e376756f7932d6e6f07f044bc05a41eed2834 Mon Sep 17 00:00:00 2001 From: tharindu1st Date: Wed, 15 Nov 2023 00:25:58 +0530 Subject: [PATCH] grpc streaming server implementatio --- .../wso2/discovery/apkmgt/application.proto | 51 - .../discovery/keymgt/key_manager_config.proto | 18 - .../discovery/keymgt/revoked_tokens.proto | 33 - .../service/apkmgt/applicationds.proto | 34 - .../discovery/service/apkmgt/eventds.proto | 18 + .../wso2/discovery/service/keymgt/kmds.proto | 22 - .../wso2/discovery/service/keymgt/rtds.proto | 38 - .../subscription/app_key_mapping_ds.proto | 18 - .../service/subscription/app_mapping_ds.proto | 34 - .../service/subscription/app_policy_ds.proto | 18 - .../service/subscription/appds.proto | 18 - .../discovery/service/subscription/sds.proto | 18 - .../service/subscription/sub_policy_ds.proto | 18 - .../discovery/subscription/application.proto | 19 +- .../application_key_mapping.proto | 2 +- .../application_key_mapping_list.proto | 33 - .../subscription/application_list.proto | 33 - .../subscription/application_policy.proto | 18 - .../application_policy_list.proto | 17 - .../subscription/applicationmapping.proto | 2 +- .../applicationmapping_list.proto | 33 - .../wso2/discovery/subscription/event.proto | 42 + .../discovery/subscription/subscription.proto | 2 +- .../subscription/subscription_list.proto | 33 - .../subscription/subscription_policy.proto | 25 - .../subscription_policy_list.proto | 17 - adapter/api/protogen.sh | 3 - .../wso2/discovery/apkmgt/application.pb.go | 439 ----- .../discovery/keymgt/key_manager_config.pb.go | 193 --- .../discovery/keymgt/revoked_tokens.pb.go | 179 -- .../service/apkmgt/applicationds.pb.go | 223 --- .../discovery/service/apkmgt/eventds.pb.go | 278 +++ .../wso2/discovery/service/keymgt/kmds.pb.go | 252 --- .../wso2/discovery/service/keymgt/rtds.pb.go | 268 --- .../subscription/app_key_mapping_ds.pb.go | 210 --- .../service/subscription/app_mapping_ds.pb.go | 226 --- .../service/subscription/app_policy_ds.pb.go | 209 --- .../service/subscription/appds.pb.go | 208 --- .../discovery/service/subscription/sds.pb.go | 208 --- .../service/subscription/sub_policy_ds.pb.go | 210 --- .../discovery/subscription/application.pb.go | 292 +--- .../application_key_mapping.pb.go | 14 +- .../application_key_mapping_list.pb.go | 183 -- .../subscription/application_list.pb.go | 180 -- .../subscription/application_policy.pb.go | 184 -- .../application_policy_list.pb.go | 166 -- .../subscription/applicationmapping.pb.go | 15 +- .../applicationmapping_list.pb.go | 182 -- .../wso2/discovery/subscription/event.pb.go | 267 +++ .../discovery/subscription/subscription.pb.go | 15 +- .../subscription/subscription_list.pb.go | 180 -- .../subscription/subscription_policy.pb.go | 258 --- .../subscription_policy_list.pb.go | 166 -- .../discovery/protocol/cache/v3/resource.go | 20 - .../commoncontroller/common_controller.go | 43 +- .../internal/cache/subscriptionDataStore.go | 121 ++ .../internal/operator/constant/constant.go | 15 + .../controllers/cp/application_controller.go | 28 +- .../cp/applicationmapping_controller.go | 22 +- .../controllers/cp/subscription_controller.go | 22 +- .../internal/operator/operator.go | 7 +- .../internal/server/event_server.go | 37 + .../utils/enforcer_connection_holder.go | 22 + .../internal/utils/event_utils.go | 199 +++ common-controller/internal/xds/server.go | 100 +- .../service/apkmgt/EventServiceProto.java | 58 + .../service/apkmgt/EventStreamService.java | 241 +++ .../apkmgt/EventStreamServiceGrpc.java | 296 ++++ .../discovery/service/apkmgt/Request.java | 557 ++++++ .../service/apkmgt/RequestOrBuilder.java | 21 + .../subscription/EventServiceProto.java | 58 + .../subscription/EventStreamService.java | 241 +++ .../subscription/EventStreamServiceGrpc.java | 296 ++++ .../service/subscription/Request.java | 557 ++++++ .../subscription/RequestOrBuilder.java | 21 + .../discovery/subscription/Application.java | 172 +- .../ApplicationKeyMappingProto.java | 8 +- .../subscription/ApplicationMappingProto.java | 8 +- .../subscription/ApplicationOrBuilder.java | 22 +- .../subscription/ApplicationProto.java | 59 +- .../discovery/subscription/Event.java | 1520 +++++++++++++++++ .../subscription/EventOrBuilder.java | 99 ++ .../discovery/subscription/EventProto.java | 73 + .../subscription/SubscriptionProto.java | 8 +- helm-charts/values.yaml | 8 +- 85 files changed, 5393 insertions(+), 5388 deletions(-) delete mode 100644 adapter/api/proto/wso2/discovery/apkmgt/application.proto delete mode 100644 adapter/api/proto/wso2/discovery/keymgt/key_manager_config.proto delete mode 100644 adapter/api/proto/wso2/discovery/keymgt/revoked_tokens.proto delete mode 100644 adapter/api/proto/wso2/discovery/service/apkmgt/applicationds.proto create mode 100644 adapter/api/proto/wso2/discovery/service/apkmgt/eventds.proto delete mode 100644 adapter/api/proto/wso2/discovery/service/keymgt/kmds.proto delete mode 100644 adapter/api/proto/wso2/discovery/service/keymgt/rtds.proto delete mode 100644 adapter/api/proto/wso2/discovery/service/subscription/app_key_mapping_ds.proto delete mode 100644 adapter/api/proto/wso2/discovery/service/subscription/app_mapping_ds.proto delete mode 100644 adapter/api/proto/wso2/discovery/service/subscription/app_policy_ds.proto delete mode 100644 adapter/api/proto/wso2/discovery/service/subscription/appds.proto delete mode 100644 adapter/api/proto/wso2/discovery/service/subscription/sds.proto delete mode 100644 adapter/api/proto/wso2/discovery/service/subscription/sub_policy_ds.proto delete mode 100644 adapter/api/proto/wso2/discovery/subscription/application_key_mapping_list.proto delete mode 100644 adapter/api/proto/wso2/discovery/subscription/application_list.proto delete mode 100644 adapter/api/proto/wso2/discovery/subscription/application_policy.proto delete mode 100644 adapter/api/proto/wso2/discovery/subscription/application_policy_list.proto delete mode 100644 adapter/api/proto/wso2/discovery/subscription/applicationmapping_list.proto create mode 100644 adapter/api/proto/wso2/discovery/subscription/event.proto delete mode 100644 adapter/api/proto/wso2/discovery/subscription/subscription_list.proto delete mode 100644 adapter/api/proto/wso2/discovery/subscription/subscription_policy.proto delete mode 100644 adapter/api/proto/wso2/discovery/subscription/subscription_policy_list.proto delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/apkmgt/application.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/keymgt/key_manager_config.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/keymgt/revoked_tokens.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/apkmgt/applicationds.pb.go create mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/apkmgt/eventds.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/keymgt/kmds.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/keymgt/rtds.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_key_mapping_ds.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_mapping_ds.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_policy_ds.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/subscription/appds.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/subscription/sds.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/service/subscription/sub_policy_ds.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/subscription/application_key_mapping_list.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/subscription/application_list.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/subscription/application_policy.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/subscription/application_policy_list.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/subscription/applicationmapping_list.pb.go create mode 100644 adapter/pkg/discovery/api/wso2/discovery/subscription/event.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_list.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_policy.pb.go delete mode 100644 adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_policy_list.pb.go create mode 100644 common-controller/internal/cache/subscriptionDataStore.go create mode 100644 common-controller/internal/server/event_server.go create mode 100644 common-controller/internal/utils/enforcer_connection_holder.go create mode 100644 common-controller/internal/utils/event_utils.go create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventServiceProto.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventStreamService.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventStreamServiceGrpc.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/Request.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/RequestOrBuilder.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventServiceProto.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventStreamService.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventStreamServiceGrpc.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/Request.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/RequestOrBuilder.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Event.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EventOrBuilder.java create mode 100644 gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EventProto.java diff --git a/adapter/api/proto/wso2/discovery/apkmgt/application.proto b/adapter/api/proto/wso2/discovery/apkmgt/application.proto deleted file mode 100644 index ca6166509..000000000 --- a/adapter/api/proto/wso2/discovery/apkmgt/application.proto +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 LLC. 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"; - -package wso2.discovery.apkmgt; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/apkmgtapplication;apkmgtapplication"; -option java_package = "org.wso2.apk.enforcer.discovery.apkmgt"; -option java_outer_classname = "ApkMgtApplicationProto"; -option java_multiple_files = false; - -// [#protodoc-title: ApplicationDetails] - -message Application { - string uuid = 1; - string name = 2; - string owner = 3; - map attributes = 4; - string subscriber = 5; - string organization = 6; - repeated Subscription subscriptions = 7; - repeated ConsumerKey consumerKeys = 8; -} - -message ConsumerKey { - string key = 1; - string keyManager = 2; -} - -message Subscription { - string uuid = 1; - string apiUuid = 2; - string policyId = 3; - string subscriptionStatus = 4; - string organization = 5; - string createdBy = 6; -} diff --git a/adapter/api/proto/wso2/discovery/keymgt/key_manager_config.proto b/adapter/api/proto/wso2/discovery/keymgt/key_manager_config.proto deleted file mode 100644 index 0889c472e..000000000 --- a/adapter/api/proto/wso2/discovery/keymgt/key_manager_config.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package wso2.discovery.keymgt; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/keymgt;keymgt"; -option java_package = "org.wso2.apk.enforcer.discovery.keymgt"; -option java_outer_classname = "KeyManagerConfigProto"; -option java_multiple_files = true; - - -// KeyManagerConfig model -message KeyManagerConfig { - string name = 1; - string type = 2; - bool enabled = 3; - string tenantDomain = 4; - string configuration = 5; -} diff --git a/adapter/api/proto/wso2/discovery/keymgt/revoked_tokens.proto b/adapter/api/proto/wso2/discovery/keymgt/revoked_tokens.proto deleted file mode 100644 index 7c503b18f..000000000 --- a/adapter/api/proto/wso2/discovery/keymgt/revoked_tokens.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. - * - * 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. - * - */ - -syntax = "proto3"; - -package wso2.discovery.keymgt; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/keymgt;keymgt"; -option java_package = "org.wso2.apk.enforcer.discovery.keymgt"; -option java_outer_classname = "RevokedTokensProto"; -option java_multiple_files = true; - -// [#protodoc-title: Config] - -// Enforcer config model -message RevokedToken { - string jti = 1; - int64 expirytime = 2; -} diff --git a/adapter/api/proto/wso2/discovery/service/apkmgt/applicationds.proto b/adapter/api/proto/wso2/discovery/service/apkmgt/applicationds.proto deleted file mode 100644 index fbac73b0c..000000000 --- a/adapter/api/proto/wso2/discovery/service/apkmgt/applicationds.proto +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 LLC. 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"; - -package discovery.service.apkmgt; - -import "envoy/service/discovery/v3/discovery.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/service/apkmgt"; -option java_package = "org.wso2.apk.enforcer.discovery.service.apkmgt"; -option java_outer_classname = "ApplicationDsProto"; -option java_multiple_files = false; -option java_generic_services = true; - -// [#protodoc-title: ApplicationDS] -service APKMgtDiscoveryService { - rpc StreamAPKMgtApplications(stream envoy.service.discovery.v3.DiscoveryRequest) - returns (stream envoy.service.discovery.v3.DiscoveryResponse) { - } -} \ No newline at end of file diff --git a/adapter/api/proto/wso2/discovery/service/apkmgt/eventds.proto b/adapter/api/proto/wso2/discovery/service/apkmgt/eventds.proto new file mode 100644 index 000000000..9a2eeefa0 --- /dev/null +++ b/adapter/api/proto/wso2/discovery/service/apkmgt/eventds.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package discovery.service.apkmgt; + +import "wso2/discovery/subscription/event.proto"; +option go_package = "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt"; +option java_package = "org.wso2.apk.enforcer.discovery.service.apkmgt"; +option java_outer_classname = "EventServiceProto"; +option java_multiple_files = true; +option java_generic_services = true; + +// [#protodoc-title: EventStreamDS] +service EventStreamService { + rpc StreamEvents (Request) returns (stream wso2.discovery.subscription.Event) {} + } +message Request { + string event = 1; +} \ No newline at end of file diff --git a/adapter/api/proto/wso2/discovery/service/keymgt/kmds.proto b/adapter/api/proto/wso2/discovery/service/keymgt/kmds.proto deleted file mode 100644 index 4d462de35..000000000 --- a/adapter/api/proto/wso2/discovery/service/keymgt/kmds.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package wso2.discovery.service.keymgt; - -import "envoy/service/discovery/v3/discovery.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/service/keymgt"; -option java_package = "org.wso2.apk.enforcer.discovery.service.keymgt"; -option java_outer_classname = "KmdsProto"; -option java_multiple_files = true; -option java_generic_services = true; - -// [#protodoc-title: KMDS] -service KMDiscoveryService { - rpc StreamKeyManagers(stream envoy.service.discovery.v3.DiscoveryRequest) - returns (stream envoy.service.discovery.v3.DiscoveryResponse) { - } - - rpc FetchKeyManagers(envoy.service.discovery.v3.DiscoveryRequest) - returns (envoy.service.discovery.v3.DiscoveryResponse) { - } -} diff --git a/adapter/api/proto/wso2/discovery/service/keymgt/rtds.proto b/adapter/api/proto/wso2/discovery/service/keymgt/rtds.proto deleted file mode 100644 index 72b938a58..000000000 --- a/adapter/api/proto/wso2/discovery/service/keymgt/rtds.proto +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. - * - * 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. - * - */ - -syntax = "proto3"; - -package wso2.discovery.service.keymgt; - -import "envoy/service/discovery/v3/discovery.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/service/keymgt"; -option java_package = "org.wso2.apk.enforcer.discovery.service.keymgt"; -option java_outer_classname = "RtdsProto"; -option java_multiple_files = true; -option java_generic_services = true; - -// [#protodoc-title: RTDS] -service RevokedTokenDiscoveryService { - rpc StreamTokens(stream envoy.service.discovery.v3.DiscoveryRequest) - returns (stream envoy.service.discovery.v3.DiscoveryResponse) { - } - - rpc FetchTokens(envoy.service.discovery.v3.DiscoveryRequest) returns (envoy.service.discovery.v3.DiscoveryResponse) { - } -} diff --git a/adapter/api/proto/wso2/discovery/service/subscription/app_key_mapping_ds.proto b/adapter/api/proto/wso2/discovery/service/subscription/app_key_mapping_ds.proto deleted file mode 100644 index c6fac0588..000000000 --- a/adapter/api/proto/wso2/discovery/service/subscription/app_key_mapping_ds.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package discovery.service.subscription; - -import "envoy/service/discovery/v3/discovery.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/service/subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.service.subscription"; -option java_outer_classname = "AppKeyMappingDSProto"; -option java_multiple_files = true; -option java_generic_services = true; - -// [#protodoc-title: AppKeyMappingDS] -service ApplicationKeyMappingDiscoveryService { - rpc StreamApplicationKeyMappings(stream envoy.service.discovery.v3.DiscoveryRequest) - returns (stream envoy.service.discovery.v3.DiscoveryResponse) { - } -} diff --git a/adapter/api/proto/wso2/discovery/service/subscription/app_mapping_ds.proto b/adapter/api/proto/wso2/discovery/service/subscription/app_mapping_ds.proto deleted file mode 100644 index 54db7f5ba..000000000 --- a/adapter/api/proto/wso2/discovery/service/subscription/app_mapping_ds.proto +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. - * - * 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. - * - */ -syntax = "proto3"; - -package discovery.service.subscription; - -import "envoy/service/discovery/v3/discovery.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/service/subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.service.subscription"; -option java_outer_classname = "AppMappingDSProto"; -option java_multiple_files = true; -option java_generic_services = true; - -// [#protodoc-title: AppMappingDS] -service ApplicationMappingDiscoveryService { - rpc StreamApplicationMappings(stream envoy.service.discovery.v3.DiscoveryRequest) - returns (stream envoy.service.discovery.v3.DiscoveryResponse) { - } -} diff --git a/adapter/api/proto/wso2/discovery/service/subscription/app_policy_ds.proto b/adapter/api/proto/wso2/discovery/service/subscription/app_policy_ds.proto deleted file mode 100644 index 242604613..000000000 --- a/adapter/api/proto/wso2/discovery/service/subscription/app_policy_ds.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package discovery.service.subscription; - -import "envoy/service/discovery/v3/discovery.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/service/subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.service.subscription"; -option java_outer_classname = "AppPolicyDSProto"; -option java_multiple_files = true; -option java_generic_services = true; - -// [#protodoc-title: AppPolicyDS] -service ApplicationPolicyDiscoveryService { - rpc StreamApplicationPolicies(stream envoy.service.discovery.v3.DiscoveryRequest) - returns (stream envoy.service.discovery.v3.DiscoveryResponse) { - } -} diff --git a/adapter/api/proto/wso2/discovery/service/subscription/appds.proto b/adapter/api/proto/wso2/discovery/service/subscription/appds.proto deleted file mode 100644 index a95d6ed40..000000000 --- a/adapter/api/proto/wso2/discovery/service/subscription/appds.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package discovery.service.subscription; - -import "envoy/service/discovery/v3/discovery.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/service/subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.service.subscription"; -option java_outer_classname = "AppDSProto"; -option java_multiple_files = true; -option java_generic_services = true; - -// [#protodoc-title: AppDS] -service ApplicationDiscoveryService { - rpc StreamApplications(stream envoy.service.discovery.v3.DiscoveryRequest) - returns (stream envoy.service.discovery.v3.DiscoveryResponse) { - } -} diff --git a/adapter/api/proto/wso2/discovery/service/subscription/sds.proto b/adapter/api/proto/wso2/discovery/service/subscription/sds.proto deleted file mode 100644 index ff2ede246..000000000 --- a/adapter/api/proto/wso2/discovery/service/subscription/sds.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package discovery.service.subscription; - -import "envoy/service/discovery/v3/discovery.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/service/subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.service.subscription"; -option java_outer_classname = "SdsProto"; -option java_multiple_files = true; -option java_generic_services = true; - -// [#protodoc-title: SDS] -service SubscriptionDiscoveryService { - rpc StreamSubscriptions(stream envoy.service.discovery.v3.DiscoveryRequest) - returns (stream envoy.service.discovery.v3.DiscoveryResponse) { - } -} diff --git a/adapter/api/proto/wso2/discovery/service/subscription/sub_policy_ds.proto b/adapter/api/proto/wso2/discovery/service/subscription/sub_policy_ds.proto deleted file mode 100644 index f56dc2f0b..000000000 --- a/adapter/api/proto/wso2/discovery/service/subscription/sub_policy_ds.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package discovery.service.subscription; - -import "envoy/service/discovery/v3/discovery.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/service/subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.service.subscription"; -option java_outer_classname = "SubPolicyDSProto"; -option java_multiple_files = true; -option java_generic_services = true; - -// [#protodoc-title: SubPolicyDS] -service SubscriptionPolicyDiscoveryService { - rpc StreamSubscriptionPolicies(stream envoy.service.discovery.v3.DiscoveryRequest) - returns (stream envoy.service.discovery.v3.DiscoveryResponse) { - } -} diff --git a/adapter/api/proto/wso2/discovery/subscription/application.proto b/adapter/api/proto/wso2/discovery/subscription/application.proto index 86a15b7ed..6a3ea7e36 100644 --- a/adapter/api/proto/wso2/discovery/subscription/application.proto +++ b/adapter/api/proto/wso2/discovery/subscription/application.proto @@ -18,7 +18,7 @@ syntax = "proto3"; package wso2.discovery.subscription; -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; +option go_package = "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription"; option java_package = "org.wso2.apk.enforcer.discovery.subscription"; option java_outer_classname = "ApplicationProto"; option java_multiple_files = true; @@ -30,19 +30,6 @@ message Application { string uuid = 1; string name = 2; string owner = 3; - map attributes = 4; -} - -message SecuritySchemes { - OAuth2 oAuth2 = 1; -} - -message OAuth2 { - repeated Environment environments = 1; -} - -message Environment { - string envID = 1; - string applicationIdentifier = 2; - string keyType = 3; + string organization = 4; + map attributes = 5; } diff --git a/adapter/api/proto/wso2/discovery/subscription/application_key_mapping.proto b/adapter/api/proto/wso2/discovery/subscription/application_key_mapping.proto index 07a744805..03459771d 100644 --- a/adapter/api/proto/wso2/discovery/subscription/application_key_mapping.proto +++ b/adapter/api/proto/wso2/discovery/subscription/application_key_mapping.proto @@ -18,7 +18,7 @@ syntax = "proto3"; package wso2.discovery.subscription; -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; +option go_package = "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription"; option java_package = "org.wso2.apk.enforcer.discovery.subscription"; option java_outer_classname = "ApplicationKeyMappingProto"; option java_multiple_files = true; diff --git a/adapter/api/proto/wso2/discovery/subscription/application_key_mapping_list.proto b/adapter/api/proto/wso2/discovery/subscription/application_key_mapping_list.proto deleted file mode 100644 index 1a20ce78c..000000000 --- a/adapter/api/proto/wso2/discovery/subscription/application_key_mapping_list.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. - * - * 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. - * - */ -syntax = "proto3"; - -package wso2.discovery.subscription; - -import "wso2/discovery/subscription/application_key_mapping.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.subscription"; -option java_outer_classname = "ApplicationKeyMappingListProto"; -option java_multiple_files = true; - -// [#protodoc-title: ApplicationKeyMappingList] - -// ApplicationKeyMappingList data model -message ApplicationKeyMappingList { - repeated ApplicationKeyMapping list = 2; -} diff --git a/adapter/api/proto/wso2/discovery/subscription/application_list.proto b/adapter/api/proto/wso2/discovery/subscription/application_list.proto deleted file mode 100644 index 78c83bcce..000000000 --- a/adapter/api/proto/wso2/discovery/subscription/application_list.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. - * - * 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. - * - */ -syntax = "proto3"; - -package wso2.discovery.subscription; - -import "wso2/discovery/subscription/application.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.subscription"; -option java_outer_classname = "ApplicationListProto"; -option java_multiple_files = true; - -// [#protodoc-title: ApplicationList] - -// ApplicationList data model -message ApplicationList { - repeated Application list = 2; -} diff --git a/adapter/api/proto/wso2/discovery/subscription/application_policy.proto b/adapter/api/proto/wso2/discovery/subscription/application_policy.proto deleted file mode 100644 index b80f2d32d..000000000 --- a/adapter/api/proto/wso2/discovery/subscription/application_policy.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package wso2.discovery.subscription; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.subscription"; -option java_outer_classname = "ApplicationPolicyProto"; -option java_multiple_files = true; - -// [#protodoc-title: ApplicationPolicy] - -// ApplicationPolicy data model -message ApplicationPolicy { - int32 id = 1; - int32 tenantId = 2; - string name = 3; - string quotaType = 4; -} diff --git a/adapter/api/proto/wso2/discovery/subscription/application_policy_list.proto b/adapter/api/proto/wso2/discovery/subscription/application_policy_list.proto deleted file mode 100644 index 9a405e500..000000000 --- a/adapter/api/proto/wso2/discovery/subscription/application_policy_list.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package wso2.discovery.subscription; - -import "wso2/discovery/subscription/application_policy.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.subscription"; -option java_outer_classname = "ApplicationPolicyListProto"; -option java_multiple_files = true; - -// [#protodoc-title: ApplicationPolicyList] - -// ApplicationPolicyList data model -message ApplicationPolicyList { - repeated ApplicationPolicy list = 2; -} diff --git a/adapter/api/proto/wso2/discovery/subscription/applicationmapping.proto b/adapter/api/proto/wso2/discovery/subscription/applicationmapping.proto index 4930ab844..2c217c79e 100644 --- a/adapter/api/proto/wso2/discovery/subscription/applicationmapping.proto +++ b/adapter/api/proto/wso2/discovery/subscription/applicationmapping.proto @@ -18,7 +18,7 @@ syntax = "proto3"; package wso2.discovery.subscription; -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; +option go_package = "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription"; option java_package = "org.wso2.apk.enforcer.discovery.subscription"; option java_outer_classname = "ApplicationMappingProto"; option java_multiple_files = true; diff --git a/adapter/api/proto/wso2/discovery/subscription/applicationmapping_list.proto b/adapter/api/proto/wso2/discovery/subscription/applicationmapping_list.proto deleted file mode 100644 index 71a11668f..000000000 --- a/adapter/api/proto/wso2/discovery/subscription/applicationmapping_list.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. - * - * 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. - * - */ -syntax = "proto3"; - -package wso2.discovery.subscription; - -import "wso2/discovery/subscription/applicationmapping.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.subscription"; -option java_outer_classname = "ApplicationMappingListProto"; -option java_multiple_files = true; - -// [#protodoc-title: ApplicationMappingList] - -// ApplicationMappingList data model -message ApplicationMappingList { - repeated ApplicationMapping list = 2; -} diff --git a/adapter/api/proto/wso2/discovery/subscription/event.proto b/adapter/api/proto/wso2/discovery/subscription/event.proto new file mode 100644 index 000000000..542ed8a49 --- /dev/null +++ b/adapter/api/proto/wso2/discovery/subscription/event.proto @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. + * + * 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. + * + */ + syntax = "proto3"; + + package wso2.discovery.subscription; + + import "wso2/discovery/subscription/application.proto"; + import "wso2/discovery/subscription/applicationmapping.proto"; + import "wso2/discovery/subscription/application_key_mapping.proto"; + import "wso2/discovery/subscription/subscription.proto"; + option go_package = "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription"; + option java_package = "org.wso2.apk.enforcer.discovery.subscription"; + option java_outer_classname = "EventProto"; + option java_multiple_files = true; + + // [#protodoc-title: Event] + + // Event data model + message Event { + string uuid = 1; + int64 timeStamp = 2; + string type = 3; + Application application = 4; + ApplicationMapping applicationMapping = 5; + ApplicationKeyMapping applicationKeyMapping = 6; + Subscription subscription = 7; + } + \ No newline at end of file diff --git a/adapter/api/proto/wso2/discovery/subscription/subscription.proto b/adapter/api/proto/wso2/discovery/subscription/subscription.proto index 4051c8593..2f61bdfb3 100644 --- a/adapter/api/proto/wso2/discovery/subscription/subscription.proto +++ b/adapter/api/proto/wso2/discovery/subscription/subscription.proto @@ -18,7 +18,7 @@ syntax = "proto3"; package wso2.discovery.subscription; -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; +option go_package = "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription"; option java_package = "org.wso2.apk.enforcer.discovery.subscription"; option java_outer_classname = "SubscriptionProto"; option java_multiple_files = true; diff --git a/adapter/api/proto/wso2/discovery/subscription/subscription_list.proto b/adapter/api/proto/wso2/discovery/subscription/subscription_list.proto deleted file mode 100644 index a4575218e..000000000 --- a/adapter/api/proto/wso2/discovery/subscription/subscription_list.proto +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. - * - * 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. - * - */ -syntax = "proto3"; - -package wso2.discovery.subscription; - -import "wso2/discovery/subscription/subscription.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.subscription"; -option java_outer_classname = "SubscriptionListProto"; -option java_multiple_files = true; - -// [#protodoc-title: SubscriptionList] - -// SubscriptionList data model -message SubscriptionList { - repeated Subscription list = 2; -} diff --git a/adapter/api/proto/wso2/discovery/subscription/subscription_policy.proto b/adapter/api/proto/wso2/discovery/subscription/subscription_policy.proto deleted file mode 100644 index e95160144..000000000 --- a/adapter/api/proto/wso2/discovery/subscription/subscription_policy.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package wso2.discovery.subscription; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.subscription"; -option java_outer_classname = "SubscriptionPolicyProto"; -option java_multiple_files = true; - -// [#protodoc-title: SubscriptionPolicy] - -// SubscriptionPolicy data model -message SubscriptionPolicy { - int32 id = 1; - int32 tenantId = 2; - string name = 3; - string quotaType = 4; - int32 graphQLMaxComplexity = 5; - int32 graphQLMaxDepth = 6; - int32 rateLimitCount = 7; - string rateLimitTimeUnit = 8; - bool stopOnQuotaReach = 9; - string tenantDomain = 10; - int64 timestamp = 11; -} diff --git a/adapter/api/proto/wso2/discovery/subscription/subscription_policy_list.proto b/adapter/api/proto/wso2/discovery/subscription/subscription_policy_list.proto deleted file mode 100644 index 93a059040..000000000 --- a/adapter/api/proto/wso2/discovery/subscription/subscription_policy_list.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package wso2.discovery.subscription; - -import "wso2/discovery/subscription/subscription_policy.proto"; - -option go_package = "github.com/envoyproxy/go-control-plane/wso2/discovery/subscription;subscription"; -option java_package = "org.wso2.apk.enforcer.discovery.subscription"; -option java_outer_classname = "SubscriptionPolicyListProto"; -option java_multiple_files = true; - -// [#protodoc-title: SubscriptionPolicyList] - -// SubscriptionPolicyList data model -message SubscriptionPolicyList { - repeated SubscriptionPolicy list = 2; -} diff --git a/adapter/api/protogen.sh b/adapter/api/protogen.sh index b457f0ff8..94163e088 100755 --- a/adapter/api/protogen.sh +++ b/adapter/api/protogen.sh @@ -56,9 +56,7 @@ printf " - ${GREEN}${BOLD}done${NC}\n" printf "protoc go messages" docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go --go-source-relative -i proto -i target/include/ -o target/gen/go -d proto/wso2/discovery/api/ docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go --go-source-relative -i proto -i target/include/ -o target/gen/go -d proto/wso2/discovery/config/enforcer/ -docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go --go-source-relative -i proto -i target/include/ -o target/gen/go -d proto/wso2/discovery/keymgt/ docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go --go-source-relative -i proto -i target/include/ -o target/gen/go -d proto/wso2/discovery/subscription/ -docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go --go-source-relative -i proto -i target/include/ -o target/gen/go -d proto/wso2/discovery/apkmgt/ printf " - ${GREEN}${BOLD}done${NC}\n" # map of proto imports for which we need to update the genrated import path @@ -70,7 +68,6 @@ import_map=Menvoy/service/discovery/v3/discovery.proto=github.com/envoyproxy/go- # generate code for go grpc services docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go -i proto -i target/include/ -o target/gen/go --go-package-map $import_map --go-source-relative -d proto/wso2/discovery/service/api docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go -i proto -i target/include/ -o target/gen/go --go-package-map $import_map --go-source-relative -d proto/wso2/discovery/service/config -docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go -i proto -i target/include/ -o target/gen/go --go-package-map $import_map --go-source-relative -d proto/wso2/discovery/service/keymgt docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go -i proto -i target/include/ -o target/gen/go --go-package-map $import_map --go-source-relative -d proto/wso2/discovery/service/subscription docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go -i proto -i target/include/ -o target/gen/go --go-package-map $import_map --go-source-relative -d proto/wso2/discovery/service/apkmgt docker run -v `pwd`:/defs namely/protoc-all:$PROTOC_VERSION -l go -i proto -i target/include/ -o target/gen/ws-go --go-source-relative -d proto/wso2/discovery/service/websocket diff --git a/adapter/pkg/discovery/api/wso2/discovery/apkmgt/application.pb.go b/adapter/pkg/discovery/api/wso2/discovery/apkmgt/application.pb.go deleted file mode 100644 index 1fc1de147..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/apkmgt/application.pb.go +++ /dev/null @@ -1,439 +0,0 @@ -// Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 LLC. 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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/apkmgt/application.proto - -package apkmgtapplication - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Application struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - Attributes map[string]string `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Subscriber string `protobuf:"bytes,5,opt,name=subscriber,proto3" json:"subscriber,omitempty"` - Organization string `protobuf:"bytes,6,opt,name=organization,proto3" json:"organization,omitempty"` - Subscriptions []*Subscription `protobuf:"bytes,7,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` - ConsumerKeys []*ConsumerKey `protobuf:"bytes,8,rep,name=consumerKeys,proto3" json:"consumerKeys,omitempty"` -} - -func (x *Application) Reset() { - *x = Application{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_apkmgt_application_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Application) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Application) ProtoMessage() {} - -func (x *Application) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_apkmgt_application_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Application.ProtoReflect.Descriptor instead. -func (*Application) Descriptor() ([]byte, []int) { - return file_wso2_discovery_apkmgt_application_proto_rawDescGZIP(), []int{0} -} - -func (x *Application) GetUuid() string { - if x != nil { - return x.Uuid - } - return "" -} - -func (x *Application) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Application) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *Application) GetAttributes() map[string]string { - if x != nil { - return x.Attributes - } - return nil -} - -func (x *Application) GetSubscriber() string { - if x != nil { - return x.Subscriber - } - return "" -} - -func (x *Application) GetOrganization() string { - if x != nil { - return x.Organization - } - return "" -} - -func (x *Application) GetSubscriptions() []*Subscription { - if x != nil { - return x.Subscriptions - } - return nil -} - -func (x *Application) GetConsumerKeys() []*ConsumerKey { - if x != nil { - return x.ConsumerKeys - } - return nil -} - -type ConsumerKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - KeyManager string `protobuf:"bytes,2,opt,name=keyManager,proto3" json:"keyManager,omitempty"` -} - -func (x *ConsumerKey) Reset() { - *x = ConsumerKey{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_apkmgt_application_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsumerKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsumerKey) ProtoMessage() {} - -func (x *ConsumerKey) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_apkmgt_application_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConsumerKey.ProtoReflect.Descriptor instead. -func (*ConsumerKey) Descriptor() ([]byte, []int) { - return file_wso2_discovery_apkmgt_application_proto_rawDescGZIP(), []int{1} -} - -func (x *ConsumerKey) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *ConsumerKey) GetKeyManager() string { - if x != nil { - return x.KeyManager - } - return "" -} - -type Subscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - ApiUuid string `protobuf:"bytes,2,opt,name=apiUuid,proto3" json:"apiUuid,omitempty"` - PolicyId string `protobuf:"bytes,3,opt,name=policyId,proto3" json:"policyId,omitempty"` - SubscriptionStatus string `protobuf:"bytes,4,opt,name=subscriptionStatus,proto3" json:"subscriptionStatus,omitempty"` - Organization string `protobuf:"bytes,5,opt,name=organization,proto3" json:"organization,omitempty"` - CreatedBy string `protobuf:"bytes,6,opt,name=createdBy,proto3" json:"createdBy,omitempty"` -} - -func (x *Subscription) Reset() { - *x = Subscription{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_apkmgt_application_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Subscription) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Subscription) ProtoMessage() {} - -func (x *Subscription) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_apkmgt_application_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Subscription.ProtoReflect.Descriptor instead. -func (*Subscription) Descriptor() ([]byte, []int) { - return file_wso2_discovery_apkmgt_application_proto_rawDescGZIP(), []int{2} -} - -func (x *Subscription) GetUuid() string { - if x != nil { - return x.Uuid - } - return "" -} - -func (x *Subscription) GetApiUuid() string { - if x != nil { - return x.ApiUuid - } - return "" -} - -func (x *Subscription) GetPolicyId() string { - if x != nil { - return x.PolicyId - } - return "" -} - -func (x *Subscription) GetSubscriptionStatus() string { - if x != nil { - return x.SubscriptionStatus - } - return "" -} - -func (x *Subscription) GetOrganization() string { - if x != nil { - return x.Organization - } - return "" -} - -func (x *Subscription) GetCreatedBy() string { - if x != nil { - return x.CreatedBy - } - return "" -} - -var File_wso2_discovery_apkmgt_application_proto protoreflect.FileDescriptor - -var file_wso2_discovery_apkmgt_application_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x77, 0x73, 0x6f, 0x32, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, - 0x22, 0xb5, 0x03, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x52, - 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x61, - 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x2e, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x52, 0x0c, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6d, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3f, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x73, - 0x75, 0x6d, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x65, 0x79, - 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, - 0x65, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x22, 0xca, 0x01, 0x0a, 0x0c, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x70, 0x69, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x70, 0x69, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x12, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x42, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x42, 0x9d, 0x01, 0x0a, 0x26, 0x6f, 0x72, 0x67, 0x2e, 0x77, - 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x61, 0x70, 0x6b, 0x6d, 0x67, - 0x74, 0x42, 0x16, 0x41, 0x70, 0x6b, 0x4d, 0x67, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x00, 0x5a, 0x59, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_apkmgt_application_proto_rawDescOnce sync.Once - file_wso2_discovery_apkmgt_application_proto_rawDescData = file_wso2_discovery_apkmgt_application_proto_rawDesc -) - -func file_wso2_discovery_apkmgt_application_proto_rawDescGZIP() []byte { - file_wso2_discovery_apkmgt_application_proto_rawDescOnce.Do(func() { - file_wso2_discovery_apkmgt_application_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_apkmgt_application_proto_rawDescData) - }) - return file_wso2_discovery_apkmgt_application_proto_rawDescData -} - -var file_wso2_discovery_apkmgt_application_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_wso2_discovery_apkmgt_application_proto_goTypes = []interface{}{ - (*Application)(nil), // 0: wso2.discovery.apkmgt.Application - (*ConsumerKey)(nil), // 1: wso2.discovery.apkmgt.ConsumerKey - (*Subscription)(nil), // 2: wso2.discovery.apkmgt.Subscription - nil, // 3: wso2.discovery.apkmgt.Application.AttributesEntry -} -var file_wso2_discovery_apkmgt_application_proto_depIdxs = []int32{ - 3, // 0: wso2.discovery.apkmgt.Application.attributes:type_name -> wso2.discovery.apkmgt.Application.AttributesEntry - 2, // 1: wso2.discovery.apkmgt.Application.subscriptions:type_name -> wso2.discovery.apkmgt.Subscription - 1, // 2: wso2.discovery.apkmgt.Application.consumerKeys:type_name -> wso2.discovery.apkmgt.ConsumerKey - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_apkmgt_application_proto_init() } -func file_wso2_discovery_apkmgt_application_proto_init() { - if File_wso2_discovery_apkmgt_application_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_apkmgt_application_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Application); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wso2_discovery_apkmgt_application_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConsumerKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wso2_discovery_apkmgt_application_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Subscription); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_apkmgt_application_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_apkmgt_application_proto_goTypes, - DependencyIndexes: file_wso2_discovery_apkmgt_application_proto_depIdxs, - MessageInfos: file_wso2_discovery_apkmgt_application_proto_msgTypes, - }.Build() - File_wso2_discovery_apkmgt_application_proto = out.File - file_wso2_discovery_apkmgt_application_proto_rawDesc = nil - file_wso2_discovery_apkmgt_application_proto_goTypes = nil - file_wso2_discovery_apkmgt_application_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/keymgt/key_manager_config.pb.go b/adapter/pkg/discovery/api/wso2/discovery/keymgt/key_manager_config.pb.go deleted file mode 100644 index bbd1ddde2..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/keymgt/key_manager_config.pb.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/keymgt/key_manager_config.proto - -package keymgt - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// KeyManagerConfig model -type KeyManagerConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` - TenantDomain string `protobuf:"bytes,4,opt,name=tenantDomain,proto3" json:"tenantDomain,omitempty"` - Configuration string `protobuf:"bytes,5,opt,name=configuration,proto3" json:"configuration,omitempty"` -} - -func (x *KeyManagerConfig) Reset() { - *x = KeyManagerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_keymgt_key_manager_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyManagerConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyManagerConfig) ProtoMessage() {} - -func (x *KeyManagerConfig) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_keymgt_key_manager_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeyManagerConfig.ProtoReflect.Descriptor instead. -func (*KeyManagerConfig) Descriptor() ([]byte, []int) { - return file_wso2_discovery_keymgt_key_manager_config_proto_rawDescGZIP(), []int{0} -} - -func (x *KeyManagerConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *KeyManagerConfig) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *KeyManagerConfig) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *KeyManagerConfig) GetTenantDomain() string { - if x != nil { - return x.TenantDomain - } - return "" -} - -func (x *KeyManagerConfig) GetConfiguration() string { - if x != nil { - return x.Configuration - } - return "" -} - -var File_wso2_discovery_keymgt_key_manager_config_proto protoreflect.FileDescriptor - -var file_wso2_discovery_keymgt_key_manager_config_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x15, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x4b, 0x65, 0x79, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x22, - 0x0a, 0x0c, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x86, 0x01, 0x0a, 0x26, 0x6f, 0x72, 0x67, - 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x79, - 0x6d, 0x67, 0x74, 0x42, 0x15, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x3b, 0x6b, 0x65, 0x79, 0x6d, 0x67, - 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_keymgt_key_manager_config_proto_rawDescOnce sync.Once - file_wso2_discovery_keymgt_key_manager_config_proto_rawDescData = file_wso2_discovery_keymgt_key_manager_config_proto_rawDesc -) - -func file_wso2_discovery_keymgt_key_manager_config_proto_rawDescGZIP() []byte { - file_wso2_discovery_keymgt_key_manager_config_proto_rawDescOnce.Do(func() { - file_wso2_discovery_keymgt_key_manager_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_keymgt_key_manager_config_proto_rawDescData) - }) - return file_wso2_discovery_keymgt_key_manager_config_proto_rawDescData -} - -var file_wso2_discovery_keymgt_key_manager_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_keymgt_key_manager_config_proto_goTypes = []interface{}{ - (*KeyManagerConfig)(nil), // 0: wso2.discovery.keymgt.KeyManagerConfig -} -var file_wso2_discovery_keymgt_key_manager_config_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_keymgt_key_manager_config_proto_init() } -func file_wso2_discovery_keymgt_key_manager_config_proto_init() { - if File_wso2_discovery_keymgt_key_manager_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_keymgt_key_manager_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyManagerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_keymgt_key_manager_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_keymgt_key_manager_config_proto_goTypes, - DependencyIndexes: file_wso2_discovery_keymgt_key_manager_config_proto_depIdxs, - MessageInfos: file_wso2_discovery_keymgt_key_manager_config_proto_msgTypes, - }.Build() - File_wso2_discovery_keymgt_key_manager_config_proto = out.File - file_wso2_discovery_keymgt_key_manager_config_proto_rawDesc = nil - file_wso2_discovery_keymgt_key_manager_config_proto_goTypes = nil - file_wso2_discovery_keymgt_key_manager_config_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/keymgt/revoked_tokens.pb.go b/adapter/pkg/discovery/api/wso2/discovery/keymgt/revoked_tokens.pb.go deleted file mode 100644 index 903cbb452..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/keymgt/revoked_tokens.pb.go +++ /dev/null @@ -1,179 +0,0 @@ -// -// Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// 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. -// - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/keymgt/revoked_tokens.proto - -package keymgt - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Enforcer config model -type RevokedToken struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Jti string `protobuf:"bytes,1,opt,name=jti,proto3" json:"jti,omitempty"` - Expirytime int64 `protobuf:"varint,2,opt,name=expirytime,proto3" json:"expirytime,omitempty"` -} - -func (x *RevokedToken) Reset() { - *x = RevokedToken{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_keymgt_revoked_tokens_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RevokedToken) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokedToken) ProtoMessage() {} - -func (x *RevokedToken) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_keymgt_revoked_tokens_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RevokedToken.ProtoReflect.Descriptor instead. -func (*RevokedToken) Descriptor() ([]byte, []int) { - return file_wso2_discovery_keymgt_revoked_tokens_proto_rawDescGZIP(), []int{0} -} - -func (x *RevokedToken) GetJti() string { - if x != nil { - return x.Jti - } - return "" -} - -func (x *RevokedToken) GetExpirytime() int64 { - if x != nil { - return x.Expirytime - } - return 0 -} - -var File_wso2_discovery_keymgt_revoked_tokens_proto protoreflect.FileDescriptor - -var file_wso2_discovery_keymgt_revoked_tokens_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x77, 0x73, - 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x79, - 0x6d, 0x67, 0x74, 0x22, 0x40, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x74, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6a, 0x74, 0x69, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x79, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x83, 0x01, 0x0a, 0x26, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, - 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, - 0x42, 0x12, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, - 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x6b, 0x65, - 0x79, 0x6d, 0x67, 0x74, 0x3b, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_keymgt_revoked_tokens_proto_rawDescOnce sync.Once - file_wso2_discovery_keymgt_revoked_tokens_proto_rawDescData = file_wso2_discovery_keymgt_revoked_tokens_proto_rawDesc -) - -func file_wso2_discovery_keymgt_revoked_tokens_proto_rawDescGZIP() []byte { - file_wso2_discovery_keymgt_revoked_tokens_proto_rawDescOnce.Do(func() { - file_wso2_discovery_keymgt_revoked_tokens_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_keymgt_revoked_tokens_proto_rawDescData) - }) - return file_wso2_discovery_keymgt_revoked_tokens_proto_rawDescData -} - -var file_wso2_discovery_keymgt_revoked_tokens_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_keymgt_revoked_tokens_proto_goTypes = []interface{}{ - (*RevokedToken)(nil), // 0: wso2.discovery.keymgt.RevokedToken -} -var file_wso2_discovery_keymgt_revoked_tokens_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_keymgt_revoked_tokens_proto_init() } -func file_wso2_discovery_keymgt_revoked_tokens_proto_init() { - if File_wso2_discovery_keymgt_revoked_tokens_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_keymgt_revoked_tokens_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokedToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_keymgt_revoked_tokens_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_keymgt_revoked_tokens_proto_goTypes, - DependencyIndexes: file_wso2_discovery_keymgt_revoked_tokens_proto_depIdxs, - MessageInfos: file_wso2_discovery_keymgt_revoked_tokens_proto_msgTypes, - }.Build() - File_wso2_discovery_keymgt_revoked_tokens_proto = out.File - file_wso2_discovery_keymgt_revoked_tokens_proto_rawDesc = nil - file_wso2_discovery_keymgt_revoked_tokens_proto_goTypes = nil - file_wso2_discovery_keymgt_revoked_tokens_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt/applicationds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt/applicationds.pb.go deleted file mode 100644 index 708b5cd91..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt/applicationds.pb.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// WSO2 LLC. 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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/service/apkmgt/applicationds.proto - -package apkmgt - -import ( - context "context" - v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_wso2_discovery_service_apkmgt_applicationds_proto protoreflect.FileDescriptor - -var file_wso2_discovery_service_apkmgt_applicationds_proto_rawDesc = []byte{ - 0x0a, 0x31, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x2f, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x1a, 0x2a, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x97, 0x01, 0x0a, 0x16, 0x41, 0x50, - 0x4b, 0x4d, 0x67, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x50, - 0x4b, 0x4d, 0x67, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x30, 0x01, 0x42, 0x8f, 0x01, 0x0a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, - 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x42, 0x12, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x00, 0x5a, 0x44, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x6b, 0x6d, - 0x67, 0x74, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_wso2_discovery_service_apkmgt_applicationds_proto_goTypes = []interface{}{ - (*v3.DiscoveryRequest)(nil), // 0: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 1: envoy.service.discovery.v3.DiscoveryResponse -} -var file_wso2_discovery_service_apkmgt_applicationds_proto_depIdxs = []int32{ - 0, // 0: discovery.service.apkmgt.APKMgtDiscoveryService.StreamAPKMgtApplications:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 1: discovery.service.apkmgt.APKMgtDiscoveryService.StreamAPKMgtApplications:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_service_apkmgt_applicationds_proto_init() } -func file_wso2_discovery_service_apkmgt_applicationds_proto_init() { - if File_wso2_discovery_service_apkmgt_applicationds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_service_apkmgt_applicationds_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wso2_discovery_service_apkmgt_applicationds_proto_goTypes, - DependencyIndexes: file_wso2_discovery_service_apkmgt_applicationds_proto_depIdxs, - }.Build() - File_wso2_discovery_service_apkmgt_applicationds_proto = out.File - file_wso2_discovery_service_apkmgt_applicationds_proto_rawDesc = nil - file_wso2_discovery_service_apkmgt_applicationds_proto_goTypes = nil - file_wso2_discovery_service_apkmgt_applicationds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// APKMgtDiscoveryServiceClient is the client API for APKMgtDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type APKMgtDiscoveryServiceClient interface { - StreamAPKMgtApplications(ctx context.Context, opts ...grpc.CallOption) (APKMgtDiscoveryService_StreamAPKMgtApplicationsClient, error) -} - -type aPKMgtDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAPKMgtDiscoveryServiceClient(cc grpc.ClientConnInterface) APKMgtDiscoveryServiceClient { - return &aPKMgtDiscoveryServiceClient{cc} -} - -func (c *aPKMgtDiscoveryServiceClient) StreamAPKMgtApplications(ctx context.Context, opts ...grpc.CallOption) (APKMgtDiscoveryService_StreamAPKMgtApplicationsClient, error) { - stream, err := c.cc.NewStream(ctx, &_APKMgtDiscoveryService_serviceDesc.Streams[0], "/discovery.service.apkmgt.APKMgtDiscoveryService/StreamAPKMgtApplications", opts...) - if err != nil { - return nil, err - } - x := &aPKMgtDiscoveryServiceStreamAPKMgtApplicationsClient{stream} - return x, nil -} - -type APKMgtDiscoveryService_StreamAPKMgtApplicationsClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type aPKMgtDiscoveryServiceStreamAPKMgtApplicationsClient struct { - grpc.ClientStream -} - -func (x *aPKMgtDiscoveryServiceStreamAPKMgtApplicationsClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *aPKMgtDiscoveryServiceStreamAPKMgtApplicationsClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// APKMgtDiscoveryServiceServer is the server API for APKMgtDiscoveryService service. -type APKMgtDiscoveryServiceServer interface { - StreamAPKMgtApplications(APKMgtDiscoveryService_StreamAPKMgtApplicationsServer) error -} - -// UnimplementedAPKMgtDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAPKMgtDiscoveryServiceServer struct { -} - -func (*UnimplementedAPKMgtDiscoveryServiceServer) StreamAPKMgtApplications(APKMgtDiscoveryService_StreamAPKMgtApplicationsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamAPKMgtApplications not implemented") -} - -func RegisterAPKMgtDiscoveryServiceServer(s *grpc.Server, srv APKMgtDiscoveryServiceServer) { - s.RegisterService(&_APKMgtDiscoveryService_serviceDesc, srv) -} - -func _APKMgtDiscoveryService_StreamAPKMgtApplications_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(APKMgtDiscoveryServiceServer).StreamAPKMgtApplications(&aPKMgtDiscoveryServiceStreamAPKMgtApplicationsServer{stream}) -} - -type APKMgtDiscoveryService_StreamAPKMgtApplicationsServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type aPKMgtDiscoveryServiceStreamAPKMgtApplicationsServer struct { - grpc.ServerStream -} - -func (x *aPKMgtDiscoveryServiceStreamAPKMgtApplicationsServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *aPKMgtDiscoveryServiceStreamAPKMgtApplicationsServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _APKMgtDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "discovery.service.apkmgt.APKMgtDiscoveryService", - HandlerType: (*APKMgtDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamAPKMgtApplications", - Handler: _APKMgtDiscoveryService_StreamAPKMgtApplications_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "wso2/discovery/service/apkmgt/applicationds.proto", -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt/eventds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt/eventds.pb.go new file mode 100644 index 000000000..44197804a --- /dev/null +++ b/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt/eventds.pb.go @@ -0,0 +1,278 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0-devel +// protoc v3.13.0 +// source: wso2/discovery/service/apkmgt/eventds.proto + +package apkmgt + +import ( + context "context" + subscription "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *Request) Reset() { + *x = Request{} + if protoimpl.UnsafeEnabled { + mi := &file_wso2_discovery_service_apkmgt_eventds_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_wso2_discovery_service_apkmgt_eventds_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Request.ProtoReflect.Descriptor instead. +func (*Request) Descriptor() ([]byte, []int) { + return file_wso2_discovery_service_apkmgt_eventds_proto_rawDescGZIP(), []int{0} +} + +func (x *Request) GetEvent() string { + if x != nil { + return x.Event + } + return "" +} + +var File_wso2_discovery_service_apkmgt_eventds_proto protoreflect.FileDescriptor + +var file_wso2_discovery_service_apkmgt_eventds_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x2f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x1a, 0x27, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x1f, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x32, 0x6f, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x6b, 0x6d, + 0x67, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x73, 0x6f, + 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x00, + 0x30, 0x01, 0x42, 0x95, 0x01, 0x0a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, + 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, + 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x42, 0x11, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x61, 0x70, 0x6b, 0x2f, + 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x61, 0x70, 0x6b, 0x6d, 0x67, 0x74, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_wso2_discovery_service_apkmgt_eventds_proto_rawDescOnce sync.Once + file_wso2_discovery_service_apkmgt_eventds_proto_rawDescData = file_wso2_discovery_service_apkmgt_eventds_proto_rawDesc +) + +func file_wso2_discovery_service_apkmgt_eventds_proto_rawDescGZIP() []byte { + file_wso2_discovery_service_apkmgt_eventds_proto_rawDescOnce.Do(func() { + file_wso2_discovery_service_apkmgt_eventds_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_service_apkmgt_eventds_proto_rawDescData) + }) + return file_wso2_discovery_service_apkmgt_eventds_proto_rawDescData +} + +var file_wso2_discovery_service_apkmgt_eventds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_wso2_discovery_service_apkmgt_eventds_proto_goTypes = []interface{}{ + (*Request)(nil), // 0: discovery.service.apkmgt.Request + (*subscription.Event)(nil), // 1: wso2.discovery.subscription.Event +} +var file_wso2_discovery_service_apkmgt_eventds_proto_depIdxs = []int32{ + 0, // 0: discovery.service.apkmgt.EventStreamService.StreamEvents:input_type -> discovery.service.apkmgt.Request + 1, // 1: discovery.service.apkmgt.EventStreamService.StreamEvents:output_type -> wso2.discovery.subscription.Event + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_wso2_discovery_service_apkmgt_eventds_proto_init() } +func file_wso2_discovery_service_apkmgt_eventds_proto_init() { + if File_wso2_discovery_service_apkmgt_eventds_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_wso2_discovery_service_apkmgt_eventds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_wso2_discovery_service_apkmgt_eventds_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_wso2_discovery_service_apkmgt_eventds_proto_goTypes, + DependencyIndexes: file_wso2_discovery_service_apkmgt_eventds_proto_depIdxs, + MessageInfos: file_wso2_discovery_service_apkmgt_eventds_proto_msgTypes, + }.Build() + File_wso2_discovery_service_apkmgt_eventds_proto = out.File + file_wso2_discovery_service_apkmgt_eventds_proto_rawDesc = nil + file_wso2_discovery_service_apkmgt_eventds_proto_goTypes = nil + file_wso2_discovery_service_apkmgt_eventds_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// EventStreamServiceClient is the client API for EventStreamService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type EventStreamServiceClient interface { + StreamEvents(ctx context.Context, in *Request, opts ...grpc.CallOption) (EventStreamService_StreamEventsClient, error) +} + +type eventStreamServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewEventStreamServiceClient(cc grpc.ClientConnInterface) EventStreamServiceClient { + return &eventStreamServiceClient{cc} +} + +func (c *eventStreamServiceClient) StreamEvents(ctx context.Context, in *Request, opts ...grpc.CallOption) (EventStreamService_StreamEventsClient, error) { + stream, err := c.cc.NewStream(ctx, &_EventStreamService_serviceDesc.Streams[0], "/discovery.service.apkmgt.EventStreamService/StreamEvents", opts...) + if err != nil { + return nil, err + } + x := &eventStreamServiceStreamEventsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type EventStreamService_StreamEventsClient interface { + Recv() (*subscription.Event, error) + grpc.ClientStream +} + +type eventStreamServiceStreamEventsClient struct { + grpc.ClientStream +} + +func (x *eventStreamServiceStreamEventsClient) Recv() (*subscription.Event, error) { + m := new(subscription.Event) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// EventStreamServiceServer is the server API for EventStreamService service. +type EventStreamServiceServer interface { + StreamEvents(*Request, EventStreamService_StreamEventsServer) error +} + +// UnimplementedEventStreamServiceServer can be embedded to have forward compatible implementations. +type UnimplementedEventStreamServiceServer struct { +} + +func (*UnimplementedEventStreamServiceServer) StreamEvents(*Request, EventStreamService_StreamEventsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamEvents not implemented") +} + +func RegisterEventStreamServiceServer(s *grpc.Server, srv EventStreamServiceServer) { + s.RegisterService(&_EventStreamService_serviceDesc, srv) +} + +func _EventStreamService_StreamEvents_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(EventStreamServiceServer).StreamEvents(m, &eventStreamServiceStreamEventsServer{stream}) +} + +type EventStreamService_StreamEventsServer interface { + Send(*subscription.Event) error + grpc.ServerStream +} + +type eventStreamServiceStreamEventsServer struct { + grpc.ServerStream +} + +func (x *eventStreamServiceStreamEventsServer) Send(m *subscription.Event) error { + return x.ServerStream.SendMsg(m) +} + +var _EventStreamService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "discovery.service.apkmgt.EventStreamService", + HandlerType: (*EventStreamServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamEvents", + Handler: _EventStreamService_StreamEvents_Handler, + ServerStreams: true, + }, + }, + Metadata: "wso2/discovery/service/apkmgt/eventds.proto", +} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/keymgt/kmds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/keymgt/kmds.pb.go deleted file mode 100644 index 903d027f3..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/service/keymgt/kmds.pb.go +++ /dev/null @@ -1,252 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/service/keymgt/kmds.proto - -package keymgt - -import ( - context "context" - v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_wso2_discovery_service_keymgt_kmds_proto protoreflect.FileDescriptor - -var file_wso2_discovery_service_keymgt_kmds_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x2f, - 0x6b, 0x6d, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x77, 0x73, 0x6f, 0x32, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xff, 0x01, 0x0a, 0x12, 0x4b, 0x4d, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x11, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x28, 0x01, 0x30, 0x01, 0x12, 0x71, 0x0a, 0x10, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, - 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x86, 0x01, 0x0a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, - 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x42, 0x09, 0x4b, 0x6d, 0x64, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x88, 0x01, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_wso2_discovery_service_keymgt_kmds_proto_goTypes = []interface{}{ - (*v3.DiscoveryRequest)(nil), // 0: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 1: envoy.service.discovery.v3.DiscoveryResponse -} -var file_wso2_discovery_service_keymgt_kmds_proto_depIdxs = []int32{ - 0, // 0: wso2.discovery.service.keymgt.KMDiscoveryService.StreamKeyManagers:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 0, // 1: wso2.discovery.service.keymgt.KMDiscoveryService.FetchKeyManagers:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 2: wso2.discovery.service.keymgt.KMDiscoveryService.StreamKeyManagers:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 1, // 3: wso2.discovery.service.keymgt.KMDiscoveryService.FetchKeyManagers:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_service_keymgt_kmds_proto_init() } -func file_wso2_discovery_service_keymgt_kmds_proto_init() { - if File_wso2_discovery_service_keymgt_kmds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_service_keymgt_kmds_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wso2_discovery_service_keymgt_kmds_proto_goTypes, - DependencyIndexes: file_wso2_discovery_service_keymgt_kmds_proto_depIdxs, - }.Build() - File_wso2_discovery_service_keymgt_kmds_proto = out.File - file_wso2_discovery_service_keymgt_kmds_proto_rawDesc = nil - file_wso2_discovery_service_keymgt_kmds_proto_goTypes = nil - file_wso2_discovery_service_keymgt_kmds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// KMDiscoveryServiceClient is the client API for KMDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type KMDiscoveryServiceClient interface { - StreamKeyManagers(ctx context.Context, opts ...grpc.CallOption) (KMDiscoveryService_StreamKeyManagersClient, error) - FetchKeyManagers(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) -} - -type kMDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewKMDiscoveryServiceClient(cc grpc.ClientConnInterface) KMDiscoveryServiceClient { - return &kMDiscoveryServiceClient{cc} -} - -func (c *kMDiscoveryServiceClient) StreamKeyManagers(ctx context.Context, opts ...grpc.CallOption) (KMDiscoveryService_StreamKeyManagersClient, error) { - stream, err := c.cc.NewStream(ctx, &_KMDiscoveryService_serviceDesc.Streams[0], "/wso2.discovery.service.keymgt.KMDiscoveryService/StreamKeyManagers", opts...) - if err != nil { - return nil, err - } - x := &kMDiscoveryServiceStreamKeyManagersClient{stream} - return x, nil -} - -type KMDiscoveryService_StreamKeyManagersClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type kMDiscoveryServiceStreamKeyManagersClient struct { - grpc.ClientStream -} - -func (x *kMDiscoveryServiceStreamKeyManagersClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *kMDiscoveryServiceStreamKeyManagersClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *kMDiscoveryServiceClient) FetchKeyManagers(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) { - out := new(v3.DiscoveryResponse) - err := c.cc.Invoke(ctx, "/wso2.discovery.service.keymgt.KMDiscoveryService/FetchKeyManagers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KMDiscoveryServiceServer is the server API for KMDiscoveryService service. -type KMDiscoveryServiceServer interface { - StreamKeyManagers(KMDiscoveryService_StreamKeyManagersServer) error - FetchKeyManagers(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) -} - -// UnimplementedKMDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedKMDiscoveryServiceServer struct { -} - -func (*UnimplementedKMDiscoveryServiceServer) StreamKeyManagers(KMDiscoveryService_StreamKeyManagersServer) error { - return status.Errorf(codes.Unimplemented, "method StreamKeyManagers not implemented") -} -func (*UnimplementedKMDiscoveryServiceServer) FetchKeyManagers(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchKeyManagers not implemented") -} - -func RegisterKMDiscoveryServiceServer(s *grpc.Server, srv KMDiscoveryServiceServer) { - s.RegisterService(&_KMDiscoveryService_serviceDesc, srv) -} - -func _KMDiscoveryService_StreamKeyManagers_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(KMDiscoveryServiceServer).StreamKeyManagers(&kMDiscoveryServiceStreamKeyManagersServer{stream}) -} - -type KMDiscoveryService_StreamKeyManagersServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type kMDiscoveryServiceStreamKeyManagersServer struct { - grpc.ServerStream -} - -func (x *kMDiscoveryServiceStreamKeyManagersServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *kMDiscoveryServiceStreamKeyManagersServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _KMDiscoveryService_FetchKeyManagers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v3.DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KMDiscoveryServiceServer).FetchKeyManagers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/wso2.discovery.service.keymgt.KMDiscoveryService/FetchKeyManagers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KMDiscoveryServiceServer).FetchKeyManagers(ctx, req.(*v3.DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _KMDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "wso2.discovery.service.keymgt.KMDiscoveryService", - HandlerType: (*KMDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchKeyManagers", - Handler: _KMDiscoveryService_FetchKeyManagers_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamKeyManagers", - Handler: _KMDiscoveryService_StreamKeyManagers_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "wso2/discovery/service/keymgt/kmds.proto", -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/keymgt/rtds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/keymgt/rtds.pb.go deleted file mode 100644 index dda0491e4..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/service/keymgt/rtds.pb.go +++ /dev/null @@ -1,268 +0,0 @@ -// -// Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// 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. -// - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/service/keymgt/rtds.proto - -package keymgt - -import ( - context "context" - v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_wso2_discovery_service_keymgt_rtds_proto protoreflect.FileDescriptor - -var file_wso2_discovery_service_keymgt_rtds_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x2f, - 0x72, 0x74, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x77, 0x73, 0x6f, 0x32, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xff, 0x01, 0x0a, 0x1c, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x0b, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x86, 0x01, 0x0a, 0x2e, 0x6f, 0x72, 0x67, 0x2e, - 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x42, 0x09, 0x52, 0x74, 0x64, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6b, 0x65, 0x79, 0x6d, 0x67, 0x74, 0x88, 0x01, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_wso2_discovery_service_keymgt_rtds_proto_goTypes = []interface{}{ - (*v3.DiscoveryRequest)(nil), // 0: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 1: envoy.service.discovery.v3.DiscoveryResponse -} -var file_wso2_discovery_service_keymgt_rtds_proto_depIdxs = []int32{ - 0, // 0: wso2.discovery.service.keymgt.RevokedTokenDiscoveryService.StreamTokens:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 0, // 1: wso2.discovery.service.keymgt.RevokedTokenDiscoveryService.FetchTokens:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 2: wso2.discovery.service.keymgt.RevokedTokenDiscoveryService.StreamTokens:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 1, // 3: wso2.discovery.service.keymgt.RevokedTokenDiscoveryService.FetchTokens:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_service_keymgt_rtds_proto_init() } -func file_wso2_discovery_service_keymgt_rtds_proto_init() { - if File_wso2_discovery_service_keymgt_rtds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_service_keymgt_rtds_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wso2_discovery_service_keymgt_rtds_proto_goTypes, - DependencyIndexes: file_wso2_discovery_service_keymgt_rtds_proto_depIdxs, - }.Build() - File_wso2_discovery_service_keymgt_rtds_proto = out.File - file_wso2_discovery_service_keymgt_rtds_proto_rawDesc = nil - file_wso2_discovery_service_keymgt_rtds_proto_goTypes = nil - file_wso2_discovery_service_keymgt_rtds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// RevokedTokenDiscoveryServiceClient is the client API for RevokedTokenDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RevokedTokenDiscoveryServiceClient interface { - StreamTokens(ctx context.Context, opts ...grpc.CallOption) (RevokedTokenDiscoveryService_StreamTokensClient, error) - FetchTokens(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) -} - -type revokedTokenDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewRevokedTokenDiscoveryServiceClient(cc grpc.ClientConnInterface) RevokedTokenDiscoveryServiceClient { - return &revokedTokenDiscoveryServiceClient{cc} -} - -func (c *revokedTokenDiscoveryServiceClient) StreamTokens(ctx context.Context, opts ...grpc.CallOption) (RevokedTokenDiscoveryService_StreamTokensClient, error) { - stream, err := c.cc.NewStream(ctx, &_RevokedTokenDiscoveryService_serviceDesc.Streams[0], "/wso2.discovery.service.keymgt.RevokedTokenDiscoveryService/StreamTokens", opts...) - if err != nil { - return nil, err - } - x := &revokedTokenDiscoveryServiceStreamTokensClient{stream} - return x, nil -} - -type RevokedTokenDiscoveryService_StreamTokensClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type revokedTokenDiscoveryServiceStreamTokensClient struct { - grpc.ClientStream -} - -func (x *revokedTokenDiscoveryServiceStreamTokensClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *revokedTokenDiscoveryServiceStreamTokensClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *revokedTokenDiscoveryServiceClient) FetchTokens(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) { - out := new(v3.DiscoveryResponse) - err := c.cc.Invoke(ctx, "/wso2.discovery.service.keymgt.RevokedTokenDiscoveryService/FetchTokens", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RevokedTokenDiscoveryServiceServer is the server API for RevokedTokenDiscoveryService service. -type RevokedTokenDiscoveryServiceServer interface { - StreamTokens(RevokedTokenDiscoveryService_StreamTokensServer) error - FetchTokens(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) -} - -// UnimplementedRevokedTokenDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedRevokedTokenDiscoveryServiceServer struct { -} - -func (*UnimplementedRevokedTokenDiscoveryServiceServer) StreamTokens(RevokedTokenDiscoveryService_StreamTokensServer) error { - return status.Errorf(codes.Unimplemented, "method StreamTokens not implemented") -} -func (*UnimplementedRevokedTokenDiscoveryServiceServer) FetchTokens(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchTokens not implemented") -} - -func RegisterRevokedTokenDiscoveryServiceServer(s *grpc.Server, srv RevokedTokenDiscoveryServiceServer) { - s.RegisterService(&_RevokedTokenDiscoveryService_serviceDesc, srv) -} - -func _RevokedTokenDiscoveryService_StreamTokens_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(RevokedTokenDiscoveryServiceServer).StreamTokens(&revokedTokenDiscoveryServiceStreamTokensServer{stream}) -} - -type RevokedTokenDiscoveryService_StreamTokensServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type revokedTokenDiscoveryServiceStreamTokensServer struct { - grpc.ServerStream -} - -func (x *revokedTokenDiscoveryServiceStreamTokensServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *revokedTokenDiscoveryServiceStreamTokensServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _RevokedTokenDiscoveryService_FetchTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v3.DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RevokedTokenDiscoveryServiceServer).FetchTokens(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/wso2.discovery.service.keymgt.RevokedTokenDiscoveryService/FetchTokens", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RevokedTokenDiscoveryServiceServer).FetchTokens(ctx, req.(*v3.DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RevokedTokenDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "wso2.discovery.service.keymgt.RevokedTokenDiscoveryService", - HandlerType: (*RevokedTokenDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchTokens", - Handler: _RevokedTokenDiscoveryService_FetchTokens_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamTokens", - Handler: _RevokedTokenDiscoveryService_StreamTokens_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "wso2/discovery/service/keymgt/rtds.proto", -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_key_mapping_ds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_key_mapping_ds.pb.go deleted file mode 100644 index d72ed0085..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_key_mapping_ds.pb.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/service/subscription/app_key_mapping_ds.proto - -package subscription - -import ( - context "context" - v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_wso2_discovery_service_subscription_app_key_mapping_ds_proto protoreflect.FileDescriptor - -var file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_rawDesc = []byte{ - 0x0a, 0x3c, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2a, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xab, 0x01, 0x0a, 0x25, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x1c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x9d, 0x01, 0x0a, 0x34, 0x6f, 0x72, 0x67, - 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x14, 0x41, 0x70, 0x70, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x44, 0x53, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, - 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_goTypes = []interface{}{ - (*v3.DiscoveryRequest)(nil), // 0: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 1: envoy.service.discovery.v3.DiscoveryResponse -} -var file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_depIdxs = []int32{ - 0, // 0: discovery.service.subscription.ApplicationKeyMappingDiscoveryService.StreamApplicationKeyMappings:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 1: discovery.service.subscription.ApplicationKeyMappingDiscoveryService.StreamApplicationKeyMappings:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_init() } -func file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_init() { - if File_wso2_discovery_service_subscription_app_key_mapping_ds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_goTypes, - DependencyIndexes: file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_depIdxs, - }.Build() - File_wso2_discovery_service_subscription_app_key_mapping_ds_proto = out.File - file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_rawDesc = nil - file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_goTypes = nil - file_wso2_discovery_service_subscription_app_key_mapping_ds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ApplicationKeyMappingDiscoveryServiceClient is the client API for ApplicationKeyMappingDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ApplicationKeyMappingDiscoveryServiceClient interface { - StreamApplicationKeyMappings(ctx context.Context, opts ...grpc.CallOption) (ApplicationKeyMappingDiscoveryService_StreamApplicationKeyMappingsClient, error) -} - -type applicationKeyMappingDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewApplicationKeyMappingDiscoveryServiceClient(cc grpc.ClientConnInterface) ApplicationKeyMappingDiscoveryServiceClient { - return &applicationKeyMappingDiscoveryServiceClient{cc} -} - -func (c *applicationKeyMappingDiscoveryServiceClient) StreamApplicationKeyMappings(ctx context.Context, opts ...grpc.CallOption) (ApplicationKeyMappingDiscoveryService_StreamApplicationKeyMappingsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ApplicationKeyMappingDiscoveryService_serviceDesc.Streams[0], "/discovery.service.subscription.ApplicationKeyMappingDiscoveryService/StreamApplicationKeyMappings", opts...) - if err != nil { - return nil, err - } - x := &applicationKeyMappingDiscoveryServiceStreamApplicationKeyMappingsClient{stream} - return x, nil -} - -type ApplicationKeyMappingDiscoveryService_StreamApplicationKeyMappingsClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type applicationKeyMappingDiscoveryServiceStreamApplicationKeyMappingsClient struct { - grpc.ClientStream -} - -func (x *applicationKeyMappingDiscoveryServiceStreamApplicationKeyMappingsClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *applicationKeyMappingDiscoveryServiceStreamApplicationKeyMappingsClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ApplicationKeyMappingDiscoveryServiceServer is the server API for ApplicationKeyMappingDiscoveryService service. -type ApplicationKeyMappingDiscoveryServiceServer interface { - StreamApplicationKeyMappings(ApplicationKeyMappingDiscoveryService_StreamApplicationKeyMappingsServer) error -} - -// UnimplementedApplicationKeyMappingDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedApplicationKeyMappingDiscoveryServiceServer struct { -} - -func (*UnimplementedApplicationKeyMappingDiscoveryServiceServer) StreamApplicationKeyMappings(ApplicationKeyMappingDiscoveryService_StreamApplicationKeyMappingsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamApplicationKeyMappings not implemented") -} - -func RegisterApplicationKeyMappingDiscoveryServiceServer(s *grpc.Server, srv ApplicationKeyMappingDiscoveryServiceServer) { - s.RegisterService(&_ApplicationKeyMappingDiscoveryService_serviceDesc, srv) -} - -func _ApplicationKeyMappingDiscoveryService_StreamApplicationKeyMappings_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ApplicationKeyMappingDiscoveryServiceServer).StreamApplicationKeyMappings(&applicationKeyMappingDiscoveryServiceStreamApplicationKeyMappingsServer{stream}) -} - -type ApplicationKeyMappingDiscoveryService_StreamApplicationKeyMappingsServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type applicationKeyMappingDiscoveryServiceStreamApplicationKeyMappingsServer struct { - grpc.ServerStream -} - -func (x *applicationKeyMappingDiscoveryServiceStreamApplicationKeyMappingsServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *applicationKeyMappingDiscoveryServiceStreamApplicationKeyMappingsServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _ApplicationKeyMappingDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "discovery.service.subscription.ApplicationKeyMappingDiscoveryService", - HandlerType: (*ApplicationKeyMappingDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamApplicationKeyMappings", - Handler: _ApplicationKeyMappingDiscoveryService_StreamApplicationKeyMappings_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "wso2/discovery/service/subscription/app_key_mapping_ds.proto", -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_mapping_ds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_mapping_ds.pb.go deleted file mode 100644 index a4a61c43a..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_mapping_ds.pb.go +++ /dev/null @@ -1,226 +0,0 @@ -// -// Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// 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. -// - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/service/subscription/app_mapping_ds.proto - -package subscription - -import ( - context "context" - v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_wso2_discovery_service_subscription_app_mapping_ds_proto protoreflect.FileDescriptor - -var file_wso2_discovery_service_subscription_app_mapping_ds_proto_rawDesc = []byte{ - 0x0a, 0x38, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x5f, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa4, 0x01, 0x0a, 0x22, 0x41, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, - 0x19, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x9a, 0x01, - 0x0a, 0x34, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, - 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, 0x41, 0x70, 0x70, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x44, 0x53, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var file_wso2_discovery_service_subscription_app_mapping_ds_proto_goTypes = []interface{}{ - (*v3.DiscoveryRequest)(nil), // 0: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 1: envoy.service.discovery.v3.DiscoveryResponse -} -var file_wso2_discovery_service_subscription_app_mapping_ds_proto_depIdxs = []int32{ - 0, // 0: discovery.service.subscription.ApplicationMappingDiscoveryService.StreamApplicationMappings:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 1: discovery.service.subscription.ApplicationMappingDiscoveryService.StreamApplicationMappings:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_service_subscription_app_mapping_ds_proto_init() } -func file_wso2_discovery_service_subscription_app_mapping_ds_proto_init() { - if File_wso2_discovery_service_subscription_app_mapping_ds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_service_subscription_app_mapping_ds_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wso2_discovery_service_subscription_app_mapping_ds_proto_goTypes, - DependencyIndexes: file_wso2_discovery_service_subscription_app_mapping_ds_proto_depIdxs, - }.Build() - File_wso2_discovery_service_subscription_app_mapping_ds_proto = out.File - file_wso2_discovery_service_subscription_app_mapping_ds_proto_rawDesc = nil - file_wso2_discovery_service_subscription_app_mapping_ds_proto_goTypes = nil - file_wso2_discovery_service_subscription_app_mapping_ds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ApplicationMappingDiscoveryServiceClient is the client API for ApplicationMappingDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ApplicationMappingDiscoveryServiceClient interface { - StreamApplicationMappings(ctx context.Context, opts ...grpc.CallOption) (ApplicationMappingDiscoveryService_StreamApplicationMappingsClient, error) -} - -type applicationMappingDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewApplicationMappingDiscoveryServiceClient(cc grpc.ClientConnInterface) ApplicationMappingDiscoveryServiceClient { - return &applicationMappingDiscoveryServiceClient{cc} -} - -func (c *applicationMappingDiscoveryServiceClient) StreamApplicationMappings(ctx context.Context, opts ...grpc.CallOption) (ApplicationMappingDiscoveryService_StreamApplicationMappingsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ApplicationMappingDiscoveryService_serviceDesc.Streams[0], "/discovery.service.subscription.ApplicationMappingDiscoveryService/StreamApplicationMappings", opts...) - if err != nil { - return nil, err - } - x := &applicationMappingDiscoveryServiceStreamApplicationMappingsClient{stream} - return x, nil -} - -type ApplicationMappingDiscoveryService_StreamApplicationMappingsClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type applicationMappingDiscoveryServiceStreamApplicationMappingsClient struct { - grpc.ClientStream -} - -func (x *applicationMappingDiscoveryServiceStreamApplicationMappingsClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *applicationMappingDiscoveryServiceStreamApplicationMappingsClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ApplicationMappingDiscoveryServiceServer is the server API for ApplicationMappingDiscoveryService service. -type ApplicationMappingDiscoveryServiceServer interface { - StreamApplicationMappings(ApplicationMappingDiscoveryService_StreamApplicationMappingsServer) error -} - -// UnimplementedApplicationMappingDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedApplicationMappingDiscoveryServiceServer struct { -} - -func (*UnimplementedApplicationMappingDiscoveryServiceServer) StreamApplicationMappings(ApplicationMappingDiscoveryService_StreamApplicationMappingsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamApplicationMappings not implemented") -} - -func RegisterApplicationMappingDiscoveryServiceServer(s *grpc.Server, srv ApplicationMappingDiscoveryServiceServer) { - s.RegisterService(&_ApplicationMappingDiscoveryService_serviceDesc, srv) -} - -func _ApplicationMappingDiscoveryService_StreamApplicationMappings_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ApplicationMappingDiscoveryServiceServer).StreamApplicationMappings(&applicationMappingDiscoveryServiceStreamApplicationMappingsServer{stream}) -} - -type ApplicationMappingDiscoveryService_StreamApplicationMappingsServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type applicationMappingDiscoveryServiceStreamApplicationMappingsServer struct { - grpc.ServerStream -} - -func (x *applicationMappingDiscoveryServiceStreamApplicationMappingsServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *applicationMappingDiscoveryServiceStreamApplicationMappingsServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _ApplicationMappingDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "discovery.service.subscription.ApplicationMappingDiscoveryService", - HandlerType: (*ApplicationMappingDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamApplicationMappings", - Handler: _ApplicationMappingDiscoveryService_StreamApplicationMappings_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "wso2/discovery/service/subscription/app_mapping_ds.proto", -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_policy_ds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_policy_ds.pb.go deleted file mode 100644 index c172e6a1d..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/app_policy_ds.pb.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/service/subscription/app_policy_ds.proto - -package subscription - -import ( - context "context" - v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_wso2_discovery_service_subscription_app_policy_ds_proto protoreflect.FileDescriptor - -var file_wso2_discovery_service_subscription_app_policy_ds_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa3, 0x01, 0x0a, 0x21, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x19, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x99, 0x01, 0x0a, 0x34, - 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x41, 0x70, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, - 0x53, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, - 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_wso2_discovery_service_subscription_app_policy_ds_proto_goTypes = []interface{}{ - (*v3.DiscoveryRequest)(nil), // 0: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 1: envoy.service.discovery.v3.DiscoveryResponse -} -var file_wso2_discovery_service_subscription_app_policy_ds_proto_depIdxs = []int32{ - 0, // 0: discovery.service.subscription.ApplicationPolicyDiscoveryService.StreamApplicationPolicies:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 1: discovery.service.subscription.ApplicationPolicyDiscoveryService.StreamApplicationPolicies:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_service_subscription_app_policy_ds_proto_init() } -func file_wso2_discovery_service_subscription_app_policy_ds_proto_init() { - if File_wso2_discovery_service_subscription_app_policy_ds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_service_subscription_app_policy_ds_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wso2_discovery_service_subscription_app_policy_ds_proto_goTypes, - DependencyIndexes: file_wso2_discovery_service_subscription_app_policy_ds_proto_depIdxs, - }.Build() - File_wso2_discovery_service_subscription_app_policy_ds_proto = out.File - file_wso2_discovery_service_subscription_app_policy_ds_proto_rawDesc = nil - file_wso2_discovery_service_subscription_app_policy_ds_proto_goTypes = nil - file_wso2_discovery_service_subscription_app_policy_ds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ApplicationPolicyDiscoveryServiceClient is the client API for ApplicationPolicyDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ApplicationPolicyDiscoveryServiceClient interface { - StreamApplicationPolicies(ctx context.Context, opts ...grpc.CallOption) (ApplicationPolicyDiscoveryService_StreamApplicationPoliciesClient, error) -} - -type applicationPolicyDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewApplicationPolicyDiscoveryServiceClient(cc grpc.ClientConnInterface) ApplicationPolicyDiscoveryServiceClient { - return &applicationPolicyDiscoveryServiceClient{cc} -} - -func (c *applicationPolicyDiscoveryServiceClient) StreamApplicationPolicies(ctx context.Context, opts ...grpc.CallOption) (ApplicationPolicyDiscoveryService_StreamApplicationPoliciesClient, error) { - stream, err := c.cc.NewStream(ctx, &_ApplicationPolicyDiscoveryService_serviceDesc.Streams[0], "/discovery.service.subscription.ApplicationPolicyDiscoveryService/StreamApplicationPolicies", opts...) - if err != nil { - return nil, err - } - x := &applicationPolicyDiscoveryServiceStreamApplicationPoliciesClient{stream} - return x, nil -} - -type ApplicationPolicyDiscoveryService_StreamApplicationPoliciesClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type applicationPolicyDiscoveryServiceStreamApplicationPoliciesClient struct { - grpc.ClientStream -} - -func (x *applicationPolicyDiscoveryServiceStreamApplicationPoliciesClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *applicationPolicyDiscoveryServiceStreamApplicationPoliciesClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ApplicationPolicyDiscoveryServiceServer is the server API for ApplicationPolicyDiscoveryService service. -type ApplicationPolicyDiscoveryServiceServer interface { - StreamApplicationPolicies(ApplicationPolicyDiscoveryService_StreamApplicationPoliciesServer) error -} - -// UnimplementedApplicationPolicyDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedApplicationPolicyDiscoveryServiceServer struct { -} - -func (*UnimplementedApplicationPolicyDiscoveryServiceServer) StreamApplicationPolicies(ApplicationPolicyDiscoveryService_StreamApplicationPoliciesServer) error { - return status.Errorf(codes.Unimplemented, "method StreamApplicationPolicies not implemented") -} - -func RegisterApplicationPolicyDiscoveryServiceServer(s *grpc.Server, srv ApplicationPolicyDiscoveryServiceServer) { - s.RegisterService(&_ApplicationPolicyDiscoveryService_serviceDesc, srv) -} - -func _ApplicationPolicyDiscoveryService_StreamApplicationPolicies_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ApplicationPolicyDiscoveryServiceServer).StreamApplicationPolicies(&applicationPolicyDiscoveryServiceStreamApplicationPoliciesServer{stream}) -} - -type ApplicationPolicyDiscoveryService_StreamApplicationPoliciesServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type applicationPolicyDiscoveryServiceStreamApplicationPoliciesServer struct { - grpc.ServerStream -} - -func (x *applicationPolicyDiscoveryServiceStreamApplicationPoliciesServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *applicationPolicyDiscoveryServiceStreamApplicationPoliciesServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _ApplicationPolicyDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "discovery.service.subscription.ApplicationPolicyDiscoveryService", - HandlerType: (*ApplicationPolicyDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamApplicationPolicies", - Handler: _ApplicationPolicyDiscoveryService_StreamApplicationPolicies_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "wso2/discovery/service/subscription/app_policy_ds.proto", -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/appds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/subscription/appds.pb.go deleted file mode 100644 index aa2c7167a..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/appds.pb.go +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/service/subscription/appds.proto - -package subscription - -import ( - context "context" - v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_wso2_discovery_service_subscription_appds_proto protoreflect.FileDescriptor - -var file_wso2_discovery_service_subscription_appds_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x1e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x96, 0x01, - 0x0a, 0x1b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, - 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x34, 0x6f, 0x72, 0x67, 0x2e, 0x77, - 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x0a, 0x41, 0x70, 0x70, 0x44, 0x53, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, - 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var file_wso2_discovery_service_subscription_appds_proto_goTypes = []interface{}{ - (*v3.DiscoveryRequest)(nil), // 0: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 1: envoy.service.discovery.v3.DiscoveryResponse -} -var file_wso2_discovery_service_subscription_appds_proto_depIdxs = []int32{ - 0, // 0: discovery.service.subscription.ApplicationDiscoveryService.StreamApplications:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 1: discovery.service.subscription.ApplicationDiscoveryService.StreamApplications:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_service_subscription_appds_proto_init() } -func file_wso2_discovery_service_subscription_appds_proto_init() { - if File_wso2_discovery_service_subscription_appds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_service_subscription_appds_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wso2_discovery_service_subscription_appds_proto_goTypes, - DependencyIndexes: file_wso2_discovery_service_subscription_appds_proto_depIdxs, - }.Build() - File_wso2_discovery_service_subscription_appds_proto = out.File - file_wso2_discovery_service_subscription_appds_proto_rawDesc = nil - file_wso2_discovery_service_subscription_appds_proto_goTypes = nil - file_wso2_discovery_service_subscription_appds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ApplicationDiscoveryServiceClient is the client API for ApplicationDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ApplicationDiscoveryServiceClient interface { - StreamApplications(ctx context.Context, opts ...grpc.CallOption) (ApplicationDiscoveryService_StreamApplicationsClient, error) -} - -type applicationDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewApplicationDiscoveryServiceClient(cc grpc.ClientConnInterface) ApplicationDiscoveryServiceClient { - return &applicationDiscoveryServiceClient{cc} -} - -func (c *applicationDiscoveryServiceClient) StreamApplications(ctx context.Context, opts ...grpc.CallOption) (ApplicationDiscoveryService_StreamApplicationsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ApplicationDiscoveryService_serviceDesc.Streams[0], "/discovery.service.subscription.ApplicationDiscoveryService/StreamApplications", opts...) - if err != nil { - return nil, err - } - x := &applicationDiscoveryServiceStreamApplicationsClient{stream} - return x, nil -} - -type ApplicationDiscoveryService_StreamApplicationsClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type applicationDiscoveryServiceStreamApplicationsClient struct { - grpc.ClientStream -} - -func (x *applicationDiscoveryServiceStreamApplicationsClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *applicationDiscoveryServiceStreamApplicationsClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ApplicationDiscoveryServiceServer is the server API for ApplicationDiscoveryService service. -type ApplicationDiscoveryServiceServer interface { - StreamApplications(ApplicationDiscoveryService_StreamApplicationsServer) error -} - -// UnimplementedApplicationDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedApplicationDiscoveryServiceServer struct { -} - -func (*UnimplementedApplicationDiscoveryServiceServer) StreamApplications(ApplicationDiscoveryService_StreamApplicationsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamApplications not implemented") -} - -func RegisterApplicationDiscoveryServiceServer(s *grpc.Server, srv ApplicationDiscoveryServiceServer) { - s.RegisterService(&_ApplicationDiscoveryService_serviceDesc, srv) -} - -func _ApplicationDiscoveryService_StreamApplications_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ApplicationDiscoveryServiceServer).StreamApplications(&applicationDiscoveryServiceStreamApplicationsServer{stream}) -} - -type ApplicationDiscoveryService_StreamApplicationsServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type applicationDiscoveryServiceStreamApplicationsServer struct { - grpc.ServerStream -} - -func (x *applicationDiscoveryServiceStreamApplicationsServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *applicationDiscoveryServiceStreamApplicationsServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _ApplicationDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "discovery.service.subscription.ApplicationDiscoveryService", - HandlerType: (*ApplicationDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamApplications", - Handler: _ApplicationDiscoveryService_StreamApplications_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "wso2/discovery/service/subscription/appds.proto", -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/sds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/subscription/sds.pb.go deleted file mode 100644 index c30dde371..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/sds.pb.go +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/service/subscription/sds.proto - -package subscription - -import ( - context "context" - v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_wso2_discovery_service_subscription_sds_proto protoreflect.FileDescriptor - -var file_wso2_discovery_service_subscription_sds_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, - 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x98, 0x01, 0x0a, 0x1c, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x13, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x91, 0x01, 0x0a, 0x34, 0x6f, 0x72, 0x67, 0x2e, 0x77, - 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0x53, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var file_wso2_discovery_service_subscription_sds_proto_goTypes = []interface{}{ - (*v3.DiscoveryRequest)(nil), // 0: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 1: envoy.service.discovery.v3.DiscoveryResponse -} -var file_wso2_discovery_service_subscription_sds_proto_depIdxs = []int32{ - 0, // 0: discovery.service.subscription.SubscriptionDiscoveryService.StreamSubscriptions:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 1: discovery.service.subscription.SubscriptionDiscoveryService.StreamSubscriptions:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_service_subscription_sds_proto_init() } -func file_wso2_discovery_service_subscription_sds_proto_init() { - if File_wso2_discovery_service_subscription_sds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_service_subscription_sds_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wso2_discovery_service_subscription_sds_proto_goTypes, - DependencyIndexes: file_wso2_discovery_service_subscription_sds_proto_depIdxs, - }.Build() - File_wso2_discovery_service_subscription_sds_proto = out.File - file_wso2_discovery_service_subscription_sds_proto_rawDesc = nil - file_wso2_discovery_service_subscription_sds_proto_goTypes = nil - file_wso2_discovery_service_subscription_sds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// SubscriptionDiscoveryServiceClient is the client API for SubscriptionDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SubscriptionDiscoveryServiceClient interface { - StreamSubscriptions(ctx context.Context, opts ...grpc.CallOption) (SubscriptionDiscoveryService_StreamSubscriptionsClient, error) -} - -type subscriptionDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSubscriptionDiscoveryServiceClient(cc grpc.ClientConnInterface) SubscriptionDiscoveryServiceClient { - return &subscriptionDiscoveryServiceClient{cc} -} - -func (c *subscriptionDiscoveryServiceClient) StreamSubscriptions(ctx context.Context, opts ...grpc.CallOption) (SubscriptionDiscoveryService_StreamSubscriptionsClient, error) { - stream, err := c.cc.NewStream(ctx, &_SubscriptionDiscoveryService_serviceDesc.Streams[0], "/discovery.service.subscription.SubscriptionDiscoveryService/StreamSubscriptions", opts...) - if err != nil { - return nil, err - } - x := &subscriptionDiscoveryServiceStreamSubscriptionsClient{stream} - return x, nil -} - -type SubscriptionDiscoveryService_StreamSubscriptionsClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type subscriptionDiscoveryServiceStreamSubscriptionsClient struct { - grpc.ClientStream -} - -func (x *subscriptionDiscoveryServiceStreamSubscriptionsClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *subscriptionDiscoveryServiceStreamSubscriptionsClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// SubscriptionDiscoveryServiceServer is the server API for SubscriptionDiscoveryService service. -type SubscriptionDiscoveryServiceServer interface { - StreamSubscriptions(SubscriptionDiscoveryService_StreamSubscriptionsServer) error -} - -// UnimplementedSubscriptionDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedSubscriptionDiscoveryServiceServer struct { -} - -func (*UnimplementedSubscriptionDiscoveryServiceServer) StreamSubscriptions(SubscriptionDiscoveryService_StreamSubscriptionsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamSubscriptions not implemented") -} - -func RegisterSubscriptionDiscoveryServiceServer(s *grpc.Server, srv SubscriptionDiscoveryServiceServer) { - s.RegisterService(&_SubscriptionDiscoveryService_serviceDesc, srv) -} - -func _SubscriptionDiscoveryService_StreamSubscriptions_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(SubscriptionDiscoveryServiceServer).StreamSubscriptions(&subscriptionDiscoveryServiceStreamSubscriptionsServer{stream}) -} - -type SubscriptionDiscoveryService_StreamSubscriptionsServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type subscriptionDiscoveryServiceStreamSubscriptionsServer struct { - grpc.ServerStream -} - -func (x *subscriptionDiscoveryServiceStreamSubscriptionsServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *subscriptionDiscoveryServiceStreamSubscriptionsServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _SubscriptionDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "discovery.service.subscription.SubscriptionDiscoveryService", - HandlerType: (*SubscriptionDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamSubscriptions", - Handler: _SubscriptionDiscoveryService_StreamSubscriptions_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "wso2/discovery/service/subscription/sds.proto", -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/sub_policy_ds.pb.go b/adapter/pkg/discovery/api/wso2/discovery/service/subscription/sub_policy_ds.pb.go deleted file mode 100644 index 19bccad76..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/service/subscription/sub_policy_ds.pb.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/service/subscription/sub_policy_ds.proto - -package subscription - -import ( - context "context" - v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_wso2_discovery_service_subscription_sub_policy_ds_proto protoreflect.FileDescriptor - -var file_wso2_discovery_service_subscription_sub_policy_ds_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x75, 0x62, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa5, 0x01, 0x0a, 0x22, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x1a, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x99, 0x01, - 0x0a, 0x34, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, - 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x53, 0x75, 0x62, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x44, 0x53, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, - 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var file_wso2_discovery_service_subscription_sub_policy_ds_proto_goTypes = []interface{}{ - (*v3.DiscoveryRequest)(nil), // 0: envoy.service.discovery.v3.DiscoveryRequest - (*v3.DiscoveryResponse)(nil), // 1: envoy.service.discovery.v3.DiscoveryResponse -} -var file_wso2_discovery_service_subscription_sub_policy_ds_proto_depIdxs = []int32{ - 0, // 0: discovery.service.subscription.SubscriptionPolicyDiscoveryService.StreamSubscriptionPolicies:input_type -> envoy.service.discovery.v3.DiscoveryRequest - 1, // 1: discovery.service.subscription.SubscriptionPolicyDiscoveryService.StreamSubscriptionPolicies:output_type -> envoy.service.discovery.v3.DiscoveryResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_service_subscription_sub_policy_ds_proto_init() } -func file_wso2_discovery_service_subscription_sub_policy_ds_proto_init() { - if File_wso2_discovery_service_subscription_sub_policy_ds_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_service_subscription_sub_policy_ds_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wso2_discovery_service_subscription_sub_policy_ds_proto_goTypes, - DependencyIndexes: file_wso2_discovery_service_subscription_sub_policy_ds_proto_depIdxs, - }.Build() - File_wso2_discovery_service_subscription_sub_policy_ds_proto = out.File - file_wso2_discovery_service_subscription_sub_policy_ds_proto_rawDesc = nil - file_wso2_discovery_service_subscription_sub_policy_ds_proto_goTypes = nil - file_wso2_discovery_service_subscription_sub_policy_ds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// SubscriptionPolicyDiscoveryServiceClient is the client API for SubscriptionPolicyDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SubscriptionPolicyDiscoveryServiceClient interface { - StreamSubscriptionPolicies(ctx context.Context, opts ...grpc.CallOption) (SubscriptionPolicyDiscoveryService_StreamSubscriptionPoliciesClient, error) -} - -type subscriptionPolicyDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSubscriptionPolicyDiscoveryServiceClient(cc grpc.ClientConnInterface) SubscriptionPolicyDiscoveryServiceClient { - return &subscriptionPolicyDiscoveryServiceClient{cc} -} - -func (c *subscriptionPolicyDiscoveryServiceClient) StreamSubscriptionPolicies(ctx context.Context, opts ...grpc.CallOption) (SubscriptionPolicyDiscoveryService_StreamSubscriptionPoliciesClient, error) { - stream, err := c.cc.NewStream(ctx, &_SubscriptionPolicyDiscoveryService_serviceDesc.Streams[0], "/discovery.service.subscription.SubscriptionPolicyDiscoveryService/StreamSubscriptionPolicies", opts...) - if err != nil { - return nil, err - } - x := &subscriptionPolicyDiscoveryServiceStreamSubscriptionPoliciesClient{stream} - return x, nil -} - -type SubscriptionPolicyDiscoveryService_StreamSubscriptionPoliciesClient interface { - Send(*v3.DiscoveryRequest) error - Recv() (*v3.DiscoveryResponse, error) - grpc.ClientStream -} - -type subscriptionPolicyDiscoveryServiceStreamSubscriptionPoliciesClient struct { - grpc.ClientStream -} - -func (x *subscriptionPolicyDiscoveryServiceStreamSubscriptionPoliciesClient) Send(m *v3.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *subscriptionPolicyDiscoveryServiceStreamSubscriptionPoliciesClient) Recv() (*v3.DiscoveryResponse, error) { - m := new(v3.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// SubscriptionPolicyDiscoveryServiceServer is the server API for SubscriptionPolicyDiscoveryService service. -type SubscriptionPolicyDiscoveryServiceServer interface { - StreamSubscriptionPolicies(SubscriptionPolicyDiscoveryService_StreamSubscriptionPoliciesServer) error -} - -// UnimplementedSubscriptionPolicyDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedSubscriptionPolicyDiscoveryServiceServer struct { -} - -func (*UnimplementedSubscriptionPolicyDiscoveryServiceServer) StreamSubscriptionPolicies(SubscriptionPolicyDiscoveryService_StreamSubscriptionPoliciesServer) error { - return status.Errorf(codes.Unimplemented, "method StreamSubscriptionPolicies not implemented") -} - -func RegisterSubscriptionPolicyDiscoveryServiceServer(s *grpc.Server, srv SubscriptionPolicyDiscoveryServiceServer) { - s.RegisterService(&_SubscriptionPolicyDiscoveryService_serviceDesc, srv) -} - -func _SubscriptionPolicyDiscoveryService_StreamSubscriptionPolicies_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(SubscriptionPolicyDiscoveryServiceServer).StreamSubscriptionPolicies(&subscriptionPolicyDiscoveryServiceStreamSubscriptionPoliciesServer{stream}) -} - -type SubscriptionPolicyDiscoveryService_StreamSubscriptionPoliciesServer interface { - Send(*v3.DiscoveryResponse) error - Recv() (*v3.DiscoveryRequest, error) - grpc.ServerStream -} - -type subscriptionPolicyDiscoveryServiceStreamSubscriptionPoliciesServer struct { - grpc.ServerStream -} - -func (x *subscriptionPolicyDiscoveryServiceStreamSubscriptionPoliciesServer) Send(m *v3.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *subscriptionPolicyDiscoveryServiceStreamSubscriptionPoliciesServer) Recv() (*v3.DiscoveryRequest, error) { - m := new(v3.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _SubscriptionPolicyDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "discovery.service.subscription.SubscriptionPolicyDiscoveryService", - HandlerType: (*SubscriptionPolicyDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamSubscriptionPolicies", - Handler: _SubscriptionPolicyDiscoveryService_StreamSubscriptionPolicies_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "wso2/discovery/service/subscription/sub_policy_ds.proto", -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/application.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/application.pb.go index aeff003c2..e40dd74c2 100644 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/application.pb.go +++ b/adapter/pkg/discovery/api/wso2/discovery/subscription/application.pb.go @@ -42,10 +42,11 @@ type Application struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - Attributes map[string]string `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` + Organization string `protobuf:"bytes,4,opt,name=organization,proto3" json:"organization,omitempty"` + Attributes map[string]string `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *Application) Reset() { @@ -101,168 +102,18 @@ func (x *Application) GetOwner() string { return "" } -func (x *Application) GetAttributes() map[string]string { - if x != nil { - return x.Attributes - } - return nil -} - -type SecuritySchemes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OAuth2 *OAuth2 `protobuf:"bytes,1,opt,name=oAuth2,proto3" json:"oAuth2,omitempty"` -} - -func (x *SecuritySchemes) Reset() { - *x = SecuritySchemes{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_application_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecuritySchemes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecuritySchemes) ProtoMessage() {} - -func (x *SecuritySchemes) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_application_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SecuritySchemes.ProtoReflect.Descriptor instead. -func (*SecuritySchemes) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_application_proto_rawDescGZIP(), []int{1} -} - -func (x *SecuritySchemes) GetOAuth2() *OAuth2 { - if x != nil { - return x.OAuth2 - } - return nil -} - -type OAuth2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Environments []*Environment `protobuf:"bytes,1,rep,name=environments,proto3" json:"environments,omitempty"` -} - -func (x *OAuth2) Reset() { - *x = OAuth2{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_application_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OAuth2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OAuth2) ProtoMessage() {} - -func (x *OAuth2) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_application_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OAuth2.ProtoReflect.Descriptor instead. -func (*OAuth2) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_application_proto_rawDescGZIP(), []int{2} -} - -func (x *OAuth2) GetEnvironments() []*Environment { - if x != nil { - return x.Environments - } - return nil -} - -type Environment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EnvID string `protobuf:"bytes,1,opt,name=envID,proto3" json:"envID,omitempty"` - ApplicationIdentifier string `protobuf:"bytes,2,opt,name=applicationIdentifier,proto3" json:"applicationIdentifier,omitempty"` - KeyType string `protobuf:"bytes,3,opt,name=keyType,proto3" json:"keyType,omitempty"` -} - -func (x *Environment) Reset() { - *x = Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_application_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Environment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Environment) ProtoMessage() {} - -func (x *Environment) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_application_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Environment.ProtoReflect.Descriptor instead. -func (*Environment) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_application_proto_rawDescGZIP(), []int{3} -} - -func (x *Environment) GetEnvID() string { - if x != nil { - return x.EnvID - } - return "" -} - -func (x *Environment) GetApplicationIdentifier() string { +func (x *Application) GetOrganization() string { if x != nil { - return x.ApplicationIdentifier + return x.Organization } return "" } -func (x *Environment) GetKeyType() string { +func (x *Application) GetAttributes() map[string]string { if x != nil { - return x.KeyType + return x.Attributes } - return "" + return nil } var File_wso2_discovery_subscription_application_proto protoreflect.FileDescriptor @@ -272,49 +123,33 @@ var file_wso2_discovery_subscription_application_proto_rawDesc = []byte{ 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe4, 0x01, 0x0a, + 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x02, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0a, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, - 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x4e, 0x0a, 0x0f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x6f, 0x41, 0x75, 0x74, 0x68, 0x32, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x52, 0x06, 0x6f, 0x41, 0x75, - 0x74, 0x68, 0x32, 0x22, 0x56, 0x0a, 0x06, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x12, 0x4c, 0x0a, - 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x65, - 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x73, 0x0a, 0x0b, 0x45, - 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, - 0x76, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x76, 0x49, 0x44, - 0x12, 0x34, 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, - 0x42, 0x93, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, - 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x10, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, - 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, + 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x8d, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, + 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x61, 0x70, + 0x6b, 0x2f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x73, 0x6f, 0x32, + 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -329,23 +164,18 @@ func file_wso2_discovery_subscription_application_proto_rawDescGZIP() []byte { return file_wso2_discovery_subscription_application_proto_rawDescData } -var file_wso2_discovery_subscription_application_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_wso2_discovery_subscription_application_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_wso2_discovery_subscription_application_proto_goTypes = []interface{}{ - (*Application)(nil), // 0: wso2.discovery.subscription.Application - (*SecuritySchemes)(nil), // 1: wso2.discovery.subscription.SecuritySchemes - (*OAuth2)(nil), // 2: wso2.discovery.subscription.OAuth2 - (*Environment)(nil), // 3: wso2.discovery.subscription.Environment - nil, // 4: wso2.discovery.subscription.Application.AttributesEntry + (*Application)(nil), // 0: wso2.discovery.subscription.Application + nil, // 1: wso2.discovery.subscription.Application.AttributesEntry } var file_wso2_discovery_subscription_application_proto_depIdxs = []int32{ - 4, // 0: wso2.discovery.subscription.Application.attributes:type_name -> wso2.discovery.subscription.Application.AttributesEntry - 2, // 1: wso2.discovery.subscription.SecuritySchemes.oAuth2:type_name -> wso2.discovery.subscription.OAuth2 - 3, // 2: wso2.discovery.subscription.OAuth2.environments:type_name -> wso2.discovery.subscription.Environment - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 1, // 0: wso2.discovery.subscription.Application.attributes:type_name -> wso2.discovery.subscription.Application.AttributesEntry + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_wso2_discovery_subscription_application_proto_init() } @@ -366,42 +196,6 @@ func file_wso2_discovery_subscription_application_proto_init() { return nil } } - file_wso2_discovery_subscription_application_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecuritySchemes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wso2_discovery_subscription_application_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OAuth2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wso2_discovery_subscription_application_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -409,7 +203,7 @@ func file_wso2_discovery_subscription_application_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_wso2_discovery_subscription_application_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_key_mapping.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/application_key_mapping.pb.go index 146019418..21a914365 100644 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_key_mapping.pb.go +++ b/adapter/pkg/discovery/api/wso2/discovery/subscription/application_key_mapping.pb.go @@ -147,17 +147,17 @@ var file_wso2_discovery_subscription_application_key_mapping_proto_rawDesc = []b 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x76, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6e, 0x76, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x9d, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x97, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x61, 0x70, 0x6b, 0x2f, 0x61, 0x64, 0x61, + 0x70, 0x74, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_key_mapping_list.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/application_key_mapping_list.pb.go deleted file mode 100644 index 57e890c27..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_key_mapping_list.pb.go +++ /dev/null @@ -1,183 +0,0 @@ -// -// Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// 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. -// - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/subscription/application_key_mapping_list.proto - -package subscription - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ApplicationKeyMappingList data model -type ApplicationKeyMappingList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - List []*ApplicationKeyMapping `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *ApplicationKeyMappingList) Reset() { - *x = ApplicationKeyMappingList{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_application_key_mapping_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplicationKeyMappingList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplicationKeyMappingList) ProtoMessage() {} - -func (x *ApplicationKeyMappingList) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_application_key_mapping_list_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplicationKeyMappingList.ProtoReflect.Descriptor instead. -func (*ApplicationKeyMappingList) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDescGZIP(), []int{0} -} - -func (x *ApplicationKeyMappingList) GetList() []*ApplicationKeyMapping { - if x != nil { - return x.List - } - return nil -} - -var File_wso2_discovery_subscription_application_key_mapping_list_proto protoreflect.FileDescriptor - -var file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDesc = []byte{ - 0x0a, 0x3e, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x1b, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x39, 0x77, - 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, 0x19, 0x41, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42, 0xa1, 0x01, - 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, - 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1e, - 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDescOnce sync.Once - file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDescData = file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDesc -) - -func file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDescGZIP() []byte { - file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDescOnce.Do(func() { - file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDescData) - }) - return file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDescData -} - -var file_wso2_discovery_subscription_application_key_mapping_list_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_subscription_application_key_mapping_list_proto_goTypes = []interface{}{ - (*ApplicationKeyMappingList)(nil), // 0: wso2.discovery.subscription.ApplicationKeyMappingList - (*ApplicationKeyMapping)(nil), // 1: wso2.discovery.subscription.ApplicationKeyMapping -} -var file_wso2_discovery_subscription_application_key_mapping_list_proto_depIdxs = []int32{ - 1, // 0: wso2.discovery.subscription.ApplicationKeyMappingList.list:type_name -> wso2.discovery.subscription.ApplicationKeyMapping - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_subscription_application_key_mapping_list_proto_init() } -func file_wso2_discovery_subscription_application_key_mapping_list_proto_init() { - if File_wso2_discovery_subscription_application_key_mapping_list_proto != nil { - return - } - file_wso2_discovery_subscription_application_key_mapping_proto_init() - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_subscription_application_key_mapping_list_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplicationKeyMappingList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_subscription_application_key_mapping_list_proto_goTypes, - DependencyIndexes: file_wso2_discovery_subscription_application_key_mapping_list_proto_depIdxs, - MessageInfos: file_wso2_discovery_subscription_application_key_mapping_list_proto_msgTypes, - }.Build() - File_wso2_discovery_subscription_application_key_mapping_list_proto = out.File - file_wso2_discovery_subscription_application_key_mapping_list_proto_rawDesc = nil - file_wso2_discovery_subscription_application_key_mapping_list_proto_goTypes = nil - file_wso2_discovery_subscription_application_key_mapping_list_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_list.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/application_list.pb.go deleted file mode 100644 index e598420c4..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_list.pb.go +++ /dev/null @@ -1,180 +0,0 @@ -// -// Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// 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. -// - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/subscription/application_list.proto - -package subscription - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ApplicationList data model -type ApplicationList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - List []*Application `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *ApplicationList) Reset() { - *x = ApplicationList{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_application_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplicationList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplicationList) ProtoMessage() {} - -func (x *ApplicationList) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_application_list_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplicationList.ProtoReflect.Descriptor instead. -func (*ApplicationList) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_application_list_proto_rawDescGZIP(), []int{0} -} - -func (x *ApplicationList) GetList() []*Application { - if x != nil { - return x.List - } - return nil -} - -var File_wso2_discovery_subscription_application_list_proto protoreflect.FileDescriptor - -var file_wso2_discovery_subscription_application_list_proto_rawDesc = []byte{ - 0x0a, 0x32, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x2d, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x4f, 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, - 0x69, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x42, 0x97, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, - 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x14, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, - 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x73, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_subscription_application_list_proto_rawDescOnce sync.Once - file_wso2_discovery_subscription_application_list_proto_rawDescData = file_wso2_discovery_subscription_application_list_proto_rawDesc -) - -func file_wso2_discovery_subscription_application_list_proto_rawDescGZIP() []byte { - file_wso2_discovery_subscription_application_list_proto_rawDescOnce.Do(func() { - file_wso2_discovery_subscription_application_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_subscription_application_list_proto_rawDescData) - }) - return file_wso2_discovery_subscription_application_list_proto_rawDescData -} - -var file_wso2_discovery_subscription_application_list_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_subscription_application_list_proto_goTypes = []interface{}{ - (*ApplicationList)(nil), // 0: wso2.discovery.subscription.ApplicationList - (*Application)(nil), // 1: wso2.discovery.subscription.Application -} -var file_wso2_discovery_subscription_application_list_proto_depIdxs = []int32{ - 1, // 0: wso2.discovery.subscription.ApplicationList.list:type_name -> wso2.discovery.subscription.Application - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_subscription_application_list_proto_init() } -func file_wso2_discovery_subscription_application_list_proto_init() { - if File_wso2_discovery_subscription_application_list_proto != nil { - return - } - file_wso2_discovery_subscription_application_proto_init() - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_subscription_application_list_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplicationList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_subscription_application_list_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_subscription_application_list_proto_goTypes, - DependencyIndexes: file_wso2_discovery_subscription_application_list_proto_depIdxs, - MessageInfos: file_wso2_discovery_subscription_application_list_proto_msgTypes, - }.Build() - File_wso2_discovery_subscription_application_list_proto = out.File - file_wso2_discovery_subscription_application_list_proto_rawDesc = nil - file_wso2_discovery_subscription_application_list_proto_goTypes = nil - file_wso2_discovery_subscription_application_list_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_policy.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/application_policy.pb.go deleted file mode 100644 index 4160cf722..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_policy.pb.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/subscription/application_policy.proto - -package subscription - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ApplicationPolicy data model -type ApplicationPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - TenantId int32 `protobuf:"varint,2,opt,name=tenantId,proto3" json:"tenantId,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - QuotaType string `protobuf:"bytes,4,opt,name=quotaType,proto3" json:"quotaType,omitempty"` -} - -func (x *ApplicationPolicy) Reset() { - *x = ApplicationPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_application_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplicationPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplicationPolicy) ProtoMessage() {} - -func (x *ApplicationPolicy) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_application_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplicationPolicy.ProtoReflect.Descriptor instead. -func (*ApplicationPolicy) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_application_policy_proto_rawDescGZIP(), []int{0} -} - -func (x *ApplicationPolicy) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *ApplicationPolicy) GetTenantId() int32 { - if x != nil { - return x.TenantId - } - return 0 -} - -func (x *ApplicationPolicy) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ApplicationPolicy) GetQuotaType() string { - if x != nil { - return x.QuotaType - } - return "" -} - -var File_wso2_discovery_subscription_application_policy_proto protoreflect.FileDescriptor - -var file_wso2_discovery_subscription_application_policy_proto_rawDesc = []byte{ - 0x0a, 0x34, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x71, 0x0a, 0x11, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x6f, 0x74, - 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x6f, - 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x42, 0x99, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, - 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x16, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_subscription_application_policy_proto_rawDescOnce sync.Once - file_wso2_discovery_subscription_application_policy_proto_rawDescData = file_wso2_discovery_subscription_application_policy_proto_rawDesc -) - -func file_wso2_discovery_subscription_application_policy_proto_rawDescGZIP() []byte { - file_wso2_discovery_subscription_application_policy_proto_rawDescOnce.Do(func() { - file_wso2_discovery_subscription_application_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_subscription_application_policy_proto_rawDescData) - }) - return file_wso2_discovery_subscription_application_policy_proto_rawDescData -} - -var file_wso2_discovery_subscription_application_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_subscription_application_policy_proto_goTypes = []interface{}{ - (*ApplicationPolicy)(nil), // 0: wso2.discovery.subscription.ApplicationPolicy -} -var file_wso2_discovery_subscription_application_policy_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_subscription_application_policy_proto_init() } -func file_wso2_discovery_subscription_application_policy_proto_init() { - if File_wso2_discovery_subscription_application_policy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_subscription_application_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplicationPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_subscription_application_policy_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_subscription_application_policy_proto_goTypes, - DependencyIndexes: file_wso2_discovery_subscription_application_policy_proto_depIdxs, - MessageInfos: file_wso2_discovery_subscription_application_policy_proto_msgTypes, - }.Build() - File_wso2_discovery_subscription_application_policy_proto = out.File - file_wso2_discovery_subscription_application_policy_proto_rawDesc = nil - file_wso2_discovery_subscription_application_policy_proto_goTypes = nil - file_wso2_discovery_subscription_application_policy_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_policy_list.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/application_policy_list.pb.go deleted file mode 100644 index 5a9a5bac8..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/application_policy_list.pb.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/subscription/application_policy_list.proto - -package subscription - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ApplicationPolicyList data model -type ApplicationPolicyList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - List []*ApplicationPolicy `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *ApplicationPolicyList) Reset() { - *x = ApplicationPolicyList{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_application_policy_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplicationPolicyList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplicationPolicyList) ProtoMessage() {} - -func (x *ApplicationPolicyList) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_application_policy_list_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplicationPolicyList.ProtoReflect.Descriptor instead. -func (*ApplicationPolicyList) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_application_policy_list_proto_rawDescGZIP(), []int{0} -} - -func (x *ApplicationPolicyList) GetList() []*ApplicationPolicy { - if x != nil { - return x.List - } - return nil -} - -var File_wso2_discovery_subscription_application_policy_list_proto protoreflect.FileDescriptor - -var file_wso2_discovery_subscription_application_policy_list_proto_rawDesc = []byte{ - 0x0a, 0x39, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x77, 0x73, 0x6f, - 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x34, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, - 0x0a, 0x15, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x9d, 0x01, 0x0a, 0x2c, - 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1a, 0x41, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, - 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x73, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_subscription_application_policy_list_proto_rawDescOnce sync.Once - file_wso2_discovery_subscription_application_policy_list_proto_rawDescData = file_wso2_discovery_subscription_application_policy_list_proto_rawDesc -) - -func file_wso2_discovery_subscription_application_policy_list_proto_rawDescGZIP() []byte { - file_wso2_discovery_subscription_application_policy_list_proto_rawDescOnce.Do(func() { - file_wso2_discovery_subscription_application_policy_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_subscription_application_policy_list_proto_rawDescData) - }) - return file_wso2_discovery_subscription_application_policy_list_proto_rawDescData -} - -var file_wso2_discovery_subscription_application_policy_list_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_subscription_application_policy_list_proto_goTypes = []interface{}{ - (*ApplicationPolicyList)(nil), // 0: wso2.discovery.subscription.ApplicationPolicyList - (*ApplicationPolicy)(nil), // 1: wso2.discovery.subscription.ApplicationPolicy -} -var file_wso2_discovery_subscription_application_policy_list_proto_depIdxs = []int32{ - 1, // 0: wso2.discovery.subscription.ApplicationPolicyList.list:type_name -> wso2.discovery.subscription.ApplicationPolicy - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_subscription_application_policy_list_proto_init() } -func file_wso2_discovery_subscription_application_policy_list_proto_init() { - if File_wso2_discovery_subscription_application_policy_list_proto != nil { - return - } - file_wso2_discovery_subscription_application_policy_proto_init() - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_subscription_application_policy_list_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplicationPolicyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_subscription_application_policy_list_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_subscription_application_policy_list_proto_goTypes, - DependencyIndexes: file_wso2_discovery_subscription_application_policy_list_proto_depIdxs, - MessageInfos: file_wso2_discovery_subscription_application_policy_list_proto_msgTypes, - }.Build() - File_wso2_discovery_subscription_application_policy_list_proto = out.File - file_wso2_discovery_subscription_application_policy_list_proto_rawDesc = nil - file_wso2_discovery_subscription_application_policy_list_proto_goTypes = nil - file_wso2_discovery_subscription_application_policy_list_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/applicationmapping.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/applicationmapping.pb.go index 75b502379..3eb0e4da9 100644 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/applicationmapping.pb.go +++ b/adapter/pkg/discovery/api/wso2/discovery/subscription/applicationmapping.pb.go @@ -116,17 +116,16 @@ var file_wso2_discovery_subscription_applicationmapping_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x42, - 0x9a, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, + 0x94, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x17, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3b, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x61, 0x70, 0x6b, + 0x2f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/applicationmapping_list.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/applicationmapping_list.pb.go deleted file mode 100644 index 00f95b7a1..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/applicationmapping_list.pb.go +++ /dev/null @@ -1,182 +0,0 @@ -// -// Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// 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. -// - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/subscription/applicationmapping_list.proto - -package subscription - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ApplicationMappingList data model -type ApplicationMappingList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - List []*ApplicationMapping `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *ApplicationMappingList) Reset() { - *x = ApplicationMappingList{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_applicationmapping_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplicationMappingList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplicationMappingList) ProtoMessage() {} - -func (x *ApplicationMappingList) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_applicationmapping_list_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApplicationMappingList.ProtoReflect.Descriptor instead. -func (*ApplicationMappingList) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_applicationmapping_list_proto_rawDescGZIP(), []int{0} -} - -func (x *ApplicationMappingList) GetList() []*ApplicationMapping { - if x != nil { - return x.List - } - return nil -} - -var File_wso2_discovery_subscription_applicationmapping_list_proto protoreflect.FileDescriptor - -var file_wso2_discovery_subscription_applicationmapping_list_proto_rawDesc = []byte{ - 0x0a, 0x39, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x77, 0x73, 0x6f, - 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x34, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, - 0x0a, 0x16, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x9e, 0x01, - 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, - 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1b, - 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, - 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x3b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_subscription_applicationmapping_list_proto_rawDescOnce sync.Once - file_wso2_discovery_subscription_applicationmapping_list_proto_rawDescData = file_wso2_discovery_subscription_applicationmapping_list_proto_rawDesc -) - -func file_wso2_discovery_subscription_applicationmapping_list_proto_rawDescGZIP() []byte { - file_wso2_discovery_subscription_applicationmapping_list_proto_rawDescOnce.Do(func() { - file_wso2_discovery_subscription_applicationmapping_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_subscription_applicationmapping_list_proto_rawDescData) - }) - return file_wso2_discovery_subscription_applicationmapping_list_proto_rawDescData -} - -var file_wso2_discovery_subscription_applicationmapping_list_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_subscription_applicationmapping_list_proto_goTypes = []interface{}{ - (*ApplicationMappingList)(nil), // 0: wso2.discovery.subscription.ApplicationMappingList - (*ApplicationMapping)(nil), // 1: wso2.discovery.subscription.ApplicationMapping -} -var file_wso2_discovery_subscription_applicationmapping_list_proto_depIdxs = []int32{ - 1, // 0: wso2.discovery.subscription.ApplicationMappingList.list:type_name -> wso2.discovery.subscription.ApplicationMapping - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_subscription_applicationmapping_list_proto_init() } -func file_wso2_discovery_subscription_applicationmapping_list_proto_init() { - if File_wso2_discovery_subscription_applicationmapping_list_proto != nil { - return - } - file_wso2_discovery_subscription_applicationmapping_proto_init() - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_subscription_applicationmapping_list_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplicationMappingList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_subscription_applicationmapping_list_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_subscription_applicationmapping_list_proto_goTypes, - DependencyIndexes: file_wso2_discovery_subscription_applicationmapping_list_proto_depIdxs, - MessageInfos: file_wso2_discovery_subscription_applicationmapping_list_proto_msgTypes, - }.Build() - File_wso2_discovery_subscription_applicationmapping_list_proto = out.File - file_wso2_discovery_subscription_applicationmapping_list_proto_rawDesc = nil - file_wso2_discovery_subscription_applicationmapping_list_proto_goTypes = nil - file_wso2_discovery_subscription_applicationmapping_list_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/event.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/event.pb.go new file mode 100644 index 000000000..bb97a44e6 --- /dev/null +++ b/adapter/pkg/discovery/api/wso2/discovery/subscription/event.pb.go @@ -0,0 +1,267 @@ +// +// Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. +// +// 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. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0-devel +// protoc v3.13.0 +// source: wso2/discovery/subscription/event.proto + +package subscription + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Event data model +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + TimeStamp int64 `protobuf:"varint,2,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Application *Application `protobuf:"bytes,4,opt,name=application,proto3" json:"application,omitempty"` + ApplicationMapping *ApplicationMapping `protobuf:"bytes,5,opt,name=applicationMapping,proto3" json:"applicationMapping,omitempty"` + ApplicationKeyMapping *ApplicationKeyMapping `protobuf:"bytes,6,opt,name=applicationKeyMapping,proto3" json:"applicationKeyMapping,omitempty"` + Subscription *Subscription `protobuf:"bytes,7,opt,name=subscription,proto3" json:"subscription,omitempty"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_wso2_discovery_subscription_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_wso2_discovery_subscription_event_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_wso2_discovery_subscription_event_proto_rawDescGZIP(), []int{0} +} + +func (x *Event) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *Event) GetTimeStamp() int64 { + if x != nil { + return x.TimeStamp + } + return 0 +} + +func (x *Event) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Event) GetApplication() *Application { + if x != nil { + return x.Application + } + return nil +} + +func (x *Event) GetApplicationMapping() *ApplicationMapping { + if x != nil { + return x.ApplicationMapping + } + return nil +} + +func (x *Event) GetApplicationKeyMapping() *ApplicationKeyMapping { + if x != nil { + return x.ApplicationKeyMapping + } + return nil +} + +func (x *Event) GetSubscription() *Subscription { + if x != nil { + return x.Subscription + } + return nil +} + +var File_wso2_discovery_subscription_event_proto protoreflect.FileDescriptor + +var file_wso2_discovery_subscription_event_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x77, 0x73, 0x6f, 0x32, 0x2e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2d, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x39, 0x77, 0x73, 0x6f, + 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x03, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x75, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x77, 0x73, + 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, + 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, + 0x12, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x12, 0x68, 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x4d, 0x0a, + 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, + 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x87, 0x01, 0x0a, + 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x61, 0x70, 0x6b, + 0x2f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_wso2_discovery_subscription_event_proto_rawDescOnce sync.Once + file_wso2_discovery_subscription_event_proto_rawDescData = file_wso2_discovery_subscription_event_proto_rawDesc +) + +func file_wso2_discovery_subscription_event_proto_rawDescGZIP() []byte { + file_wso2_discovery_subscription_event_proto_rawDescOnce.Do(func() { + file_wso2_discovery_subscription_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_subscription_event_proto_rawDescData) + }) + return file_wso2_discovery_subscription_event_proto_rawDescData +} + +var file_wso2_discovery_subscription_event_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_wso2_discovery_subscription_event_proto_goTypes = []interface{}{ + (*Event)(nil), // 0: wso2.discovery.subscription.Event + (*Application)(nil), // 1: wso2.discovery.subscription.Application + (*ApplicationMapping)(nil), // 2: wso2.discovery.subscription.ApplicationMapping + (*ApplicationKeyMapping)(nil), // 3: wso2.discovery.subscription.ApplicationKeyMapping + (*Subscription)(nil), // 4: wso2.discovery.subscription.Subscription +} +var file_wso2_discovery_subscription_event_proto_depIdxs = []int32{ + 1, // 0: wso2.discovery.subscription.Event.application:type_name -> wso2.discovery.subscription.Application + 2, // 1: wso2.discovery.subscription.Event.applicationMapping:type_name -> wso2.discovery.subscription.ApplicationMapping + 3, // 2: wso2.discovery.subscription.Event.applicationKeyMapping:type_name -> wso2.discovery.subscription.ApplicationKeyMapping + 4, // 3: wso2.discovery.subscription.Event.subscription:type_name -> wso2.discovery.subscription.Subscription + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_wso2_discovery_subscription_event_proto_init() } +func file_wso2_discovery_subscription_event_proto_init() { + if File_wso2_discovery_subscription_event_proto != nil { + return + } + file_wso2_discovery_subscription_application_proto_init() + file_wso2_discovery_subscription_applicationmapping_proto_init() + file_wso2_discovery_subscription_application_key_mapping_proto_init() + file_wso2_discovery_subscription_subscription_proto_init() + if !protoimpl.UnsafeEnabled { + file_wso2_discovery_subscription_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_wso2_discovery_subscription_event_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_wso2_discovery_subscription_event_proto_goTypes, + DependencyIndexes: file_wso2_discovery_subscription_event_proto_depIdxs, + MessageInfos: file_wso2_discovery_subscription_event_proto_msgTypes, + }.Build() + File_wso2_discovery_subscription_event_proto = out.File + file_wso2_discovery_subscription_event_proto_rawDesc = nil + file_wso2_discovery_subscription_event_proto_goTypes = nil + file_wso2_discovery_subscription_event_proto_depIdxs = nil +} diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription.pb.go index e4c9d7bc0..a28d25531 100644 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription.pb.go +++ b/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription.pb.go @@ -186,17 +186,16 @@ var file_wso2_discovery_subscription_subscription_proto_rawDesc = []byte{ 0x69, 0x62, 0x65, 0x64, 0x41, 0x50, 0x49, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x94, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x8e, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3b, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x61, 0x70, 0x6b, + 0x2f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_list.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_list.pb.go deleted file mode 100644 index 5a493f3f5..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_list.pb.go +++ /dev/null @@ -1,180 +0,0 @@ -// -// Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. -// -// 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. -// - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/subscription/subscription_list.proto - -package subscription - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// SubscriptionList data model -type SubscriptionList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - List []*Subscription `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *SubscriptionList) Reset() { - *x = SubscriptionList{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_subscription_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubscriptionList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubscriptionList) ProtoMessage() {} - -func (x *SubscriptionList) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_subscription_list_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubscriptionList.ProtoReflect.Descriptor instead. -func (*SubscriptionList) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_subscription_list_proto_rawDescGZIP(), []int{0} -} - -func (x *SubscriptionList) GetList() []*Subscription { - if x != nil { - return x.List - } - return nil -} - -var File_wso2_discovery_subscription_subscription_list_proto protoreflect.FileDescriptor - -var file_wso2_discovery_subscription_subscription_list_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x98, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, - 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x15, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x3b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_subscription_subscription_list_proto_rawDescOnce sync.Once - file_wso2_discovery_subscription_subscription_list_proto_rawDescData = file_wso2_discovery_subscription_subscription_list_proto_rawDesc -) - -func file_wso2_discovery_subscription_subscription_list_proto_rawDescGZIP() []byte { - file_wso2_discovery_subscription_subscription_list_proto_rawDescOnce.Do(func() { - file_wso2_discovery_subscription_subscription_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_subscription_subscription_list_proto_rawDescData) - }) - return file_wso2_discovery_subscription_subscription_list_proto_rawDescData -} - -var file_wso2_discovery_subscription_subscription_list_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_subscription_subscription_list_proto_goTypes = []interface{}{ - (*SubscriptionList)(nil), // 0: wso2.discovery.subscription.SubscriptionList - (*Subscription)(nil), // 1: wso2.discovery.subscription.Subscription -} -var file_wso2_discovery_subscription_subscription_list_proto_depIdxs = []int32{ - 1, // 0: wso2.discovery.subscription.SubscriptionList.list:type_name -> wso2.discovery.subscription.Subscription - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_subscription_subscription_list_proto_init() } -func file_wso2_discovery_subscription_subscription_list_proto_init() { - if File_wso2_discovery_subscription_subscription_list_proto != nil { - return - } - file_wso2_discovery_subscription_subscription_proto_init() - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_subscription_subscription_list_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscriptionList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_subscription_subscription_list_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_subscription_subscription_list_proto_goTypes, - DependencyIndexes: file_wso2_discovery_subscription_subscription_list_proto_depIdxs, - MessageInfos: file_wso2_discovery_subscription_subscription_list_proto_msgTypes, - }.Build() - File_wso2_discovery_subscription_subscription_list_proto = out.File - file_wso2_discovery_subscription_subscription_list_proto_rawDesc = nil - file_wso2_discovery_subscription_subscription_list_proto_goTypes = nil - file_wso2_discovery_subscription_subscription_list_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_policy.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_policy.pb.go deleted file mode 100644 index 073c867c3..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_policy.pb.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/subscription/subscription_policy.proto - -package subscription - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// SubscriptionPolicy data model -type SubscriptionPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - TenantId int32 `protobuf:"varint,2,opt,name=tenantId,proto3" json:"tenantId,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - QuotaType string `protobuf:"bytes,4,opt,name=quotaType,proto3" json:"quotaType,omitempty"` - GraphQLMaxComplexity int32 `protobuf:"varint,5,opt,name=graphQLMaxComplexity,proto3" json:"graphQLMaxComplexity,omitempty"` - GraphQLMaxDepth int32 `protobuf:"varint,6,opt,name=graphQLMaxDepth,proto3" json:"graphQLMaxDepth,omitempty"` - RateLimitCount int32 `protobuf:"varint,7,opt,name=rateLimitCount,proto3" json:"rateLimitCount,omitempty"` - RateLimitTimeUnit string `protobuf:"bytes,8,opt,name=rateLimitTimeUnit,proto3" json:"rateLimitTimeUnit,omitempty"` - StopOnQuotaReach bool `protobuf:"varint,9,opt,name=stopOnQuotaReach,proto3" json:"stopOnQuotaReach,omitempty"` - TenantDomain string `protobuf:"bytes,10,opt,name=tenantDomain,proto3" json:"tenantDomain,omitempty"` - Timestamp int64 `protobuf:"varint,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (x *SubscriptionPolicy) Reset() { - *x = SubscriptionPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_subscription_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubscriptionPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubscriptionPolicy) ProtoMessage() {} - -func (x *SubscriptionPolicy) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_subscription_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubscriptionPolicy.ProtoReflect.Descriptor instead. -func (*SubscriptionPolicy) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_subscription_policy_proto_rawDescGZIP(), []int{0} -} - -func (x *SubscriptionPolicy) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *SubscriptionPolicy) GetTenantId() int32 { - if x != nil { - return x.TenantId - } - return 0 -} - -func (x *SubscriptionPolicy) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SubscriptionPolicy) GetQuotaType() string { - if x != nil { - return x.QuotaType - } - return "" -} - -func (x *SubscriptionPolicy) GetGraphQLMaxComplexity() int32 { - if x != nil { - return x.GraphQLMaxComplexity - } - return 0 -} - -func (x *SubscriptionPolicy) GetGraphQLMaxDepth() int32 { - if x != nil { - return x.GraphQLMaxDepth - } - return 0 -} - -func (x *SubscriptionPolicy) GetRateLimitCount() int32 { - if x != nil { - return x.RateLimitCount - } - return 0 -} - -func (x *SubscriptionPolicy) GetRateLimitTimeUnit() string { - if x != nil { - return x.RateLimitTimeUnit - } - return "" -} - -func (x *SubscriptionPolicy) GetStopOnQuotaReach() bool { - if x != nil { - return x.StopOnQuotaReach - } - return false -} - -func (x *SubscriptionPolicy) GetTenantDomain() string { - if x != nil { - return x.TenantDomain - } - return "" -} - -func (x *SubscriptionPolicy) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -var File_wso2_discovery_subscription_subscription_policy_proto protoreflect.FileDescriptor - -var file_wso2_discovery_subscription_subscription_policy_proto_rawDesc = []byte{ - 0x0a, 0x35, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x03, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x71, - 0x75, 0x6f, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x71, 0x75, 0x6f, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x51, 0x4c, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x67, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, - 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x74, 0x79, 0x12, 0x28, 0x0a, - 0x0f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x4d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x74, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x4d, - 0x61, 0x78, 0x44, 0x65, 0x70, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0e, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x2c, 0x0a, 0x11, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x55, 0x6e, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x2a, 0x0a, - 0x10, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x61, 0x63, - 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x74, 0x6f, 0x70, 0x4f, 0x6e, 0x51, - 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x61, 0x63, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x9a, 0x01, 0x0a, 0x2c, - 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, 0x2e, 0x65, 0x6e, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x17, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_subscription_subscription_policy_proto_rawDescOnce sync.Once - file_wso2_discovery_subscription_subscription_policy_proto_rawDescData = file_wso2_discovery_subscription_subscription_policy_proto_rawDesc -) - -func file_wso2_discovery_subscription_subscription_policy_proto_rawDescGZIP() []byte { - file_wso2_discovery_subscription_subscription_policy_proto_rawDescOnce.Do(func() { - file_wso2_discovery_subscription_subscription_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_subscription_subscription_policy_proto_rawDescData) - }) - return file_wso2_discovery_subscription_subscription_policy_proto_rawDescData -} - -var file_wso2_discovery_subscription_subscription_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_subscription_subscription_policy_proto_goTypes = []interface{}{ - (*SubscriptionPolicy)(nil), // 0: wso2.discovery.subscription.SubscriptionPolicy -} -var file_wso2_discovery_subscription_subscription_policy_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_subscription_subscription_policy_proto_init() } -func file_wso2_discovery_subscription_subscription_policy_proto_init() { - if File_wso2_discovery_subscription_subscription_policy_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_subscription_subscription_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscriptionPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_subscription_subscription_policy_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_subscription_subscription_policy_proto_goTypes, - DependencyIndexes: file_wso2_discovery_subscription_subscription_policy_proto_depIdxs, - MessageInfos: file_wso2_discovery_subscription_subscription_policy_proto_msgTypes, - }.Build() - File_wso2_discovery_subscription_subscription_policy_proto = out.File - file_wso2_discovery_subscription_subscription_policy_proto_rawDesc = nil - file_wso2_discovery_subscription_subscription_policy_proto_goTypes = nil - file_wso2_discovery_subscription_subscription_policy_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_policy_list.pb.go b/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_policy_list.pb.go deleted file mode 100644 index ccb2f46e1..000000000 --- a/adapter/pkg/discovery/api/wso2/discovery/subscription/subscription_policy_list.pb.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0-devel -// protoc v3.13.0 -// source: wso2/discovery/subscription/subscription_policy_list.proto - -package subscription - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// SubscriptionPolicyList data model -type SubscriptionPolicyList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - List []*SubscriptionPolicy `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *SubscriptionPolicyList) Reset() { - *x = SubscriptionPolicyList{} - if protoimpl.UnsafeEnabled { - mi := &file_wso2_discovery_subscription_subscription_policy_list_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubscriptionPolicyList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubscriptionPolicyList) ProtoMessage() {} - -func (x *SubscriptionPolicyList) ProtoReflect() protoreflect.Message { - mi := &file_wso2_discovery_subscription_subscription_policy_list_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubscriptionPolicyList.ProtoReflect.Descriptor instead. -func (*SubscriptionPolicyList) Descriptor() ([]byte, []int) { - return file_wso2_discovery_subscription_subscription_policy_list_proto_rawDescGZIP(), []int{0} -} - -func (x *SubscriptionPolicyList) GetList() []*SubscriptionPolicy { - if x != nil { - return x.List - } - return nil -} - -var File_wso2_discovery_subscription_subscription_policy_list_proto protoreflect.FileDescriptor - -var file_wso2_discovery_subscription_subscription_policy_list_proto_rawDesc = []byte{ - 0x0a, 0x3a, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x77, 0x73, - 0x6f, 0x32, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x35, 0x77, 0x73, 0x6f, 0x32, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x5d, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x04, 0x6c, 0x69, - 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x42, - 0x9e, 0x01, 0x0a, 0x2c, 0x6f, 0x72, 0x67, 0x2e, 0x77, 0x73, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x6b, - 0x2e, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x1b, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x77, 0x73, 0x6f, 0x32, 0x2f, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x3b, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wso2_discovery_subscription_subscription_policy_list_proto_rawDescOnce sync.Once - file_wso2_discovery_subscription_subscription_policy_list_proto_rawDescData = file_wso2_discovery_subscription_subscription_policy_list_proto_rawDesc -) - -func file_wso2_discovery_subscription_subscription_policy_list_proto_rawDescGZIP() []byte { - file_wso2_discovery_subscription_subscription_policy_list_proto_rawDescOnce.Do(func() { - file_wso2_discovery_subscription_subscription_policy_list_proto_rawDescData = protoimpl.X.CompressGZIP(file_wso2_discovery_subscription_subscription_policy_list_proto_rawDescData) - }) - return file_wso2_discovery_subscription_subscription_policy_list_proto_rawDescData -} - -var file_wso2_discovery_subscription_subscription_policy_list_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_wso2_discovery_subscription_subscription_policy_list_proto_goTypes = []interface{}{ - (*SubscriptionPolicyList)(nil), // 0: wso2.discovery.subscription.SubscriptionPolicyList - (*SubscriptionPolicy)(nil), // 1: wso2.discovery.subscription.SubscriptionPolicy -} -var file_wso2_discovery_subscription_subscription_policy_list_proto_depIdxs = []int32{ - 1, // 0: wso2.discovery.subscription.SubscriptionPolicyList.list:type_name -> wso2.discovery.subscription.SubscriptionPolicy - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_wso2_discovery_subscription_subscription_policy_list_proto_init() } -func file_wso2_discovery_subscription_subscription_policy_list_proto_init() { - if File_wso2_discovery_subscription_subscription_policy_list_proto != nil { - return - } - file_wso2_discovery_subscription_subscription_policy_proto_init() - if !protoimpl.UnsafeEnabled { - file_wso2_discovery_subscription_subscription_policy_list_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscriptionPolicyList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wso2_discovery_subscription_subscription_policy_list_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wso2_discovery_subscription_subscription_policy_list_proto_goTypes, - DependencyIndexes: file_wso2_discovery_subscription_subscription_policy_list_proto_depIdxs, - MessageInfos: file_wso2_discovery_subscription_subscription_policy_list_proto_msgTypes, - }.Build() - File_wso2_discovery_subscription_subscription_policy_list_proto = out.File - file_wso2_discovery_subscription_subscription_policy_list_proto_rawDesc = nil - file_wso2_discovery_subscription_subscription_policy_list_proto_goTypes = nil - file_wso2_discovery_subscription_subscription_policy_list_proto_depIdxs = nil -} diff --git a/adapter/pkg/discovery/protocol/cache/v3/resource.go b/adapter/pkg/discovery/protocol/cache/v3/resource.go index 710f1e3d6..526b4bff5 100644 --- a/adapter/pkg/discovery/protocol/cache/v3/resource.go +++ b/adapter/pkg/discovery/protocol/cache/v3/resource.go @@ -19,9 +19,7 @@ import ( envoy_types "github.com/envoyproxy/go-control-plane/pkg/cache/types" "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/api" - apkmgt "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/apkmgt" "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/config/enforcer" - "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/keymgt" "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription" "github.com/wso2/apk/adapter/pkg/discovery/protocol/cache/types" "github.com/wso2/apk/adapter/pkg/discovery/protocol/resource/v3" @@ -78,28 +76,10 @@ func GetResourceName(res envoy_types.Resource) string { return fmt.Sprint(v.Vhost, v.BasePath, v.Version) case *enforcer.Config: return "Config" - case *subscription.SubscriptionList: - return "Subscription" - case *subscription.ApplicationList: - return "Application" case *subscription.JWTIssuerList: return "JWTIssuer" - case *subscription.ApplicationKeyMappingList: - return "ApplicationKeyMapping" - case *subscription.ApplicationMappingList: - return "ApplicationMapping" case *subscription.APIList: return "APIList" - case *subscription.ApplicationPolicyList: - return "ApplicationPolicyList" - case *subscription.SubscriptionPolicyList: - return "SubscriptionPolicyList" - case *keymgt.KeyManagerConfig: - return fmt.Sprint(v.Name) - case *apkmgt.Application: - return fmt.Sprint(v.Uuid) - case *keymgt.RevokedToken: - return fmt.Sprint(v.Jti) case *subscription.Application: return fmt.Sprint(v.Uuid) case *subscription.Subscription: diff --git a/common-controller/commoncontroller/common_controller.go b/common-controller/commoncontroller/common_controller.go index 6f6a5bbec..6021488d5 100644 --- a/common-controller/commoncontroller/common_controller.go +++ b/common-controller/commoncontroller/common_controller.go @@ -31,23 +31,19 @@ import ( discoveryv3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" envoy_cachev3 "github.com/envoyproxy/go-control-plane/pkg/cache/v3" xdsv3 "github.com/envoyproxy/go-control-plane/pkg/server/v3" - enforcerCallbacks "github.com/wso2/apk/common-controller/internal/xds/enforcercallbacks" - routercb "github.com/wso2/apk/common-controller/internal/xds/routercallbacks" - apiservice "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/api" - configservice "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/config" - subscriptionservice "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/subscription" - wso2_server "github.com/wso2/apk/adapter/pkg/discovery/protocol/server/v3" + apkmgt "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt" "github.com/wso2/apk/adapter/pkg/health" healthservice "github.com/wso2/apk/adapter/pkg/health/api/wso2/health/service" + "github.com/wso2/apk/adapter/pkg/logging" "github.com/wso2/apk/common-controller/internal/config" + "github.com/wso2/apk/common-controller/internal/loggers" "github.com/wso2/apk/common-controller/internal/operator" + "github.com/wso2/apk/common-controller/internal/server" utils "github.com/wso2/apk/common-controller/internal/utils" xds "github.com/wso2/apk/common-controller/internal/xds" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/keepalive" - "github.com/wso2/apk/adapter/pkg/logging" - "github.com/wso2/apk/common-controller/internal/loggers" ) var ( @@ -147,9 +143,7 @@ func runRatelimitServer(rlsServer xdsv3.Server) { }() } -func runCommonEnforcerServer(server xdsv3.Server, enforcerServer wso2_server.Server, enforcerSdsServer wso2_server.Server, - enforcerAppDsSrv wso2_server.Server, enforcerAppKeyMappingDsSrv wso2_server.Server, enforcerAppMappingDsSrv wso2_server.Server, - port uint) { +func runCommonEnforcerServer(Port uint) { var grpcOptions []grpc.ServerOption grpcOptions = append(grpcOptions, grpc.MaxConcurrentStreams(grpcMaxConcurrentStreams)) publicKeyLocation, privateKeyLocation, truststoreLocation := utils.GetKeyLocations() @@ -182,16 +176,7 @@ func runCommonEnforcerServer(server xdsv3.Server, enforcerServer wso2_server.Ser if err != nil { loggers.LoggerAPKOperator.ErrorC(logging.PrintError(logging.Error1100, logging.BLOCKER, "Failed to listen on port: %v, error: %v", port, err.Error())) } - - // register services - discoveryv3.RegisterAggregatedDiscoveryServiceServer(grpcServer, server) - configservice.RegisterConfigDiscoveryServiceServer(grpcServer, enforcerServer) - apiservice.RegisterApiDiscoveryServiceServer(grpcServer, enforcerServer) - subscriptionservice.RegisterSubscriptionDiscoveryServiceServer(grpcServer, enforcerSdsServer) - subscriptionservice.RegisterApplicationDiscoveryServiceServer(grpcServer, enforcerAppDsSrv) - subscriptionservice.RegisterApplicationKeyMappingDiscoveryServiceServer(grpcServer, enforcerAppKeyMappingDsSrv) - subscriptionservice.RegisterApplicationMappingDiscoveryServiceServer(grpcServer, enforcerAppMappingDsSrv) - // register health service + apkmgt.RegisterEventStreamServiceServer(grpcServer, &server.EventServer{}) healthservice.RegisterHealthServer(grpcServer, &health.Server{}) loggers.LoggerAPKOperator.Info("port: ", port, " common enforcer server listening") @@ -223,22 +208,8 @@ func InitCommonControllerServer(conf *config.Config) { // Set empty snapshot to initiate ratelimit service xds.SetEmptySnapshotupdate(conf.CommonController.Server.Label) - cache := xds.GetXdsCache() - enforcerCache := xds.GetEnforcerCache() - enforcerSubscriptionCache := xds.GetEnforcerSubscriptionCache() - enforcerApplicationCache := xds.GetEnforcerApplicationCache() - enforcerApplicationKeyMappingCache := xds.GetEnforcerApplicationKeyMappingCache() - enforcerApplicationMappingCache := xds.GetEnforcerApplicationMappingCache() - srv := xdsv3.NewServer(ctx, cache, &routercb.Callbacks{}) - enforcerXdsSrv := wso2_server.NewServer(ctx, enforcerCache, &enforcerCallbacks.Callbacks{}) - enforcerSdsSrv := wso2_server.NewServer(ctx, enforcerSubscriptionCache, &enforcerCallbacks.Callbacks{}) - enforcerAppDsSrv := wso2_server.NewServer(ctx, enforcerApplicationCache, &enforcerCallbacks.Callbacks{}) - enforcerAppKeyMappingDsSrv := wso2_server.NewServer(ctx, enforcerApplicationKeyMappingCache, &enforcerCallbacks.Callbacks{}) - enforcerAppMappingDsSrv := wso2_server.NewServer(ctx, enforcerApplicationMappingCache, &enforcerCallbacks.Callbacks{}) - // Start Enforcer xDS gRPC server - runCommonEnforcerServer(srv, enforcerXdsSrv, enforcerSdsSrv, enforcerAppDsSrv, enforcerAppKeyMappingDsSrv, - enforcerAppMappingDsSrv, port) + runCommonEnforcerServer(port) go operator.InitOperator() diff --git a/common-controller/internal/cache/subscriptionDataStore.go b/common-controller/internal/cache/subscriptionDataStore.go new file mode 100644 index 000000000..7e4ab9abd --- /dev/null +++ b/common-controller/internal/cache/subscriptionDataStore.go @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2023 WSO2 LLC. (http://www.wso2.org) All Rights Reserved. + * + * 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. + * + */ + +package cache + +import ( + "sync" + + logger "github.com/sirupsen/logrus" + cpv1alpha2 "github.com/wso2/apk/common-controller/internal/operator/apis/cp/v1alpha2" + "k8s.io/apimachinery/pkg/types" +) + +// SubscriptionDataStore is a cache subscription data. +type SubscriptionDataStore struct { + applicationStore map[types.NamespacedName]*cpv1alpha2.ApplicationSpec + subscriptionStore map[types.NamespacedName]*cpv1alpha2.SubscriptionSpec + applicationMappingStore map[types.NamespacedName]*cpv1alpha2.ApplicationMappingSpec + mu sync.Mutex +} + +// CreateNewSubscriptionDataStore creates a new SubscriptionDataStore. +func CreateNewSubscriptionDataStore() *SubscriptionDataStore { + return &SubscriptionDataStore{ + applicationStore: map[types.NamespacedName]*cpv1alpha2.ApplicationSpec{}, + subscriptionStore: map[types.NamespacedName]*cpv1alpha2.SubscriptionSpec{}, + applicationMappingStore: map[types.NamespacedName]*cpv1alpha2.ApplicationMappingSpec{}, + } +} + +// AddorUpdateApplicationToStore adds a new application to the DataStore. +func (ods *SubscriptionDataStore) AddorUpdateApplicationToStore(name types.NamespacedName, application cpv1alpha2.ApplicationSpec) { + ods.mu.Lock() + defer ods.mu.Unlock() + logger.Debug("Adding/Updating application to cache") + ods.applicationStore[name] = &application +} + +// AddorUpdateSubscriptionToStore adds a new subscription to the DataStore. +func (ods *SubscriptionDataStore) AddorUpdateSubscriptionToStore(name types.NamespacedName, subscription cpv1alpha2.SubscriptionSpec) { + ods.mu.Lock() + defer ods.mu.Unlock() + logger.Debug("Adding/Updating subscription to cache") + ods.subscriptionStore[name] = &subscription +} + +// AddorUpdateApplicationMappingToStore adds a new application mapping to the DataStore. +func (ods *SubscriptionDataStore) AddorUpdateApplicationMappingToStore(name types.NamespacedName, applicationMapping cpv1alpha2.ApplicationMappingSpec) { + ods.mu.Lock() + defer ods.mu.Unlock() + logger.Debug("Adding/Updating application mapping to cache") + ods.applicationMappingStore[name] = &applicationMapping +} + +// GetApplicationFromStore get cached application +func (ods *SubscriptionDataStore) GetApplicationFromStore(name types.NamespacedName) (cpv1alpha2.ApplicationSpec, bool) { + var application cpv1alpha2.ApplicationSpec + if cachedApplication, found := ods.applicationStore[name]; found { + logger.Debug("Found cached application") + return *cachedApplication, true + } + return application, false +} + +// GetSubscriptionFromStore get cached subscription +func (ods *SubscriptionDataStore) GetSubscriptionFromStore(name types.NamespacedName) (cpv1alpha2.SubscriptionSpec, bool) { + var subscription cpv1alpha2.SubscriptionSpec + if cachedSubscription, found := ods.subscriptionStore[name]; found { + logger.Debug("Found cached subscription") + return *cachedSubscription, true + } + return subscription, false +} + +// GetApplicationMappingFromStore get cached application mapping +func (ods *SubscriptionDataStore) GetApplicationMappingFromStore(name types.NamespacedName) (cpv1alpha2.ApplicationMappingSpec, bool) { + var applicationMapping cpv1alpha2.ApplicationMappingSpec + if cachedApplicationMapping, found := ods.applicationMappingStore[name]; found { + logger.Debug("Found cached application mapping") + return *cachedApplicationMapping, true + } + return applicationMapping, false +} + +// DeleteApplicationFromStore delete from application cache +func (ods *SubscriptionDataStore) DeleteApplicationFromStore(name types.NamespacedName) { + ods.mu.Lock() + defer ods.mu.Unlock() + logger.Debug("Deleting application from cache") + delete(ods.applicationStore, name) +} + +// DeleteSubscriptionFromStore delete from subscription cache +func (ods *SubscriptionDataStore) DeleteSubscriptionFromStore(name types.NamespacedName) { + ods.mu.Lock() + defer ods.mu.Unlock() + logger.Debug("Deleting subscription from cache") + delete(ods.subscriptionStore, name) +} + +// DeleteApplicationMappingFromStore delete from application mapping cache +func (ods *SubscriptionDataStore) DeleteApplicationMappingFromStore(name types.NamespacedName) { + ods.mu.Lock() + defer ods.mu.Unlock() + logger.Debug("Deleting application mapping from cache") + delete(ods.applicationMappingStore, name) +} diff --git a/common-controller/internal/operator/constant/constant.go b/common-controller/internal/operator/constant/constant.go index cb2e18985..a9bb47769 100644 --- a/common-controller/internal/operator/constant/constant.go +++ b/common-controller/internal/operator/constant/constant.go @@ -32,6 +32,21 @@ const ( Delete string = "DELETED" ) +const ( + APPLICATION_CREATED string = "APPLICATION_CREATED" + APPLICATION_UPDATED string = "APPLICATION_UPDATED" + APPLICATION_DELETED string = "APPLICATION_DELETED" + SUBSCRIPTION_CREATED string = "SUBSCRIPTION_CREATED" + SUBSCRIPTION_UPDATED string = "SUBSCRIPTION_UPDATED" + SUBSCRIPTION_DELETED string = "SUBSCRIPTION_DELETED" + APPLICATION_MAPPING_CREATED string = "APPLICATION_MAPPING_CREATED" + APPLICATION_MAPPING_UPDATED string = "APPLICATION_MAPPING_UPDATED" + APPLICATION_MAPPING_DELETED string = "APPLICATION_MAPPING_DELETED" + APPLICATION_KEY_MAPPING_CREATED string = "APPLICATION_KEY_MAPPING_CREATED" + APPLICATION_KEY_MAPPING_UPDATED string = "APPLICATION_KEY_MAPPING_UPDATED" + APPLICATION_KEY_MAPPING_DELETED string = "APPLICATION_KEY_MAPPING_DELETED" +) + // Environment variable names and default values const ( OperatorPodNamespace string = "OPERATOR_POD_NAMESPACE" diff --git a/common-controller/internal/operator/controllers/cp/application_controller.go b/common-controller/internal/operator/controllers/cp/application_controller.go index b5c49d730..9c681ee92 100644 --- a/common-controller/internal/operator/controllers/cp/application_controller.go +++ b/common-controller/internal/operator/controllers/cp/application_controller.go @@ -22,11 +22,13 @@ import ( "fmt" "github.com/wso2/apk/adapter/pkg/logging" + "github.com/wso2/apk/common-controller/internal/cache" "github.com/wso2/apk/common-controller/internal/loggers" cpv1alpha2 "github.com/wso2/apk/common-controller/internal/operator/apis/cp/v1alpha2" constants "github.com/wso2/apk/common-controller/internal/operator/constant" "github.com/wso2/apk/common-controller/internal/server" "github.com/wso2/apk/common-controller/internal/utils" + k8error "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -43,12 +45,14 @@ import ( type ApplicationReconciler struct { client client.Client Scheme *runtime.Scheme + ods *cache.SubscriptionDataStore } // NewApplicationController creates a new Application controller instance -func NewApplicationController(mgr manager.Manager) error { +func NewApplicationController(mgr manager.Manager, subscriptionStore *cache.SubscriptionDataStore) error { r := &ApplicationReconciler{ client: mgr.GetClient(), + ods: subscriptionStore, } c, err := controller.New(constants.ApplicationController, mgr, controller.Options{Reconciler: r}) if err != nil { @@ -89,7 +93,29 @@ func (applicationReconciler *ApplicationReconciler) Reconcile(ctx context.Contex return reconcile.Result{}, fmt.Errorf("failed to get applications %s/%s", applicationKey.Namespace, applicationKey.Name) } + var application cpv1alpha2.Application + if err := applicationReconciler.client.Get(ctx, req.NamespacedName, &application); err != nil { + if k8error.IsNotFound(err) { + applicationSpec, found := applicationReconciler.ods.GetApplicationFromStore(applicationKey) + if found { + utils.SendAppDeletionEvent(applicationKey.Name, applicationSpec) + applicationReconciler.ods.DeleteApplicationFromStore(applicationKey) + return ctrl.Result{}, nil + } else { + loggers.LoggerAPKOperator.Debugf("Application %s/%s does not exist in k8s", applicationKey.Namespace, applicationKey.Name) + } + } else { + applicationSpec, found := applicationReconciler.ods.GetApplicationFromStore(applicationKey) + if found { + // update + utils.SendAppUpdateEvent(applicationKey.Name, applicationSpec, application.Spec) + } else { + utils.SendAddApplicationEvent(application) + } + applicationReconciler.ods.AddorUpdateApplicationToStore(applicationKey, application.Spec) + } + } sendAppUpdates(applicationList) return ctrl.Result{}, nil } diff --git a/common-controller/internal/operator/controllers/cp/applicationmapping_controller.go b/common-controller/internal/operator/controllers/cp/applicationmapping_controller.go index b450013c0..837aa57fc 100644 --- a/common-controller/internal/operator/controllers/cp/applicationmapping_controller.go +++ b/common-controller/internal/operator/controllers/cp/applicationmapping_controller.go @@ -22,8 +22,10 @@ import ( "fmt" "github.com/wso2/apk/adapter/pkg/logging" + "github.com/wso2/apk/common-controller/internal/cache" "github.com/wso2/apk/common-controller/internal/loggers" "github.com/wso2/apk/common-controller/internal/server" + k8error "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -44,12 +46,14 @@ import ( type ApplicationMappingReconciler struct { client client.Client Scheme *runtime.Scheme + ods *cache.SubscriptionDataStore } // NewApplicationMappingController creates a new Application and Subscription mapping (i.e. ApplicationMapping) controller instance -func NewApplicationMappingController(mgr manager.Manager) error { +func NewApplicationMappingController(mgr manager.Manager, subscriptionStore *cache.SubscriptionDataStore) error { r := &ApplicationMappingReconciler{ client: mgr.GetClient(), + ods: subscriptionStore, } c, err := controller.New(constants.ApplicationMappingController, mgr, controller.Options{Reconciler: r}) if err != nil { @@ -90,7 +94,21 @@ func (r *ApplicationMappingReconciler) Reconcile(ctx context.Context, req ctrl.R return reconcile.Result{}, fmt.Errorf("failed to get application mappings %s/%s", applicationMappingKey.Namespace, applicationMappingKey.Name) } - + var applicationMapping cpv1alpha2.ApplicationMapping + if err := r.client.Get(ctx, req.NamespacedName, &applicationMapping); err != nil { + if k8error.IsNotFound(err) { + applicationMapping, found := r.ods.GetApplicationMappingFromStore(applicationMappingKey) + if !found { + loggers.LoggerAPKOperator.Debugf("Application mapping %s/%s not found. Ignoring since object must be deleted", applicationMappingKey.Namespace, applicationMappingKey.Name) + } else { + utils.SendDeleteApplicationMappingEvent(applicationMappingKey.Name, applicationMapping) + r.ods.DeleteApplicationMappingFromStore(applicationMappingKey) + return ctrl.Result{}, nil + } + } else { + utils.SendCreateApplicationMappingEvent(applicationMapping) + } + } sendUpdates(applicationMappingList) return ctrl.Result{}, nil } diff --git a/common-controller/internal/operator/controllers/cp/subscription_controller.go b/common-controller/internal/operator/controllers/cp/subscription_controller.go index 13aaeaf8f..0933b37ff 100644 --- a/common-controller/internal/operator/controllers/cp/subscription_controller.go +++ b/common-controller/internal/operator/controllers/cp/subscription_controller.go @@ -22,10 +22,12 @@ import ( "fmt" "github.com/wso2/apk/adapter/pkg/logging" + "github.com/wso2/apk/common-controller/internal/cache" loggers "github.com/wso2/apk/common-controller/internal/loggers" constants "github.com/wso2/apk/common-controller/internal/operator/constant" "github.com/wso2/apk/common-controller/internal/server" "github.com/wso2/apk/common-controller/internal/utils" + k8error "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -44,12 +46,14 @@ import ( type SubscriptionReconciler struct { client client.Client Scheme *runtime.Scheme + ods *cache.SubscriptionDataStore } // NewSubscriptionController creates a new Subscription controller instance. -func NewSubscriptionController(mgr manager.Manager) error { +func NewSubscriptionController(mgr manager.Manager, subscriptionStore *cache.SubscriptionDataStore) error { r := &SubscriptionReconciler{ client: mgr.GetClient(), + ods: subscriptionStore, } c, err := controller.New(constants.SubscriptionController, mgr, controller.Options{Reconciler: r}) if err != nil { @@ -92,6 +96,22 @@ func (subscriptionReconciler *SubscriptionReconciler) Reconcile(ctx context.Cont subscriptionKey.Namespace, subscriptionKey.Name) } sendSubUpdates(subscriptionList) + var subscription cpv1alpha2.Subscription + if err := subscriptionReconciler.client.Get(ctx, req.NamespacedName, &subscription); err != nil { + if k8error.IsNotFound(err) { + subscriptionSpec, state := subscriptionReconciler.ods.GetSubscriptionFromStore(subscriptionKey) + if state { + // Subscription in cache + loggers.LoggerAPKOperator.Debugf("Subscription %s/%s not found. Ignoring since object must be deleted", subscriptionKey.Namespace, subscriptionKey.Name) + utils.SendDeleteSubscriptionEvent(subscriptionKey.Name, subscriptionSpec) + subscriptionReconciler.ods.DeleteSubscriptionFromStore(subscriptionKey) + return ctrl.Result{}, nil + } + } else { + utils.SendAddSubscriptionEvent(subscription) + subscriptionReconciler.ods.AddorUpdateSubscriptionToStore(subscriptionKey, subscription.Spec) + } + } return ctrl.Result{}, nil } diff --git a/common-controller/internal/operator/operator.go b/common-controller/internal/operator/operator.go index b6e20627f..8518f327f 100644 --- a/common-controller/internal/operator/operator.go +++ b/common-controller/internal/operator/operator.go @@ -76,6 +76,7 @@ func InitOperator() { ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) ratelimitStore := cache.CreateNewOperatorDataStore() + subscriptionStore := cache.CreateNewSubscriptionDataStore() mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, @@ -133,15 +134,15 @@ func InitOperator() { loggers.LoggerAPKOperator.ErrorC(logging.PrintError(logging.Error3114, logging.MAJOR, "Error creating JWT Issuer controller, error: %v", err)) } - if err := cpcontrollers.NewApplicationController(mgr); err != nil { + if err := cpcontrollers.NewApplicationController(mgr, subscriptionStore); err != nil { loggers.LoggerAPKOperator.ErrorC(logging.PrintError(logging.Error3115, logging.MAJOR, "Error creating Application controller, error: %v", err)) } - if err := cpcontrollers.NewSubscriptionController(mgr); err != nil { + if err := cpcontrollers.NewSubscriptionController(mgr, subscriptionStore); err != nil { loggers.LoggerAPKOperator.ErrorC(logging.PrintError(logging.Error3116, logging.MAJOR, "Error creating Subscription controller, error: %v", err)) } - if err := cpcontrollers.NewApplicationMappingController(mgr); err != nil { + if err := cpcontrollers.NewApplicationMappingController(mgr, subscriptionStore); err != nil { loggers.LoggerAPKOperator.ErrorC(logging.PrintError(logging.Error3117, logging.MAJOR, "Error creating Application Mapping controller, error: %v", err)) } diff --git a/common-controller/internal/server/event_server.go b/common-controller/internal/server/event_server.go new file mode 100644 index 000000000..16aa18e3f --- /dev/null +++ b/common-controller/internal/server/event_server.go @@ -0,0 +1,37 @@ +package server + +import ( + "log" + + apkmgt "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt" + utils "github.com/wso2/apk/common-controller/internal/utils" + "google.golang.org/grpc/metadata" +) + +// EventServer struct use to hold event server +type EventServer struct { + apkmgt.UnimplementedEventStreamServiceServer +} + +// StreamEvents streams events to the enforcer +func (s EventServer) StreamEvents(req *apkmgt.Request, srv apkmgt.EventStreamService_StreamEventsServer) error { + // Read metadata from the request context + md, ok := metadata.FromIncomingContext(srv.Context()) + if !ok { + log.Printf("missing metadata") + return nil + // Handle the case where metadata is not present + } + enforcerID := md.Get("enforcer-uuid") + utils.AddClientConnection(enforcerID[0], srv) + for { + if srv.Context().Done() == nil { + utils.DeleteClientConnection(enforcerID[0]) + return nil // Client closed the connection + } else if srv.Context().Err() != nil { + log.Printf("error : %v", srv.Context().Err()) + utils.DeleteClientConnection(enforcerID[0]) + return nil + } + } +} diff --git a/common-controller/internal/utils/enforcer_connection_holder.go b/common-controller/internal/utils/enforcer_connection_holder.go new file mode 100644 index 000000000..6db90a035 --- /dev/null +++ b/common-controller/internal/utils/enforcer_connection_holder.go @@ -0,0 +1,22 @@ +package utils + +import ( + apkmgt "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/service/apkmgt" +) + +var clientConnections = make(map[string]apkmgt.EventStreamService_StreamEventsServer) + +// AddClientConnection adds a client connection to the map +func AddClientConnection(clientID string, stream apkmgt.EventStreamService_StreamEventsServer) { + clientConnections[clientID] = stream +} + +// DeleteClientConnection deletes a client connection from the map +func DeleteClientConnection(clientID string) { + delete(clientConnections, clientID) +} + +// GetAllClientConnections returns all client connections +func GetAllClientConnections() map[string]apkmgt.EventStreamService_StreamEventsServer { + return clientConnections +} diff --git a/common-controller/internal/utils/event_utils.go b/common-controller/internal/utils/event_utils.go new file mode 100644 index 000000000..4adc378ac --- /dev/null +++ b/common-controller/internal/utils/event_utils.go @@ -0,0 +1,199 @@ +package utils + +import ( + time "time" + + "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription" + "github.com/wso2/apk/common-controller/internal/loggers" + cpv1alpha2 "github.com/wso2/apk/common-controller/internal/operator/apis/cp/v1alpha2" + constants "github.com/wso2/apk/common-controller/internal/operator/constant" +) + +// SendAppDeletionEvent sends an application creation event to the enforcer +func SendAppDeletionEvent(applicationUUID string, applicationSpec cpv1alpha2.ApplicationSpec) { + currentTime := time.Now() + milliseconds := currentTime.UnixNano() / int64(time.Millisecond) + event := subscription.Event{ + Uuid: applicationUUID, + Type: constants.APPLICATION_DELETED, + TimeStamp: milliseconds, + Application: &subscription.Application{ + Uuid: applicationUUID, + Name: applicationSpec.Name, + Owner: applicationSpec.Owner, + Organization: applicationSpec.Organization, + Attributes: applicationSpec.Attributes, + }, + } + sendEvent(event) +} + +// SendAppUpdateEvent sends an application update event to the enforcer +func SendAppUpdateEvent(applicationUUID string, oldApplicationSpec cpv1alpha2.ApplicationSpec, newApplicationSpec cpv1alpha2.ApplicationSpec) { + currentTime := time.Now() + milliseconds := currentTime.UnixNano() / int64(time.Millisecond) + event := subscription.Event{ + Uuid: applicationUUID, + Type: constants.APPLICATION_UPDATED, + TimeStamp: milliseconds, + Application: &subscription.Application{ + Uuid: applicationUUID, + Name: newApplicationSpec.Name, + Owner: newApplicationSpec.Owner, + Organization: newApplicationSpec.Organization, + Attributes: newApplicationSpec.Attributes, + }, + } + sendEvent(event) + SendDeleteApplicationKeyMappingEvent(applicationUUID, oldApplicationSpec) + SendApplicationKeyMappingEvent(applicationUUID, newApplicationSpec) +} + +// SendAddApplicationEvent sends an application creation event to the enforcer +func SendAddApplicationEvent(application cpv1alpha2.Application) { + currentTime := time.Now() + milliseconds := currentTime.UnixNano() / int64(time.Millisecond) + event := subscription.Event{ + Uuid: application.ObjectMeta.Name, + Type: constants.APPLICATION_CREATED, + TimeStamp: milliseconds, + Application: &subscription.Application{ + Uuid: application.ObjectMeta.Name, + Name: application.Spec.Name, + Owner: application.Spec.Owner, + Organization: application.Spec.Organization, + Attributes: application.Spec.Attributes, + }, + } + sendEvent(event) +} + +// SendAddSubscriptionEvent sends an subscription creation event to the enforcer +func SendAddSubscriptionEvent(sub cpv1alpha2.Subscription) { + currentTime := time.Now() + milliseconds := currentTime.UnixNano() / int64(time.Millisecond) + event := subscription.Event{ + Uuid: sub.ObjectMeta.Name, + Type: constants.SUBSCRIPTION_CREATED, + TimeStamp: milliseconds, + Subscription: &subscription.Subscription{ + Uuid: sub.ObjectMeta.Name, + SubStatus: sub.Spec.SubscriptionStatus, + Organization: sub.Spec.Organization, + SubscribedApi: &subscription.SubscribedAPI{ + Name: sub.Spec.API.Name, + Version: sub.Spec.API.Version, + }, + }, + } + sendEvent(event) +} + +// SendDeleteSubscriptionEvent sends an subscription deletion event to the enforcer +func SendDeleteSubscriptionEvent(subscriptionUUID string, subscriptionSpec cpv1alpha2.SubscriptionSpec) { + currentTime := time.Now() + milliseconds := currentTime.UnixNano() / int64(time.Millisecond) + event := subscription.Event{ + Uuid: subscriptionUUID, + Type: constants.SUBSCRIPTION_DELETED, + TimeStamp: milliseconds, + Subscription: &subscription.Subscription{ + Uuid: subscriptionUUID, + SubStatus: subscriptionSpec.SubscriptionStatus, + Organization: subscriptionSpec.Organization, + SubscribedApi: &subscription.SubscribedAPI{ + Name: subscriptionSpec.API.Name, + Version: subscriptionSpec.API.Version, + }, + }, + } + sendEvent(event) +} + +// SendCreateApplicationMappingEvent sends an application mapping event to the enforcer +func SendCreateApplicationMappingEvent(applicationMapping cpv1alpha2.ApplicationMapping) { + currentTime := time.Now() + milliseconds := currentTime.UnixNano() / int64(time.Millisecond) + event := subscription.Event{ + Uuid: applicationMapping.ObjectMeta.Name, + Type: constants.APPLICATION_MAPPING_CREATED, + TimeStamp: milliseconds, + ApplicationMapping: &subscription.ApplicationMapping{ + Uuid: applicationMapping.ObjectMeta.Name, + ApplicationRef: applicationMapping.Spec.ApplicationRef, + SubscriptionRef: applicationMapping.Spec.SubscriptionRef, + }, + } + sendEvent(event) +} + +// SendDeleteApplicationMappingEvent sends an application mapping deletion event to the enforcer +func SendDeleteApplicationMappingEvent(applicationMappingUUID string, applicationMappingSpec cpv1alpha2.ApplicationMappingSpec) { + currentTime := time.Now() + milliseconds := currentTime.UnixNano() / int64(time.Millisecond) + event := subscription.Event{ + Uuid: applicationMappingUUID, + Type: constants.APPLICATION_DELETED, + TimeStamp: milliseconds, + ApplicationMapping: &subscription.ApplicationMapping{ + Uuid: applicationMappingUUID, + ApplicationRef: applicationMappingSpec.ApplicationRef, + SubscriptionRef: applicationMappingSpec.SubscriptionRef, + }, + } + sendEvent(event) +} +func SendDeleteApplicationKeyMappingEvent(applicationUUID string, applicationKeyMapping cpv1alpha2.ApplicationSpec) { + currentTime := time.Now() + milliseconds := currentTime.UnixNano() / int64(time.Millisecond) + var oauth2SecurityScheme = applicationKeyMapping.SecuritySchemes.OAuth2 + if oauth2SecurityScheme != nil { + for _, env := range oauth2SecurityScheme.Environments { + event := subscription.Event{ + Uuid: applicationUUID, + Type: constants.APPLICATION_KEY_MAPPING_DELETED, + TimeStamp: milliseconds, + ApplicationKeyMapping: &subscription.ApplicationKeyMapping{ + ApplicationUUID: applicationUUID, + SecurityScheme: constants.OAuth2, + ApplicationIdentifier: env.AppID, + KeyType: env.KeyType, + EnvID: env.EnvID, + }, + } + sendEvent(event) + } + } +} +func SendApplicationKeyMappingEvent(applicationUUID string, applicationSpec cpv1alpha2.ApplicationSpec) { + currentTime := time.Now() + milliseconds := currentTime.UnixNano() / int64(time.Millisecond) + var oauth2SecurityScheme = applicationSpec.SecuritySchemes.OAuth2 + if oauth2SecurityScheme != nil { + for _, env := range oauth2SecurityScheme.Environments { + event := subscription.Event{ + Uuid: applicationUUID, + Type: constants.APPLICATION_KEY_MAPPING_CREATED, + TimeStamp: milliseconds, + ApplicationKeyMapping: &subscription.ApplicationKeyMapping{ + ApplicationUUID: applicationUUID, + SecurityScheme: constants.OAuth2, + ApplicationIdentifier: env.AppID, + KeyType: env.KeyType, + EnvID: env.EnvID, + }, + } + sendEvent(event) + } + } +} +func sendEvent(event subscription.Event) { + for clientId, stream := range GetAllClientConnections() { + err := stream.Send(&event) + if err != nil { + loggers.LoggerAPK.Errorf("Error sending event to client %s: %v", clientId, err) + } else { + loggers.LoggerAPK.Debugf("Event sent to client %s", clientId) + } + } +} diff --git a/common-controller/internal/xds/server.go b/common-controller/internal/xds/server.go index 9bd0ac587..af86e60b5 100644 --- a/common-controller/internal/xds/server.go +++ b/common-controller/internal/xds/server.go @@ -18,8 +18,6 @@ package xds import ( - "context" - crand "crypto/rand" "fmt" "math/big" "math/rand" @@ -33,31 +31,27 @@ import ( "github.com/envoyproxy/go-control-plane/pkg/cache/types" envoy_cachev3 "github.com/envoyproxy/go-control-plane/pkg/cache/v3" - "github.com/wso2/apk/adapter/pkg/discovery/api/wso2/discovery/subscription" wso2_cache "github.com/wso2/apk/adapter/pkg/discovery/protocol/cache/v3" - wso2_resource "github.com/wso2/apk/adapter/pkg/discovery/protocol/resource/v3" eventhubTypes "github.com/wso2/apk/adapter/pkg/eventhub/types" - "github.com/wso2/apk/adapter/pkg/logging" - "github.com/wso2/apk/common-controller/internal/loggers" dpv1alpha1 "github.com/wso2/apk/common-controller/internal/operator/apis/dp/v1alpha1" ) // EnvoyInternalAPI struct use to hold envoy resources and adapter internal resources type EnvoyInternalAPI struct { // commonControllerInternalAPI model.commonControllerInternalAPI - envoyLabels []string - routes []*routev3.Route - clusters []*clusterv3.Cluster - endpointAddresses []*corev3.Address - enforcerAPI types.Resource + envoyLabels []string + routes []*routev3.Route + clusters []*clusterv3.Cluster + endpointAddresses []*corev3.Address + enforcerAPI types.Resource } // EnvoyGatewayConfig struct use to hold envoy gateway resources type EnvoyGatewayConfig struct { - listener *listenerv3.Listener - routeConfig *routev3.RouteConfiguration - clusters []*clusterv3.Cluster - endpoints []*corev3.Address + listener *listenerv3.Listener + routeConfig *routev3.RouteConfiguration + clusters []*clusterv3.Cluster + endpoints []*corev3.Address // customRateLimitPolicies []*model.CustomRateLimitPolicy } @@ -245,79 +239,3 @@ func GetEnforcerApplicationKeyMappingCache() wso2_cache.SnapshotCache { func GetEnforcerApplicationMappingCache() wso2_cache.SnapshotCache { return enforcerApplicationMappingCache } - -// UpdateEnforcerApplications sets new update to the enforcer's Applications -func UpdateEnforcerApplications(applications *subscription.ApplicationList) { - loggers.LoggerXds.Debug("Updating Enforcer Application Cache") - label := commonEnforcerLabel - applicationList := append(enforcerLabelMap[label].applications, applications) - version, _ := crand.Int(crand.Reader, maxRandomBigInt()) - snap, _ := wso2_cache.NewSnapshot(fmt.Sprint(version), map[wso2_resource.Type][]types.Resource{ - wso2_resource.ApplicationListType: applicationList, - }) - snap.Consistent() - errSetSnap := enforcerApplicationCache.SetSnapshot(context.Background(), label, snap) - if errSetSnap != nil { - loggers.LoggerXds.ErrorC(logging.PrintError(logging.Error1414, logging.MAJOR, "Error while setting the snapshot : %v", errSetSnap.Error())) - } - enforcerLabelMap[label].applications = applicationList - loggers.LoggerXds.Infof("New Application cache update for the label: " + label + " version: " + fmt.Sprint(version)) -} - -// UpdateEnforcerApplicationKeyMappings sets new update to the enforcer's Application Key Mappings -func UpdateEnforcerApplicationKeyMappings(applicationKeyMappings *subscription.ApplicationKeyMappingList) { - loggers.LoggerXds.Debug("Updating Application Key Mapping Cache") - label := commonEnforcerLabel - applicationKeyMappingList := append(enforcerLabelMap[label].applicationKeyMappings, applicationKeyMappings) - version, _ := crand.Int(crand.Reader, maxRandomBigInt()) - snap, _ := wso2_cache.NewSnapshot(fmt.Sprint(version), map[wso2_resource.Type][]types.Resource{ - wso2_resource.ApplicationKeyMappingListType: applicationKeyMappingList, - }) - snap.Consistent() - errSetSnap := enforcerApplicationKeyMappingCache.SetSnapshot(context.Background(), label, snap) - if errSetSnap != nil { - loggers.LoggerXds.ErrorC(logging.PrintError(logging.Error1414, logging.MAJOR, "Error while setting the snapshot : %v", errSetSnap.Error())) - } - enforcerLabelMap[label].applicationKeyMappings = applicationKeyMappingList - loggers.LoggerXds.Infof("New Application Key Mapping cache update for the label: " + label + " version: " + fmt.Sprint(version)) -} - -// UpdateEnforcerSubscriptions sets new update to the enforcer's Subscriptions -func UpdateEnforcerSubscriptions(subscriptions *subscription.SubscriptionList) { - //TODO: (Dinusha) check this hardcoded value - loggers.LoggerXds.Debug("Updating Enforcer Subscription Cache") - label := commonEnforcerLabel - subscriptionList := append(enforcerLabelMap[label].subscriptions, subscriptions) - - // TODO: (VirajSalaka) Decide if a map is required to keep version (just to avoid having the same version) - version, _ := crand.Int(crand.Reader, maxRandomBigInt()) - snap, _ := wso2_cache.NewSnapshot(fmt.Sprint(version), map[wso2_resource.Type][]types.Resource{ - wso2_resource.SubscriptionListType: subscriptionList, - }) - snap.Consistent() - - errSetSnap := enforcerSubscriptionCache.SetSnapshot(context.Background(), label, snap) - if errSetSnap != nil { - loggers.LoggerXds.ErrorC(logging.PrintError(logging.Error1414, logging.MAJOR, "Error while setting the snapshot : %v", errSetSnap.Error())) - } - enforcerLabelMap[label].subscriptions = subscriptionList - loggers.LoggerXds.Infof("New Subscription cache update for the label: " + label + " version: " + fmt.Sprint(version)) -} - -// UpdateEnforcerApplicationMappings sets new update to the enforcer's Application Mappings -func UpdateEnforcerApplicationMappings(applicationMappings *subscription.ApplicationMappingList) { - loggers.LoggerXds.Debug("Updating Application Mapping Cache") - label := commonEnforcerLabel - applicationMappingList := append(enforcerLabelMap[label].applicationMappings, applicationMappings) - version, _ := crand.Int(crand.Reader, maxRandomBigInt()) - snap, _ := wso2_cache.NewSnapshot(fmt.Sprint(version), map[wso2_resource.Type][]types.Resource{ - wso2_resource.ApplicationMappingListType: applicationMappingList, - }) - snap.Consistent() - errSetSnap := enforcerApplicationMappingCache.SetSnapshot(context.Background(), label, snap) - if errSetSnap != nil { - loggers.LoggerXds.ErrorC(logging.PrintError(logging.Error1414, logging.MAJOR, "Error while setting the snapshot : %v", errSetSnap.Error())) - } - enforcerLabelMap[label].applicationMappings = applicationMappingList - loggers.LoggerXds.Infof("New Application Mapping cache update for the label: " + label + " version: " + fmt.Sprint(version)) -} diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventServiceProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventServiceProto.java new file mode 100644 index 000000000..2ebf3bdcc --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventServiceProto.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/service/apkmgt/eventds.proto + +package org.wso2.apk.enforcer.discovery.service.apkmgt; + +public final class EventServiceProto { + private EventServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_discovery_service_apkmgt_Request_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_discovery_service_apkmgt_Request_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n+wso2/discovery/service/apkmgt/eventds." + + "proto\022\030discovery.service.apkmgt\032\'wso2/di" + + "scovery/subscription/event.proto\"\030\n\007Requ" + + "est\022\r\n\005event\030\001 \001(\t2o\n\022EventStreamService" + + "\022Y\n\014StreamEvents\022!.discovery.service.apk" + + "mgt.Request\032\".wso2.discovery.subscriptio" + + "n.Event\"\0000\001B\225\001\n.org.wso2.apk.enforcer.di" + + "scovery.service.apkmgtB\021EventServiceProt" + + "oP\001ZKgithub.com/wso2/apk/adapter/pkg/dis" + + "covery/api/wso2/discovery/service/apkmgt" + + "\210\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.wso2.apk.enforcer.discovery.subscription.EventProto.getDescriptor(), + }); + internal_static_discovery_service_apkmgt_Request_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_discovery_service_apkmgt_Request_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_discovery_service_apkmgt_Request_descriptor, + new java.lang.String[] { "Event", }); + org.wso2.apk.enforcer.discovery.subscription.EventProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventStreamService.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventStreamService.java new file mode 100644 index 000000000..6e57e5bca --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventStreamService.java @@ -0,0 +1,241 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/service/apkmgt/eventds.proto + +package org.wso2.apk.enforcer.discovery.service.apkmgt; + +/** + *
+ * [#protodoc-title: EventStreamDS]
+ * 
+ * + * Protobuf service {@code discovery.service.apkmgt.EventStreamService} + */ +public abstract class EventStreamService + implements com.google.protobuf.Service { + protected EventStreamService() {} + + public interface Interface { + /** + * rpc StreamEvents(.discovery.service.apkmgt.Request) returns (stream .wso2.discovery.subscription.Event); + */ + public abstract void streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.apkmgt.Request request, + com.google.protobuf.RpcCallback done); + + } + + public static com.google.protobuf.Service newReflectiveService( + final Interface impl) { + return new EventStreamService() { + @java.lang.Override + public void streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.apkmgt.Request request, + com.google.protobuf.RpcCallback done) { + impl.streamEvents(controller, request, done); + } + + }; + } + + public static com.google.protobuf.BlockingService + newReflectiveBlockingService(final BlockingInterface impl) { + return new com.google.protobuf.BlockingService() { + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final com.google.protobuf.Message callBlockingMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request) + throws com.google.protobuf.ServiceException { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callBlockingMethod() given method descriptor for " + + "wrong service type."); + } + switch(method.getIndex()) { + case 0: + return impl.streamEvents(controller, (org.wso2.apk.enforcer.discovery.service.apkmgt.Request)request); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.wso2.apk.enforcer.discovery.service.apkmgt.Request.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + }; + } + + /** + * rpc StreamEvents(.discovery.service.apkmgt.Request) returns (stream .wso2.discovery.subscription.Event); + */ + public abstract void streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.apkmgt.Request request, + com.google.protobuf.RpcCallback done); + + public static final + com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptor() { + return org.wso2.apk.enforcer.discovery.service.apkmgt.EventServiceProto.getDescriptor().getServices().get(0); + } + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final void callMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request, + com.google.protobuf.RpcCallback< + com.google.protobuf.Message> done) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callMethod() given method descriptor for wrong " + + "service type."); + } + switch(method.getIndex()) { + case 0: + this.streamEvents(controller, (org.wso2.apk.enforcer.discovery.service.apkmgt.Request)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.wso2.apk.enforcer.discovery.service.apkmgt.Request.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public static Stub newStub( + com.google.protobuf.RpcChannel channel) { + return new Stub(channel); + } + + public static final class Stub extends org.wso2.apk.enforcer.discovery.service.apkmgt.EventStreamService implements Interface { + private Stub(com.google.protobuf.RpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.RpcChannel channel; + + public com.google.protobuf.RpcChannel getChannel() { + return channel; + } + + public void streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.apkmgt.Request request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.wso2.apk.enforcer.discovery.subscription.Event.class, + org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance())); + } + } + + public static BlockingInterface newBlockingStub( + com.google.protobuf.BlockingRpcChannel channel) { + return new BlockingStub(channel); + } + + public interface BlockingInterface { + public org.wso2.apk.enforcer.discovery.subscription.Event streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.apkmgt.Request request) + throws com.google.protobuf.ServiceException; + } + + private static final class BlockingStub implements BlockingInterface { + private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.BlockingRpcChannel channel; + + public org.wso2.apk.enforcer.discovery.subscription.Event streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.apkmgt.Request request) + throws com.google.protobuf.ServiceException { + return (org.wso2.apk.enforcer.discovery.subscription.Event) channel.callBlockingMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance()); + } + + } + + // @@protoc_insertion_point(class_scope:discovery.service.apkmgt.EventStreamService) +} + diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventStreamServiceGrpc.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventStreamServiceGrpc.java new file mode 100644 index 000000000..dffec9ee4 --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/EventStreamServiceGrpc.java @@ -0,0 +1,296 @@ +package org.wso2.apk.enforcer.discovery.service.apkmgt; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * [#protodoc-title: EventStreamDS]
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: wso2/discovery/service/apkmgt/eventds.proto") +public final class EventStreamServiceGrpc { + + private EventStreamServiceGrpc() {} + + public static final String SERVICE_NAME = "discovery.service.apkmgt.EventStreamService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getStreamEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamEvents", + requestType = org.wso2.apk.enforcer.discovery.service.apkmgt.Request.class, + responseType = org.wso2.apk.enforcer.discovery.subscription.Event.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getStreamEventsMethod() { + io.grpc.MethodDescriptor getStreamEventsMethod; + if ((getStreamEventsMethod = EventStreamServiceGrpc.getStreamEventsMethod) == null) { + synchronized (EventStreamServiceGrpc.class) { + if ((getStreamEventsMethod = EventStreamServiceGrpc.getStreamEventsMethod) == null) { + EventStreamServiceGrpc.getStreamEventsMethod = getStreamEventsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.wso2.apk.enforcer.discovery.service.apkmgt.Request.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance())) + .setSchemaDescriptor(new EventStreamServiceMethodDescriptorSupplier("StreamEvents")) + .build(); + } + } + } + return getStreamEventsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static EventStreamServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventStreamServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceStub(channel, callOptions); + } + }; + return EventStreamServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EventStreamServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventStreamServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceBlockingStub(channel, callOptions); + } + }; + return EventStreamServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static EventStreamServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventStreamServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceFutureStub(channel, callOptions); + } + }; + return EventStreamServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * [#protodoc-title: EventStreamDS]
+   * 
+ */ + public static abstract class EventStreamServiceImplBase implements io.grpc.BindableService { + + /** + */ + public void streamEvents(org.wso2.apk.enforcer.discovery.service.apkmgt.Request request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getStreamEventsMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getStreamEventsMethod(), + asyncServerStreamingCall( + new MethodHandlers< + org.wso2.apk.enforcer.discovery.service.apkmgt.Request, + org.wso2.apk.enforcer.discovery.subscription.Event>( + this, METHODID_STREAM_EVENTS))) + .build(); + } + } + + /** + *
+   * [#protodoc-title: EventStreamDS]
+   * 
+ */ + public static final class EventStreamServiceStub extends io.grpc.stub.AbstractAsyncStub { + private EventStreamServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EventStreamServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceStub(channel, callOptions); + } + + /** + */ + public void streamEvents(org.wso2.apk.enforcer.discovery.service.apkmgt.Request request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getStreamEventsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * [#protodoc-title: EventStreamDS]
+   * 
+ */ + public static final class EventStreamServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private EventStreamServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EventStreamServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceBlockingStub(channel, callOptions); + } + + /** + */ + public java.util.Iterator streamEvents( + org.wso2.apk.enforcer.discovery.service.apkmgt.Request request) { + return blockingServerStreamingCall( + getChannel(), getStreamEventsMethod(), getCallOptions(), request); + } + } + + /** + *
+   * [#protodoc-title: EventStreamDS]
+   * 
+ */ + public static final class EventStreamServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + private EventStreamServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EventStreamServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_STREAM_EVENTS = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final EventStreamServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(EventStreamServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_STREAM_EVENTS: + serviceImpl.streamEvents((org.wso2.apk.enforcer.discovery.service.apkmgt.Request) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class EventStreamServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EventStreamServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return org.wso2.apk.enforcer.discovery.service.apkmgt.EventServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("EventStreamService"); + } + } + + private static final class EventStreamServiceFileDescriptorSupplier + extends EventStreamServiceBaseDescriptorSupplier { + EventStreamServiceFileDescriptorSupplier() {} + } + + private static final class EventStreamServiceMethodDescriptorSupplier + extends EventStreamServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + EventStreamServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (EventStreamServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new EventStreamServiceFileDescriptorSupplier()) + .addMethod(getStreamEventsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/Request.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/Request.java new file mode 100644 index 000000000..bd03bb036 --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/Request.java @@ -0,0 +1,557 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/service/apkmgt/eventds.proto + +package org.wso2.apk.enforcer.discovery.service.apkmgt; + +/** + * Protobuf type {@code discovery.service.apkmgt.Request} + */ +public final class Request extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:discovery.service.apkmgt.Request) + RequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use Request.newBuilder() to construct. + private Request(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Request() { + event_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Request(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Request( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + event_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.wso2.apk.enforcer.discovery.service.apkmgt.EventServiceProto.internal_static_discovery_service_apkmgt_Request_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.wso2.apk.enforcer.discovery.service.apkmgt.EventServiceProto.internal_static_discovery_service_apkmgt_Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.wso2.apk.enforcer.discovery.service.apkmgt.Request.class, org.wso2.apk.enforcer.discovery.service.apkmgt.Request.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + private volatile java.lang.Object event_; + /** + * string event = 1; + * @return The event. + */ + @java.lang.Override + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + event_ = s; + return s; + } + } + /** + * string event = 1; + * @return The bytes for event. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getEventBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, event_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEventBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, event_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.wso2.apk.enforcer.discovery.service.apkmgt.Request)) { + return super.equals(obj); + } + org.wso2.apk.enforcer.discovery.service.apkmgt.Request other = (org.wso2.apk.enforcer.discovery.service.apkmgt.Request) obj; + + if (!getEvent() + .equals(other.getEvent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.wso2.apk.enforcer.discovery.service.apkmgt.Request prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code discovery.service.apkmgt.Request} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:discovery.service.apkmgt.Request) + org.wso2.apk.enforcer.discovery.service.apkmgt.RequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.wso2.apk.enforcer.discovery.service.apkmgt.EventServiceProto.internal_static_discovery_service_apkmgt_Request_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.wso2.apk.enforcer.discovery.service.apkmgt.EventServiceProto.internal_static_discovery_service_apkmgt_Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.wso2.apk.enforcer.discovery.service.apkmgt.Request.class, org.wso2.apk.enforcer.discovery.service.apkmgt.Request.Builder.class); + } + + // Construct using org.wso2.apk.enforcer.discovery.service.apkmgt.Request.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + event_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.wso2.apk.enforcer.discovery.service.apkmgt.EventServiceProto.internal_static_discovery_service_apkmgt_Request_descriptor; + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.service.apkmgt.Request getDefaultInstanceForType() { + return org.wso2.apk.enforcer.discovery.service.apkmgt.Request.getDefaultInstance(); + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.service.apkmgt.Request build() { + org.wso2.apk.enforcer.discovery.service.apkmgt.Request result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.service.apkmgt.Request buildPartial() { + org.wso2.apk.enforcer.discovery.service.apkmgt.Request result = new org.wso2.apk.enforcer.discovery.service.apkmgt.Request(this); + result.event_ = event_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.wso2.apk.enforcer.discovery.service.apkmgt.Request) { + return mergeFrom((org.wso2.apk.enforcer.discovery.service.apkmgt.Request)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.wso2.apk.enforcer.discovery.service.apkmgt.Request other) { + if (other == org.wso2.apk.enforcer.discovery.service.apkmgt.Request.getDefaultInstance()) return this; + if (!other.getEvent().isEmpty()) { + event_ = other.event_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.wso2.apk.enforcer.discovery.service.apkmgt.Request parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.wso2.apk.enforcer.discovery.service.apkmgt.Request) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object event_ = ""; + /** + * string event = 1; + * @return The event. + */ + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + event_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string event = 1; + * @return The bytes for event. + */ + public com.google.protobuf.ByteString + getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string event = 1; + * @param value The event to set. + * @return This builder for chaining. + */ + public Builder setEvent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + event_ = value; + onChanged(); + return this; + } + /** + * string event = 1; + * @return This builder for chaining. + */ + public Builder clearEvent() { + + event_ = getDefaultInstance().getEvent(); + onChanged(); + return this; + } + /** + * string event = 1; + * @param value The bytes for event to set. + * @return This builder for chaining. + */ + public Builder setEventBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + event_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:discovery.service.apkmgt.Request) + } + + // @@protoc_insertion_point(class_scope:discovery.service.apkmgt.Request) + private static final org.wso2.apk.enforcer.discovery.service.apkmgt.Request DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.service.apkmgt.Request(); + } + + public static org.wso2.apk.enforcer.discovery.service.apkmgt.Request getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Request parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Request(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.service.apkmgt.Request getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/RequestOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/RequestOrBuilder.java new file mode 100644 index 000000000..e7e08f0e4 --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/apkmgt/RequestOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/service/apkmgt/eventds.proto + +package org.wso2.apk.enforcer.discovery.service.apkmgt; + +public interface RequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:discovery.service.apkmgt.Request) + com.google.protobuf.MessageOrBuilder { + + /** + * string event = 1; + * @return The event. + */ + java.lang.String getEvent(); + /** + * string event = 1; + * @return The bytes for event. + */ + com.google.protobuf.ByteString + getEventBytes(); +} diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventServiceProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventServiceProto.java new file mode 100644 index 000000000..f671cf88a --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventServiceProto.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/service/apkmgt/eventds.proto + +package org.wso2.apk.enforcer.discovery.service.subscription; + +public final class EventServiceProto { + private EventServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_discovery_service_apkmgt_Request_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_discovery_service_apkmgt_Request_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n+wso2/discovery/service/apkmgt/eventds." + + "proto\022\030discovery.service.apkmgt\032\'wso2/di" + + "scovery/subscription/event.proto\"\030\n\007Requ" + + "est\022\r\n\005event\030\001 \001(\t2o\n\022EventStreamService" + + "\022Y\n\014StreamEvents\022!.discovery.service.apk" + + "mgt.Request\032\".wso2.discovery.subscriptio" + + "n.Event\"\0000\001B\232\001\n4org.wso2.apk.enforcer.di" + + "scovery.service.subscriptionB\021EventServi" + + "ceProtoP\001ZJgithub.com/envoyproxy/go-cont" + + "rol-plane/wso2/discovery/service/subscri" + + "ption\210\001\001b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.wso2.apk.enforcer.discovery.subscription.EventProto.getDescriptor(), + }); + internal_static_discovery_service_apkmgt_Request_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_discovery_service_apkmgt_Request_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_discovery_service_apkmgt_Request_descriptor, + new java.lang.String[] { "Event", }); + org.wso2.apk.enforcer.discovery.subscription.EventProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventStreamService.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventStreamService.java new file mode 100644 index 000000000..29506a60f --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventStreamService.java @@ -0,0 +1,241 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/service/apkmgt/eventds.proto + +package org.wso2.apk.enforcer.discovery.service.subscription; + +/** + *
+ * [#protodoc-title: EventStreamDS]
+ * 
+ * + * Protobuf service {@code discovery.service.apkmgt.EventStreamService} + */ +public abstract class EventStreamService + implements com.google.protobuf.Service { + protected EventStreamService() {} + + public interface Interface { + /** + * rpc StreamEvents(.discovery.service.apkmgt.Request) returns (stream .wso2.discovery.subscription.Event); + */ + public abstract void streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.subscription.Request request, + com.google.protobuf.RpcCallback done); + + } + + public static com.google.protobuf.Service newReflectiveService( + final Interface impl) { + return new EventStreamService() { + @java.lang.Override + public void streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.subscription.Request request, + com.google.protobuf.RpcCallback done) { + impl.streamEvents(controller, request, done); + } + + }; + } + + public static com.google.protobuf.BlockingService + newReflectiveBlockingService(final BlockingInterface impl) { + return new com.google.protobuf.BlockingService() { + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final com.google.protobuf.Message callBlockingMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request) + throws com.google.protobuf.ServiceException { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callBlockingMethod() given method descriptor for " + + "wrong service type."); + } + switch(method.getIndex()) { + case 0: + return impl.streamEvents(controller, (org.wso2.apk.enforcer.discovery.service.subscription.Request)request); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.wso2.apk.enforcer.discovery.service.subscription.Request.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + }; + } + + /** + * rpc StreamEvents(.discovery.service.apkmgt.Request) returns (stream .wso2.discovery.subscription.Event); + */ + public abstract void streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.subscription.Request request, + com.google.protobuf.RpcCallback done); + + public static final + com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptor() { + return org.wso2.apk.enforcer.discovery.service.subscription.EventServiceProto.getDescriptor().getServices().get(0); + } + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final void callMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request, + com.google.protobuf.RpcCallback< + com.google.protobuf.Message> done) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callMethod() given method descriptor for wrong " + + "service type."); + } + switch(method.getIndex()) { + case 0: + this.streamEvents(controller, (org.wso2.apk.enforcer.discovery.service.subscription.Request)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.wso2.apk.enforcer.discovery.service.subscription.Request.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public static Stub newStub( + com.google.protobuf.RpcChannel channel) { + return new Stub(channel); + } + + public static final class Stub extends org.wso2.apk.enforcer.discovery.service.subscription.EventStreamService implements Interface { + private Stub(com.google.protobuf.RpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.RpcChannel channel; + + public com.google.protobuf.RpcChannel getChannel() { + return channel; + } + + public void streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.subscription.Request request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.wso2.apk.enforcer.discovery.subscription.Event.class, + org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance())); + } + } + + public static BlockingInterface newBlockingStub( + com.google.protobuf.BlockingRpcChannel channel) { + return new BlockingStub(channel); + } + + public interface BlockingInterface { + public org.wso2.apk.enforcer.discovery.subscription.Event streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.subscription.Request request) + throws com.google.protobuf.ServiceException; + } + + private static final class BlockingStub implements BlockingInterface { + private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.BlockingRpcChannel channel; + + public org.wso2.apk.enforcer.discovery.subscription.Event streamEvents( + com.google.protobuf.RpcController controller, + org.wso2.apk.enforcer.discovery.service.subscription.Request request) + throws com.google.protobuf.ServiceException { + return (org.wso2.apk.enforcer.discovery.subscription.Event) channel.callBlockingMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance()); + } + + } + + // @@protoc_insertion_point(class_scope:discovery.service.apkmgt.EventStreamService) +} + diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventStreamServiceGrpc.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventStreamServiceGrpc.java new file mode 100644 index 000000000..5ae47c183 --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/EventStreamServiceGrpc.java @@ -0,0 +1,296 @@ +package org.wso2.apk.enforcer.discovery.service.subscription; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * [#protodoc-title: EventStreamDS]
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: wso2/discovery/service/apkmgt/eventds.proto") +public final class EventStreamServiceGrpc { + + private EventStreamServiceGrpc() {} + + public static final String SERVICE_NAME = "discovery.service.apkmgt.EventStreamService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getStreamEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamEvents", + requestType = org.wso2.apk.enforcer.discovery.service.subscription.Request.class, + responseType = org.wso2.apk.enforcer.discovery.subscription.Event.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getStreamEventsMethod() { + io.grpc.MethodDescriptor getStreamEventsMethod; + if ((getStreamEventsMethod = EventStreamServiceGrpc.getStreamEventsMethod) == null) { + synchronized (EventStreamServiceGrpc.class) { + if ((getStreamEventsMethod = EventStreamServiceGrpc.getStreamEventsMethod) == null) { + EventStreamServiceGrpc.getStreamEventsMethod = getStreamEventsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.wso2.apk.enforcer.discovery.service.subscription.Request.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance())) + .setSchemaDescriptor(new EventStreamServiceMethodDescriptorSupplier("StreamEvents")) + .build(); + } + } + } + return getStreamEventsMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static EventStreamServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventStreamServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceStub(channel, callOptions); + } + }; + return EventStreamServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EventStreamServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventStreamServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceBlockingStub(channel, callOptions); + } + }; + return EventStreamServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static EventStreamServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EventStreamServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceFutureStub(channel, callOptions); + } + }; + return EventStreamServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * [#protodoc-title: EventStreamDS]
+   * 
+ */ + public static abstract class EventStreamServiceImplBase implements io.grpc.BindableService { + + /** + */ + public void streamEvents(org.wso2.apk.enforcer.discovery.service.subscription.Request request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getStreamEventsMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getStreamEventsMethod(), + asyncServerStreamingCall( + new MethodHandlers< + org.wso2.apk.enforcer.discovery.service.subscription.Request, + org.wso2.apk.enforcer.discovery.subscription.Event>( + this, METHODID_STREAM_EVENTS))) + .build(); + } + } + + /** + *
+   * [#protodoc-title: EventStreamDS]
+   * 
+ */ + public static final class EventStreamServiceStub extends io.grpc.stub.AbstractAsyncStub { + private EventStreamServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EventStreamServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceStub(channel, callOptions); + } + + /** + */ + public void streamEvents(org.wso2.apk.enforcer.discovery.service.subscription.Request request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getStreamEventsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * [#protodoc-title: EventStreamDS]
+   * 
+ */ + public static final class EventStreamServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private EventStreamServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EventStreamServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceBlockingStub(channel, callOptions); + } + + /** + */ + public java.util.Iterator streamEvents( + org.wso2.apk.enforcer.discovery.service.subscription.Request request) { + return blockingServerStreamingCall( + getChannel(), getStreamEventsMethod(), getCallOptions(), request); + } + } + + /** + *
+   * [#protodoc-title: EventStreamDS]
+   * 
+ */ + public static final class EventStreamServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + private EventStreamServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EventStreamServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EventStreamServiceFutureStub(channel, callOptions); + } + } + + private static final int METHODID_STREAM_EVENTS = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final EventStreamServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(EventStreamServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_STREAM_EVENTS: + serviceImpl.streamEvents((org.wso2.apk.enforcer.discovery.service.subscription.Request) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class EventStreamServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EventStreamServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return org.wso2.apk.enforcer.discovery.service.subscription.EventServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("EventStreamService"); + } + } + + private static final class EventStreamServiceFileDescriptorSupplier + extends EventStreamServiceBaseDescriptorSupplier { + EventStreamServiceFileDescriptorSupplier() {} + } + + private static final class EventStreamServiceMethodDescriptorSupplier + extends EventStreamServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + EventStreamServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (EventStreamServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new EventStreamServiceFileDescriptorSupplier()) + .addMethod(getStreamEventsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/Request.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/Request.java new file mode 100644 index 000000000..14694e3e4 --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/Request.java @@ -0,0 +1,557 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/service/apkmgt/eventds.proto + +package org.wso2.apk.enforcer.discovery.service.subscription; + +/** + * Protobuf type {@code discovery.service.apkmgt.Request} + */ +public final class Request extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:discovery.service.apkmgt.Request) + RequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use Request.newBuilder() to construct. + private Request(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Request() { + event_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Request(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Request( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + event_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.wso2.apk.enforcer.discovery.service.subscription.EventServiceProto.internal_static_discovery_service_apkmgt_Request_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.wso2.apk.enforcer.discovery.service.subscription.EventServiceProto.internal_static_discovery_service_apkmgt_Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.wso2.apk.enforcer.discovery.service.subscription.Request.class, org.wso2.apk.enforcer.discovery.service.subscription.Request.Builder.class); + } + + public static final int EVENT_FIELD_NUMBER = 1; + private volatile java.lang.Object event_; + /** + * string event = 1; + * @return The event. + */ + @java.lang.Override + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + event_ = s; + return s; + } + } + /** + * string event = 1; + * @return The bytes for event. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getEventBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, event_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEventBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, event_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.wso2.apk.enforcer.discovery.service.subscription.Request)) { + return super.equals(obj); + } + org.wso2.apk.enforcer.discovery.service.subscription.Request other = (org.wso2.apk.enforcer.discovery.service.subscription.Request) obj; + + if (!getEvent() + .equals(other.getEvent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.wso2.apk.enforcer.discovery.service.subscription.Request parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.wso2.apk.enforcer.discovery.service.subscription.Request prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code discovery.service.apkmgt.Request} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:discovery.service.apkmgt.Request) + org.wso2.apk.enforcer.discovery.service.subscription.RequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.wso2.apk.enforcer.discovery.service.subscription.EventServiceProto.internal_static_discovery_service_apkmgt_Request_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.wso2.apk.enforcer.discovery.service.subscription.EventServiceProto.internal_static_discovery_service_apkmgt_Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.wso2.apk.enforcer.discovery.service.subscription.Request.class, org.wso2.apk.enforcer.discovery.service.subscription.Request.Builder.class); + } + + // Construct using org.wso2.apk.enforcer.discovery.service.subscription.Request.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + event_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.wso2.apk.enforcer.discovery.service.subscription.EventServiceProto.internal_static_discovery_service_apkmgt_Request_descriptor; + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.service.subscription.Request getDefaultInstanceForType() { + return org.wso2.apk.enforcer.discovery.service.subscription.Request.getDefaultInstance(); + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.service.subscription.Request build() { + org.wso2.apk.enforcer.discovery.service.subscription.Request result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.service.subscription.Request buildPartial() { + org.wso2.apk.enforcer.discovery.service.subscription.Request result = new org.wso2.apk.enforcer.discovery.service.subscription.Request(this); + result.event_ = event_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.wso2.apk.enforcer.discovery.service.subscription.Request) { + return mergeFrom((org.wso2.apk.enforcer.discovery.service.subscription.Request)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.wso2.apk.enforcer.discovery.service.subscription.Request other) { + if (other == org.wso2.apk.enforcer.discovery.service.subscription.Request.getDefaultInstance()) return this; + if (!other.getEvent().isEmpty()) { + event_ = other.event_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.wso2.apk.enforcer.discovery.service.subscription.Request parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.wso2.apk.enforcer.discovery.service.subscription.Request) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object event_ = ""; + /** + * string event = 1; + * @return The event. + */ + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + event_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string event = 1; + * @return The bytes for event. + */ + public com.google.protobuf.ByteString + getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string event = 1; + * @param value The event to set. + * @return This builder for chaining. + */ + public Builder setEvent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + event_ = value; + onChanged(); + return this; + } + /** + * string event = 1; + * @return This builder for chaining. + */ + public Builder clearEvent() { + + event_ = getDefaultInstance().getEvent(); + onChanged(); + return this; + } + /** + * string event = 1; + * @param value The bytes for event to set. + * @return This builder for chaining. + */ + public Builder setEventBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + event_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:discovery.service.apkmgt.Request) + } + + // @@protoc_insertion_point(class_scope:discovery.service.apkmgt.Request) + private static final org.wso2.apk.enforcer.discovery.service.subscription.Request DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.service.subscription.Request(); + } + + public static org.wso2.apk.enforcer.discovery.service.subscription.Request getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Request parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Request(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.service.subscription.Request getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/RequestOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/RequestOrBuilder.java new file mode 100644 index 000000000..d4e1e8ad1 --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/service/subscription/RequestOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/service/apkmgt/eventds.proto + +package org.wso2.apk.enforcer.discovery.service.subscription; + +public interface RequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:discovery.service.apkmgt.Request) + com.google.protobuf.MessageOrBuilder { + + /** + * string event = 1; + * @return The event. + */ + java.lang.String getEvent(); + /** + * string event = 1; + * @return The bytes for event. + */ + com.google.protobuf.ByteString + getEventBytes(); +} diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Application.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Application.java index 907e16b6f..48b681eaa 100644 --- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Application.java +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Application.java @@ -23,6 +23,7 @@ private Application() { uuid_ = ""; name_ = ""; owner_ = ""; + organization_ = ""; } @java.lang.Override @@ -75,6 +76,12 @@ private Application( break; } case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + organization_ = s; + break; + } + case 42: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { attributes_ = com.google.protobuf.MapField.newMapField( AttributesDefaultEntryHolder.defaultEntry); @@ -116,7 +123,7 @@ private Application( protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { - case 4: + case 5: return internalGetAttributes(); default: throw new RuntimeException( @@ -245,7 +252,45 @@ public java.lang.String getOwner() { } } - public static final int ATTRIBUTES_FIELD_NUMBER = 4; + public static final int ORGANIZATION_FIELD_NUMBER = 4; + private volatile java.lang.Object organization_; + /** + * string organization = 4; + * @return The organization. + */ + @java.lang.Override + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organization_ = s; + return s; + } + } + /** + * string organization = 4; + * @return The bytes for organization. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 5; private static final class AttributesDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = @@ -272,7 +317,7 @@ public int getAttributesCount() { return internalGetAttributes().getMap().size(); } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ @java.lang.Override @@ -290,7 +335,7 @@ public java.util.Map getAttributes() { return getAttributesMap(); } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ @java.lang.Override @@ -298,7 +343,7 @@ public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ @java.lang.Override @@ -311,7 +356,7 @@ public java.lang.String getAttributesOrDefault( return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ @java.lang.Override @@ -349,12 +394,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!getOwnerBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, owner_); } + if (!getOrganizationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, organization_); + } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, - 4); + 5); unknownFields.writeTo(output); } @@ -373,6 +421,9 @@ public int getSerializedSize() { if (!getOwnerBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, owner_); } + if (!getOrganizationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, organization_); + } for (java.util.Map.Entry entry : internalGetAttributes().getMap().entrySet()) { com.google.protobuf.MapEntry @@ -381,7 +432,7 @@ public int getSerializedSize() { .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, attributes__); + .computeMessageSize(5, attributes__); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -404,6 +455,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getName())) return false; if (!getOwner() .equals(other.getOwner())) return false; + if (!getOrganization() + .equals(other.getOrganization())) return false; if (!internalGetAttributes().equals( other.internalGetAttributes())) return false; if (!unknownFields.equals(other.unknownFields)) return false; @@ -423,6 +476,8 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + OWNER_FIELD_NUMBER; hash = (53 * hash) + getOwner().hashCode(); + hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER; + hash = (53 * hash) + getOrganization().hashCode(); if (!internalGetAttributes().getMap().isEmpty()) { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); @@ -542,7 +597,7 @@ public static final class Builder extends protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { - case 4: + case 5: return internalGetAttributes(); default: throw new RuntimeException( @@ -553,7 +608,7 @@ protected com.google.protobuf.MapField internalGetMapField( protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { - case 4: + case 5: return internalGetMutableAttributes(); default: throw new RuntimeException( @@ -592,6 +647,8 @@ public Builder clear() { owner_ = ""; + organization_ = ""; + internalGetMutableAttributes().clear(); return this; } @@ -623,6 +680,7 @@ public org.wso2.apk.enforcer.discovery.subscription.Application buildPartial() { result.uuid_ = uuid_; result.name_ = name_; result.owner_ = owner_; + result.organization_ = organization_; result.attributes_ = internalGetAttributes(); result.attributes_.makeImmutable(); onBuilt(); @@ -685,6 +743,10 @@ public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.Applicatio owner_ = other.owner_; onChanged(); } + if (!other.getOrganization().isEmpty()) { + organization_ = other.organization_; + onChanged(); + } internalGetMutableAttributes().mergeFrom( other.internalGetAttributes()); this.mergeUnknownFields(other.unknownFields); @@ -945,6 +1007,82 @@ public Builder setOwnerBytes( return this; } + private java.lang.Object organization_ = ""; + /** + * string organization = 4; + * @return The organization. + */ + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organization_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string organization = 4; + * @return The bytes for organization. + */ + public com.google.protobuf.ByteString + getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string organization = 4; + * @param value The organization to set. + * @return This builder for chaining. + */ + public Builder setOrganization( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + organization_ = value; + onChanged(); + return this; + } + /** + * string organization = 4; + * @return This builder for chaining. + */ + public Builder clearOrganization() { + + organization_ = getDefaultInstance().getOrganization(); + onChanged(); + return this; + } + /** + * string organization = 4; + * @param value The bytes for organization to set. + * @return This builder for chaining. + */ + public Builder setOrganizationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + organization_ = value; + onChanged(); + return this; + } + private com.google.protobuf.MapField< java.lang.String, java.lang.String> attributes_; private com.google.protobuf.MapField @@ -972,7 +1110,7 @@ public int getAttributesCount() { return internalGetAttributes().getMap().size(); } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ @java.lang.Override @@ -990,7 +1128,7 @@ public java.util.Map getAttributes() { return getAttributesMap(); } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ @java.lang.Override @@ -998,7 +1136,7 @@ public java.util.Map getAttributesMap() { return internalGetAttributes().getMap(); } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ @java.lang.Override @@ -1011,7 +1149,7 @@ public java.lang.String getAttributesOrDefault( return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ @java.lang.Override @@ -1032,7 +1170,7 @@ public Builder clearAttributes() { return this; } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ public Builder removeAttributes( @@ -1051,7 +1189,7 @@ public Builder removeAttributes( return internalGetMutableAttributes().getMutableMap(); } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ public Builder putAttributes( java.lang.String key, @@ -1063,7 +1201,7 @@ public Builder putAttributes( return this; } /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ public Builder putAllAttributes( diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationKeyMappingProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationKeyMappingProto.java index 712e3f083..8eb2d71b9 100644 --- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationKeyMappingProto.java +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationKeyMappingProto.java @@ -34,11 +34,11 @@ public static void registerAllExtensions( "plicationUUID\030\001 \001(\t\022\026\n\016securityScheme\030\002 " + "\001(\t\022\035\n\025applicationIdentifier\030\003 \001(\t\022\017\n\007ke" + "yType\030\004 \001(\t\022\r\n\005envID\030\005 \001(\t\022\021\n\ttimestamp\030" + - "\006 \001(\003B\235\001\n,org.wso2.apk.enforcer.discover" + + "\006 \001(\003B\227\001\n,org.wso2.apk.enforcer.discover" + "y.subscriptionB\032ApplicationKeyMappingPro" + - "toP\001ZOgithub.com/envoyproxy/go-control-p" + - "lane/wso2/discovery/subscription;subscri" + - "ptionb\006proto3" + "toP\001ZIgithub.com/wso2/apk/adapter/pkg/di" + + "scovery/api/wso2/discovery/subscriptionb" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationMappingProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationMappingProto.java index acf005fed..16a0503f2 100644 --- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationMappingProto.java +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationMappingProto.java @@ -32,11 +32,11 @@ public static void registerAllExtensions( "nmapping.proto\022\033wso2.discovery.subscript" + "ion\"S\n\022ApplicationMapping\022\014\n\004uuid\030\001 \001(\t\022" + "\026\n\016applicationRef\030\002 \001(\t\022\027\n\017subscriptionR" + - "ef\030\003 \001(\tB\232\001\n,org.wso2.apk.enforcer.disco" + + "ef\030\003 \001(\tB\224\001\n,org.wso2.apk.enforcer.disco" + "very.subscriptionB\027ApplicationMappingPro" + - "toP\001ZOgithub.com/envoyproxy/go-control-p" + - "lane/wso2/discovery/subscription;subscri" + - "ptionb\006proto3" + "toP\001ZIgithub.com/wso2/apk/adapter/pkg/di" + + "scovery/api/wso2/discovery/subscriptionb" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationOrBuilder.java index df686382a..38bd96619 100644 --- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationOrBuilder.java +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationOrBuilder.java @@ -44,11 +44,23 @@ public interface ApplicationOrBuilder extends getOwnerBytes(); /** - * map<string, string> attributes = 4; + * string organization = 4; + * @return The organization. + */ + java.lang.String getOrganization(); + /** + * string organization = 4; + * @return The bytes for organization. + */ + com.google.protobuf.ByteString + getOrganizationBytes(); + + /** + * map<string, string> attributes = 5; */ int getAttributesCount(); /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ boolean containsAttributes( java.lang.String key); @@ -59,19 +71,19 @@ boolean containsAttributes( java.util.Map getAttributes(); /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ java.util.Map getAttributesMap(); /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ java.lang.String getAttributesOrDefault( java.lang.String key, java.lang.String defaultValue); /** - * map<string, string> attributes = 4; + * map<string, string> attributes = 5; */ java.lang.String getAttributesOrThrow( diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationProto.java index d4b5b129c..49d0be32a 100644 --- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationProto.java +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/ApplicationProto.java @@ -24,21 +24,6 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_wso2_discovery_subscription_Application_AttributesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_wso2_discovery_subscription_SecuritySchemes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_wso2_discovery_subscription_SecuritySchemes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_wso2_discovery_subscription_OAuth2_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_wso2_discovery_subscription_OAuth2_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_wso2_discovery_subscription_Environment_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_wso2_discovery_subscription_Environment_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -49,22 +34,16 @@ public static void registerAllExtensions( static { java.lang.String[] descriptorData = { "\n-wso2/discovery/subscription/applicatio" + - "n.proto\022\033wso2.discovery.subscription\"\271\001\n" + + "n.proto\022\033wso2.discovery.subscription\"\317\001\n" + "\013Application\022\014\n\004uuid\030\001 \001(\t\022\014\n\004name\030\002 \001(\t" + - "\022\r\n\005owner\030\003 \001(\t\022L\n\nattributes\030\004 \003(\01328.ws" + - "o2.discovery.subscription.Application.At" + - "tributesEntry\0321\n\017AttributesEntry\022\013\n\003key\030" + - "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"F\n\017SecuritySche" + - "mes\0223\n\006oAuth2\030\001 \001(\0132#.wso2.discovery.sub" + - "scription.OAuth2\"H\n\006OAuth2\022>\n\014environmen" + - "ts\030\001 \003(\0132(.wso2.discovery.subscription.E" + - "nvironment\"L\n\013Environment\022\r\n\005envID\030\001 \001(\t" + - "\022\035\n\025applicationIdentifier\030\002 \001(\t\022\017\n\007keyTy" + - "pe\030\003 \001(\tB\223\001\n,org.wso2.apk.enforcer.disco" + - "very.subscriptionB\020ApplicationProtoP\001ZOg" + - "ithub.com/envoyproxy/go-control-plane/ws" + - "o2/discovery/subscription;subscriptionb\006" + - "proto3" + "\022\r\n\005owner\030\003 \001(\t\022\024\n\014organization\030\004 \001(\t\022L\n" + + "\nattributes\030\005 \003(\01328.wso2.discovery.subsc" + + "ription.Application.AttributesEntry\0321\n\017A" + + "ttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001B\215\001\n,org.wso2.apk.enforcer.discove" + + "ry.subscriptionB\020ApplicationProtoP\001ZIgit" + + "hub.com/wso2/apk/adapter/pkg/discovery/a" + + "pi/wso2/discovery/subscriptionb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -75,31 +54,13 @@ public static void registerAllExtensions( internal_static_wso2_discovery_subscription_Application_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_wso2_discovery_subscription_Application_descriptor, - new java.lang.String[] { "Uuid", "Name", "Owner", "Attributes", }); + new java.lang.String[] { "Uuid", "Name", "Owner", "Organization", "Attributes", }); internal_static_wso2_discovery_subscription_Application_AttributesEntry_descriptor = internal_static_wso2_discovery_subscription_Application_descriptor.getNestedTypes().get(0); internal_static_wso2_discovery_subscription_Application_AttributesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_wso2_discovery_subscription_Application_AttributesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); - internal_static_wso2_discovery_subscription_SecuritySchemes_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_wso2_discovery_subscription_SecuritySchemes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_wso2_discovery_subscription_SecuritySchemes_descriptor, - new java.lang.String[] { "OAuth2", }); - internal_static_wso2_discovery_subscription_OAuth2_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_wso2_discovery_subscription_OAuth2_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_wso2_discovery_subscription_OAuth2_descriptor, - new java.lang.String[] { "Environments", }); - internal_static_wso2_discovery_subscription_Environment_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_wso2_discovery_subscription_Environment_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_wso2_discovery_subscription_Environment_descriptor, - new java.lang.String[] { "EnvID", "ApplicationIdentifier", "KeyType", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Event.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Event.java new file mode 100644 index 000000000..5cca96f54 --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/Event.java @@ -0,0 +1,1520 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/subscription/event.proto + +package org.wso2.apk.enforcer.discovery.subscription; + +/** + *
+ * Event data model
+ * 
+ * + * Protobuf type {@code wso2.discovery.subscription.Event} + */ +public final class Event extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:wso2.discovery.subscription.Event) + EventOrBuilder { +private static final long serialVersionUID = 0L; + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Event() { + uuid_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Event(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Event( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uuid_ = s; + break; + } + case 16: { + + timeStamp_ = input.readInt64(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 34: { + org.wso2.apk.enforcer.discovery.subscription.Application.Builder subBuilder = null; + if (application_ != null) { + subBuilder = application_.toBuilder(); + } + application_ = input.readMessage(org.wso2.apk.enforcer.discovery.subscription.Application.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(application_); + application_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.Builder subBuilder = null; + if (applicationMapping_ != null) { + subBuilder = applicationMapping_.toBuilder(); + } + applicationMapping_ = input.readMessage(org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(applicationMapping_); + applicationMapping_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.Builder subBuilder = null; + if (applicationKeyMapping_ != null) { + subBuilder = applicationKeyMapping_.toBuilder(); + } + applicationKeyMapping_ = input.readMessage(org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(applicationKeyMapping_); + applicationKeyMapping_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder subBuilder = null; + if (subscription_ != null) { + subBuilder = subscription_.toBuilder(); + } + subscription_ = input.readMessage(org.wso2.apk.enforcer.discovery.subscription.Subscription.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(subscription_); + subscription_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.wso2.apk.enforcer.discovery.subscription.EventProto.internal_static_wso2_discovery_subscription_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.wso2.apk.enforcer.discovery.subscription.EventProto.internal_static_wso2_discovery_subscription_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.wso2.apk.enforcer.discovery.subscription.Event.class, org.wso2.apk.enforcer.discovery.subscription.Event.Builder.class); + } + + public static final int UUID_FIELD_NUMBER = 1; + private volatile java.lang.Object uuid_; + /** + * string uuid = 1; + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } + } + /** + * string uuid = 1; + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMESTAMP_FIELD_NUMBER = 2; + private long timeStamp_; + /** + * int64 timeStamp = 2; + * @return The timeStamp. + */ + @java.lang.Override + public long getTimeStamp() { + return timeStamp_; + } + + public static final int TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object type_; + /** + * string type = 3; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * string type = 3; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_FIELD_NUMBER = 4; + private org.wso2.apk.enforcer.discovery.subscription.Application application_; + /** + * .wso2.discovery.subscription.Application application = 4; + * @return Whether the application field is set. + */ + @java.lang.Override + public boolean hasApplication() { + return application_ != null; + } + /** + * .wso2.discovery.subscription.Application application = 4; + * @return The application. + */ + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.Application getApplication() { + return application_ == null ? org.wso2.apk.enforcer.discovery.subscription.Application.getDefaultInstance() : application_; + } + /** + * .wso2.discovery.subscription.Application application = 4; + */ + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.ApplicationOrBuilder getApplicationOrBuilder() { + return getApplication(); + } + + public static final int APPLICATIONMAPPING_FIELD_NUMBER = 5; + private org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping applicationMapping_; + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + * @return Whether the applicationMapping field is set. + */ + @java.lang.Override + public boolean hasApplicationMapping() { + return applicationMapping_ != null; + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + * @return The applicationMapping. + */ + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping getApplicationMapping() { + return applicationMapping_ == null ? org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.getDefaultInstance() : applicationMapping_; + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + */ + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.ApplicationMappingOrBuilder getApplicationMappingOrBuilder() { + return getApplicationMapping(); + } + + public static final int APPLICATIONKEYMAPPING_FIELD_NUMBER = 6; + private org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping applicationKeyMapping_; + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + * @return Whether the applicationKeyMapping field is set. + */ + @java.lang.Override + public boolean hasApplicationKeyMapping() { + return applicationKeyMapping_ != null; + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + * @return The applicationKeyMapping. + */ + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping getApplicationKeyMapping() { + return applicationKeyMapping_ == null ? org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.getDefaultInstance() : applicationKeyMapping_; + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + */ + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMappingOrBuilder getApplicationKeyMappingOrBuilder() { + return getApplicationKeyMapping(); + } + + public static final int SUBSCRIPTION_FIELD_NUMBER = 7; + private org.wso2.apk.enforcer.discovery.subscription.Subscription subscription_; + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + * @return Whether the subscription field is set. + */ + @java.lang.Override + public boolean hasSubscription() { + return subscription_ != null; + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + * @return The subscription. + */ + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.Subscription getSubscription() { + return subscription_ == null ? org.wso2.apk.enforcer.discovery.subscription.Subscription.getDefaultInstance() : subscription_; + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + */ + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder getSubscriptionOrBuilder() { + return getSubscription(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getUuidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); + } + if (timeStamp_ != 0L) { + output.writeInt64(2, timeStamp_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + if (application_ != null) { + output.writeMessage(4, getApplication()); + } + if (applicationMapping_ != null) { + output.writeMessage(5, getApplicationMapping()); + } + if (applicationKeyMapping_ != null) { + output.writeMessage(6, getApplicationKeyMapping()); + } + if (subscription_ != null) { + output.writeMessage(7, getSubscription()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUuidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); + } + if (timeStamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, timeStamp_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + if (application_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getApplication()); + } + if (applicationMapping_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getApplicationMapping()); + } + if (applicationKeyMapping_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getApplicationKeyMapping()); + } + if (subscription_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getSubscription()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.wso2.apk.enforcer.discovery.subscription.Event)) { + return super.equals(obj); + } + org.wso2.apk.enforcer.discovery.subscription.Event other = (org.wso2.apk.enforcer.discovery.subscription.Event) obj; + + if (!getUuid() + .equals(other.getUuid())) return false; + if (getTimeStamp() + != other.getTimeStamp()) return false; + if (!getType() + .equals(other.getType())) return false; + if (hasApplication() != other.hasApplication()) return false; + if (hasApplication()) { + if (!getApplication() + .equals(other.getApplication())) return false; + } + if (hasApplicationMapping() != other.hasApplicationMapping()) return false; + if (hasApplicationMapping()) { + if (!getApplicationMapping() + .equals(other.getApplicationMapping())) return false; + } + if (hasApplicationKeyMapping() != other.hasApplicationKeyMapping()) return false; + if (hasApplicationKeyMapping()) { + if (!getApplicationKeyMapping() + .equals(other.getApplicationKeyMapping())) return false; + } + if (hasSubscription() != other.hasSubscription()) return false; + if (hasSubscription()) { + if (!getSubscription() + .equals(other.getSubscription())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimeStamp()); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (hasApplication()) { + hash = (37 * hash) + APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getApplication().hashCode(); + } + if (hasApplicationMapping()) { + hash = (37 * hash) + APPLICATIONMAPPING_FIELD_NUMBER; + hash = (53 * hash) + getApplicationMapping().hashCode(); + } + if (hasApplicationKeyMapping()) { + hash = (37 * hash) + APPLICATIONKEYMAPPING_FIELD_NUMBER; + hash = (53 * hash) + getApplicationKeyMapping().hashCode(); + } + if (hasSubscription()) { + hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getSubscription().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.wso2.apk.enforcer.discovery.subscription.Event parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.wso2.apk.enforcer.discovery.subscription.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Event data model
+   * 
+ * + * Protobuf type {@code wso2.discovery.subscription.Event} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:wso2.discovery.subscription.Event) + org.wso2.apk.enforcer.discovery.subscription.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.wso2.apk.enforcer.discovery.subscription.EventProto.internal_static_wso2_discovery_subscription_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.wso2.apk.enforcer.discovery.subscription.EventProto.internal_static_wso2_discovery_subscription_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.wso2.apk.enforcer.discovery.subscription.Event.class, org.wso2.apk.enforcer.discovery.subscription.Event.Builder.class); + } + + // Construct using org.wso2.apk.enforcer.discovery.subscription.Event.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uuid_ = ""; + + timeStamp_ = 0L; + + type_ = ""; + + if (applicationBuilder_ == null) { + application_ = null; + } else { + application_ = null; + applicationBuilder_ = null; + } + if (applicationMappingBuilder_ == null) { + applicationMapping_ = null; + } else { + applicationMapping_ = null; + applicationMappingBuilder_ = null; + } + if (applicationKeyMappingBuilder_ == null) { + applicationKeyMapping_ = null; + } else { + applicationKeyMapping_ = null; + applicationKeyMappingBuilder_ = null; + } + if (subscriptionBuilder_ == null) { + subscription_ = null; + } else { + subscription_ = null; + subscriptionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.wso2.apk.enforcer.discovery.subscription.EventProto.internal_static_wso2_discovery_subscription_Event_descriptor; + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.Event getDefaultInstanceForType() { + return org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance(); + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.Event build() { + org.wso2.apk.enforcer.discovery.subscription.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.Event buildPartial() { + org.wso2.apk.enforcer.discovery.subscription.Event result = new org.wso2.apk.enforcer.discovery.subscription.Event(this); + result.uuid_ = uuid_; + result.timeStamp_ = timeStamp_; + result.type_ = type_; + if (applicationBuilder_ == null) { + result.application_ = application_; + } else { + result.application_ = applicationBuilder_.build(); + } + if (applicationMappingBuilder_ == null) { + result.applicationMapping_ = applicationMapping_; + } else { + result.applicationMapping_ = applicationMappingBuilder_.build(); + } + if (applicationKeyMappingBuilder_ == null) { + result.applicationKeyMapping_ = applicationKeyMapping_; + } else { + result.applicationKeyMapping_ = applicationKeyMappingBuilder_.build(); + } + if (subscriptionBuilder_ == null) { + result.subscription_ = subscription_; + } else { + result.subscription_ = subscriptionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.wso2.apk.enforcer.discovery.subscription.Event) { + return mergeFrom((org.wso2.apk.enforcer.discovery.subscription.Event)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.wso2.apk.enforcer.discovery.subscription.Event other) { + if (other == org.wso2.apk.enforcer.discovery.subscription.Event.getDefaultInstance()) return this; + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + onChanged(); + } + if (other.getTimeStamp() != 0L) { + setTimeStamp(other.getTimeStamp()); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (other.hasApplication()) { + mergeApplication(other.getApplication()); + } + if (other.hasApplicationMapping()) { + mergeApplicationMapping(other.getApplicationMapping()); + } + if (other.hasApplicationKeyMapping()) { + mergeApplicationKeyMapping(other.getApplicationKeyMapping()); + } + if (other.hasSubscription()) { + mergeSubscription(other.getSubscription()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.wso2.apk.enforcer.discovery.subscription.Event parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.wso2.apk.enforcer.discovery.subscription.Event) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uuid_ = ""; + /** + * string uuid = 1; + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string uuid = 1; + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString + getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string uuid = 1; + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uuid_ = value; + onChanged(); + return this; + } + /** + * string uuid = 1; + * @return This builder for chaining. + */ + public Builder clearUuid() { + + uuid_ = getDefaultInstance().getUuid(); + onChanged(); + return this; + } + /** + * string uuid = 1; + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uuid_ = value; + onChanged(); + return this; + } + + private long timeStamp_ ; + /** + * int64 timeStamp = 2; + * @return The timeStamp. + */ + @java.lang.Override + public long getTimeStamp() { + return timeStamp_; + } + /** + * int64 timeStamp = 2; + * @param value The timeStamp to set. + * @return This builder for chaining. + */ + public Builder setTimeStamp(long value) { + + timeStamp_ = value; + onChanged(); + return this; + } + /** + * int64 timeStamp = 2; + * @return This builder for chaining. + */ + public Builder clearTimeStamp() { + + timeStamp_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * string type = 3; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string type = 3; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * string type = 3; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * string type = 3; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private org.wso2.apk.enforcer.discovery.subscription.Application application_; + private com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.Application, org.wso2.apk.enforcer.discovery.subscription.Application.Builder, org.wso2.apk.enforcer.discovery.subscription.ApplicationOrBuilder> applicationBuilder_; + /** + * .wso2.discovery.subscription.Application application = 4; + * @return Whether the application field is set. + */ + public boolean hasApplication() { + return applicationBuilder_ != null || application_ != null; + } + /** + * .wso2.discovery.subscription.Application application = 4; + * @return The application. + */ + public org.wso2.apk.enforcer.discovery.subscription.Application getApplication() { + if (applicationBuilder_ == null) { + return application_ == null ? org.wso2.apk.enforcer.discovery.subscription.Application.getDefaultInstance() : application_; + } else { + return applicationBuilder_.getMessage(); + } + } + /** + * .wso2.discovery.subscription.Application application = 4; + */ + public Builder setApplication(org.wso2.apk.enforcer.discovery.subscription.Application value) { + if (applicationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + application_ = value; + onChanged(); + } else { + applicationBuilder_.setMessage(value); + } + + return this; + } + /** + * .wso2.discovery.subscription.Application application = 4; + */ + public Builder setApplication( + org.wso2.apk.enforcer.discovery.subscription.Application.Builder builderForValue) { + if (applicationBuilder_ == null) { + application_ = builderForValue.build(); + onChanged(); + } else { + applicationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .wso2.discovery.subscription.Application application = 4; + */ + public Builder mergeApplication(org.wso2.apk.enforcer.discovery.subscription.Application value) { + if (applicationBuilder_ == null) { + if (application_ != null) { + application_ = + org.wso2.apk.enforcer.discovery.subscription.Application.newBuilder(application_).mergeFrom(value).buildPartial(); + } else { + application_ = value; + } + onChanged(); + } else { + applicationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .wso2.discovery.subscription.Application application = 4; + */ + public Builder clearApplication() { + if (applicationBuilder_ == null) { + application_ = null; + onChanged(); + } else { + application_ = null; + applicationBuilder_ = null; + } + + return this; + } + /** + * .wso2.discovery.subscription.Application application = 4; + */ + public org.wso2.apk.enforcer.discovery.subscription.Application.Builder getApplicationBuilder() { + + onChanged(); + return getApplicationFieldBuilder().getBuilder(); + } + /** + * .wso2.discovery.subscription.Application application = 4; + */ + public org.wso2.apk.enforcer.discovery.subscription.ApplicationOrBuilder getApplicationOrBuilder() { + if (applicationBuilder_ != null) { + return applicationBuilder_.getMessageOrBuilder(); + } else { + return application_ == null ? + org.wso2.apk.enforcer.discovery.subscription.Application.getDefaultInstance() : application_; + } + } + /** + * .wso2.discovery.subscription.Application application = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.Application, org.wso2.apk.enforcer.discovery.subscription.Application.Builder, org.wso2.apk.enforcer.discovery.subscription.ApplicationOrBuilder> + getApplicationFieldBuilder() { + if (applicationBuilder_ == null) { + applicationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.Application, org.wso2.apk.enforcer.discovery.subscription.Application.Builder, org.wso2.apk.enforcer.discovery.subscription.ApplicationOrBuilder>( + getApplication(), + getParentForChildren(), + isClean()); + application_ = null; + } + return applicationBuilder_; + } + + private org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping applicationMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping, org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.Builder, org.wso2.apk.enforcer.discovery.subscription.ApplicationMappingOrBuilder> applicationMappingBuilder_; + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + * @return Whether the applicationMapping field is set. + */ + public boolean hasApplicationMapping() { + return applicationMappingBuilder_ != null || applicationMapping_ != null; + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + * @return The applicationMapping. + */ + public org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping getApplicationMapping() { + if (applicationMappingBuilder_ == null) { + return applicationMapping_ == null ? org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.getDefaultInstance() : applicationMapping_; + } else { + return applicationMappingBuilder_.getMessage(); + } + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + */ + public Builder setApplicationMapping(org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping value) { + if (applicationMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + applicationMapping_ = value; + onChanged(); + } else { + applicationMappingBuilder_.setMessage(value); + } + + return this; + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + */ + public Builder setApplicationMapping( + org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.Builder builderForValue) { + if (applicationMappingBuilder_ == null) { + applicationMapping_ = builderForValue.build(); + onChanged(); + } else { + applicationMappingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + */ + public Builder mergeApplicationMapping(org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping value) { + if (applicationMappingBuilder_ == null) { + if (applicationMapping_ != null) { + applicationMapping_ = + org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.newBuilder(applicationMapping_).mergeFrom(value).buildPartial(); + } else { + applicationMapping_ = value; + } + onChanged(); + } else { + applicationMappingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + */ + public Builder clearApplicationMapping() { + if (applicationMappingBuilder_ == null) { + applicationMapping_ = null; + onChanged(); + } else { + applicationMapping_ = null; + applicationMappingBuilder_ = null; + } + + return this; + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + */ + public org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.Builder getApplicationMappingBuilder() { + + onChanged(); + return getApplicationMappingFieldBuilder().getBuilder(); + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + */ + public org.wso2.apk.enforcer.discovery.subscription.ApplicationMappingOrBuilder getApplicationMappingOrBuilder() { + if (applicationMappingBuilder_ != null) { + return applicationMappingBuilder_.getMessageOrBuilder(); + } else { + return applicationMapping_ == null ? + org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.getDefaultInstance() : applicationMapping_; + } + } + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping, org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.Builder, org.wso2.apk.enforcer.discovery.subscription.ApplicationMappingOrBuilder> + getApplicationMappingFieldBuilder() { + if (applicationMappingBuilder_ == null) { + applicationMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping, org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping.Builder, org.wso2.apk.enforcer.discovery.subscription.ApplicationMappingOrBuilder>( + getApplicationMapping(), + getParentForChildren(), + isClean()); + applicationMapping_ = null; + } + return applicationMappingBuilder_; + } + + private org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping applicationKeyMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping, org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.Builder, org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMappingOrBuilder> applicationKeyMappingBuilder_; + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + * @return Whether the applicationKeyMapping field is set. + */ + public boolean hasApplicationKeyMapping() { + return applicationKeyMappingBuilder_ != null || applicationKeyMapping_ != null; + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + * @return The applicationKeyMapping. + */ + public org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping getApplicationKeyMapping() { + if (applicationKeyMappingBuilder_ == null) { + return applicationKeyMapping_ == null ? org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.getDefaultInstance() : applicationKeyMapping_; + } else { + return applicationKeyMappingBuilder_.getMessage(); + } + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + */ + public Builder setApplicationKeyMapping(org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping value) { + if (applicationKeyMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + applicationKeyMapping_ = value; + onChanged(); + } else { + applicationKeyMappingBuilder_.setMessage(value); + } + + return this; + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + */ + public Builder setApplicationKeyMapping( + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.Builder builderForValue) { + if (applicationKeyMappingBuilder_ == null) { + applicationKeyMapping_ = builderForValue.build(); + onChanged(); + } else { + applicationKeyMappingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + */ + public Builder mergeApplicationKeyMapping(org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping value) { + if (applicationKeyMappingBuilder_ == null) { + if (applicationKeyMapping_ != null) { + applicationKeyMapping_ = + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.newBuilder(applicationKeyMapping_).mergeFrom(value).buildPartial(); + } else { + applicationKeyMapping_ = value; + } + onChanged(); + } else { + applicationKeyMappingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + */ + public Builder clearApplicationKeyMapping() { + if (applicationKeyMappingBuilder_ == null) { + applicationKeyMapping_ = null; + onChanged(); + } else { + applicationKeyMapping_ = null; + applicationKeyMappingBuilder_ = null; + } + + return this; + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + */ + public org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.Builder getApplicationKeyMappingBuilder() { + + onChanged(); + return getApplicationKeyMappingFieldBuilder().getBuilder(); + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + */ + public org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMappingOrBuilder getApplicationKeyMappingOrBuilder() { + if (applicationKeyMappingBuilder_ != null) { + return applicationKeyMappingBuilder_.getMessageOrBuilder(); + } else { + return applicationKeyMapping_ == null ? + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.getDefaultInstance() : applicationKeyMapping_; + } + } + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping, org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.Builder, org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMappingOrBuilder> + getApplicationKeyMappingFieldBuilder() { + if (applicationKeyMappingBuilder_ == null) { + applicationKeyMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping, org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping.Builder, org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMappingOrBuilder>( + getApplicationKeyMapping(), + getParentForChildren(), + isClean()); + applicationKeyMapping_ = null; + } + return applicationKeyMappingBuilder_; + } + + private org.wso2.apk.enforcer.discovery.subscription.Subscription subscription_; + private com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.Subscription, org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder, org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder> subscriptionBuilder_; + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + * @return Whether the subscription field is set. + */ + public boolean hasSubscription() { + return subscriptionBuilder_ != null || subscription_ != null; + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + * @return The subscription. + */ + public org.wso2.apk.enforcer.discovery.subscription.Subscription getSubscription() { + if (subscriptionBuilder_ == null) { + return subscription_ == null ? org.wso2.apk.enforcer.discovery.subscription.Subscription.getDefaultInstance() : subscription_; + } else { + return subscriptionBuilder_.getMessage(); + } + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + */ + public Builder setSubscription(org.wso2.apk.enforcer.discovery.subscription.Subscription value) { + if (subscriptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subscription_ = value; + onChanged(); + } else { + subscriptionBuilder_.setMessage(value); + } + + return this; + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + */ + public Builder setSubscription( + org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder builderForValue) { + if (subscriptionBuilder_ == null) { + subscription_ = builderForValue.build(); + onChanged(); + } else { + subscriptionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + */ + public Builder mergeSubscription(org.wso2.apk.enforcer.discovery.subscription.Subscription value) { + if (subscriptionBuilder_ == null) { + if (subscription_ != null) { + subscription_ = + org.wso2.apk.enforcer.discovery.subscription.Subscription.newBuilder(subscription_).mergeFrom(value).buildPartial(); + } else { + subscription_ = value; + } + onChanged(); + } else { + subscriptionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + */ + public Builder clearSubscription() { + if (subscriptionBuilder_ == null) { + subscription_ = null; + onChanged(); + } else { + subscription_ = null; + subscriptionBuilder_ = null; + } + + return this; + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + */ + public org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder getSubscriptionBuilder() { + + onChanged(); + return getSubscriptionFieldBuilder().getBuilder(); + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + */ + public org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder getSubscriptionOrBuilder() { + if (subscriptionBuilder_ != null) { + return subscriptionBuilder_.getMessageOrBuilder(); + } else { + return subscription_ == null ? + org.wso2.apk.enforcer.discovery.subscription.Subscription.getDefaultInstance() : subscription_; + } + } + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.Subscription, org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder, org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder> + getSubscriptionFieldBuilder() { + if (subscriptionBuilder_ == null) { + subscriptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.wso2.apk.enforcer.discovery.subscription.Subscription, org.wso2.apk.enforcer.discovery.subscription.Subscription.Builder, org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder>( + getSubscription(), + getParentForChildren(), + isClean()); + subscription_ = null; + } + return subscriptionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:wso2.discovery.subscription.Event) + } + + // @@protoc_insertion_point(class_scope:wso2.discovery.subscription.Event) + private static final org.wso2.apk.enforcer.discovery.subscription.Event DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.wso2.apk.enforcer.discovery.subscription.Event(); + } + + public static org.wso2.apk.enforcer.discovery.subscription.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Event(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.wso2.apk.enforcer.discovery.subscription.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EventOrBuilder.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EventOrBuilder.java new file mode 100644 index 000000000..8f693067f --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EventOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/subscription/event.proto + +package org.wso2.apk.enforcer.discovery.subscription; + +public interface EventOrBuilder extends + // @@protoc_insertion_point(interface_extends:wso2.discovery.subscription.Event) + com.google.protobuf.MessageOrBuilder { + + /** + * string uuid = 1; + * @return The uuid. + */ + java.lang.String getUuid(); + /** + * string uuid = 1; + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString + getUuidBytes(); + + /** + * int64 timeStamp = 2; + * @return The timeStamp. + */ + long getTimeStamp(); + + /** + * string type = 3; + * @return The type. + */ + java.lang.String getType(); + /** + * string type = 3; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * .wso2.discovery.subscription.Application application = 4; + * @return Whether the application field is set. + */ + boolean hasApplication(); + /** + * .wso2.discovery.subscription.Application application = 4; + * @return The application. + */ + org.wso2.apk.enforcer.discovery.subscription.Application getApplication(); + /** + * .wso2.discovery.subscription.Application application = 4; + */ + org.wso2.apk.enforcer.discovery.subscription.ApplicationOrBuilder getApplicationOrBuilder(); + + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + * @return Whether the applicationMapping field is set. + */ + boolean hasApplicationMapping(); + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + * @return The applicationMapping. + */ + org.wso2.apk.enforcer.discovery.subscription.ApplicationMapping getApplicationMapping(); + /** + * .wso2.discovery.subscription.ApplicationMapping applicationMapping = 5; + */ + org.wso2.apk.enforcer.discovery.subscription.ApplicationMappingOrBuilder getApplicationMappingOrBuilder(); + + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + * @return Whether the applicationKeyMapping field is set. + */ + boolean hasApplicationKeyMapping(); + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + * @return The applicationKeyMapping. + */ + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMapping getApplicationKeyMapping(); + /** + * .wso2.discovery.subscription.ApplicationKeyMapping applicationKeyMapping = 6; + */ + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMappingOrBuilder getApplicationKeyMappingOrBuilder(); + + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + * @return Whether the subscription field is set. + */ + boolean hasSubscription(); + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + * @return The subscription. + */ + org.wso2.apk.enforcer.discovery.subscription.Subscription getSubscription(); + /** + * .wso2.discovery.subscription.Subscription subscription = 7; + */ + org.wso2.apk.enforcer.discovery.subscription.SubscriptionOrBuilder getSubscriptionOrBuilder(); +} diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EventProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EventProto.java new file mode 100644 index 000000000..7c794cb2e --- /dev/null +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/EventProto.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wso2/discovery/subscription/event.proto + +package org.wso2.apk.enforcer.discovery.subscription; + +public final class EventProto { + private EventProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_wso2_discovery_subscription_Event_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_wso2_discovery_subscription_Event_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\'wso2/discovery/subscription/event.prot" + + "o\022\033wso2.discovery.subscription\032-wso2/dis" + + "covery/subscription/application.proto\0324w" + + "so2/discovery/subscription/applicationma" + + "pping.proto\0329wso2/discovery/subscription" + + "/application_key_mapping.proto\032.wso2/dis" + + "covery/subscription/subscription.proto\"\326" + + "\002\n\005Event\022\014\n\004uuid\030\001 \001(\t\022\021\n\ttimeStamp\030\002 \001(" + + "\003\022\014\n\004type\030\003 \001(\t\022=\n\013application\030\004 \001(\0132(.w" + + "so2.discovery.subscription.Application\022K" + + "\n\022applicationMapping\030\005 \001(\0132/.wso2.discov" + + "ery.subscription.ApplicationMapping\022Q\n\025a" + + "pplicationKeyMapping\030\006 \001(\01322.wso2.discov" + + "ery.subscription.ApplicationKeyMapping\022?" + + "\n\014subscription\030\007 \001(\0132).wso2.discovery.su" + + "bscription.SubscriptionB\207\001\n,org.wso2.apk" + + ".enforcer.discovery.subscriptionB\nEventP" + + "rotoP\001ZIgithub.com/wso2/apk/adapter/pkg/" + + "discovery/api/wso2/discovery/subscriptio" + + "nb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.getDescriptor(), + org.wso2.apk.enforcer.discovery.subscription.ApplicationMappingProto.getDescriptor(), + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMappingProto.getDescriptor(), + org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.getDescriptor(), + }); + internal_static_wso2_discovery_subscription_Event_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_wso2_discovery_subscription_Event_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_wso2_discovery_subscription_Event_descriptor, + new java.lang.String[] { "Uuid", "TimeStamp", "Type", "Application", "ApplicationMapping", "ApplicationKeyMapping", "Subscription", }); + org.wso2.apk.enforcer.discovery.subscription.ApplicationProto.getDescriptor(); + org.wso2.apk.enforcer.discovery.subscription.ApplicationMappingProto.getDescriptor(); + org.wso2.apk.enforcer.discovery.subscription.ApplicationKeyMappingProto.getDescriptor(); + org.wso2.apk.enforcer.discovery.subscription.SubscriptionProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionProto.java b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionProto.java index 5bd30b302..d8fe93be3 100644 --- a/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionProto.java +++ b/gateway/enforcer/org.wso2.apk.enforcer/src/main/java/org/wso2/apk/enforcer/discovery/subscription/SubscriptionProto.java @@ -39,11 +39,11 @@ public static void registerAllExtensions( "d\030\002 \001(\t\022\024\n\014organization\030\003 \001(\t\022A\n\rsubscri" + "bedApi\030\004 \001(\0132*.wso2.discovery.subscripti" + "on.SubscribedAPI\".\n\rSubscribedAPI\022\014\n\004nam" + - "e\030\001 \001(\t\022\017\n\007version\030\002 \001(\tB\224\001\n,org.wso2.ap" + + "e\030\001 \001(\t\022\017\n\007version\030\002 \001(\tB\216\001\n,org.wso2.ap" + "k.enforcer.discovery.subscriptionB\021Subsc" + - "riptionProtoP\001ZOgithub.com/envoyproxy/go" + - "-control-plane/wso2/discovery/subscripti" + - "on;subscriptionb\006proto3" + "riptionProtoP\001ZIgithub.com/wso2/apk/adap" + + "ter/pkg/discovery/api/wso2/discovery/sub" + + "scriptionb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/helm-charts/values.yaml b/helm-charts/values.yaml index 7c52d2566..41fd0df10 100644 --- a/helm-charts/values.yaml +++ b/helm-charts/values.yaml @@ -245,8 +245,8 @@ wso2: failureThreshold: 5 strategy: RollingUpdate replicas: 1 - imagePullPolicy: Always - image: wso2/apk-common-controller:latest + imagePullPolicy: IfNotPresent + image: apk-common-controller:1.0.0-SNAPSHOT security: sslHostname: "commoncontroller" # configs: @@ -333,8 +333,8 @@ wso2: periodSeconds: 20 failureThreshold: 5 strategy: RollingUpdate - imagePullPolicy: Always - image: wso2/apk-enforcer:latest + imagePullPolicy: IfNotPresent + image: apk-enforcer:1.0.0-SNAPSHOT security: sslHostname: "enforcer" # logging: