@lansweeper/data-platform-outbound-grpc 0.0.3 → 0.1.2
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 +3 -3
- package/gen-proto/outbound_grpc_pb.js +22 -22
- package/gen-proto/outbound_pb.d.ts +1 -1
- package/gen-proto/outbound_pb.js +1811 -1811
- 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 +29 -0
- package/proto/outbound.proto +3 -1
- package/src/main/java/com/lansweeper/dp/outbound/v1/Outbound.java +43170 -0
- /package/{proto/DOC.md → DOC.md} +0 -0
|
@@ -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.
|
|
3
|
+
"version": "0.1.2",
|
|
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": "6c1060fcfc55676095ff3151867a44dcebfc2348"
|
|
13
13
|
}
|
package/pom.xml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
3
|
+
<modelVersion>4.0.0</modelVersion>
|
|
4
|
+
<groupId>com.lansweeper.dp</groupId>
|
|
5
|
+
<artifactId>outbound.v1</artifactId>
|
|
6
|
+
<packaging>jar</packaging>
|
|
7
|
+
<version>0.1.1</version>
|
|
8
|
+
<name>Data Platform Outbound gRPC</name>
|
|
9
|
+
<url>http://maven.apache.org</url>
|
|
10
|
+
<properties>
|
|
11
|
+
<java.version>17</java.version>
|
|
12
|
+
<maven.compiler.source>${java.version}</maven.compiler.source>
|
|
13
|
+
<maven.compiler.target>${java.version}</maven.compiler.target>
|
|
14
|
+
</properties>
|
|
15
|
+
<dependencies>
|
|
16
|
+
<dependency>
|
|
17
|
+
<groupId>com.google.protobuf</groupId>
|
|
18
|
+
<artifactId>protobuf-java</artifactId>
|
|
19
|
+
<version>3.21.2</version>
|
|
20
|
+
</dependency>
|
|
21
|
+
</dependencies>
|
|
22
|
+
<distributionManagement>
|
|
23
|
+
<repository>
|
|
24
|
+
<id>github</id>
|
|
25
|
+
<url>https://maven.pkg.github.com/Lansweeper/MavenRegistry</url>
|
|
26
|
+
<name>GitHub Lansweeper Apache Maven Packages</name>
|
|
27
|
+
</repository>
|
|
28
|
+
</distributionManagement>
|
|
29
|
+
</project>
|
package/proto/outbound.proto
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* N.B. This file has been documented using the specification available here: https://github.com/pseudomuto/protoc-gen-doc
|
|
7
7
|
*/
|
|
8
8
|
syntax = "proto3";
|
|
9
|
-
package com.lansweeper.dp.
|
|
9
|
+
package com.lansweeper.dp.outbound.v1;
|
|
10
|
+
|
|
11
|
+
option go_package = "../generated-go";
|
|
10
12
|
|
|
11
13
|
import "google/protobuf/timestamp.proto";
|
|
12
14
|
|