-
Notifications
You must be signed in to change notification settings - Fork 567
/
license_grpc.pb.go
419 lines (388 loc) · 15.8 KB
/
license_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
416
417
418
419
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v4.25.1
// source: license/license.proto
package license
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
const (
API_Activate_FullMethodName = "/license_v2.API/Activate"
API_GetActivationCode_FullMethodName = "/license_v2.API/GetActivationCode"
API_DeleteAll_FullMethodName = "/license_v2.API/DeleteAll"
API_AddCluster_FullMethodName = "/license_v2.API/AddCluster"
API_DeleteCluster_FullMethodName = "/license_v2.API/DeleteCluster"
API_ListClusters_FullMethodName = "/license_v2.API/ListClusters"
API_UpdateCluster_FullMethodName = "/license_v2.API/UpdateCluster"
API_Heartbeat_FullMethodName = "/license_v2.API/Heartbeat"
API_ListUserClusters_FullMethodName = "/license_v2.API/ListUserClusters"
)
// APIClient is the client API for API 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 APIClient interface {
// Activate enables the license service by setting the enterprise activation
// code to serve.
Activate(ctx context.Context, in *ActivateRequest, opts ...grpc.CallOption) (*ActivateResponse, error)
GetActivationCode(ctx context.Context, in *GetActivationCodeRequest, opts ...grpc.CallOption) (*GetActivationCodeResponse, error)
// DeleteAll deactivates the server and removes all data.
DeleteAll(ctx context.Context, in *DeleteAllRequest, opts ...grpc.CallOption) (*DeleteAllResponse, error)
// CRUD operations for the pachds registered with this server.
AddCluster(ctx context.Context, in *AddClusterRequest, opts ...grpc.CallOption) (*AddClusterResponse, error)
DeleteCluster(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*DeleteClusterResponse, error)
ListClusters(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error)
UpdateCluster(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*UpdateClusterResponse, error)
// Heartbeat is the RPC registered pachds make to the license server
// to communicate their status and fetch updates.
Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error)
// Lists all clusters available to user
ListUserClusters(ctx context.Context, in *ListUserClustersRequest, opts ...grpc.CallOption) (*ListUserClustersResponse, error)
}
type aPIClient struct {
cc grpc.ClientConnInterface
}
func NewAPIClient(cc grpc.ClientConnInterface) APIClient {
return &aPIClient{cc}
}
func (c *aPIClient) Activate(ctx context.Context, in *ActivateRequest, opts ...grpc.CallOption) (*ActivateResponse, error) {
out := new(ActivateResponse)
err := c.cc.Invoke(ctx, API_Activate_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) GetActivationCode(ctx context.Context, in *GetActivationCodeRequest, opts ...grpc.CallOption) (*GetActivationCodeResponse, error) {
out := new(GetActivationCodeResponse)
err := c.cc.Invoke(ctx, API_GetActivationCode_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) DeleteAll(ctx context.Context, in *DeleteAllRequest, opts ...grpc.CallOption) (*DeleteAllResponse, error) {
out := new(DeleteAllResponse)
err := c.cc.Invoke(ctx, API_DeleteAll_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) AddCluster(ctx context.Context, in *AddClusterRequest, opts ...grpc.CallOption) (*AddClusterResponse, error) {
out := new(AddClusterResponse)
err := c.cc.Invoke(ctx, API_AddCluster_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) DeleteCluster(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*DeleteClusterResponse, error) {
out := new(DeleteClusterResponse)
err := c.cc.Invoke(ctx, API_DeleteCluster_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) ListClusters(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error) {
out := new(ListClustersResponse)
err := c.cc.Invoke(ctx, API_ListClusters_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) UpdateCluster(ctx context.Context, in *UpdateClusterRequest, opts ...grpc.CallOption) (*UpdateClusterResponse, error) {
out := new(UpdateClusterResponse)
err := c.cc.Invoke(ctx, API_UpdateCluster_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error) {
out := new(HeartbeatResponse)
err := c.cc.Invoke(ctx, API_Heartbeat_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) ListUserClusters(ctx context.Context, in *ListUserClustersRequest, opts ...grpc.CallOption) (*ListUserClustersResponse, error) {
out := new(ListUserClustersResponse)
err := c.cc.Invoke(ctx, API_ListUserClusters_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// APIServer is the server API for API service.
// All implementations must embed UnimplementedAPIServer
// for forward compatibility
type APIServer interface {
// Activate enables the license service by setting the enterprise activation
// code to serve.
Activate(context.Context, *ActivateRequest) (*ActivateResponse, error)
GetActivationCode(context.Context, *GetActivationCodeRequest) (*GetActivationCodeResponse, error)
// DeleteAll deactivates the server and removes all data.
DeleteAll(context.Context, *DeleteAllRequest) (*DeleteAllResponse, error)
// CRUD operations for the pachds registered with this server.
AddCluster(context.Context, *AddClusterRequest) (*AddClusterResponse, error)
DeleteCluster(context.Context, *DeleteClusterRequest) (*DeleteClusterResponse, error)
ListClusters(context.Context, *ListClustersRequest) (*ListClustersResponse, error)
UpdateCluster(context.Context, *UpdateClusterRequest) (*UpdateClusterResponse, error)
// Heartbeat is the RPC registered pachds make to the license server
// to communicate their status and fetch updates.
Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
// Lists all clusters available to user
ListUserClusters(context.Context, *ListUserClustersRequest) (*ListUserClustersResponse, error)
mustEmbedUnimplementedAPIServer()
}
// UnimplementedAPIServer must be embedded to have forward compatible implementations.
type UnimplementedAPIServer struct {
}
func (UnimplementedAPIServer) Activate(context.Context, *ActivateRequest) (*ActivateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented")
}
func (UnimplementedAPIServer) GetActivationCode(context.Context, *GetActivationCodeRequest) (*GetActivationCodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetActivationCode not implemented")
}
func (UnimplementedAPIServer) DeleteAll(context.Context, *DeleteAllRequest) (*DeleteAllResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteAll not implemented")
}
func (UnimplementedAPIServer) AddCluster(context.Context, *AddClusterRequest) (*AddClusterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddCluster not implemented")
}
func (UnimplementedAPIServer) DeleteCluster(context.Context, *DeleteClusterRequest) (*DeleteClusterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteCluster not implemented")
}
func (UnimplementedAPIServer) ListClusters(context.Context, *ListClustersRequest) (*ListClustersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListClusters not implemented")
}
func (UnimplementedAPIServer) UpdateCluster(context.Context, *UpdateClusterRequest) (*UpdateClusterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCluster not implemented")
}
func (UnimplementedAPIServer) Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Heartbeat not implemented")
}
func (UnimplementedAPIServer) ListUserClusters(context.Context, *ListUserClustersRequest) (*ListUserClustersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListUserClusters not implemented")
}
func (UnimplementedAPIServer) mustEmbedUnimplementedAPIServer() {}
// UnsafeAPIServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to APIServer will
// result in compilation errors.
type UnsafeAPIServer interface {
mustEmbedUnimplementedAPIServer()
}
func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer) {
s.RegisterService(&API_ServiceDesc, srv)
}
func _API_Activate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ActivateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Activate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: API_Activate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Activate(ctx, req.(*ActivateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_GetActivationCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetActivationCodeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).GetActivationCode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: API_GetActivationCode_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).GetActivationCode(ctx, req.(*GetActivationCodeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_DeleteAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteAllRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).DeleteAll(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: API_DeleteAll_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).DeleteAll(ctx, req.(*DeleteAllRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_AddCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddClusterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).AddCluster(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: API_AddCluster_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).AddCluster(ctx, req.(*AddClusterRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_DeleteCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteClusterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).DeleteCluster(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: API_DeleteCluster_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).DeleteCluster(ctx, req.(*DeleteClusterRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_ListClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListClustersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).ListClusters(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: API_ListClusters_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).ListClusters(ctx, req.(*ListClustersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_UpdateCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateClusterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).UpdateCluster(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: API_UpdateCluster_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).UpdateCluster(ctx, req.(*UpdateClusterRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_Heartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HeartbeatRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Heartbeat(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: API_Heartbeat_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Heartbeat(ctx, req.(*HeartbeatRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_ListUserClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListUserClustersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).ListUserClusters(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: API_ListUserClusters_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).ListUserClusters(ctx, req.(*ListUserClustersRequest))
}
return interceptor(ctx, in, info, handler)
}
// API_ServiceDesc is the grpc.ServiceDesc for API service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var API_ServiceDesc = grpc.ServiceDesc{
ServiceName: "license_v2.API",
HandlerType: (*APIServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Activate",
Handler: _API_Activate_Handler,
},
{
MethodName: "GetActivationCode",
Handler: _API_GetActivationCode_Handler,
},
{
MethodName: "DeleteAll",
Handler: _API_DeleteAll_Handler,
},
{
MethodName: "AddCluster",
Handler: _API_AddCluster_Handler,
},
{
MethodName: "DeleteCluster",
Handler: _API_DeleteCluster_Handler,
},
{
MethodName: "ListClusters",
Handler: _API_ListClusters_Handler,
},
{
MethodName: "UpdateCluster",
Handler: _API_UpdateCluster_Handler,
},
{
MethodName: "Heartbeat",
Handler: _API_Heartbeat_Handler,
},
{
MethodName: "ListUserClusters",
Handler: _API_ListUserClusters_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "license/license.proto",
}