elimity-insights-sdk 1.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elimity/__init__.py +0 -0
- elimity/__init__.pyi +1 -0
- elimity/insights/__init__.py +0 -0
- elimity/insights/__init__.pyi +3 -0
- elimity/insights/common/__init__.py +0 -0
- elimity/insights/common/__init__.pyi +1 -0
- elimity/insights/common/v1alpha1/__init__.py +0 -0
- elimity/insights/common/v1alpha1/__init__.pyi +1 -0
- elimity/insights/common/v1alpha1/common.pb.go +494 -0
- elimity/insights/common/v1alpha1/common_pb.ts +138 -0
- elimity/insights/common/v1alpha1/common_pb2.py +50 -0
- elimity/insights/common/v1alpha1/common_pb2.pyi +63 -0
- elimity/insights/customgateway/__init__.py +0 -0
- elimity/insights/customgateway/__init__.pyi +1 -0
- elimity/insights/customgateway/v1alpha1/__init__.py +0 -0
- elimity/insights/customgateway/v1alpha1/__init__.pyi +2 -0
- elimity/insights/customgateway/v1alpha1/customgateway.pb.go +504 -0
- elimity/insights/customgateway/v1alpha1/customgateway_connect.py +119 -0
- elimity/insights/customgateway/v1alpha1/customgateway_pb.ts +136 -0
- elimity/insights/customgateway/v1alpha1/customgateway_pb2.py +52 -0
- elimity/insights/customgateway/v1alpha1/customgateway_pb2.pyi +48 -0
- elimity/insights/customgateway/v1alpha1/v1alpha1connect/__init__.py +0 -0
- elimity/insights/customgateway/v1alpha1/v1alpha1connect/__init__.pyi +0 -0
- elimity/insights/customgateway/v1alpha1/v1alpha1connect/customgateway.connect.go +113 -0
- elimity/insights/export/__init__.py +0 -0
- elimity/insights/export/__init__.pyi +1 -0
- elimity/insights/export/v1alpha1/__init__.py +0 -0
- elimity/insights/export/v1alpha1/__init__.pyi +2 -0
- elimity/insights/export/v1alpha1/export.pb.go +635 -0
- elimity/insights/export/v1alpha1/export_connect.py +119 -0
- elimity/insights/export/v1alpha1/export_pb.ts +182 -0
- elimity/insights/export/v1alpha1/export_pb2.py +50 -0
- elimity/insights/export/v1alpha1/export_pb2.pyi +57 -0
- elimity/insights/export/v1alpha1/v1alpha1connect/__init__.py +0 -0
- elimity/insights/export/v1alpha1/v1alpha1connect/__init__.pyi +0 -0
- elimity/insights/export/v1alpha1/v1alpha1connect/export.connect.go +112 -0
- elimity/py.typed +0 -0
- elimity_insights_sdk/__init__.py +31 -0
- elimity_insights_sdk/_sdk.py +190 -0
- elimity_insights_sdk/py.typed +0 -0
- elimity_insights_sdk-1.1.1.dist-info/METADATA +13 -0
- elimity_insights_sdk-1.1.1.dist-info/RECORD +44 -0
- elimity_insights_sdk-1.1.1.dist-info/WHEEL +4 -0
- elimity_insights_sdk-1.1.1.dist-info/licenses/LICENSE.txt +201 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
|
|
3
|
+
# source: elimity/insights/customgateway/v1alpha1/customgateway.proto
|
|
4
|
+
|
|
5
|
+
from collections.abc import AsyncIterator, Iterable, Iterator, Mapping
|
|
6
|
+
from typing import Protocol
|
|
7
|
+
|
|
8
|
+
from connectrpc.client import ConnectClient, ConnectClientSync
|
|
9
|
+
from connectrpc.code import Code
|
|
10
|
+
from connectrpc.errors import ConnectError
|
|
11
|
+
from connectrpc.interceptor import Interceptor, InterceptorSync
|
|
12
|
+
from connectrpc.method import IdempotencyLevel, MethodInfo
|
|
13
|
+
from connectrpc.request import Headers, RequestContext
|
|
14
|
+
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
|
|
15
|
+
import elimity.insights.customgateway.v1alpha1.customgateway_pb2 as elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Service(Protocol):
|
|
19
|
+
def perform_import(self, request: elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportRequest, ctx: RequestContext) -> AsyncIterator[elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportResponse]:
|
|
20
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ServiceASGIApplication(ConnectASGIApplication):
|
|
24
|
+
def __init__(self, service: Service, *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
|
|
25
|
+
super().__init__(
|
|
26
|
+
endpoints={
|
|
27
|
+
"/elimity.insights.customgateway.v1alpha1.Service/PerformImport": Endpoint.server_stream(
|
|
28
|
+
method=MethodInfo(
|
|
29
|
+
name="PerformImport",
|
|
30
|
+
service_name="elimity.insights.customgateway.v1alpha1.Service",
|
|
31
|
+
input=elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportRequest,
|
|
32
|
+
output=elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportResponse,
|
|
33
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
34
|
+
),
|
|
35
|
+
function=service.perform_import,
|
|
36
|
+
),
|
|
37
|
+
},
|
|
38
|
+
interceptors=interceptors,
|
|
39
|
+
read_max_bytes=read_max_bytes,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def path(self) -> str:
|
|
44
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
45
|
+
return "/elimity.insights.customgateway.v1alpha1.Service"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class ServiceClient(ConnectClient):
|
|
49
|
+
def perform_import(
|
|
50
|
+
self,
|
|
51
|
+
request: elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportRequest,
|
|
52
|
+
*,
|
|
53
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
54
|
+
timeout_ms: int | None = None,
|
|
55
|
+
) -> AsyncIterator[elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportResponse]:
|
|
56
|
+
return self.execute_server_stream(
|
|
57
|
+
request=request,
|
|
58
|
+
method=MethodInfo(
|
|
59
|
+
name="PerformImport",
|
|
60
|
+
service_name="elimity.insights.customgateway.v1alpha1.Service",
|
|
61
|
+
input=elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportRequest,
|
|
62
|
+
output=elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportResponse,
|
|
63
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
64
|
+
),
|
|
65
|
+
headers=headers,
|
|
66
|
+
timeout_ms=timeout_ms,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class ServiceSync(Protocol):
|
|
71
|
+
def perform_import(self, request: elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportRequest, ctx: RequestContext) -> Iterator[elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportResponse]:
|
|
72
|
+
raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class ServiceWSGIApplication(ConnectWSGIApplication):
|
|
76
|
+
def __init__(self, service: ServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
|
|
77
|
+
super().__init__(
|
|
78
|
+
endpoints={
|
|
79
|
+
"/elimity.insights.customgateway.v1alpha1.Service/PerformImport": EndpointSync.server_stream(
|
|
80
|
+
method=MethodInfo(
|
|
81
|
+
name="PerformImport",
|
|
82
|
+
service_name="elimity.insights.customgateway.v1alpha1.Service",
|
|
83
|
+
input=elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportRequest,
|
|
84
|
+
output=elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportResponse,
|
|
85
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
86
|
+
),
|
|
87
|
+
function=service.perform_import,
|
|
88
|
+
),
|
|
89
|
+
},
|
|
90
|
+
interceptors=interceptors,
|
|
91
|
+
read_max_bytes=read_max_bytes,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def path(self) -> str:
|
|
96
|
+
"""Returns the URL path to mount the application to when serving multiple applications."""
|
|
97
|
+
return "/elimity.insights.customgateway.v1alpha1.Service"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class ServiceClientSync(ConnectClientSync):
|
|
101
|
+
def perform_import(
|
|
102
|
+
self,
|
|
103
|
+
request: elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportRequest,
|
|
104
|
+
*,
|
|
105
|
+
headers: Headers | Mapping[str, str] | None = None,
|
|
106
|
+
timeout_ms: int | None = None,
|
|
107
|
+
) -> Iterator[elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportResponse]:
|
|
108
|
+
return self.execute_server_stream(
|
|
109
|
+
request=request,
|
|
110
|
+
method=MethodInfo(
|
|
111
|
+
name="PerformImport",
|
|
112
|
+
service_name="elimity.insights.customgateway.v1alpha1.Service",
|
|
113
|
+
input=elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportRequest,
|
|
114
|
+
output=elimity_dot_insights_dot_customgateway_dot_v1alpha1_dot_customgateway__pb2.PerformImportResponse,
|
|
115
|
+
idempotency_level=IdempotencyLevel.UNKNOWN,
|
|
116
|
+
),
|
|
117
|
+
headers=headers,
|
|
118
|
+
timeout_ms=timeout_ms,
|
|
119
|
+
)
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "import_extension=js,target=ts"
|
|
2
|
+
// @generated from file elimity/insights/customgateway/v1alpha1/customgateway.proto (package elimity.insights.customgateway.v1alpha1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
6
|
+
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
7
|
+
import type { Entity, Relationship } from "../../common/v1alpha1/common_pb.js";
|
|
8
|
+
import { file_elimity_insights_common_v1alpha1_common } from "../../common/v1alpha1/common_pb.js";
|
|
9
|
+
import type { Empty, Value } from "@bufbuild/protobuf/wkt";
|
|
10
|
+
import { file_google_protobuf_empty, file_google_protobuf_struct } from "@bufbuild/protobuf/wkt";
|
|
11
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Describes the file elimity/insights/customgateway/v1alpha1/customgateway.proto.
|
|
15
|
+
*/
|
|
16
|
+
export const file_elimity_insights_customgateway_v1alpha1_customgateway: GenFile = /*@__PURE__*/
|
|
17
|
+
fileDesc("CjtlbGltaXR5L2luc2lnaHRzL2N1c3RvbWdhdGV3YXkvdjFhbHBoYTEvY3VzdG9tZ2F0ZXdheS5wcm90bxInZWxpbWl0eS5pbnNpZ2h0cy5jdXN0b21nYXRld2F5LnYxYWxwaGExImEKBUxldmVsEicKBWFsZXJ0GAEgASgLMhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5SAASJgoEaW5mbxgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eUgAQgcKBXZhbHVlIlUKA0xvZxI9CgVsZXZlbBgBIAEoCzIuLmVsaW1pdHkuaW5zaWdodHMuY3VzdG9tZ2F0ZXdheS52MWFscGhhMS5MZXZlbBIPCgdtZXNzYWdlGAIgASgJIrgBChRQZXJmb3JtSW1wb3J0UmVxdWVzdBJZCgZmaWVsZHMYASADKAsySS5lbGltaXR5Lmluc2lnaHRzLmN1c3RvbWdhdGV3YXkudjFhbHBoYTEuUGVyZm9ybUltcG9ydFJlcXVlc3QuRmllbGRzRW50cnkaRQoLRmllbGRzRW50cnkSCwoDa2V5GAEgASgJEiUKBXZhbHVlGAIgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlOgI4ASLhAQoVUGVyZm9ybUltcG9ydFJlc3BvbnNlEjoKBmVudGl0eRgBIAEoCzIoLmVsaW1pdHkuaW5zaWdodHMuY29tbW9uLnYxYWxwaGExLkVudGl0eUgAEjsKA2xvZxgCIAEoCzIsLmVsaW1pdHkuaW5zaWdodHMuY3VzdG9tZ2F0ZXdheS52MWFscGhhMS5Mb2dIABJGCgxyZWxhdGlvbnNoaXAYAyABKAsyLi5lbGltaXR5Lmluc2lnaHRzLmNvbW1vbi52MWFscGhhMS5SZWxhdGlvbnNoaXBIAEIHCgV2YWx1ZTKcAQoHU2VydmljZRKQAQoNUGVyZm9ybUltcG9ydBI9LmVsaW1pdHkuaW5zaWdodHMuY3VzdG9tZ2F0ZXdheS52MWFscGhhMS5QZXJmb3JtSW1wb3J0UmVxdWVzdBo+LmVsaW1pdHkuaW5zaWdodHMuY3VzdG9tZ2F0ZXdheS52MWFscGhhMS5QZXJmb3JtSW1wb3J0UmVzcG9uc2UwAUJRWk9naXRodWIuY29tL2VsaW1pdHktY29tL2luc2lnaHRzLXNkay9nZW4vZWxpbWl0eS9pbnNpZ2h0cy9jdXN0b21nYXRld2F5L3YxYWxwaGExYgZwcm90bzM", [file_elimity_insights_common_v1alpha1_common, file_google_protobuf_empty, file_google_protobuf_struct]);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @generated from message elimity.insights.customgateway.v1alpha1.Level
|
|
21
|
+
*/
|
|
22
|
+
export type Level = Message<"elimity.insights.customgateway.v1alpha1.Level"> & {
|
|
23
|
+
/**
|
|
24
|
+
* @generated from oneof elimity.insights.customgateway.v1alpha1.Level.value
|
|
25
|
+
*/
|
|
26
|
+
value: {
|
|
27
|
+
/**
|
|
28
|
+
* @generated from field: google.protobuf.Empty alert = 1;
|
|
29
|
+
*/
|
|
30
|
+
value: Empty;
|
|
31
|
+
case: "alert";
|
|
32
|
+
} | {
|
|
33
|
+
/**
|
|
34
|
+
* @generated from field: google.protobuf.Empty info = 2;
|
|
35
|
+
*/
|
|
36
|
+
value: Empty;
|
|
37
|
+
case: "info";
|
|
38
|
+
} | { case: undefined; value?: undefined };
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Describes the message elimity.insights.customgateway.v1alpha1.Level.
|
|
43
|
+
* Use `create(LevelSchema)` to create a new message.
|
|
44
|
+
*/
|
|
45
|
+
export const LevelSchema: GenMessage<Level> = /*@__PURE__*/
|
|
46
|
+
messageDesc(file_elimity_insights_customgateway_v1alpha1_customgateway, 0);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @generated from message elimity.insights.customgateway.v1alpha1.Log
|
|
50
|
+
*/
|
|
51
|
+
export type Log = Message<"elimity.insights.customgateway.v1alpha1.Log"> & {
|
|
52
|
+
/**
|
|
53
|
+
* @generated from field: elimity.insights.customgateway.v1alpha1.Level level = 1;
|
|
54
|
+
*/
|
|
55
|
+
level?: Level;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @generated from field: string message = 2;
|
|
59
|
+
*/
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Describes the message elimity.insights.customgateway.v1alpha1.Log.
|
|
65
|
+
* Use `create(LogSchema)` to create a new message.
|
|
66
|
+
*/
|
|
67
|
+
export const LogSchema: GenMessage<Log> = /*@__PURE__*/
|
|
68
|
+
messageDesc(file_elimity_insights_customgateway_v1alpha1_customgateway, 1);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @generated from message elimity.insights.customgateway.v1alpha1.PerformImportRequest
|
|
72
|
+
*/
|
|
73
|
+
export type PerformImportRequest = Message<"elimity.insights.customgateway.v1alpha1.PerformImportRequest"> & {
|
|
74
|
+
/**
|
|
75
|
+
* @generated from field: map<string, google.protobuf.Value> fields = 1;
|
|
76
|
+
*/
|
|
77
|
+
fields: { [key: string]: Value };
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Describes the message elimity.insights.customgateway.v1alpha1.PerformImportRequest.
|
|
82
|
+
* Use `create(PerformImportRequestSchema)` to create a new message.
|
|
83
|
+
*/
|
|
84
|
+
export const PerformImportRequestSchema: GenMessage<PerformImportRequest> = /*@__PURE__*/
|
|
85
|
+
messageDesc(file_elimity_insights_customgateway_v1alpha1_customgateway, 2);
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @generated from message elimity.insights.customgateway.v1alpha1.PerformImportResponse
|
|
89
|
+
*/
|
|
90
|
+
export type PerformImportResponse = Message<"elimity.insights.customgateway.v1alpha1.PerformImportResponse"> & {
|
|
91
|
+
/**
|
|
92
|
+
* @generated from oneof elimity.insights.customgateway.v1alpha1.PerformImportResponse.value
|
|
93
|
+
*/
|
|
94
|
+
value: {
|
|
95
|
+
/**
|
|
96
|
+
* @generated from field: elimity.insights.common.v1alpha1.Entity entity = 1;
|
|
97
|
+
*/
|
|
98
|
+
value: Entity;
|
|
99
|
+
case: "entity";
|
|
100
|
+
} | {
|
|
101
|
+
/**
|
|
102
|
+
* @generated from field: elimity.insights.customgateway.v1alpha1.Log log = 2;
|
|
103
|
+
*/
|
|
104
|
+
value: Log;
|
|
105
|
+
case: "log";
|
|
106
|
+
} | {
|
|
107
|
+
/**
|
|
108
|
+
* @generated from field: elimity.insights.common.v1alpha1.Relationship relationship = 3;
|
|
109
|
+
*/
|
|
110
|
+
value: Relationship;
|
|
111
|
+
case: "relationship";
|
|
112
|
+
} | { case: undefined; value?: undefined };
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Describes the message elimity.insights.customgateway.v1alpha1.PerformImportResponse.
|
|
117
|
+
* Use `create(PerformImportResponseSchema)` to create a new message.
|
|
118
|
+
*/
|
|
119
|
+
export const PerformImportResponseSchema: GenMessage<PerformImportResponse> = /*@__PURE__*/
|
|
120
|
+
messageDesc(file_elimity_insights_customgateway_v1alpha1_customgateway, 3);
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @generated from service elimity.insights.customgateway.v1alpha1.Service
|
|
124
|
+
*/
|
|
125
|
+
export const Service: GenService<{
|
|
126
|
+
/**
|
|
127
|
+
* @generated from rpc elimity.insights.customgateway.v1alpha1.Service.PerformImport
|
|
128
|
+
*/
|
|
129
|
+
performImport: {
|
|
130
|
+
methodKind: "server_streaming";
|
|
131
|
+
input: typeof PerformImportRequestSchema;
|
|
132
|
+
output: typeof PerformImportResponseSchema;
|
|
133
|
+
},
|
|
134
|
+
}> = /*@__PURE__*/
|
|
135
|
+
serviceDesc(file_elimity_insights_customgateway_v1alpha1_customgateway, 0);
|
|
136
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: elimity/insights/customgateway/v1alpha1/customgateway.proto
|
|
5
|
+
# Protobuf Python Version: 5.29.5
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
29,
|
|
16
|
+
5,
|
|
17
|
+
'',
|
|
18
|
+
'elimity/insights/customgateway/v1alpha1/customgateway.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from elimity.insights.common.v1alpha1 import common_pb2 as elimity_dot_insights_dot_common_dot_v1alpha1_dot_common__pb2
|
|
26
|
+
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
|
|
27
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n;elimity/insights/customgateway/v1alpha1/customgateway.proto\x12\'elimity.insights.customgateway.v1alpha1\x1a-elimity/insights/common/v1alpha1/common.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"n\n\x05Level\x12.\n\x05\x61lert\x18\x01 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x05\x61lert\x12,\n\x04info\x18\x02 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x04infoB\x07\n\x05value\"e\n\x03Log\x12\x44\n\x05level\x18\x01 \x01(\x0b\x32..elimity.insights.customgateway.v1alpha1.LevelR\x05level\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\"\xcc\x01\n\x14PerformImportRequest\x12\x61\n\x06\x66ields\x18\x01 \x03(\x0b\x32I.elimity.insights.customgateway.v1alpha1.PerformImportRequest.FieldsEntryR\x06\x66ields\x1aQ\n\x0b\x46ieldsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.ValueR\x05value:\x02\x38\x01\"\xfc\x01\n\x15PerformImportResponse\x12\x42\n\x06\x65ntity\x18\x01 \x01(\x0b\x32(.elimity.insights.common.v1alpha1.EntityH\x00R\x06\x65ntity\x12@\n\x03log\x18\x02 \x01(\x0b\x32,.elimity.insights.customgateway.v1alpha1.LogH\x00R\x03log\x12T\n\x0crelationship\x18\x03 \x01(\x0b\x32..elimity.insights.common.v1alpha1.RelationshipH\x00R\x0crelationshipB\x07\n\x05value2\x9c\x01\n\x07Service\x12\x90\x01\n\rPerformImport\x12=.elimity.insights.customgateway.v1alpha1.PerformImportRequest\x1a>.elimity.insights.customgateway.v1alpha1.PerformImportResponse0\x01\x42QZOgithub.com/elimity-com/insights-sdk/gen/elimity/insights/customgateway/v1alpha1b\x06proto3')
|
|
31
|
+
|
|
32
|
+
_globals = globals()
|
|
33
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
34
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'elimity.insights.customgateway.v1alpha1.customgateway_pb2', _globals)
|
|
35
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
36
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
37
|
+
_globals['DESCRIPTOR']._serialized_options = b'ZOgithub.com/elimity-com/insights-sdk/gen/elimity/insights/customgateway/v1alpha1'
|
|
38
|
+
_globals['_PERFORMIMPORTREQUEST_FIELDSENTRY']._loaded_options = None
|
|
39
|
+
_globals['_PERFORMIMPORTREQUEST_FIELDSENTRY']._serialized_options = b'8\001'
|
|
40
|
+
_globals['_LEVEL']._serialized_start=210
|
|
41
|
+
_globals['_LEVEL']._serialized_end=320
|
|
42
|
+
_globals['_LOG']._serialized_start=322
|
|
43
|
+
_globals['_LOG']._serialized_end=423
|
|
44
|
+
_globals['_PERFORMIMPORTREQUEST']._serialized_start=426
|
|
45
|
+
_globals['_PERFORMIMPORTREQUEST']._serialized_end=630
|
|
46
|
+
_globals['_PERFORMIMPORTREQUEST_FIELDSENTRY']._serialized_start=549
|
|
47
|
+
_globals['_PERFORMIMPORTREQUEST_FIELDSENTRY']._serialized_end=630
|
|
48
|
+
_globals['_PERFORMIMPORTRESPONSE']._serialized_start=633
|
|
49
|
+
_globals['_PERFORMIMPORTRESPONSE']._serialized_end=885
|
|
50
|
+
_globals['_SERVICE']._serialized_start=888
|
|
51
|
+
_globals['_SERVICE']._serialized_end=1044
|
|
52
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from elimity.insights.common.v1alpha1 import common_pb2 as _common_pb2
|
|
2
|
+
from google.protobuf import empty_pb2 as _empty_pb2
|
|
3
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
|
4
|
+
from google.protobuf.internal import containers as _containers
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import message as _message
|
|
7
|
+
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
8
|
+
|
|
9
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
10
|
+
|
|
11
|
+
class Level(_message.Message):
|
|
12
|
+
__slots__ = ("alert", "info")
|
|
13
|
+
ALERT_FIELD_NUMBER: _ClassVar[int]
|
|
14
|
+
INFO_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
alert: _empty_pb2.Empty
|
|
16
|
+
info: _empty_pb2.Empty
|
|
17
|
+
def __init__(self, alert: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ..., info: _Optional[_Union[_empty_pb2.Empty, _Mapping]] = ...) -> None: ...
|
|
18
|
+
|
|
19
|
+
class Log(_message.Message):
|
|
20
|
+
__slots__ = ("level", "message")
|
|
21
|
+
LEVEL_FIELD_NUMBER: _ClassVar[int]
|
|
22
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
|
23
|
+
level: Level
|
|
24
|
+
message: str
|
|
25
|
+
def __init__(self, level: _Optional[_Union[Level, _Mapping]] = ..., message: _Optional[str] = ...) -> None: ...
|
|
26
|
+
|
|
27
|
+
class PerformImportRequest(_message.Message):
|
|
28
|
+
__slots__ = ("fields",)
|
|
29
|
+
class FieldsEntry(_message.Message):
|
|
30
|
+
__slots__ = ("key", "value")
|
|
31
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
32
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
33
|
+
key: str
|
|
34
|
+
value: _struct_pb2.Value
|
|
35
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_struct_pb2.Value, _Mapping]] = ...) -> None: ...
|
|
36
|
+
FIELDS_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
fields: _containers.MessageMap[str, _struct_pb2.Value]
|
|
38
|
+
def __init__(self, fields: _Optional[_Mapping[str, _struct_pb2.Value]] = ...) -> None: ...
|
|
39
|
+
|
|
40
|
+
class PerformImportResponse(_message.Message):
|
|
41
|
+
__slots__ = ("entity", "log", "relationship")
|
|
42
|
+
ENTITY_FIELD_NUMBER: _ClassVar[int]
|
|
43
|
+
LOG_FIELD_NUMBER: _ClassVar[int]
|
|
44
|
+
RELATIONSHIP_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
entity: _common_pb2.Entity
|
|
46
|
+
log: Log
|
|
47
|
+
relationship: _common_pb2.Relationship
|
|
48
|
+
def __init__(self, entity: _Optional[_Union[_common_pb2.Entity, _Mapping]] = ..., log: _Optional[_Union[Log, _Mapping]] = ..., relationship: _Optional[_Union[_common_pb2.Relationship, _Mapping]] = ...) -> None: ...
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Source: elimity/insights/customgateway/v1alpha1/customgateway.proto
|
|
4
|
+
|
|
5
|
+
package v1alpha1connect
|
|
6
|
+
|
|
7
|
+
import (
|
|
8
|
+
connect "connectrpc.com/connect"
|
|
9
|
+
context "context"
|
|
10
|
+
errors "errors"
|
|
11
|
+
v1alpha1 "github.com/elimity-com/insights-sdk/gen/elimity/insights/customgateway/v1alpha1"
|
|
12
|
+
http "net/http"
|
|
13
|
+
strings "strings"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
|
17
|
+
// compatible. If you get a compiler error that this constant is not defined, this code was
|
|
18
|
+
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
|
19
|
+
// problem by either regenerating this code with an older version of connect or updating the connect
|
|
20
|
+
// version compiled into your binary.
|
|
21
|
+
const _ = connect.IsAtLeastVersion1_13_0
|
|
22
|
+
|
|
23
|
+
const (
|
|
24
|
+
// ServiceName is the fully-qualified name of the Service service.
|
|
25
|
+
ServiceName = "elimity.insights.customgateway.v1alpha1.Service"
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
|
29
|
+
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
|
30
|
+
//
|
|
31
|
+
// Note that these are different from the fully-qualified method names used by
|
|
32
|
+
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
|
33
|
+
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
|
34
|
+
// period.
|
|
35
|
+
const (
|
|
36
|
+
// ServicePerformImportProcedure is the fully-qualified name of the Service's PerformImport RPC.
|
|
37
|
+
ServicePerformImportProcedure = "/elimity.insights.customgateway.v1alpha1.Service/PerformImport"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package.
|
|
41
|
+
var (
|
|
42
|
+
serviceServiceDescriptor = v1alpha1.File_elimity_insights_customgateway_v1alpha1_customgateway_proto.Services().ByName("Service")
|
|
43
|
+
servicePerformImportMethodDescriptor = serviceServiceDescriptor.Methods().ByName("PerformImport")
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
// ServiceClient is a client for the elimity.insights.customgateway.v1alpha1.Service service.
|
|
47
|
+
type ServiceClient interface {
|
|
48
|
+
PerformImport(context.Context, *connect.Request[v1alpha1.PerformImportRequest]) (*connect.ServerStreamForClient[v1alpha1.PerformImportResponse], error)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// NewServiceClient constructs a client for the elimity.insights.customgateway.v1alpha1.Service
|
|
52
|
+
// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
|
|
53
|
+
// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
|
|
54
|
+
// the connect.WithGRPC() or connect.WithGRPCWeb() options.
|
|
55
|
+
//
|
|
56
|
+
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
|
57
|
+
// http://api.acme.com or https://acme.com/grpc).
|
|
58
|
+
func NewServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ServiceClient {
|
|
59
|
+
baseURL = strings.TrimRight(baseURL, "/")
|
|
60
|
+
return &serviceClient{
|
|
61
|
+
performImport: connect.NewClient[v1alpha1.PerformImportRequest, v1alpha1.PerformImportResponse](
|
|
62
|
+
httpClient,
|
|
63
|
+
baseURL+ServicePerformImportProcedure,
|
|
64
|
+
connect.WithSchema(servicePerformImportMethodDescriptor),
|
|
65
|
+
connect.WithClientOptions(opts...),
|
|
66
|
+
),
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// serviceClient implements ServiceClient.
|
|
71
|
+
type serviceClient struct {
|
|
72
|
+
performImport *connect.Client[v1alpha1.PerformImportRequest, v1alpha1.PerformImportResponse]
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// PerformImport calls elimity.insights.customgateway.v1alpha1.Service.PerformImport.
|
|
76
|
+
func (c *serviceClient) PerformImport(ctx context.Context, req *connect.Request[v1alpha1.PerformImportRequest]) (*connect.ServerStreamForClient[v1alpha1.PerformImportResponse], error) {
|
|
77
|
+
return c.performImport.CallServerStream(ctx, req)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ServiceHandler is an implementation of the elimity.insights.customgateway.v1alpha1.Service
|
|
81
|
+
// service.
|
|
82
|
+
type ServiceHandler interface {
|
|
83
|
+
PerformImport(context.Context, *connect.Request[v1alpha1.PerformImportRequest], *connect.ServerStream[v1alpha1.PerformImportResponse]) error
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// NewServiceHandler builds an HTTP handler from the service implementation. It returns the path on
|
|
87
|
+
// which to mount the handler and the handler itself.
|
|
88
|
+
//
|
|
89
|
+
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
|
90
|
+
// and JSON codecs. They also support gzip compression.
|
|
91
|
+
func NewServiceHandler(svc ServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
|
92
|
+
servicePerformImportHandler := connect.NewServerStreamHandler(
|
|
93
|
+
ServicePerformImportProcedure,
|
|
94
|
+
svc.PerformImport,
|
|
95
|
+
connect.WithSchema(servicePerformImportMethodDescriptor),
|
|
96
|
+
connect.WithHandlerOptions(opts...),
|
|
97
|
+
)
|
|
98
|
+
return "/elimity.insights.customgateway.v1alpha1.Service/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
99
|
+
switch r.URL.Path {
|
|
100
|
+
case ServicePerformImportProcedure:
|
|
101
|
+
servicePerformImportHandler.ServeHTTP(w, r)
|
|
102
|
+
default:
|
|
103
|
+
http.NotFound(w, r)
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// UnimplementedServiceHandler returns CodeUnimplemented from all methods.
|
|
109
|
+
type UnimplementedServiceHandler struct{}
|
|
110
|
+
|
|
111
|
+
func (UnimplementedServiceHandler) PerformImport(context.Context, *connect.Request[v1alpha1.PerformImportRequest], *connect.ServerStream[v1alpha1.PerformImportResponse]) error {
|
|
112
|
+
return connect.NewError(connect.CodeUnimplemented, errors.New("elimity.insights.customgateway.v1alpha1.Service.PerformImport is not implemented"))
|
|
113
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import v1alpha1
|
|
File without changes
|