@lansweeper/data-platform-outbound-grpc 0.1.1 → 0.1.3
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_pb.d.ts +12 -0
- package/gen-proto/outbound_pb.js +99 -0
- package/generated-go/outbound.pb.go +3688 -0
- package/generated-go/outbound_grpc.pb.go +174 -0
- package/go.mod +3 -0
- package/package.json +2 -2
- package/pom.xml +1 -1
- package/proto/outbound.proto +4 -0
- package/src/main/java/com/lansweeper/dp/outbound/v1/Outbound.java +618 -307
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// - protoc-gen-go-grpc v1.2.0
|
|
4
|
+
// - protoc v3.15.8
|
|
5
|
+
// source: outbound.proto
|
|
6
|
+
|
|
7
|
+
package generated_go
|
|
8
|
+
|
|
9
|
+
import (
|
|
10
|
+
context "context"
|
|
11
|
+
grpc "google.golang.org/grpc"
|
|
12
|
+
codes "google.golang.org/grpc/codes"
|
|
13
|
+
status "google.golang.org/grpc/status"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
// This is a compile-time assertion to ensure that this generated file
|
|
17
|
+
// is compatible with the grpc package it is being compiled against.
|
|
18
|
+
// Requires gRPC-Go v1.32.0 or later.
|
|
19
|
+
const _ = grpc.SupportPackageIsVersion7
|
|
20
|
+
|
|
21
|
+
// DataCoreOutboundServiceClient is the client API for DataCoreOutboundService service.
|
|
22
|
+
//
|
|
23
|
+
// 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.
|
|
24
|
+
type DataCoreOutboundServiceClient interface {
|
|
25
|
+
// Retrieve a single entity by site/inst-id/type/id
|
|
26
|
+
GetEntity(ctx context.Context, in *GetEntityRequest, opts ...grpc.CallOption) (*GetEntityResponse, error)
|
|
27
|
+
// lists entities for a site or site/type
|
|
28
|
+
ListEntities(ctx context.Context, in *ListEntityRequest, opts ...grpc.CallOption) (DataCoreOutboundService_ListEntitiesClient, error)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type dataCoreOutboundServiceClient struct {
|
|
32
|
+
cc grpc.ClientConnInterface
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
func NewDataCoreOutboundServiceClient(cc grpc.ClientConnInterface) DataCoreOutboundServiceClient {
|
|
36
|
+
return &dataCoreOutboundServiceClient{cc}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
func (c *dataCoreOutboundServiceClient) GetEntity(ctx context.Context, in *GetEntityRequest, opts ...grpc.CallOption) (*GetEntityResponse, error) {
|
|
40
|
+
out := new(GetEntityResponse)
|
|
41
|
+
err := c.cc.Invoke(ctx, "/com.lansweeper.dp.outbound.v1.DataCoreOutboundService/GetEntity", in, out, opts...)
|
|
42
|
+
if err != nil {
|
|
43
|
+
return nil, err
|
|
44
|
+
}
|
|
45
|
+
return out, nil
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
func (c *dataCoreOutboundServiceClient) ListEntities(ctx context.Context, in *ListEntityRequest, opts ...grpc.CallOption) (DataCoreOutboundService_ListEntitiesClient, error) {
|
|
49
|
+
stream, err := c.cc.NewStream(ctx, &DataCoreOutboundService_ServiceDesc.Streams[0], "/com.lansweeper.dp.outbound.v1.DataCoreOutboundService/ListEntities", opts...)
|
|
50
|
+
if err != nil {
|
|
51
|
+
return nil, err
|
|
52
|
+
}
|
|
53
|
+
x := &dataCoreOutboundServiceListEntitiesClient{stream}
|
|
54
|
+
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
55
|
+
return nil, err
|
|
56
|
+
}
|
|
57
|
+
if err := x.ClientStream.CloseSend(); err != nil {
|
|
58
|
+
return nil, err
|
|
59
|
+
}
|
|
60
|
+
return x, nil
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
type DataCoreOutboundService_ListEntitiesClient interface {
|
|
64
|
+
Recv() (*ListEntityResponse, error)
|
|
65
|
+
grpc.ClientStream
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
type dataCoreOutboundServiceListEntitiesClient struct {
|
|
69
|
+
grpc.ClientStream
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
func (x *dataCoreOutboundServiceListEntitiesClient) Recv() (*ListEntityResponse, error) {
|
|
73
|
+
m := new(ListEntityResponse)
|
|
74
|
+
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
75
|
+
return nil, err
|
|
76
|
+
}
|
|
77
|
+
return m, nil
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// DataCoreOutboundServiceServer is the server API for DataCoreOutboundService service.
|
|
81
|
+
// All implementations must embed UnimplementedDataCoreOutboundServiceServer
|
|
82
|
+
// for forward compatibility
|
|
83
|
+
type DataCoreOutboundServiceServer interface {
|
|
84
|
+
// Retrieve a single entity by site/inst-id/type/id
|
|
85
|
+
GetEntity(context.Context, *GetEntityRequest) (*GetEntityResponse, error)
|
|
86
|
+
// lists entities for a site or site/type
|
|
87
|
+
ListEntities(*ListEntityRequest, DataCoreOutboundService_ListEntitiesServer) error
|
|
88
|
+
mustEmbedUnimplementedDataCoreOutboundServiceServer()
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// UnimplementedDataCoreOutboundServiceServer must be embedded to have forward compatible implementations.
|
|
92
|
+
type UnimplementedDataCoreOutboundServiceServer struct {
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
func (UnimplementedDataCoreOutboundServiceServer) GetEntity(context.Context, *GetEntityRequest) (*GetEntityResponse, error) {
|
|
96
|
+
return nil, status.Errorf(codes.Unimplemented, "method GetEntity not implemented")
|
|
97
|
+
}
|
|
98
|
+
func (UnimplementedDataCoreOutboundServiceServer) ListEntities(*ListEntityRequest, DataCoreOutboundService_ListEntitiesServer) error {
|
|
99
|
+
return status.Errorf(codes.Unimplemented, "method ListEntities not implemented")
|
|
100
|
+
}
|
|
101
|
+
func (UnimplementedDataCoreOutboundServiceServer) mustEmbedUnimplementedDataCoreOutboundServiceServer() {
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// UnsafeDataCoreOutboundServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
105
|
+
// Use of this interface is not recommended, as added methods to DataCoreOutboundServiceServer will
|
|
106
|
+
// result in compilation errors.
|
|
107
|
+
type UnsafeDataCoreOutboundServiceServer interface {
|
|
108
|
+
mustEmbedUnimplementedDataCoreOutboundServiceServer()
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
func RegisterDataCoreOutboundServiceServer(s grpc.ServiceRegistrar, srv DataCoreOutboundServiceServer) {
|
|
112
|
+
s.RegisterService(&DataCoreOutboundService_ServiceDesc, srv)
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
func _DataCoreOutboundService_GetEntity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
116
|
+
in := new(GetEntityRequest)
|
|
117
|
+
if err := dec(in); err != nil {
|
|
118
|
+
return nil, err
|
|
119
|
+
}
|
|
120
|
+
if interceptor == nil {
|
|
121
|
+
return srv.(DataCoreOutboundServiceServer).GetEntity(ctx, in)
|
|
122
|
+
}
|
|
123
|
+
info := &grpc.UnaryServerInfo{
|
|
124
|
+
Server: srv,
|
|
125
|
+
FullMethod: "/com.lansweeper.dp.outbound.v1.DataCoreOutboundService/GetEntity",
|
|
126
|
+
}
|
|
127
|
+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
128
|
+
return srv.(DataCoreOutboundServiceServer).GetEntity(ctx, req.(*GetEntityRequest))
|
|
129
|
+
}
|
|
130
|
+
return interceptor(ctx, in, info, handler)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
func _DataCoreOutboundService_ListEntities_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
134
|
+
m := new(ListEntityRequest)
|
|
135
|
+
if err := stream.RecvMsg(m); err != nil {
|
|
136
|
+
return err
|
|
137
|
+
}
|
|
138
|
+
return srv.(DataCoreOutboundServiceServer).ListEntities(m, &dataCoreOutboundServiceListEntitiesServer{stream})
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
type DataCoreOutboundService_ListEntitiesServer interface {
|
|
142
|
+
Send(*ListEntityResponse) error
|
|
143
|
+
grpc.ServerStream
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
type dataCoreOutboundServiceListEntitiesServer struct {
|
|
147
|
+
grpc.ServerStream
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
func (x *dataCoreOutboundServiceListEntitiesServer) Send(m *ListEntityResponse) error {
|
|
151
|
+
return x.ServerStream.SendMsg(m)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// DataCoreOutboundService_ServiceDesc is the grpc.ServiceDesc for DataCoreOutboundService service.
|
|
155
|
+
// It's only intended for direct use with grpc.RegisterService,
|
|
156
|
+
// and not to be introspected or modified (even as a copy)
|
|
157
|
+
var DataCoreOutboundService_ServiceDesc = grpc.ServiceDesc{
|
|
158
|
+
ServiceName: "com.lansweeper.dp.outbound.v1.DataCoreOutboundService",
|
|
159
|
+
HandlerType: (*DataCoreOutboundServiceServer)(nil),
|
|
160
|
+
Methods: []grpc.MethodDesc{
|
|
161
|
+
{
|
|
162
|
+
MethodName: "GetEntity",
|
|
163
|
+
Handler: _DataCoreOutboundService_GetEntity_Handler,
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
Streams: []grpc.StreamDesc{
|
|
167
|
+
{
|
|
168
|
+
StreamName: "ListEntities",
|
|
169
|
+
Handler: _DataCoreOutboundService_ListEntities_Handler,
|
|
170
|
+
ServerStreams: true,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
Metadata: "outbound.proto",
|
|
174
|
+
}
|
package/go.mod
ADDED
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.3",
|
|
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": "6501ef896a08c289420fc5292484206d12f45c59"
|
|
13
13
|
}
|
package/pom.xml
CHANGED
package/proto/outbound.proto
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
syntax = "proto3";
|
|
9
9
|
package com.lansweeper.dp.outbound.v1;
|
|
10
10
|
|
|
11
|
+
option go_package = "../generated-go";
|
|
12
|
+
|
|
11
13
|
import "google/protobuf/timestamp.proto";
|
|
12
14
|
|
|
13
15
|
// ----- Service Part ------
|
|
@@ -130,6 +132,7 @@ message HardwareInfo {
|
|
|
130
132
|
|
|
131
133
|
optional CatalogBrand catalog_brand = 22;
|
|
132
134
|
optional CatalogModel catalog_model = 23;
|
|
135
|
+
optional CatalogModel catalog_family = 25;
|
|
133
136
|
|
|
134
137
|
optional RawHardwareInfo raw = 24;
|
|
135
138
|
}
|
|
@@ -143,6 +146,7 @@ message RawHardwareInfo {
|
|
|
143
146
|
|
|
144
147
|
message OperatingSystemInfo {
|
|
145
148
|
optional int64 id = 1;
|
|
149
|
+
optional int64 make_id = 11;
|
|
146
150
|
optional string name = 2;
|
|
147
151
|
optional string version = 3;
|
|
148
152
|
optional string build = 4;
|