-
Notifications
You must be signed in to change notification settings - Fork 53
/
apiextensions_grpc.pb.go
415 lines (356 loc) · 15.7 KB
/
apiextensions_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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - ragu v1.0.0
// source: github.com/rancher/opni/pkg/plugins/apis/apiextensions/apiextensions.proto
package apiextensions
import (
context "context"
totem "github.com/kralicky/totem"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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
const (
ManagementAPIExtension_Descriptors_FullMethodName = "/apiextensions.ManagementAPIExtension/Descriptors"
)
// ManagementAPIExtensionClient is the client API for ManagementAPIExtension 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 ManagementAPIExtensionClient interface {
Descriptors(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ServiceDescriptorProtoList, error)
}
type managementAPIExtensionClient struct {
cc grpc.ClientConnInterface
}
func NewManagementAPIExtensionClient(cc grpc.ClientConnInterface) ManagementAPIExtensionClient {
return &managementAPIExtensionClient{cc}
}
func (c *managementAPIExtensionClient) Descriptors(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ServiceDescriptorProtoList, error) {
out := new(ServiceDescriptorProtoList)
err := c.cc.Invoke(ctx, ManagementAPIExtension_Descriptors_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ManagementAPIExtensionServer is the server API for ManagementAPIExtension service.
// All implementations must embed UnimplementedManagementAPIExtensionServer
// for forward compatibility
type ManagementAPIExtensionServer interface {
Descriptors(context.Context, *emptypb.Empty) (*ServiceDescriptorProtoList, error)
mustEmbedUnimplementedManagementAPIExtensionServer()
}
// UnimplementedManagementAPIExtensionServer must be embedded to have forward compatible implementations.
type UnimplementedManagementAPIExtensionServer struct {
}
func (UnimplementedManagementAPIExtensionServer) Descriptors(context.Context, *emptypb.Empty) (*ServiceDescriptorProtoList, error) {
return nil, status.Errorf(codes.Unimplemented, "method Descriptors not implemented")
}
func (UnimplementedManagementAPIExtensionServer) mustEmbedUnimplementedManagementAPIExtensionServer() {
}
// UnsafeManagementAPIExtensionServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ManagementAPIExtensionServer will
// result in compilation errors.
type UnsafeManagementAPIExtensionServer interface {
mustEmbedUnimplementedManagementAPIExtensionServer()
}
func RegisterManagementAPIExtensionServer(s grpc.ServiceRegistrar, srv ManagementAPIExtensionServer) {
s.RegisterService(&ManagementAPIExtension_ServiceDesc, srv)
}
func _ManagementAPIExtension_Descriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ManagementAPIExtensionServer).Descriptors(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ManagementAPIExtension_Descriptors_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ManagementAPIExtensionServer).Descriptors(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
// ManagementAPIExtension_ServiceDesc is the grpc.ServiceDesc for ManagementAPIExtension service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ManagementAPIExtension_ServiceDesc = grpc.ServiceDesc{
ServiceName: "apiextensions.ManagementAPIExtension",
HandlerType: (*ManagementAPIExtensionServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Descriptors",
Handler: _ManagementAPIExtension_Descriptors_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "github.com/rancher/opni/pkg/plugins/apis/apiextensions/apiextensions.proto",
}
const (
HTTPAPIExtension_Configure_FullMethodName = "/apiextensions.HTTPAPIExtension/Configure"
)
// HTTPAPIExtensionClient is the client API for HTTPAPIExtension 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 HTTPAPIExtensionClient interface {
Configure(ctx context.Context, in *CertConfig, opts ...grpc.CallOption) (*HTTPAPIExtensionConfig, error)
}
type hTTPAPIExtensionClient struct {
cc grpc.ClientConnInterface
}
func NewHTTPAPIExtensionClient(cc grpc.ClientConnInterface) HTTPAPIExtensionClient {
return &hTTPAPIExtensionClient{cc}
}
func (c *hTTPAPIExtensionClient) Configure(ctx context.Context, in *CertConfig, opts ...grpc.CallOption) (*HTTPAPIExtensionConfig, error) {
out := new(HTTPAPIExtensionConfig)
err := c.cc.Invoke(ctx, HTTPAPIExtension_Configure_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HTTPAPIExtensionServer is the server API for HTTPAPIExtension service.
// All implementations must embed UnimplementedHTTPAPIExtensionServer
// for forward compatibility
type HTTPAPIExtensionServer interface {
Configure(context.Context, *CertConfig) (*HTTPAPIExtensionConfig, error)
mustEmbedUnimplementedHTTPAPIExtensionServer()
}
// UnimplementedHTTPAPIExtensionServer must be embedded to have forward compatible implementations.
type UnimplementedHTTPAPIExtensionServer struct {
}
func (UnimplementedHTTPAPIExtensionServer) Configure(context.Context, *CertConfig) (*HTTPAPIExtensionConfig, error) {
return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
}
func (UnimplementedHTTPAPIExtensionServer) mustEmbedUnimplementedHTTPAPIExtensionServer() {}
// UnsafeHTTPAPIExtensionServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HTTPAPIExtensionServer will
// result in compilation errors.
type UnsafeHTTPAPIExtensionServer interface {
mustEmbedUnimplementedHTTPAPIExtensionServer()
}
func RegisterHTTPAPIExtensionServer(s grpc.ServiceRegistrar, srv HTTPAPIExtensionServer) {
s.RegisterService(&HTTPAPIExtension_ServiceDesc, srv)
}
func _HTTPAPIExtension_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CertConfig)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPAPIExtensionServer).Configure(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: HTTPAPIExtension_Configure_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPAPIExtensionServer).Configure(ctx, req.(*CertConfig))
}
return interceptor(ctx, in, info, handler)
}
// HTTPAPIExtension_ServiceDesc is the grpc.ServiceDesc for HTTPAPIExtension service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HTTPAPIExtension_ServiceDesc = grpc.ServiceDesc{
ServiceName: "apiextensions.HTTPAPIExtension",
HandlerType: (*HTTPAPIExtensionServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Configure",
Handler: _HTTPAPIExtension_Configure_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "github.com/rancher/opni/pkg/plugins/apis/apiextensions/apiextensions.proto",
}
const (
StreamAPIExtension_ConnectInternal_FullMethodName = "/apiextensions.StreamAPIExtension/ConnectInternal"
)
// StreamAPIExtensionClient is the client API for StreamAPIExtension 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 StreamAPIExtensionClient interface {
ConnectInternal(ctx context.Context, opts ...grpc.CallOption) (StreamAPIExtension_ConnectInternalClient, error)
}
type streamAPIExtensionClient struct {
cc grpc.ClientConnInterface
}
func NewStreamAPIExtensionClient(cc grpc.ClientConnInterface) StreamAPIExtensionClient {
return &streamAPIExtensionClient{cc}
}
func (c *streamAPIExtensionClient) ConnectInternal(ctx context.Context, opts ...grpc.CallOption) (StreamAPIExtension_ConnectInternalClient, error) {
stream, err := c.cc.NewStream(ctx, &StreamAPIExtension_ServiceDesc.Streams[0], StreamAPIExtension_ConnectInternal_FullMethodName, opts...)
if err != nil {
return nil, err
}
x := &streamAPIExtensionConnectInternalClient{stream}
return x, nil
}
type StreamAPIExtension_ConnectInternalClient interface {
Send(*totem.RPC) error
Recv() (*totem.RPC, error)
grpc.ClientStream
}
type streamAPIExtensionConnectInternalClient struct {
grpc.ClientStream
}
func (x *streamAPIExtensionConnectInternalClient) Send(m *totem.RPC) error {
return x.ClientStream.SendMsg(m)
}
func (x *streamAPIExtensionConnectInternalClient) Recv() (*totem.RPC, error) {
m := new(totem.RPC)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// StreamAPIExtensionServer is the server API for StreamAPIExtension service.
// All implementations must embed UnimplementedStreamAPIExtensionServer
// for forward compatibility
type StreamAPIExtensionServer interface {
ConnectInternal(StreamAPIExtension_ConnectInternalServer) error
mustEmbedUnimplementedStreamAPIExtensionServer()
}
// UnimplementedStreamAPIExtensionServer must be embedded to have forward compatible implementations.
type UnimplementedStreamAPIExtensionServer struct {
}
func (UnimplementedStreamAPIExtensionServer) ConnectInternal(StreamAPIExtension_ConnectInternalServer) error {
return status.Errorf(codes.Unimplemented, "method ConnectInternal not implemented")
}
func (UnimplementedStreamAPIExtensionServer) mustEmbedUnimplementedStreamAPIExtensionServer() {}
// UnsafeStreamAPIExtensionServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to StreamAPIExtensionServer will
// result in compilation errors.
type UnsafeStreamAPIExtensionServer interface {
mustEmbedUnimplementedStreamAPIExtensionServer()
}
func RegisterStreamAPIExtensionServer(s grpc.ServiceRegistrar, srv StreamAPIExtensionServer) {
s.RegisterService(&StreamAPIExtension_ServiceDesc, srv)
}
func _StreamAPIExtension_ConnectInternal_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(StreamAPIExtensionServer).ConnectInternal(&streamAPIExtensionConnectInternalServer{stream})
}
type StreamAPIExtension_ConnectInternalServer interface {
Send(*totem.RPC) error
Recv() (*totem.RPC, error)
grpc.ServerStream
}
type streamAPIExtensionConnectInternalServer struct {
grpc.ServerStream
}
func (x *streamAPIExtensionConnectInternalServer) Send(m *totem.RPC) error {
return x.ServerStream.SendMsg(m)
}
func (x *streamAPIExtensionConnectInternalServer) Recv() (*totem.RPC, error) {
m := new(totem.RPC)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// StreamAPIExtension_ServiceDesc is the grpc.ServiceDesc for StreamAPIExtension service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var StreamAPIExtension_ServiceDesc = grpc.ServiceDesc{
ServiceName: "apiextensions.StreamAPIExtension",
HandlerType: (*StreamAPIExtensionServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "ConnectInternal",
Handler: _StreamAPIExtension_ConnectInternal_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "github.com/rancher/opni/pkg/plugins/apis/apiextensions/apiextensions.proto",
}
const (
UnaryAPIExtension_UnaryDescriptor_FullMethodName = "/apiextensions.UnaryAPIExtension/UnaryDescriptor"
)
// UnaryAPIExtensionClient is the client API for UnaryAPIExtension 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 UnaryAPIExtensionClient interface {
UnaryDescriptor(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*descriptorpb.ServiceDescriptorProto, error)
}
type unaryAPIExtensionClient struct {
cc grpc.ClientConnInterface
}
func NewUnaryAPIExtensionClient(cc grpc.ClientConnInterface) UnaryAPIExtensionClient {
return &unaryAPIExtensionClient{cc}
}
func (c *unaryAPIExtensionClient) UnaryDescriptor(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*descriptorpb.ServiceDescriptorProto, error) {
out := new(descriptorpb.ServiceDescriptorProto)
err := c.cc.Invoke(ctx, UnaryAPIExtension_UnaryDescriptor_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UnaryAPIExtensionServer is the server API for UnaryAPIExtension service.
// All implementations must embed UnimplementedUnaryAPIExtensionServer
// for forward compatibility
type UnaryAPIExtensionServer interface {
UnaryDescriptor(context.Context, *emptypb.Empty) (*descriptorpb.ServiceDescriptorProto, error)
mustEmbedUnimplementedUnaryAPIExtensionServer()
}
// UnimplementedUnaryAPIExtensionServer must be embedded to have forward compatible implementations.
type UnimplementedUnaryAPIExtensionServer struct {
}
func (UnimplementedUnaryAPIExtensionServer) UnaryDescriptor(context.Context, *emptypb.Empty) (*descriptorpb.ServiceDescriptorProto, error) {
return nil, status.Errorf(codes.Unimplemented, "method UnaryDescriptor not implemented")
}
func (UnimplementedUnaryAPIExtensionServer) mustEmbedUnimplementedUnaryAPIExtensionServer() {}
// UnsafeUnaryAPIExtensionServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UnaryAPIExtensionServer will
// result in compilation errors.
type UnsafeUnaryAPIExtensionServer interface {
mustEmbedUnimplementedUnaryAPIExtensionServer()
}
func RegisterUnaryAPIExtensionServer(s grpc.ServiceRegistrar, srv UnaryAPIExtensionServer) {
s.RegisterService(&UnaryAPIExtension_ServiceDesc, srv)
}
func _UnaryAPIExtension_UnaryDescriptor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UnaryAPIExtensionServer).UnaryDescriptor(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: UnaryAPIExtension_UnaryDescriptor_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UnaryAPIExtensionServer).UnaryDescriptor(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
// UnaryAPIExtension_ServiceDesc is the grpc.ServiceDesc for UnaryAPIExtension service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UnaryAPIExtension_ServiceDesc = grpc.ServiceDesc{
ServiceName: "apiextensions.UnaryAPIExtension",
HandlerType: (*UnaryAPIExtensionServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UnaryDescriptor",
Handler: _UnaryAPIExtension_UnaryDescriptor_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "github.com/rancher/opni/pkg/plugins/apis/apiextensions/apiextensions.proto",
}