-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdependency_service_v2_grpc.pb.go
312 lines (268 loc) · 10.5 KB
/
dependency_service_v2_grpc.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.20.1
// source: services/dependency_service_v2.proto
package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// DependencyServiceV2Client is the client API for DependencyServiceV2 service.
//
// 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.
type DependencyServiceV2Client interface {
Connect(ctx context.Context, opts ...grpc.CallOption) (DependencyServiceV2_ConnectClient, error)
Sync(ctx context.Context, in *DependenciesServiceV2SyncRequest, opts ...grpc.CallOption) (*Response, error)
Install(ctx context.Context, opts ...grpc.CallOption) (DependencyServiceV2_InstallClient, error)
UninstallDependencies(ctx context.Context, opts ...grpc.CallOption) (DependencyServiceV2_UninstallDependenciesClient, error)
}
type dependencyServiceV2Client struct {
cc grpc.ClientConnInterface
}
func NewDependencyServiceV2Client(cc grpc.ClientConnInterface) DependencyServiceV2Client {
return &dependencyServiceV2Client{cc}
}
func (c *dependencyServiceV2Client) Connect(ctx context.Context, opts ...grpc.CallOption) (DependencyServiceV2_ConnectClient, error) {
stream, err := c.cc.NewStream(ctx, &DependencyServiceV2_ServiceDesc.Streams[0], "/grpc.DependencyServiceV2/Connect", opts...)
if err != nil {
return nil, err
}
x := &dependencyServiceV2ConnectClient{stream}
return x, nil
}
type DependencyServiceV2_ConnectClient interface {
Send(*DependenciesServiceV2ConnectRequest) error
CloseAndRecv() (*Response, error)
grpc.ClientStream
}
type dependencyServiceV2ConnectClient struct {
grpc.ClientStream
}
func (x *dependencyServiceV2ConnectClient) Send(m *DependenciesServiceV2ConnectRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *dependencyServiceV2ConnectClient) CloseAndRecv() (*Response, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(Response)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *dependencyServiceV2Client) Sync(ctx context.Context, in *DependenciesServiceV2SyncRequest, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, "/grpc.DependencyServiceV2/Sync", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dependencyServiceV2Client) Install(ctx context.Context, opts ...grpc.CallOption) (DependencyServiceV2_InstallClient, error) {
stream, err := c.cc.NewStream(ctx, &DependencyServiceV2_ServiceDesc.Streams[1], "/grpc.DependencyServiceV2/Install", opts...)
if err != nil {
return nil, err
}
x := &dependencyServiceV2InstallClient{stream}
return x, nil
}
type DependencyServiceV2_InstallClient interface {
Send(*DependenciesServiceV2InstallRequest) error
Recv() (*Response, error)
grpc.ClientStream
}
type dependencyServiceV2InstallClient struct {
grpc.ClientStream
}
func (x *dependencyServiceV2InstallClient) Send(m *DependenciesServiceV2InstallRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *dependencyServiceV2InstallClient) Recv() (*Response, error) {
m := new(Response)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *dependencyServiceV2Client) UninstallDependencies(ctx context.Context, opts ...grpc.CallOption) (DependencyServiceV2_UninstallDependenciesClient, error) {
stream, err := c.cc.NewStream(ctx, &DependencyServiceV2_ServiceDesc.Streams[2], "/grpc.DependencyServiceV2/UninstallDependencies", opts...)
if err != nil {
return nil, err
}
x := &dependencyServiceV2UninstallDependenciesClient{stream}
return x, nil
}
type DependencyServiceV2_UninstallDependenciesClient interface {
Send(*DependenciesServiceV2UninstallRequest) error
Recv() (*Response, error)
grpc.ClientStream
}
type dependencyServiceV2UninstallDependenciesClient struct {
grpc.ClientStream
}
func (x *dependencyServiceV2UninstallDependenciesClient) Send(m *DependenciesServiceV2UninstallRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *dependencyServiceV2UninstallDependenciesClient) Recv() (*Response, error) {
m := new(Response)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// DependencyServiceV2Server is the server API for DependencyServiceV2 service.
// All implementations must embed UnimplementedDependencyServiceV2Server
// for forward compatibility
type DependencyServiceV2Server interface {
Connect(DependencyServiceV2_ConnectServer) error
Sync(context.Context, *DependenciesServiceV2SyncRequest) (*Response, error)
Install(DependencyServiceV2_InstallServer) error
UninstallDependencies(DependencyServiceV2_UninstallDependenciesServer) error
mustEmbedUnimplementedDependencyServiceV2Server()
}
// UnimplementedDependencyServiceV2Server must be embedded to have forward compatible implementations.
type UnimplementedDependencyServiceV2Server struct {
}
func (UnimplementedDependencyServiceV2Server) Connect(DependencyServiceV2_ConnectServer) error {
return status.Errorf(codes.Unimplemented, "method Connect not implemented")
}
func (UnimplementedDependencyServiceV2Server) Sync(context.Context, *DependenciesServiceV2SyncRequest) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
}
func (UnimplementedDependencyServiceV2Server) Install(DependencyServiceV2_InstallServer) error {
return status.Errorf(codes.Unimplemented, "method Install not implemented")
}
func (UnimplementedDependencyServiceV2Server) UninstallDependencies(DependencyServiceV2_UninstallDependenciesServer) error {
return status.Errorf(codes.Unimplemented, "method UninstallDependencies not implemented")
}
func (UnimplementedDependencyServiceV2Server) mustEmbedUnimplementedDependencyServiceV2Server() {}
// UnsafeDependencyServiceV2Server may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DependencyServiceV2Server will
// result in compilation errors.
type UnsafeDependencyServiceV2Server interface {
mustEmbedUnimplementedDependencyServiceV2Server()
}
func RegisterDependencyServiceV2Server(s grpc.ServiceRegistrar, srv DependencyServiceV2Server) {
s.RegisterService(&DependencyServiceV2_ServiceDesc, srv)
}
func _DependencyServiceV2_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(DependencyServiceV2Server).Connect(&dependencyServiceV2ConnectServer{stream})
}
type DependencyServiceV2_ConnectServer interface {
SendAndClose(*Response) error
Recv() (*DependenciesServiceV2ConnectRequest, error)
grpc.ServerStream
}
type dependencyServiceV2ConnectServer struct {
grpc.ServerStream
}
func (x *dependencyServiceV2ConnectServer) SendAndClose(m *Response) error {
return x.ServerStream.SendMsg(m)
}
func (x *dependencyServiceV2ConnectServer) Recv() (*DependenciesServiceV2ConnectRequest, error) {
m := new(DependenciesServiceV2ConnectRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _DependencyServiceV2_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DependenciesServiceV2SyncRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DependencyServiceV2Server).Sync(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.DependencyServiceV2/Sync",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DependencyServiceV2Server).Sync(ctx, req.(*DependenciesServiceV2SyncRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DependencyServiceV2_Install_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(DependencyServiceV2Server).Install(&dependencyServiceV2InstallServer{stream})
}
type DependencyServiceV2_InstallServer interface {
Send(*Response) error
Recv() (*DependenciesServiceV2InstallRequest, error)
grpc.ServerStream
}
type dependencyServiceV2InstallServer struct {
grpc.ServerStream
}
func (x *dependencyServiceV2InstallServer) Send(m *Response) error {
return x.ServerStream.SendMsg(m)
}
func (x *dependencyServiceV2InstallServer) Recv() (*DependenciesServiceV2InstallRequest, error) {
m := new(DependenciesServiceV2InstallRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _DependencyServiceV2_UninstallDependencies_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(DependencyServiceV2Server).UninstallDependencies(&dependencyServiceV2UninstallDependenciesServer{stream})
}
type DependencyServiceV2_UninstallDependenciesServer interface {
Send(*Response) error
Recv() (*DependenciesServiceV2UninstallRequest, error)
grpc.ServerStream
}
type dependencyServiceV2UninstallDependenciesServer struct {
grpc.ServerStream
}
func (x *dependencyServiceV2UninstallDependenciesServer) Send(m *Response) error {
return x.ServerStream.SendMsg(m)
}
func (x *dependencyServiceV2UninstallDependenciesServer) Recv() (*DependenciesServiceV2UninstallRequest, error) {
m := new(DependenciesServiceV2UninstallRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// DependencyServiceV2_ServiceDesc is the grpc.ServiceDesc for DependencyServiceV2 service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DependencyServiceV2_ServiceDesc = grpc.ServiceDesc{
ServiceName: "grpc.DependencyServiceV2",
HandlerType: (*DependencyServiceV2Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Sync",
Handler: _DependencyServiceV2_Sync_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Connect",
Handler: _DependencyServiceV2_Connect_Handler,
ClientStreams: true,
},
{
StreamName: "Install",
Handler: _DependencyServiceV2_Install_Handler,
ServerStreams: true,
ClientStreams: true,
},
{
StreamName: "UninstallDependencies",
Handler: _DependencyServiceV2_UninstallDependencies_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "services/dependency_service_v2.proto",
}