-
Notifications
You must be signed in to change notification settings - Fork 0
/
library_grpc.pb.go
539 lines (503 loc) · 21.9 KB
/
library_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
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v4.24.3
// source: cmd/protoc-gen-gors/examples/google/example/library/v1/library.proto
package library
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
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 (
LibraryService_CreateShelf_FullMethodName = "/google.example.library.v1.LibraryService/CreateShelf"
LibraryService_ListOneShelves_FullMethodName = "/google.example.library.v1.LibraryService/ListOneShelves"
LibraryService_GetShelf_FullMethodName = "/google.example.library.v1.LibraryService/GetShelf"
LibraryService_DeleteShelf_FullMethodName = "/google.example.library.v1.LibraryService/DeleteShelf"
LibraryService_ListBooks_FullMethodName = "/google.example.library.v1.LibraryService/ListBooks"
LibraryService_CreateBook_FullMethodName = "/google.example.library.v1.LibraryService/CreateBook"
LibraryService_GetBook_FullMethodName = "/google.example.library.v1.LibraryService/GetBook"
LibraryService_UpdateBook_FullMethodName = "/google.example.library.v1.LibraryService/UpdateBook"
LibraryService_DeleteBook_FullMethodName = "/google.example.library.v1.LibraryService/DeleteBook"
LibraryService_MergeShelves_FullMethodName = "/google.example.library.v1.LibraryService/MergeShelves"
LibraryService_MoveBook_FullMethodName = "/google.example.library.v1.LibraryService/MoveBook"
)
// LibraryServiceClient is the client API for LibraryService 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 LibraryServiceClient interface {
// Creates a shelf, and returns the new Shelf.
CreateShelf(ctx context.Context, in *CreateShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
// Lists shelves. The order is unspecified but deterministic. Newly created
// shelves will not necessarily be added to the end of this list.
ListOneShelves(ctx context.Context, in *ListShelvesRequest, opts ...grpc.CallOption) (*ListShelvesResponse, error)
// Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
// Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
DeleteShelf(ctx context.Context, in *DeleteShelfRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Lists books in a shelf. The order is unspecified but deterministic. Newly
// created books will not necessarily be added to the end of this list.
// Returns NOT_FOUND if the shelf does not exist.
ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error)
// Creates a book, and returns the new Book.
CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error)
// Gets a book. Returns NOT_FOUND if the book does not exist.
GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error)
// Updates a book. Returns INVALID_ARGUMENT if the name of the book
// is non-empty and does not equal the existing name.
UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error)
// Deletes a book. Returns NOT_FOUND if the book does not exist.
DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Merges two shelves by adding all books from the shelf named
// `other_shelf_name` to shelf `name`, and deletes
// `other_shelf_name`. Returns the updated shelf.
// The book ids of the moved books may not be the same as the original books.
//
// Returns NOT_FOUND if either shelf does not exist.
// This call is a no-op if the specified shelves are the same.
MergeShelves(ctx context.Context, in *MergeShelvesRequest, opts ...grpc.CallOption) (*Shelf, error)
// Moves a book to another shelf, and returns the new book. The book
// id of the new book may not be the same as the original book.
MoveBook(ctx context.Context, in *MoveBookRequest, opts ...grpc.CallOption) (*Book, error)
}
type libraryServiceClient struct {
cc grpc.ClientConnInterface
}
func NewLibraryServiceClient(cc grpc.ClientConnInterface) LibraryServiceClient {
return &libraryServiceClient{cc}
}
func (c *libraryServiceClient) CreateShelf(ctx context.Context, in *CreateShelfRequest, opts ...grpc.CallOption) (*Shelf, error) {
out := new(Shelf)
err := c.cc.Invoke(ctx, LibraryService_CreateShelf_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) ListOneShelves(ctx context.Context, in *ListShelvesRequest, opts ...grpc.CallOption) (*ListShelvesResponse, error) {
out := new(ListShelvesResponse)
err := c.cc.Invoke(ctx, LibraryService_ListOneShelves_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error) {
out := new(Shelf)
err := c.cc.Invoke(ctx, LibraryService_GetShelf_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) DeleteShelf(ctx context.Context, in *DeleteShelfRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, LibraryService_DeleteShelf_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) ListBooks(ctx context.Context, in *ListBooksRequest, opts ...grpc.CallOption) (*ListBooksResponse, error) {
out := new(ListBooksResponse)
err := c.cc.Invoke(ctx, LibraryService_ListBooks_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) CreateBook(ctx context.Context, in *CreateBookRequest, opts ...grpc.CallOption) (*Book, error) {
out := new(Book)
err := c.cc.Invoke(ctx, LibraryService_CreateBook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error) {
out := new(Book)
err := c.cc.Invoke(ctx, LibraryService_GetBook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) UpdateBook(ctx context.Context, in *UpdateBookRequest, opts ...grpc.CallOption) (*Book, error) {
out := new(Book)
err := c.cc.Invoke(ctx, LibraryService_UpdateBook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) DeleteBook(ctx context.Context, in *DeleteBookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, LibraryService_DeleteBook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) MergeShelves(ctx context.Context, in *MergeShelvesRequest, opts ...grpc.CallOption) (*Shelf, error) {
out := new(Shelf)
err := c.cc.Invoke(ctx, LibraryService_MergeShelves_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *libraryServiceClient) MoveBook(ctx context.Context, in *MoveBookRequest, opts ...grpc.CallOption) (*Book, error) {
out := new(Book)
err := c.cc.Invoke(ctx, LibraryService_MoveBook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// LibraryServiceServer is the server API for LibraryService service.
// All implementations must embed UnimplementedLibraryServiceServer
// for forward compatibility
type LibraryServiceServer interface {
// Creates a shelf, and returns the new Shelf.
CreateShelf(context.Context, *CreateShelfRequest) (*Shelf, error)
// Lists shelves. The order is unspecified but deterministic. Newly created
// shelves will not necessarily be added to the end of this list.
ListOneShelves(context.Context, *ListShelvesRequest) (*ListShelvesResponse, error)
// Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
GetShelf(context.Context, *GetShelfRequest) (*Shelf, error)
// Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
DeleteShelf(context.Context, *DeleteShelfRequest) (*emptypb.Empty, error)
// Lists books in a shelf. The order is unspecified but deterministic. Newly
// created books will not necessarily be added to the end of this list.
// Returns NOT_FOUND if the shelf does not exist.
ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error)
// Creates a book, and returns the new Book.
CreateBook(context.Context, *CreateBookRequest) (*Book, error)
// Gets a book. Returns NOT_FOUND if the book does not exist.
GetBook(context.Context, *GetBookRequest) (*Book, error)
// Updates a book. Returns INVALID_ARGUMENT if the name of the book
// is non-empty and does not equal the existing name.
UpdateBook(context.Context, *UpdateBookRequest) (*Book, error)
// Deletes a book. Returns NOT_FOUND if the book does not exist.
DeleteBook(context.Context, *DeleteBookRequest) (*emptypb.Empty, error)
// Merges two shelves by adding all books from the shelf named
// `other_shelf_name` to shelf `name`, and deletes
// `other_shelf_name`. Returns the updated shelf.
// The book ids of the moved books may not be the same as the original books.
//
// Returns NOT_FOUND if either shelf does not exist.
// This call is a no-op if the specified shelves are the same.
MergeShelves(context.Context, *MergeShelvesRequest) (*Shelf, error)
// Moves a book to another shelf, and returns the new book. The book
// id of the new book may not be the same as the original book.
MoveBook(context.Context, *MoveBookRequest) (*Book, error)
mustEmbedUnimplementedLibraryServiceServer()
}
// UnimplementedLibraryServiceServer must be embedded to have forward compatible implementations.
type UnimplementedLibraryServiceServer struct {
}
func (UnimplementedLibraryServiceServer) CreateShelf(context.Context, *CreateShelfRequest) (*Shelf, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateShelf not implemented")
}
func (UnimplementedLibraryServiceServer) ListOneShelves(context.Context, *ListShelvesRequest) (*ListShelvesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListOneShelves not implemented")
}
func (UnimplementedLibraryServiceServer) GetShelf(context.Context, *GetShelfRequest) (*Shelf, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetShelf not implemented")
}
func (UnimplementedLibraryServiceServer) DeleteShelf(context.Context, *DeleteShelfRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteShelf not implemented")
}
func (UnimplementedLibraryServiceServer) ListBooks(context.Context, *ListBooksRequest) (*ListBooksResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListBooks not implemented")
}
func (UnimplementedLibraryServiceServer) CreateBook(context.Context, *CreateBookRequest) (*Book, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateBook not implemented")
}
func (UnimplementedLibraryServiceServer) GetBook(context.Context, *GetBookRequest) (*Book, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBook not implemented")
}
func (UnimplementedLibraryServiceServer) UpdateBook(context.Context, *UpdateBookRequest) (*Book, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateBook not implemented")
}
func (UnimplementedLibraryServiceServer) DeleteBook(context.Context, *DeleteBookRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteBook not implemented")
}
func (UnimplementedLibraryServiceServer) MergeShelves(context.Context, *MergeShelvesRequest) (*Shelf, error) {
return nil, status.Errorf(codes.Unimplemented, "method MergeShelves not implemented")
}
func (UnimplementedLibraryServiceServer) MoveBook(context.Context, *MoveBookRequest) (*Book, error) {
return nil, status.Errorf(codes.Unimplemented, "method MoveBook not implemented")
}
func (UnimplementedLibraryServiceServer) mustEmbedUnimplementedLibraryServiceServer() {}
// UnsafeLibraryServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LibraryServiceServer will
// result in compilation errors.
type UnsafeLibraryServiceServer interface {
mustEmbedUnimplementedLibraryServiceServer()
}
func RegisterLibraryServiceServer(s grpc.ServiceRegistrar, srv LibraryServiceServer) {
s.RegisterService(&LibraryService_ServiceDesc, srv)
}
func _LibraryService_CreateShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateShelfRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).CreateShelf(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_CreateShelf_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).CreateShelf(ctx, req.(*CreateShelfRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_ListOneShelves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListShelvesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).ListOneShelves(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_ListOneShelves_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).ListOneShelves(ctx, req.(*ListShelvesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_GetShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetShelfRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).GetShelf(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_GetShelf_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).GetShelf(ctx, req.(*GetShelfRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_DeleteShelf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteShelfRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).DeleteShelf(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_DeleteShelf_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).DeleteShelf(ctx, req.(*DeleteShelfRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_ListBooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListBooksRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).ListBooks(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_ListBooks_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).ListBooks(ctx, req.(*ListBooksRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_CreateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateBookRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).CreateBook(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_CreateBook_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).CreateBook(ctx, req.(*CreateBookRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_GetBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBookRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).GetBook(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_GetBook_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).GetBook(ctx, req.(*GetBookRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_UpdateBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateBookRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).UpdateBook(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_UpdateBook_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).UpdateBook(ctx, req.(*UpdateBookRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_DeleteBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteBookRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).DeleteBook(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_DeleteBook_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).DeleteBook(ctx, req.(*DeleteBookRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_MergeShelves_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MergeShelvesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).MergeShelves(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_MergeShelves_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).MergeShelves(ctx, req.(*MergeShelvesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LibraryService_MoveBook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MoveBookRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LibraryServiceServer).MoveBook(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: LibraryService_MoveBook_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LibraryServiceServer).MoveBook(ctx, req.(*MoveBookRequest))
}
return interceptor(ctx, in, info, handler)
}
// LibraryService_ServiceDesc is the grpc.ServiceDesc for LibraryService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var LibraryService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.example.library.v1.LibraryService",
HandlerType: (*LibraryServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateShelf",
Handler: _LibraryService_CreateShelf_Handler,
},
{
MethodName: "ListOneShelves",
Handler: _LibraryService_ListOneShelves_Handler,
},
{
MethodName: "GetShelf",
Handler: _LibraryService_GetShelf_Handler,
},
{
MethodName: "DeleteShelf",
Handler: _LibraryService_DeleteShelf_Handler,
},
{
MethodName: "ListBooks",
Handler: _LibraryService_ListBooks_Handler,
},
{
MethodName: "CreateBook",
Handler: _LibraryService_CreateBook_Handler,
},
{
MethodName: "GetBook",
Handler: _LibraryService_GetBook_Handler,
},
{
MethodName: "UpdateBook",
Handler: _LibraryService_UpdateBook_Handler,
},
{
MethodName: "DeleteBook",
Handler: _LibraryService_DeleteBook_Handler,
},
{
MethodName: "MergeShelves",
Handler: _LibraryService_MergeShelves_Handler,
},
{
MethodName: "MoveBook",
Handler: _LibraryService_MoveBook_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cmd/protoc-gen-gors/examples/google/example/library/v1/library.proto",
}