@lansweeper/data-platform-outbound-grpc 0.1.12 → 0.1.13
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.
- package/CHANGELOG.md +8 -0
- package/gen-proto/image.json +1 -1
- package/gen-proto/outbound_grpc_pb.d.ts +17 -0
- package/gen-proto/outbound_grpc_pb.js +34 -0
- package/gen-proto/outbound_pb.d.ts +108 -63
- package/gen-proto/outbound_pb.js +976 -534
- package/generated-go/outbound.pb.go +1343 -1215
- package/generated-go/outbound_grpc.pb.go +41 -2
- package/java.json +1 -1
- package/package.json +2 -2
- package/proto/outbound.proto +46 -16
|
@@ -26,8 +26,9 @@ import (
|
|
|
26
26
|
const _ = grpc.SupportPackageIsVersion7
|
|
27
27
|
|
|
28
28
|
const (
|
|
29
|
-
DataCoreOutboundService_GetEntity_FullMethodName
|
|
30
|
-
DataCoreOutboundService_ListEntities_FullMethodName
|
|
29
|
+
DataCoreOutboundService_GetEntity_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreOutboundService/GetEntity"
|
|
30
|
+
DataCoreOutboundService_ListEntities_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreOutboundService/ListEntities"
|
|
31
|
+
DataCoreOutboundService_CatalogLookup_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreOutboundService/CatalogLookup"
|
|
31
32
|
)
|
|
32
33
|
|
|
33
34
|
// DataCoreOutboundServiceClient is the client API for DataCoreOutboundService service.
|
|
@@ -38,6 +39,8 @@ type DataCoreOutboundServiceClient interface {
|
|
|
38
39
|
GetEntity(ctx context.Context, in *GetEntityRequest, opts ...grpc.CallOption) (*GetEntityResponse, error)
|
|
39
40
|
// lists entities for a site or site/type
|
|
40
41
|
ListEntities(ctx context.Context, in *ListEntityRequest, opts ...grpc.CallOption) (DataCoreOutboundService_ListEntitiesClient, error)
|
|
42
|
+
// Retrieve a single entity by site/inst-id/type/id
|
|
43
|
+
CatalogLookup(ctx context.Context, in *CatalogLookupRequest, opts ...grpc.CallOption) (*CatalogLookupResponse, error)
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
type dataCoreOutboundServiceClient struct {
|
|
@@ -89,6 +92,15 @@ func (x *dataCoreOutboundServiceListEntitiesClient) Recv() (*ListEntityResponse,
|
|
|
89
92
|
return m, nil
|
|
90
93
|
}
|
|
91
94
|
|
|
95
|
+
func (c *dataCoreOutboundServiceClient) CatalogLookup(ctx context.Context, in *CatalogLookupRequest, opts ...grpc.CallOption) (*CatalogLookupResponse, error) {
|
|
96
|
+
out := new(CatalogLookupResponse)
|
|
97
|
+
err := c.cc.Invoke(ctx, DataCoreOutboundService_CatalogLookup_FullMethodName, in, out, opts...)
|
|
98
|
+
if err != nil {
|
|
99
|
+
return nil, err
|
|
100
|
+
}
|
|
101
|
+
return out, nil
|
|
102
|
+
}
|
|
103
|
+
|
|
92
104
|
// DataCoreOutboundServiceServer is the server API for DataCoreOutboundService service.
|
|
93
105
|
// All implementations must embed UnimplementedDataCoreOutboundServiceServer
|
|
94
106
|
// for forward compatibility
|
|
@@ -97,6 +109,8 @@ type DataCoreOutboundServiceServer interface {
|
|
|
97
109
|
GetEntity(context.Context, *GetEntityRequest) (*GetEntityResponse, error)
|
|
98
110
|
// lists entities for a site or site/type
|
|
99
111
|
ListEntities(*ListEntityRequest, DataCoreOutboundService_ListEntitiesServer) error
|
|
112
|
+
// Retrieve a single entity by site/inst-id/type/id
|
|
113
|
+
CatalogLookup(context.Context, *CatalogLookupRequest) (*CatalogLookupResponse, error)
|
|
100
114
|
mustEmbedUnimplementedDataCoreOutboundServiceServer()
|
|
101
115
|
}
|
|
102
116
|
|
|
@@ -110,6 +124,9 @@ func (UnimplementedDataCoreOutboundServiceServer) GetEntity(context.Context, *Ge
|
|
|
110
124
|
func (UnimplementedDataCoreOutboundServiceServer) ListEntities(*ListEntityRequest, DataCoreOutboundService_ListEntitiesServer) error {
|
|
111
125
|
return status.Errorf(codes.Unimplemented, "method ListEntities not implemented")
|
|
112
126
|
}
|
|
127
|
+
func (UnimplementedDataCoreOutboundServiceServer) CatalogLookup(context.Context, *CatalogLookupRequest) (*CatalogLookupResponse, error) {
|
|
128
|
+
return nil, status.Errorf(codes.Unimplemented, "method CatalogLookup not implemented")
|
|
129
|
+
}
|
|
113
130
|
func (UnimplementedDataCoreOutboundServiceServer) mustEmbedUnimplementedDataCoreOutboundServiceServer() {
|
|
114
131
|
}
|
|
115
132
|
|
|
@@ -163,6 +180,24 @@ func (x *dataCoreOutboundServiceListEntitiesServer) Send(m *ListEntityResponse)
|
|
|
163
180
|
return x.ServerStream.SendMsg(m)
|
|
164
181
|
}
|
|
165
182
|
|
|
183
|
+
func _DataCoreOutboundService_CatalogLookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
184
|
+
in := new(CatalogLookupRequest)
|
|
185
|
+
if err := dec(in); err != nil {
|
|
186
|
+
return nil, err
|
|
187
|
+
}
|
|
188
|
+
if interceptor == nil {
|
|
189
|
+
return srv.(DataCoreOutboundServiceServer).CatalogLookup(ctx, in)
|
|
190
|
+
}
|
|
191
|
+
info := &grpc.UnaryServerInfo{
|
|
192
|
+
Server: srv,
|
|
193
|
+
FullMethod: DataCoreOutboundService_CatalogLookup_FullMethodName,
|
|
194
|
+
}
|
|
195
|
+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
196
|
+
return srv.(DataCoreOutboundServiceServer).CatalogLookup(ctx, req.(*CatalogLookupRequest))
|
|
197
|
+
}
|
|
198
|
+
return interceptor(ctx, in, info, handler)
|
|
199
|
+
}
|
|
200
|
+
|
|
166
201
|
// DataCoreOutboundService_ServiceDesc is the grpc.ServiceDesc for DataCoreOutboundService service.
|
|
167
202
|
// It's only intended for direct use with grpc.RegisterService,
|
|
168
203
|
// and not to be introspected or modified (even as a copy)
|
|
@@ -174,6 +209,10 @@ var DataCoreOutboundService_ServiceDesc = grpc.ServiceDesc{
|
|
|
174
209
|
MethodName: "GetEntity",
|
|
175
210
|
Handler: _DataCoreOutboundService_GetEntity_Handler,
|
|
176
211
|
},
|
|
212
|
+
{
|
|
213
|
+
MethodName: "CatalogLookup",
|
|
214
|
+
Handler: _DataCoreOutboundService_CatalogLookup_Handler,
|
|
215
|
+
},
|
|
177
216
|
},
|
|
178
217
|
Streams: []grpc.StreamDesc{
|
|
179
218
|
{
|
package/java.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lansweeper/data-platform-outbound-grpc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Data Platform Outbound gRPC",
|
|
5
5
|
"main": "gen-proto/index.js",
|
|
6
6
|
"types": "gen-proto/index.d.ts",
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"@grpc/grpc-js": "^1.5.1",
|
|
10
10
|
"google-protobuf": "^3.17.0"
|
|
11
11
|
},
|
|
12
|
-
"gitHead": "
|
|
12
|
+
"gitHead": "04c17bf03534723b067248f0b76860ce75084e08"
|
|
13
13
|
}
|
package/proto/outbound.proto
CHANGED
|
@@ -28,6 +28,8 @@ service DataCoreOutboundService {
|
|
|
28
28
|
// lists entities for a site or site/type
|
|
29
29
|
rpc ListEntities(ListEntityRequest) returns (stream ListEntityResponse) {}
|
|
30
30
|
|
|
31
|
+
// Retrieve a single entity by site/inst-id/type/id
|
|
32
|
+
rpc CatalogLookup (CatalogLookupRequest) returns (CatalogLookupResponse) {}
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
/**
|
|
@@ -55,6 +57,24 @@ message ListEntityResponse {
|
|
|
55
57
|
repeated Entity related = 2;
|
|
56
58
|
}
|
|
57
59
|
|
|
60
|
+
message CatalogLookupRequest {
|
|
61
|
+
repeated int64 brand_id = 1;
|
|
62
|
+
repeated int64 model_id = 2;
|
|
63
|
+
repeated int64 os_id = 3;
|
|
64
|
+
repeated int64 sw_id = 4;
|
|
65
|
+
repeated int64 monitor_id = 5;
|
|
66
|
+
|
|
67
|
+
optional bool only_requested = 10; // false by default: to avoid to get full path
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
message CatalogLookupResponse {
|
|
71
|
+
repeated CatalogBrand brand = 1;
|
|
72
|
+
repeated CatalogModel model = 2;
|
|
73
|
+
repeated CatalogOs os = 3;
|
|
74
|
+
repeated CatalogSoftware sw = 4;
|
|
75
|
+
repeated CatalogMonitor monitor = 5;
|
|
76
|
+
}
|
|
77
|
+
|
|
58
78
|
// ----- Data Part ------
|
|
59
79
|
|
|
60
80
|
message EntityPath {
|
|
@@ -128,9 +148,16 @@ message CoreFields {
|
|
|
128
148
|
|
|
129
149
|
message HardwareInfo {
|
|
130
150
|
optional int64 type_id = 1;
|
|
151
|
+
|
|
152
|
+
// catalog id of: CatalogBrand
|
|
131
153
|
optional int64 make_id = 2;
|
|
154
|
+
|
|
155
|
+
// catalog id of: CatalogModel
|
|
132
156
|
optional int64 model_id = 3;
|
|
157
|
+
|
|
158
|
+
// catalog id of: CatalogModel
|
|
133
159
|
optional int64 family_id = 4;
|
|
160
|
+
|
|
134
161
|
optional bool is_family = 6;
|
|
135
162
|
optional string serial = 7;
|
|
136
163
|
optional string type_name = 10;
|
|
@@ -141,10 +168,6 @@ message HardwareInfo {
|
|
|
141
168
|
optional string cpe = 21;
|
|
142
169
|
optional int32 rank = 20;
|
|
143
170
|
|
|
144
|
-
optional CatalogBrand catalog_brand = 22;
|
|
145
|
-
optional CatalogModel catalog_model = 23;
|
|
146
|
-
optional CatalogModel catalog_family = 25;
|
|
147
|
-
|
|
148
171
|
optional RawHardwareInfo raw = 24;
|
|
149
172
|
}
|
|
150
173
|
|
|
@@ -156,8 +179,12 @@ message RawHardwareInfo {
|
|
|
156
179
|
}
|
|
157
180
|
|
|
158
181
|
message OperatingSystemInfo {
|
|
182
|
+
// catalog id of: CatalogOs
|
|
159
183
|
optional int64 id = 1;
|
|
184
|
+
|
|
185
|
+
// catalog id of: CatalogBrand
|
|
160
186
|
optional int64 make_id = 11;
|
|
187
|
+
|
|
161
188
|
optional string name = 2;
|
|
162
189
|
optional string version = 3;
|
|
163
190
|
optional string build = 4;
|
|
@@ -169,9 +196,6 @@ message OperatingSystemInfo {
|
|
|
169
196
|
|
|
170
197
|
optional int32 rank = 8;
|
|
171
198
|
|
|
172
|
-
optional CatalogBrand catalog_brand = 9;
|
|
173
|
-
optional CatalogOs catalog_os = 10;
|
|
174
|
-
|
|
175
199
|
oneof raw {
|
|
176
200
|
WindowsRawOperatingSystemInfo windows = 32;
|
|
177
201
|
}
|
|
@@ -201,13 +225,17 @@ message MonitorInventory {
|
|
|
201
225
|
|
|
202
226
|
/* Monitor definition: normalized and with link to raw */
|
|
203
227
|
message Monitor {
|
|
228
|
+
// catalog id of: CatalogMonitor
|
|
229
|
+
optional int64 id = 1;
|
|
204
230
|
|
|
205
|
-
|
|
206
|
-
optional
|
|
207
|
-
google.protobuf.Timestamp manufacturer_date = 3;
|
|
231
|
+
// catalog id of: CatalogBrand
|
|
232
|
+
optional int64 make_id = 2;
|
|
208
233
|
|
|
209
|
-
|
|
210
|
-
|
|
234
|
+
string make_name = 3;
|
|
235
|
+
string model_name = 4;
|
|
236
|
+
|
|
237
|
+
optional string serial_number = 5;
|
|
238
|
+
google.protobuf.Timestamp manufacturer_date = 6;
|
|
211
239
|
|
|
212
240
|
oneof raw {
|
|
213
241
|
WindowsRawMonitorInfo windows = 20;
|
|
@@ -237,8 +265,14 @@ message Software {
|
|
|
237
265
|
optional int32 rank = 1;
|
|
238
266
|
optional int64 type_id = 2;
|
|
239
267
|
optional int64 cat_id = 3;
|
|
268
|
+
|
|
269
|
+
// catalog id of: CatalogBrand
|
|
240
270
|
optional int64 make_id = 4;
|
|
271
|
+
|
|
272
|
+
// catalog id of: CatalogSoftware
|
|
241
273
|
optional int64 sw_id = 5;
|
|
274
|
+
|
|
275
|
+
// catalog id of: CatalogSoftware
|
|
242
276
|
optional int64 parent_id = 6;
|
|
243
277
|
|
|
244
278
|
optional string type_name = 7;
|
|
@@ -254,10 +288,6 @@ message Software {
|
|
|
254
288
|
|
|
255
289
|
optional string cpe = 15;
|
|
256
290
|
|
|
257
|
-
optional CatalogBrand catalog_brand = 22;
|
|
258
|
-
optional CatalogSoftware catalog_software = 16;
|
|
259
|
-
optional CatalogSoftware catalog_latest = 23;
|
|
260
|
-
|
|
261
291
|
RawSoftware raw = 17;
|
|
262
292
|
optional string raw_hash = 18; // optional raw hash of SW
|
|
263
293
|
optional string nre_hash = 19; // optional NRE hash of SW
|