Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
lima-vm
GitHub Repository: lima-vm/lima
Path: blob/master/pkg/driver/external/driver_grpc.pb.go
2611 views
1
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
// versions:
3
// - protoc-gen-go-grpc [version omitted for reproducibility]
4
// - protoc [version omitted for reproducibility]
5
// source: driver.proto
6
7
package external
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
emptypb "google.golang.org/protobuf/types/known/emptypb"
15
)
16
17
// This is a compile-time assertion to ensure that this generated file
18
// is compatible with the grpc package it is being compiled against.
19
// Requires gRPC-Go v1.64.0 or later.
20
const _ = grpc.SupportPackageIsVersion9
21
22
const (
23
Driver_Validate_FullMethodName = "/Driver/Validate"
24
Driver_Create_FullMethodName = "/Driver/Create"
25
Driver_CreateDisk_FullMethodName = "/Driver/CreateDisk"
26
Driver_Start_FullMethodName = "/Driver/Start"
27
Driver_Stop_FullMethodName = "/Driver/Stop"
28
Driver_Delete_FullMethodName = "/Driver/Delete"
29
Driver_BootScripts_FullMethodName = "/Driver/BootScripts"
30
Driver_RunGUI_FullMethodName = "/Driver/RunGUI"
31
Driver_ChangeDisplayPassword_FullMethodName = "/Driver/ChangeDisplayPassword"
32
Driver_GetDisplayConnection_FullMethodName = "/Driver/GetDisplayConnection"
33
Driver_CreateSnapshot_FullMethodName = "/Driver/CreateSnapshot"
34
Driver_ApplySnapshot_FullMethodName = "/Driver/ApplySnapshot"
35
Driver_DeleteSnapshot_FullMethodName = "/Driver/DeleteSnapshot"
36
Driver_ListSnapshots_FullMethodName = "/Driver/ListSnapshots"
37
Driver_ForwardGuestAgent_FullMethodName = "/Driver/ForwardGuestAgent"
38
Driver_GuestAgentConn_FullMethodName = "/Driver/GuestAgentConn"
39
Driver_Configure_FullMethodName = "/Driver/Configure"
40
Driver_Info_FullMethodName = "/Driver/Info"
41
Driver_SSHAddress_FullMethodName = "/Driver/SSHAddress"
42
Driver_AdditionalSetupForSSH_FullMethodName = "/Driver/AdditionalSetupForSSH"
43
)
44
45
// DriverClient is the client API for Driver service.
46
//
47
// 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.
48
type DriverClient interface {
49
Validate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
50
Create(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
51
CreateDisk(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
52
Start(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StartResponse], error)
53
Stop(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
54
Delete(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
55
BootScripts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BootScriptsResponse, error)
56
RunGUI(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
57
ChangeDisplayPassword(ctx context.Context, in *ChangeDisplayPasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
58
GetDisplayConnection(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetDisplayConnectionResponse, error)
59
CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
60
ApplySnapshot(ctx context.Context, in *ApplySnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
61
DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
62
ListSnapshots(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListSnapshotsResponse, error)
63
ForwardGuestAgent(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ForwardGuestAgentResponse, error)
64
GuestAgentConn(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
65
Configure(ctx context.Context, in *SetConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
66
Info(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfoResponse, error)
67
SSHAddress(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SSHAddressResponse, error)
68
// AdditionalSetupForSSH provides additional setup required for SSH connection.
69
// It is called after VM is started, before first SSH connection.
70
AdditionalSetupForSSH(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
71
}
72
73
type driverClient struct {
74
cc grpc.ClientConnInterface
75
}
76
77
func NewDriverClient(cc grpc.ClientConnInterface) DriverClient {
78
return &driverClient{cc}
79
}
80
81
func (c *driverClient) Validate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
82
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
83
out := new(emptypb.Empty)
84
err := c.cc.Invoke(ctx, Driver_Validate_FullMethodName, in, out, cOpts...)
85
if err != nil {
86
return nil, err
87
}
88
return out, nil
89
}
90
91
func (c *driverClient) Create(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
92
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
93
out := new(emptypb.Empty)
94
err := c.cc.Invoke(ctx, Driver_Create_FullMethodName, in, out, cOpts...)
95
if err != nil {
96
return nil, err
97
}
98
return out, nil
99
}
100
101
func (c *driverClient) CreateDisk(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
102
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
103
out := new(emptypb.Empty)
104
err := c.cc.Invoke(ctx, Driver_CreateDisk_FullMethodName, in, out, cOpts...)
105
if err != nil {
106
return nil, err
107
}
108
return out, nil
109
}
110
111
func (c *driverClient) Start(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StartResponse], error) {
112
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
113
stream, err := c.cc.NewStream(ctx, &Driver_ServiceDesc.Streams[0], Driver_Start_FullMethodName, cOpts...)
114
if err != nil {
115
return nil, err
116
}
117
x := &grpc.GenericClientStream[emptypb.Empty, StartResponse]{ClientStream: stream}
118
if err := x.ClientStream.SendMsg(in); err != nil {
119
return nil, err
120
}
121
if err := x.ClientStream.CloseSend(); err != nil {
122
return nil, err
123
}
124
return x, nil
125
}
126
127
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
128
type Driver_StartClient = grpc.ServerStreamingClient[StartResponse]
129
130
func (c *driverClient) Stop(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
131
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
132
out := new(emptypb.Empty)
133
err := c.cc.Invoke(ctx, Driver_Stop_FullMethodName, in, out, cOpts...)
134
if err != nil {
135
return nil, err
136
}
137
return out, nil
138
}
139
140
func (c *driverClient) Delete(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
141
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
142
out := new(emptypb.Empty)
143
err := c.cc.Invoke(ctx, Driver_Delete_FullMethodName, in, out, cOpts...)
144
if err != nil {
145
return nil, err
146
}
147
return out, nil
148
}
149
150
func (c *driverClient) BootScripts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BootScriptsResponse, error) {
151
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
152
out := new(BootScriptsResponse)
153
err := c.cc.Invoke(ctx, Driver_BootScripts_FullMethodName, in, out, cOpts...)
154
if err != nil {
155
return nil, err
156
}
157
return out, nil
158
}
159
160
func (c *driverClient) RunGUI(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
161
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
162
out := new(emptypb.Empty)
163
err := c.cc.Invoke(ctx, Driver_RunGUI_FullMethodName, in, out, cOpts...)
164
if err != nil {
165
return nil, err
166
}
167
return out, nil
168
}
169
170
func (c *driverClient) ChangeDisplayPassword(ctx context.Context, in *ChangeDisplayPasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
171
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
172
out := new(emptypb.Empty)
173
err := c.cc.Invoke(ctx, Driver_ChangeDisplayPassword_FullMethodName, in, out, cOpts...)
174
if err != nil {
175
return nil, err
176
}
177
return out, nil
178
}
179
180
func (c *driverClient) GetDisplayConnection(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetDisplayConnectionResponse, error) {
181
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
182
out := new(GetDisplayConnectionResponse)
183
err := c.cc.Invoke(ctx, Driver_GetDisplayConnection_FullMethodName, in, out, cOpts...)
184
if err != nil {
185
return nil, err
186
}
187
return out, nil
188
}
189
190
func (c *driverClient) CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
191
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
192
out := new(emptypb.Empty)
193
err := c.cc.Invoke(ctx, Driver_CreateSnapshot_FullMethodName, in, out, cOpts...)
194
if err != nil {
195
return nil, err
196
}
197
return out, nil
198
}
199
200
func (c *driverClient) ApplySnapshot(ctx context.Context, in *ApplySnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
201
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
202
out := new(emptypb.Empty)
203
err := c.cc.Invoke(ctx, Driver_ApplySnapshot_FullMethodName, in, out, cOpts...)
204
if err != nil {
205
return nil, err
206
}
207
return out, nil
208
}
209
210
func (c *driverClient) DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
211
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
212
out := new(emptypb.Empty)
213
err := c.cc.Invoke(ctx, Driver_DeleteSnapshot_FullMethodName, in, out, cOpts...)
214
if err != nil {
215
return nil, err
216
}
217
return out, nil
218
}
219
220
func (c *driverClient) ListSnapshots(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListSnapshotsResponse, error) {
221
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
222
out := new(ListSnapshotsResponse)
223
err := c.cc.Invoke(ctx, Driver_ListSnapshots_FullMethodName, in, out, cOpts...)
224
if err != nil {
225
return nil, err
226
}
227
return out, nil
228
}
229
230
func (c *driverClient) ForwardGuestAgent(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ForwardGuestAgentResponse, error) {
231
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
232
out := new(ForwardGuestAgentResponse)
233
err := c.cc.Invoke(ctx, Driver_ForwardGuestAgent_FullMethodName, in, out, cOpts...)
234
if err != nil {
235
return nil, err
236
}
237
return out, nil
238
}
239
240
func (c *driverClient) GuestAgentConn(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
241
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
242
out := new(emptypb.Empty)
243
err := c.cc.Invoke(ctx, Driver_GuestAgentConn_FullMethodName, in, out, cOpts...)
244
if err != nil {
245
return nil, err
246
}
247
return out, nil
248
}
249
250
func (c *driverClient) Configure(ctx context.Context, in *SetConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
251
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
252
out := new(emptypb.Empty)
253
err := c.cc.Invoke(ctx, Driver_Configure_FullMethodName, in, out, cOpts...)
254
if err != nil {
255
return nil, err
256
}
257
return out, nil
258
}
259
260
func (c *driverClient) Info(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InfoResponse, error) {
261
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
262
out := new(InfoResponse)
263
err := c.cc.Invoke(ctx, Driver_Info_FullMethodName, in, out, cOpts...)
264
if err != nil {
265
return nil, err
266
}
267
return out, nil
268
}
269
270
func (c *driverClient) SSHAddress(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SSHAddressResponse, error) {
271
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
272
out := new(SSHAddressResponse)
273
err := c.cc.Invoke(ctx, Driver_SSHAddress_FullMethodName, in, out, cOpts...)
274
if err != nil {
275
return nil, err
276
}
277
return out, nil
278
}
279
280
func (c *driverClient) AdditionalSetupForSSH(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
281
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
282
out := new(emptypb.Empty)
283
err := c.cc.Invoke(ctx, Driver_AdditionalSetupForSSH_FullMethodName, in, out, cOpts...)
284
if err != nil {
285
return nil, err
286
}
287
return out, nil
288
}
289
290
// DriverServer is the server API for Driver service.
291
// All implementations must embed UnimplementedDriverServer
292
// for forward compatibility.
293
type DriverServer interface {
294
Validate(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
295
Create(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
296
CreateDisk(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
297
Start(*emptypb.Empty, grpc.ServerStreamingServer[StartResponse]) error
298
Stop(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
299
Delete(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
300
BootScripts(context.Context, *emptypb.Empty) (*BootScriptsResponse, error)
301
RunGUI(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
302
ChangeDisplayPassword(context.Context, *ChangeDisplayPasswordRequest) (*emptypb.Empty, error)
303
GetDisplayConnection(context.Context, *emptypb.Empty) (*GetDisplayConnectionResponse, error)
304
CreateSnapshot(context.Context, *CreateSnapshotRequest) (*emptypb.Empty, error)
305
ApplySnapshot(context.Context, *ApplySnapshotRequest) (*emptypb.Empty, error)
306
DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*emptypb.Empty, error)
307
ListSnapshots(context.Context, *emptypb.Empty) (*ListSnapshotsResponse, error)
308
ForwardGuestAgent(context.Context, *emptypb.Empty) (*ForwardGuestAgentResponse, error)
309
GuestAgentConn(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
310
Configure(context.Context, *SetConfigRequest) (*emptypb.Empty, error)
311
Info(context.Context, *emptypb.Empty) (*InfoResponse, error)
312
SSHAddress(context.Context, *emptypb.Empty) (*SSHAddressResponse, error)
313
// AdditionalSetupForSSH provides additional setup required for SSH connection.
314
// It is called after VM is started, before first SSH connection.
315
AdditionalSetupForSSH(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
316
mustEmbedUnimplementedDriverServer()
317
}
318
319
// UnimplementedDriverServer must be embedded to have
320
// forward compatible implementations.
321
//
322
// NOTE: this should be embedded by value instead of pointer to avoid a nil
323
// pointer dereference when methods are called.
324
type UnimplementedDriverServer struct{}
325
326
func (UnimplementedDriverServer) Validate(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
327
return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented")
328
}
329
func (UnimplementedDriverServer) Create(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
330
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
331
}
332
func (UnimplementedDriverServer) CreateDisk(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
333
return nil, status.Errorf(codes.Unimplemented, "method CreateDisk not implemented")
334
}
335
func (UnimplementedDriverServer) Start(*emptypb.Empty, grpc.ServerStreamingServer[StartResponse]) error {
336
return status.Errorf(codes.Unimplemented, "method Start not implemented")
337
}
338
func (UnimplementedDriverServer) Stop(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
339
return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
340
}
341
func (UnimplementedDriverServer) Delete(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
342
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
343
}
344
func (UnimplementedDriverServer) BootScripts(context.Context, *emptypb.Empty) (*BootScriptsResponse, error) {
345
return nil, status.Errorf(codes.Unimplemented, "method BootScripts not implemented")
346
}
347
func (UnimplementedDriverServer) RunGUI(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
348
return nil, status.Errorf(codes.Unimplemented, "method RunGUI not implemented")
349
}
350
func (UnimplementedDriverServer) ChangeDisplayPassword(context.Context, *ChangeDisplayPasswordRequest) (*emptypb.Empty, error) {
351
return nil, status.Errorf(codes.Unimplemented, "method ChangeDisplayPassword not implemented")
352
}
353
func (UnimplementedDriverServer) GetDisplayConnection(context.Context, *emptypb.Empty) (*GetDisplayConnectionResponse, error) {
354
return nil, status.Errorf(codes.Unimplemented, "method GetDisplayConnection not implemented")
355
}
356
func (UnimplementedDriverServer) CreateSnapshot(context.Context, *CreateSnapshotRequest) (*emptypb.Empty, error) {
357
return nil, status.Errorf(codes.Unimplemented, "method CreateSnapshot not implemented")
358
}
359
func (UnimplementedDriverServer) ApplySnapshot(context.Context, *ApplySnapshotRequest) (*emptypb.Empty, error) {
360
return nil, status.Errorf(codes.Unimplemented, "method ApplySnapshot not implemented")
361
}
362
func (UnimplementedDriverServer) DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*emptypb.Empty, error) {
363
return nil, status.Errorf(codes.Unimplemented, "method DeleteSnapshot not implemented")
364
}
365
func (UnimplementedDriverServer) ListSnapshots(context.Context, *emptypb.Empty) (*ListSnapshotsResponse, error) {
366
return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented")
367
}
368
func (UnimplementedDriverServer) ForwardGuestAgent(context.Context, *emptypb.Empty) (*ForwardGuestAgentResponse, error) {
369
return nil, status.Errorf(codes.Unimplemented, "method ForwardGuestAgent not implemented")
370
}
371
func (UnimplementedDriverServer) GuestAgentConn(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
372
return nil, status.Errorf(codes.Unimplemented, "method GuestAgentConn not implemented")
373
}
374
func (UnimplementedDriverServer) Configure(context.Context, *SetConfigRequest) (*emptypb.Empty, error) {
375
return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
376
}
377
func (UnimplementedDriverServer) Info(context.Context, *emptypb.Empty) (*InfoResponse, error) {
378
return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
379
}
380
func (UnimplementedDriverServer) SSHAddress(context.Context, *emptypb.Empty) (*SSHAddressResponse, error) {
381
return nil, status.Errorf(codes.Unimplemented, "method SSHAddress not implemented")
382
}
383
func (UnimplementedDriverServer) AdditionalSetupForSSH(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
384
return nil, status.Errorf(codes.Unimplemented, "method AdditionalSetupForSSH not implemented")
385
}
386
func (UnimplementedDriverServer) mustEmbedUnimplementedDriverServer() {}
387
func (UnimplementedDriverServer) testEmbeddedByValue() {}
388
389
// UnsafeDriverServer may be embedded to opt out of forward compatibility for this service.
390
// Use of this interface is not recommended, as added methods to DriverServer will
391
// result in compilation errors.
392
type UnsafeDriverServer interface {
393
mustEmbedUnimplementedDriverServer()
394
}
395
396
func RegisterDriverServer(s grpc.ServiceRegistrar, srv DriverServer) {
397
// If the following call pancis, it indicates UnimplementedDriverServer was
398
// embedded by pointer and is nil. This will cause panics if an
399
// unimplemented method is ever invoked, so we test this at initialization
400
// time to prevent it from happening at runtime later due to I/O.
401
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
402
t.testEmbeddedByValue()
403
}
404
s.RegisterService(&Driver_ServiceDesc, srv)
405
}
406
407
func _Driver_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
408
in := new(emptypb.Empty)
409
if err := dec(in); err != nil {
410
return nil, err
411
}
412
if interceptor == nil {
413
return srv.(DriverServer).Validate(ctx, in)
414
}
415
info := &grpc.UnaryServerInfo{
416
Server: srv,
417
FullMethod: Driver_Validate_FullMethodName,
418
}
419
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
420
return srv.(DriverServer).Validate(ctx, req.(*emptypb.Empty))
421
}
422
return interceptor(ctx, in, info, handler)
423
}
424
425
func _Driver_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
426
in := new(emptypb.Empty)
427
if err := dec(in); err != nil {
428
return nil, err
429
}
430
if interceptor == nil {
431
return srv.(DriverServer).Create(ctx, in)
432
}
433
info := &grpc.UnaryServerInfo{
434
Server: srv,
435
FullMethod: Driver_Create_FullMethodName,
436
}
437
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
438
return srv.(DriverServer).Create(ctx, req.(*emptypb.Empty))
439
}
440
return interceptor(ctx, in, info, handler)
441
}
442
443
func _Driver_CreateDisk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
444
in := new(emptypb.Empty)
445
if err := dec(in); err != nil {
446
return nil, err
447
}
448
if interceptor == nil {
449
return srv.(DriverServer).CreateDisk(ctx, in)
450
}
451
info := &grpc.UnaryServerInfo{
452
Server: srv,
453
FullMethod: Driver_CreateDisk_FullMethodName,
454
}
455
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
456
return srv.(DriverServer).CreateDisk(ctx, req.(*emptypb.Empty))
457
}
458
return interceptor(ctx, in, info, handler)
459
}
460
461
func _Driver_Start_Handler(srv interface{}, stream grpc.ServerStream) error {
462
m := new(emptypb.Empty)
463
if err := stream.RecvMsg(m); err != nil {
464
return err
465
}
466
return srv.(DriverServer).Start(m, &grpc.GenericServerStream[emptypb.Empty, StartResponse]{ServerStream: stream})
467
}
468
469
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
470
type Driver_StartServer = grpc.ServerStreamingServer[StartResponse]
471
472
func _Driver_Stop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
473
in := new(emptypb.Empty)
474
if err := dec(in); err != nil {
475
return nil, err
476
}
477
if interceptor == nil {
478
return srv.(DriverServer).Stop(ctx, in)
479
}
480
info := &grpc.UnaryServerInfo{
481
Server: srv,
482
FullMethod: Driver_Stop_FullMethodName,
483
}
484
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
485
return srv.(DriverServer).Stop(ctx, req.(*emptypb.Empty))
486
}
487
return interceptor(ctx, in, info, handler)
488
}
489
490
func _Driver_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
491
in := new(emptypb.Empty)
492
if err := dec(in); err != nil {
493
return nil, err
494
}
495
if interceptor == nil {
496
return srv.(DriverServer).Delete(ctx, in)
497
}
498
info := &grpc.UnaryServerInfo{
499
Server: srv,
500
FullMethod: Driver_Delete_FullMethodName,
501
}
502
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
503
return srv.(DriverServer).Delete(ctx, req.(*emptypb.Empty))
504
}
505
return interceptor(ctx, in, info, handler)
506
}
507
508
func _Driver_BootScripts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
509
in := new(emptypb.Empty)
510
if err := dec(in); err != nil {
511
return nil, err
512
}
513
if interceptor == nil {
514
return srv.(DriverServer).BootScripts(ctx, in)
515
}
516
info := &grpc.UnaryServerInfo{
517
Server: srv,
518
FullMethod: Driver_BootScripts_FullMethodName,
519
}
520
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
521
return srv.(DriverServer).BootScripts(ctx, req.(*emptypb.Empty))
522
}
523
return interceptor(ctx, in, info, handler)
524
}
525
526
func _Driver_RunGUI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
527
in := new(emptypb.Empty)
528
if err := dec(in); err != nil {
529
return nil, err
530
}
531
if interceptor == nil {
532
return srv.(DriverServer).RunGUI(ctx, in)
533
}
534
info := &grpc.UnaryServerInfo{
535
Server: srv,
536
FullMethod: Driver_RunGUI_FullMethodName,
537
}
538
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
539
return srv.(DriverServer).RunGUI(ctx, req.(*emptypb.Empty))
540
}
541
return interceptor(ctx, in, info, handler)
542
}
543
544
func _Driver_ChangeDisplayPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
545
in := new(ChangeDisplayPasswordRequest)
546
if err := dec(in); err != nil {
547
return nil, err
548
}
549
if interceptor == nil {
550
return srv.(DriverServer).ChangeDisplayPassword(ctx, in)
551
}
552
info := &grpc.UnaryServerInfo{
553
Server: srv,
554
FullMethod: Driver_ChangeDisplayPassword_FullMethodName,
555
}
556
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
557
return srv.(DriverServer).ChangeDisplayPassword(ctx, req.(*ChangeDisplayPasswordRequest))
558
}
559
return interceptor(ctx, in, info, handler)
560
}
561
562
func _Driver_GetDisplayConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
563
in := new(emptypb.Empty)
564
if err := dec(in); err != nil {
565
return nil, err
566
}
567
if interceptor == nil {
568
return srv.(DriverServer).GetDisplayConnection(ctx, in)
569
}
570
info := &grpc.UnaryServerInfo{
571
Server: srv,
572
FullMethod: Driver_GetDisplayConnection_FullMethodName,
573
}
574
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
575
return srv.(DriverServer).GetDisplayConnection(ctx, req.(*emptypb.Empty))
576
}
577
return interceptor(ctx, in, info, handler)
578
}
579
580
func _Driver_CreateSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
581
in := new(CreateSnapshotRequest)
582
if err := dec(in); err != nil {
583
return nil, err
584
}
585
if interceptor == nil {
586
return srv.(DriverServer).CreateSnapshot(ctx, in)
587
}
588
info := &grpc.UnaryServerInfo{
589
Server: srv,
590
FullMethod: Driver_CreateSnapshot_FullMethodName,
591
}
592
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
593
return srv.(DriverServer).CreateSnapshot(ctx, req.(*CreateSnapshotRequest))
594
}
595
return interceptor(ctx, in, info, handler)
596
}
597
598
func _Driver_ApplySnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
599
in := new(ApplySnapshotRequest)
600
if err := dec(in); err != nil {
601
return nil, err
602
}
603
if interceptor == nil {
604
return srv.(DriverServer).ApplySnapshot(ctx, in)
605
}
606
info := &grpc.UnaryServerInfo{
607
Server: srv,
608
FullMethod: Driver_ApplySnapshot_FullMethodName,
609
}
610
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
611
return srv.(DriverServer).ApplySnapshot(ctx, req.(*ApplySnapshotRequest))
612
}
613
return interceptor(ctx, in, info, handler)
614
}
615
616
func _Driver_DeleteSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
617
in := new(DeleteSnapshotRequest)
618
if err := dec(in); err != nil {
619
return nil, err
620
}
621
if interceptor == nil {
622
return srv.(DriverServer).DeleteSnapshot(ctx, in)
623
}
624
info := &grpc.UnaryServerInfo{
625
Server: srv,
626
FullMethod: Driver_DeleteSnapshot_FullMethodName,
627
}
628
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
629
return srv.(DriverServer).DeleteSnapshot(ctx, req.(*DeleteSnapshotRequest))
630
}
631
return interceptor(ctx, in, info, handler)
632
}
633
634
func _Driver_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
635
in := new(emptypb.Empty)
636
if err := dec(in); err != nil {
637
return nil, err
638
}
639
if interceptor == nil {
640
return srv.(DriverServer).ListSnapshots(ctx, in)
641
}
642
info := &grpc.UnaryServerInfo{
643
Server: srv,
644
FullMethod: Driver_ListSnapshots_FullMethodName,
645
}
646
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
647
return srv.(DriverServer).ListSnapshots(ctx, req.(*emptypb.Empty))
648
}
649
return interceptor(ctx, in, info, handler)
650
}
651
652
func _Driver_ForwardGuestAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
653
in := new(emptypb.Empty)
654
if err := dec(in); err != nil {
655
return nil, err
656
}
657
if interceptor == nil {
658
return srv.(DriverServer).ForwardGuestAgent(ctx, in)
659
}
660
info := &grpc.UnaryServerInfo{
661
Server: srv,
662
FullMethod: Driver_ForwardGuestAgent_FullMethodName,
663
}
664
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
665
return srv.(DriverServer).ForwardGuestAgent(ctx, req.(*emptypb.Empty))
666
}
667
return interceptor(ctx, in, info, handler)
668
}
669
670
func _Driver_GuestAgentConn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
671
in := new(emptypb.Empty)
672
if err := dec(in); err != nil {
673
return nil, err
674
}
675
if interceptor == nil {
676
return srv.(DriverServer).GuestAgentConn(ctx, in)
677
}
678
info := &grpc.UnaryServerInfo{
679
Server: srv,
680
FullMethod: Driver_GuestAgentConn_FullMethodName,
681
}
682
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
683
return srv.(DriverServer).GuestAgentConn(ctx, req.(*emptypb.Empty))
684
}
685
return interceptor(ctx, in, info, handler)
686
}
687
688
func _Driver_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
689
in := new(SetConfigRequest)
690
if err := dec(in); err != nil {
691
return nil, err
692
}
693
if interceptor == nil {
694
return srv.(DriverServer).Configure(ctx, in)
695
}
696
info := &grpc.UnaryServerInfo{
697
Server: srv,
698
FullMethod: Driver_Configure_FullMethodName,
699
}
700
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
701
return srv.(DriverServer).Configure(ctx, req.(*SetConfigRequest))
702
}
703
return interceptor(ctx, in, info, handler)
704
}
705
706
func _Driver_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
707
in := new(emptypb.Empty)
708
if err := dec(in); err != nil {
709
return nil, err
710
}
711
if interceptor == nil {
712
return srv.(DriverServer).Info(ctx, in)
713
}
714
info := &grpc.UnaryServerInfo{
715
Server: srv,
716
FullMethod: Driver_Info_FullMethodName,
717
}
718
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
719
return srv.(DriverServer).Info(ctx, req.(*emptypb.Empty))
720
}
721
return interceptor(ctx, in, info, handler)
722
}
723
724
func _Driver_SSHAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
725
in := new(emptypb.Empty)
726
if err := dec(in); err != nil {
727
return nil, err
728
}
729
if interceptor == nil {
730
return srv.(DriverServer).SSHAddress(ctx, in)
731
}
732
info := &grpc.UnaryServerInfo{
733
Server: srv,
734
FullMethod: Driver_SSHAddress_FullMethodName,
735
}
736
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
737
return srv.(DriverServer).SSHAddress(ctx, req.(*emptypb.Empty))
738
}
739
return interceptor(ctx, in, info, handler)
740
}
741
742
func _Driver_AdditionalSetupForSSH_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
743
in := new(emptypb.Empty)
744
if err := dec(in); err != nil {
745
return nil, err
746
}
747
if interceptor == nil {
748
return srv.(DriverServer).AdditionalSetupForSSH(ctx, in)
749
}
750
info := &grpc.UnaryServerInfo{
751
Server: srv,
752
FullMethod: Driver_AdditionalSetupForSSH_FullMethodName,
753
}
754
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
755
return srv.(DriverServer).AdditionalSetupForSSH(ctx, req.(*emptypb.Empty))
756
}
757
return interceptor(ctx, in, info, handler)
758
}
759
760
// Driver_ServiceDesc is the grpc.ServiceDesc for Driver service.
761
// It's only intended for direct use with grpc.RegisterService,
762
// and not to be introspected or modified (even as a copy)
763
var Driver_ServiceDesc = grpc.ServiceDesc{
764
ServiceName: "Driver",
765
HandlerType: (*DriverServer)(nil),
766
Methods: []grpc.MethodDesc{
767
{
768
MethodName: "Validate",
769
Handler: _Driver_Validate_Handler,
770
},
771
{
772
MethodName: "Create",
773
Handler: _Driver_Create_Handler,
774
},
775
{
776
MethodName: "CreateDisk",
777
Handler: _Driver_CreateDisk_Handler,
778
},
779
{
780
MethodName: "Stop",
781
Handler: _Driver_Stop_Handler,
782
},
783
{
784
MethodName: "Delete",
785
Handler: _Driver_Delete_Handler,
786
},
787
{
788
MethodName: "BootScripts",
789
Handler: _Driver_BootScripts_Handler,
790
},
791
{
792
MethodName: "RunGUI",
793
Handler: _Driver_RunGUI_Handler,
794
},
795
{
796
MethodName: "ChangeDisplayPassword",
797
Handler: _Driver_ChangeDisplayPassword_Handler,
798
},
799
{
800
MethodName: "GetDisplayConnection",
801
Handler: _Driver_GetDisplayConnection_Handler,
802
},
803
{
804
MethodName: "CreateSnapshot",
805
Handler: _Driver_CreateSnapshot_Handler,
806
},
807
{
808
MethodName: "ApplySnapshot",
809
Handler: _Driver_ApplySnapshot_Handler,
810
},
811
{
812
MethodName: "DeleteSnapshot",
813
Handler: _Driver_DeleteSnapshot_Handler,
814
},
815
{
816
MethodName: "ListSnapshots",
817
Handler: _Driver_ListSnapshots_Handler,
818
},
819
{
820
MethodName: "ForwardGuestAgent",
821
Handler: _Driver_ForwardGuestAgent_Handler,
822
},
823
{
824
MethodName: "GuestAgentConn",
825
Handler: _Driver_GuestAgentConn_Handler,
826
},
827
{
828
MethodName: "Configure",
829
Handler: _Driver_Configure_Handler,
830
},
831
{
832
MethodName: "Info",
833
Handler: _Driver_Info_Handler,
834
},
835
{
836
MethodName: "SSHAddress",
837
Handler: _Driver_SSHAddress_Handler,
838
},
839
{
840
MethodName: "AdditionalSetupForSSH",
841
Handler: _Driver_AdditionalSetupForSSH_Handler,
842
},
843
},
844
Streams: []grpc.StreamDesc{
845
{
846
StreamName: "Start",
847
Handler: _Driver_Start_Handler,
848
ServerStreams: true,
849
},
850
},
851
Metadata: "driver.proto",
852
}
853
854