@lansweeper/data-platform-outbound-grpc 0.1.125 → 0.1.127
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 +16 -0
- package/gen-proto/image.json +1 -1
- package/gen-proto/outbound_grpc_pb.d.ts +99 -0
- package/gen-proto/outbound_grpc_pb.js +96 -0
- package/gen-proto/outbound_pb.d.ts +54 -6
- package/gen-proto/outbound_pb.js +338 -22
- package/generated-go/outbound.pb.go +8201 -7954
- package/generated-go/outbound_grpc.pb.go +271 -0
- package/java.json +1 -1
- package/package.json +2 -2
- package/proto/outbound.proto +34 -1
|
@@ -301,3 +301,274 @@ var DataCoreOutboundService_ServiceDesc = grpc.ServiceDesc{
|
|
|
301
301
|
},
|
|
302
302
|
Metadata: "outbound.proto",
|
|
303
303
|
}
|
|
304
|
+
|
|
305
|
+
const (
|
|
306
|
+
DataCoreBackofficeService_CreateEntity_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreBackofficeService/CreateEntity"
|
|
307
|
+
DataCoreBackofficeService_GetAsset_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreBackofficeService/GetAsset"
|
|
308
|
+
DataCoreBackofficeService_UpdateAsset_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreBackofficeService/UpdateAsset"
|
|
309
|
+
DataCoreBackofficeService_DeleteAsset_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreBackofficeService/DeleteAsset"
|
|
310
|
+
DataCoreBackofficeService_ListAssets_FullMethodName = "/com.lansweeper.dp.outbound.v1.DataCoreBackofficeService/ListAssets"
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
// DataCoreBackofficeServiceClient is the client API for DataCoreBackofficeService service.
|
|
314
|
+
//
|
|
315
|
+
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
316
|
+
type DataCoreBackofficeServiceClient interface {
|
|
317
|
+
// CRUD Entity
|
|
318
|
+
CreateEntity(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error)
|
|
319
|
+
GetAsset(ctx context.Context, in *EntityPath, opts ...grpc.CallOption) (*Entity, error)
|
|
320
|
+
UpdateAsset(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error)
|
|
321
|
+
DeleteAsset(ctx context.Context, in *EntityPath, opts ...grpc.CallOption) (*Entity, error)
|
|
322
|
+
// Just take site_id from entity path
|
|
323
|
+
ListAssets(ctx context.Context, in *EntityFilter, opts ...grpc.CallOption) (DataCoreBackofficeService_ListAssetsClient, error)
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
type dataCoreBackofficeServiceClient struct {
|
|
327
|
+
cc grpc.ClientConnInterface
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
func NewDataCoreBackofficeServiceClient(cc grpc.ClientConnInterface) DataCoreBackofficeServiceClient {
|
|
331
|
+
return &dataCoreBackofficeServiceClient{cc}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
func (c *dataCoreBackofficeServiceClient) CreateEntity(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) {
|
|
335
|
+
out := new(Entity)
|
|
336
|
+
err := c.cc.Invoke(ctx, DataCoreBackofficeService_CreateEntity_FullMethodName, in, out, opts...)
|
|
337
|
+
if err != nil {
|
|
338
|
+
return nil, err
|
|
339
|
+
}
|
|
340
|
+
return out, nil
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
func (c *dataCoreBackofficeServiceClient) GetAsset(ctx context.Context, in *EntityPath, opts ...grpc.CallOption) (*Entity, error) {
|
|
344
|
+
out := new(Entity)
|
|
345
|
+
err := c.cc.Invoke(ctx, DataCoreBackofficeService_GetAsset_FullMethodName, in, out, opts...)
|
|
346
|
+
if err != nil {
|
|
347
|
+
return nil, err
|
|
348
|
+
}
|
|
349
|
+
return out, nil
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
func (c *dataCoreBackofficeServiceClient) UpdateAsset(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) {
|
|
353
|
+
out := new(Entity)
|
|
354
|
+
err := c.cc.Invoke(ctx, DataCoreBackofficeService_UpdateAsset_FullMethodName, in, out, opts...)
|
|
355
|
+
if err != nil {
|
|
356
|
+
return nil, err
|
|
357
|
+
}
|
|
358
|
+
return out, nil
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
func (c *dataCoreBackofficeServiceClient) DeleteAsset(ctx context.Context, in *EntityPath, opts ...grpc.CallOption) (*Entity, error) {
|
|
362
|
+
out := new(Entity)
|
|
363
|
+
err := c.cc.Invoke(ctx, DataCoreBackofficeService_DeleteAsset_FullMethodName, in, out, opts...)
|
|
364
|
+
if err != nil {
|
|
365
|
+
return nil, err
|
|
366
|
+
}
|
|
367
|
+
return out, nil
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
func (c *dataCoreBackofficeServiceClient) ListAssets(ctx context.Context, in *EntityFilter, opts ...grpc.CallOption) (DataCoreBackofficeService_ListAssetsClient, error) {
|
|
371
|
+
stream, err := c.cc.NewStream(ctx, &DataCoreBackofficeService_ServiceDesc.Streams[0], DataCoreBackofficeService_ListAssets_FullMethodName, opts...)
|
|
372
|
+
if err != nil {
|
|
373
|
+
return nil, err
|
|
374
|
+
}
|
|
375
|
+
x := &dataCoreBackofficeServiceListAssetsClient{stream}
|
|
376
|
+
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
377
|
+
return nil, err
|
|
378
|
+
}
|
|
379
|
+
if err := x.ClientStream.CloseSend(); err != nil {
|
|
380
|
+
return nil, err
|
|
381
|
+
}
|
|
382
|
+
return x, nil
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
type DataCoreBackofficeService_ListAssetsClient interface {
|
|
386
|
+
Recv() (*Entity, error)
|
|
387
|
+
grpc.ClientStream
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
type dataCoreBackofficeServiceListAssetsClient struct {
|
|
391
|
+
grpc.ClientStream
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
func (x *dataCoreBackofficeServiceListAssetsClient) Recv() (*Entity, error) {
|
|
395
|
+
m := new(Entity)
|
|
396
|
+
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
397
|
+
return nil, err
|
|
398
|
+
}
|
|
399
|
+
return m, nil
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// DataCoreBackofficeServiceServer is the server API for DataCoreBackofficeService service.
|
|
403
|
+
// All implementations must embed UnimplementedDataCoreBackofficeServiceServer
|
|
404
|
+
// for forward compatibility
|
|
405
|
+
type DataCoreBackofficeServiceServer interface {
|
|
406
|
+
// CRUD Entity
|
|
407
|
+
CreateEntity(context.Context, *Entity) (*Entity, error)
|
|
408
|
+
GetAsset(context.Context, *EntityPath) (*Entity, error)
|
|
409
|
+
UpdateAsset(context.Context, *Entity) (*Entity, error)
|
|
410
|
+
DeleteAsset(context.Context, *EntityPath) (*Entity, error)
|
|
411
|
+
// Just take site_id from entity path
|
|
412
|
+
ListAssets(*EntityFilter, DataCoreBackofficeService_ListAssetsServer) error
|
|
413
|
+
mustEmbedUnimplementedDataCoreBackofficeServiceServer()
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// UnimplementedDataCoreBackofficeServiceServer must be embedded to have forward compatible implementations.
|
|
417
|
+
type UnimplementedDataCoreBackofficeServiceServer struct {
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
func (UnimplementedDataCoreBackofficeServiceServer) CreateEntity(context.Context, *Entity) (*Entity, error) {
|
|
421
|
+
return nil, status.Errorf(codes.Unimplemented, "method CreateEntity not implemented")
|
|
422
|
+
}
|
|
423
|
+
func (UnimplementedDataCoreBackofficeServiceServer) GetAsset(context.Context, *EntityPath) (*Entity, error) {
|
|
424
|
+
return nil, status.Errorf(codes.Unimplemented, "method GetAsset not implemented")
|
|
425
|
+
}
|
|
426
|
+
func (UnimplementedDataCoreBackofficeServiceServer) UpdateAsset(context.Context, *Entity) (*Entity, error) {
|
|
427
|
+
return nil, status.Errorf(codes.Unimplemented, "method UpdateAsset not implemented")
|
|
428
|
+
}
|
|
429
|
+
func (UnimplementedDataCoreBackofficeServiceServer) DeleteAsset(context.Context, *EntityPath) (*Entity, error) {
|
|
430
|
+
return nil, status.Errorf(codes.Unimplemented, "method DeleteAsset not implemented")
|
|
431
|
+
}
|
|
432
|
+
func (UnimplementedDataCoreBackofficeServiceServer) ListAssets(*EntityFilter, DataCoreBackofficeService_ListAssetsServer) error {
|
|
433
|
+
return status.Errorf(codes.Unimplemented, "method ListAssets not implemented")
|
|
434
|
+
}
|
|
435
|
+
func (UnimplementedDataCoreBackofficeServiceServer) mustEmbedUnimplementedDataCoreBackofficeServiceServer() {
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// UnsafeDataCoreBackofficeServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
439
|
+
// Use of this interface is not recommended, as added methods to DataCoreBackofficeServiceServer will
|
|
440
|
+
// result in compilation errors.
|
|
441
|
+
type UnsafeDataCoreBackofficeServiceServer interface {
|
|
442
|
+
mustEmbedUnimplementedDataCoreBackofficeServiceServer()
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
func RegisterDataCoreBackofficeServiceServer(s grpc.ServiceRegistrar, srv DataCoreBackofficeServiceServer) {
|
|
446
|
+
s.RegisterService(&DataCoreBackofficeService_ServiceDesc, srv)
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
func _DataCoreBackofficeService_CreateEntity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
450
|
+
in := new(Entity)
|
|
451
|
+
if err := dec(in); err != nil {
|
|
452
|
+
return nil, err
|
|
453
|
+
}
|
|
454
|
+
if interceptor == nil {
|
|
455
|
+
return srv.(DataCoreBackofficeServiceServer).CreateEntity(ctx, in)
|
|
456
|
+
}
|
|
457
|
+
info := &grpc.UnaryServerInfo{
|
|
458
|
+
Server: srv,
|
|
459
|
+
FullMethod: DataCoreBackofficeService_CreateEntity_FullMethodName,
|
|
460
|
+
}
|
|
461
|
+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
462
|
+
return srv.(DataCoreBackofficeServiceServer).CreateEntity(ctx, req.(*Entity))
|
|
463
|
+
}
|
|
464
|
+
return interceptor(ctx, in, info, handler)
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
func _DataCoreBackofficeService_GetAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
468
|
+
in := new(EntityPath)
|
|
469
|
+
if err := dec(in); err != nil {
|
|
470
|
+
return nil, err
|
|
471
|
+
}
|
|
472
|
+
if interceptor == nil {
|
|
473
|
+
return srv.(DataCoreBackofficeServiceServer).GetAsset(ctx, in)
|
|
474
|
+
}
|
|
475
|
+
info := &grpc.UnaryServerInfo{
|
|
476
|
+
Server: srv,
|
|
477
|
+
FullMethod: DataCoreBackofficeService_GetAsset_FullMethodName,
|
|
478
|
+
}
|
|
479
|
+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
480
|
+
return srv.(DataCoreBackofficeServiceServer).GetAsset(ctx, req.(*EntityPath))
|
|
481
|
+
}
|
|
482
|
+
return interceptor(ctx, in, info, handler)
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
func _DataCoreBackofficeService_UpdateAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
486
|
+
in := new(Entity)
|
|
487
|
+
if err := dec(in); err != nil {
|
|
488
|
+
return nil, err
|
|
489
|
+
}
|
|
490
|
+
if interceptor == nil {
|
|
491
|
+
return srv.(DataCoreBackofficeServiceServer).UpdateAsset(ctx, in)
|
|
492
|
+
}
|
|
493
|
+
info := &grpc.UnaryServerInfo{
|
|
494
|
+
Server: srv,
|
|
495
|
+
FullMethod: DataCoreBackofficeService_UpdateAsset_FullMethodName,
|
|
496
|
+
}
|
|
497
|
+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
498
|
+
return srv.(DataCoreBackofficeServiceServer).UpdateAsset(ctx, req.(*Entity))
|
|
499
|
+
}
|
|
500
|
+
return interceptor(ctx, in, info, handler)
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
func _DataCoreBackofficeService_DeleteAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
504
|
+
in := new(EntityPath)
|
|
505
|
+
if err := dec(in); err != nil {
|
|
506
|
+
return nil, err
|
|
507
|
+
}
|
|
508
|
+
if interceptor == nil {
|
|
509
|
+
return srv.(DataCoreBackofficeServiceServer).DeleteAsset(ctx, in)
|
|
510
|
+
}
|
|
511
|
+
info := &grpc.UnaryServerInfo{
|
|
512
|
+
Server: srv,
|
|
513
|
+
FullMethod: DataCoreBackofficeService_DeleteAsset_FullMethodName,
|
|
514
|
+
}
|
|
515
|
+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
516
|
+
return srv.(DataCoreBackofficeServiceServer).DeleteAsset(ctx, req.(*EntityPath))
|
|
517
|
+
}
|
|
518
|
+
return interceptor(ctx, in, info, handler)
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
func _DataCoreBackofficeService_ListAssets_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
522
|
+
m := new(EntityFilter)
|
|
523
|
+
if err := stream.RecvMsg(m); err != nil {
|
|
524
|
+
return err
|
|
525
|
+
}
|
|
526
|
+
return srv.(DataCoreBackofficeServiceServer).ListAssets(m, &dataCoreBackofficeServiceListAssetsServer{stream})
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
type DataCoreBackofficeService_ListAssetsServer interface {
|
|
530
|
+
Send(*Entity) error
|
|
531
|
+
grpc.ServerStream
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
type dataCoreBackofficeServiceListAssetsServer struct {
|
|
535
|
+
grpc.ServerStream
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
func (x *dataCoreBackofficeServiceListAssetsServer) Send(m *Entity) error {
|
|
539
|
+
return x.ServerStream.SendMsg(m)
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// DataCoreBackofficeService_ServiceDesc is the grpc.ServiceDesc for DataCoreBackofficeService service.
|
|
543
|
+
// It's only intended for direct use with grpc.RegisterService,
|
|
544
|
+
// and not to be introspected or modified (even as a copy)
|
|
545
|
+
var DataCoreBackofficeService_ServiceDesc = grpc.ServiceDesc{
|
|
546
|
+
ServiceName: "com.lansweeper.dp.outbound.v1.DataCoreBackofficeService",
|
|
547
|
+
HandlerType: (*DataCoreBackofficeServiceServer)(nil),
|
|
548
|
+
Methods: []grpc.MethodDesc{
|
|
549
|
+
{
|
|
550
|
+
MethodName: "CreateEntity",
|
|
551
|
+
Handler: _DataCoreBackofficeService_CreateEntity_Handler,
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
MethodName: "GetAsset",
|
|
555
|
+
Handler: _DataCoreBackofficeService_GetAsset_Handler,
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
MethodName: "UpdateAsset",
|
|
559
|
+
Handler: _DataCoreBackofficeService_UpdateAsset_Handler,
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
MethodName: "DeleteAsset",
|
|
563
|
+
Handler: _DataCoreBackofficeService_DeleteAsset_Handler,
|
|
564
|
+
},
|
|
565
|
+
},
|
|
566
|
+
Streams: []grpc.StreamDesc{
|
|
567
|
+
{
|
|
568
|
+
StreamName: "ListAssets",
|
|
569
|
+
Handler: _DataCoreBackofficeService_ListAssets_Handler,
|
|
570
|
+
ServerStreams: true,
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
Metadata: "outbound.proto",
|
|
574
|
+
}
|
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.127",
|
|
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": "b042853a211b149b359e68f73a6fd8f37463af66"
|
|
13
13
|
}
|
package/proto/outbound.proto
CHANGED
|
@@ -52,6 +52,39 @@ service DataCoreOutboundService {
|
|
|
52
52
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* GRPC Service for Backoffice
|
|
57
|
+
*/
|
|
58
|
+
service DataCoreBackofficeService {
|
|
59
|
+
|
|
60
|
+
// CRUD Entity
|
|
61
|
+
rpc CreateEntity(Entity) returns (Entity);
|
|
62
|
+
rpc GetAsset(EntityPath) returns (Entity);
|
|
63
|
+
rpc UpdateAsset(Entity) returns (Entity);
|
|
64
|
+
rpc DeleteAsset(EntityPath) returns (Entity);
|
|
65
|
+
// Just take site_id from entity path
|
|
66
|
+
rpc ListAssets(EntityFilter) returns (stream Entity);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message EntityFilter {
|
|
70
|
+
string site_id = 1;
|
|
71
|
+
optional bool full_entity = 2; // default false - just return metadata
|
|
72
|
+
|
|
73
|
+
enum EntryState {
|
|
74
|
+
GOLDEN = 0;
|
|
75
|
+
ALIAS = 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
enum VirtualState {
|
|
79
|
+
REAL = 0;
|
|
80
|
+
VIRTUAL = 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
optional EntryState entry_state = 3;
|
|
84
|
+
optional VirtualState virtual_state = 4;
|
|
85
|
+
}
|
|
86
|
+
// ------------------------------------------------------------------------------------
|
|
87
|
+
|
|
55
88
|
|
|
56
89
|
/**
|
|
57
90
|
* Retrieve an Entity through his path
|
|
@@ -358,7 +391,7 @@ message Tag {
|
|
|
358
391
|
*/
|
|
359
392
|
message Relation {
|
|
360
393
|
optional EntityPath from = 1; // if missing, 'self' assumed
|
|
361
|
-
|
|
394
|
+
repeated EntityPath to = 2; // if missing, 'self' assumed
|
|
362
395
|
google.protobuf.Timestamp start = 3;
|
|
363
396
|
optional google.protobuf.Timestamp end = 4; // if end is marked, it's over
|
|
364
397
|
string name = 5;
|