-
Notifications
You must be signed in to change notification settings - Fork 302
/
client_services.pb.go
607 lines (561 loc) · 25.9 KB
/
client_services.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
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: lorawan-stack/api/client_services.proto
package ttnpb
import (
context "context"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
golang_proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = golang_proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() {
proto.RegisterFile("lorawan-stack/api/client_services.proto", fileDescriptor_80815ba053239a77)
}
func init() {
golang_proto.RegisterFile("lorawan-stack/api/client_services.proto", fileDescriptor_80815ba053239a77)
}
var fileDescriptor_80815ba053239a77 = []byte{
// 663 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x41, 0x6b, 0x13, 0x41,
0x14, 0x66, 0xab, 0x4d, 0x65, 0x90, 0x16, 0x07, 0xa9, 0xb0, 0x4d, 0xab, 0xdd, 0x16, 0x0a, 0xc1,
0xce, 0x48, 0x4b, 0x41, 0xbc, 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x31, 0x81, 0xc9,
0xe0, 0x67, 0xad, 0xab, 0x30, 0xef, 0x6b, 0xbe, 0x6f, 0xe1, 0x8a, 0x55, 0xde, 0x86, 0x6d, 0x8f,
0xe2, 0xf1, 0xda, 0x7b, 0xb0, 0xf1, 0xed, 0x6c, 0xc1, 0xf1, 0x29, 0x57, 0x04, 0x1a, 0x0c, 0x1a,
0x42, 0x72, 0x43, 0x24, 0x83, 0x23, 0xa5, 0x9b, 0xb4, 0xfb, 0xff, 0xae, 0xbd, 0x4e, 0xe3, 0x26,
0xa7, 0x00, 0x32, 0xae, 0xd7, 0x2b, 0x56, 0x9c, 0xf5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x55,
0x7b, 0x41, 0xb7, 0xfc, 0x07, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// ClientRegistryClient is the client API for ClientRegistry service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ClientRegistryClient interface {
// Create a new OAuth client. This also sets the given organization or user as
// first collaborator with all possible rights.
Create(ctx context.Context, in *CreateClientRequest, opts ...grpc.CallOption) (*Client, error)
// Get the OAuth client with the given identifiers, selecting the fields specified
// in the field mask.
// More or less fields may be returned, depending on the rights of the caller.
Get(ctx context.Context, in *GetClientRequest, opts ...grpc.CallOption) (*Client, error)
// List OAuth clients where the given user or organization is a direct collaborator.
// If no user or organization is given, this returns the OAuth clients the caller
// has access to.
// Similar to Get, this selects the fields specified in the field mask.
// More or less fields may be returned, depending on the rights of the caller.
List(ctx context.Context, in *ListClientsRequest, opts ...grpc.CallOption) (*Clients, error)
// Update the OAuth client, changing the fields specified by the field mask to the provided values.
Update(ctx context.Context, in *UpdateClientRequest, opts ...grpc.CallOption) (*Client, error)
// Delete the OAuth client. This may not release the client ID for reuse.
Delete(ctx context.Context, in *ClientIdentifiers, opts ...grpc.CallOption) (*types.Empty, error)
// Restore a recently deleted client.
//
// Deployment configuration may specify if, and for how long after deletion,
// entities can be restored.
Restore(ctx context.Context, in *ClientIdentifiers, opts ...grpc.CallOption) (*types.Empty, error)
// Purge the client. This will release the client ID for reuse.
Purge(ctx context.Context, in *ClientIdentifiers, opts ...grpc.CallOption) (*types.Empty, error)
}
type clientRegistryClient struct {
cc *grpc.ClientConn
}
func NewClientRegistryClient(cc *grpc.ClientConn) ClientRegistryClient {
return &clientRegistryClient{cc}
}
func (c *clientRegistryClient) Create(ctx context.Context, in *CreateClientRequest, opts ...grpc.CallOption) (*Client, error) {
out := new(Client)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientRegistry/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clientRegistryClient) Get(ctx context.Context, in *GetClientRequest, opts ...grpc.CallOption) (*Client, error) {
out := new(Client)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientRegistry/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clientRegistryClient) List(ctx context.Context, in *ListClientsRequest, opts ...grpc.CallOption) (*Clients, error) {
out := new(Clients)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientRegistry/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clientRegistryClient) Update(ctx context.Context, in *UpdateClientRequest, opts ...grpc.CallOption) (*Client, error) {
out := new(Client)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientRegistry/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clientRegistryClient) Delete(ctx context.Context, in *ClientIdentifiers, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientRegistry/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clientRegistryClient) Restore(ctx context.Context, in *ClientIdentifiers, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientRegistry/Restore", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clientRegistryClient) Purge(ctx context.Context, in *ClientIdentifiers, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientRegistry/Purge", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ClientRegistryServer is the server API for ClientRegistry service.
type ClientRegistryServer interface {
// Create a new OAuth client. This also sets the given organization or user as
// first collaborator with all possible rights.
Create(context.Context, *CreateClientRequest) (*Client, error)
// Get the OAuth client with the given identifiers, selecting the fields specified
// in the field mask.
// More or less fields may be returned, depending on the rights of the caller.
Get(context.Context, *GetClientRequest) (*Client, error)
// List OAuth clients where the given user or organization is a direct collaborator.
// If no user or organization is given, this returns the OAuth clients the caller
// has access to.
// Similar to Get, this selects the fields specified in the field mask.
// More or less fields may be returned, depending on the rights of the caller.
List(context.Context, *ListClientsRequest) (*Clients, error)
// Update the OAuth client, changing the fields specified by the field mask to the provided values.
Update(context.Context, *UpdateClientRequest) (*Client, error)
// Delete the OAuth client. This may not release the client ID for reuse.
Delete(context.Context, *ClientIdentifiers) (*types.Empty, error)
// Restore a recently deleted client.
//
// Deployment configuration may specify if, and for how long after deletion,
// entities can be restored.
Restore(context.Context, *ClientIdentifiers) (*types.Empty, error)
// Purge the client. This will release the client ID for reuse.
Purge(context.Context, *ClientIdentifiers) (*types.Empty, error)
}
// UnimplementedClientRegistryServer can be embedded to have forward compatible implementations.
type UnimplementedClientRegistryServer struct {
}
func (*UnimplementedClientRegistryServer) Create(ctx context.Context, req *CreateClientRequest) (*Client, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (*UnimplementedClientRegistryServer) Get(ctx context.Context, req *GetClientRequest) (*Client, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (*UnimplementedClientRegistryServer) List(ctx context.Context, req *ListClientsRequest) (*Clients, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (*UnimplementedClientRegistryServer) Update(ctx context.Context, req *UpdateClientRequest) (*Client, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (*UnimplementedClientRegistryServer) Delete(ctx context.Context, req *ClientIdentifiers) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (*UnimplementedClientRegistryServer) Restore(ctx context.Context, req *ClientIdentifiers) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Restore not implemented")
}
func (*UnimplementedClientRegistryServer) Purge(ctx context.Context, req *ClientIdentifiers) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Purge not implemented")
}
func RegisterClientRegistryServer(s *grpc.Server, srv ClientRegistryServer) {
s.RegisterService(&_ClientRegistry_serviceDesc, srv)
}
func _ClientRegistry_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateClientRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientRegistryServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientRegistry/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientRegistryServer).Create(ctx, req.(*CreateClientRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ClientRegistry_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetClientRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientRegistryServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientRegistry/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientRegistryServer).Get(ctx, req.(*GetClientRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ClientRegistry_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListClientsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientRegistryServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientRegistry/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientRegistryServer).List(ctx, req.(*ListClientsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ClientRegistry_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateClientRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientRegistryServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientRegistry/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientRegistryServer).Update(ctx, req.(*UpdateClientRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ClientRegistry_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ClientIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientRegistryServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientRegistry/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientRegistryServer).Delete(ctx, req.(*ClientIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
func _ClientRegistry_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ClientIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientRegistryServer).Restore(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientRegistry/Restore",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientRegistryServer).Restore(ctx, req.(*ClientIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
func _ClientRegistry_Purge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ClientIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientRegistryServer).Purge(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientRegistry/Purge",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientRegistryServer).Purge(ctx, req.(*ClientIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
var _ClientRegistry_serviceDesc = grpc.ServiceDesc{
ServiceName: "ttn.lorawan.v3.ClientRegistry",
HandlerType: (*ClientRegistryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _ClientRegistry_Create_Handler,
},
{
MethodName: "Get",
Handler: _ClientRegistry_Get_Handler,
},
{
MethodName: "List",
Handler: _ClientRegistry_List_Handler,
},
{
MethodName: "Update",
Handler: _ClientRegistry_Update_Handler,
},
{
MethodName: "Delete",
Handler: _ClientRegistry_Delete_Handler,
},
{
MethodName: "Restore",
Handler: _ClientRegistry_Restore_Handler,
},
{
MethodName: "Purge",
Handler: _ClientRegistry_Purge_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "lorawan-stack/api/client_services.proto",
}
// ClientAccessClient is the client API for ClientAccess service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ClientAccessClient interface {
// List the rights the caller has on this application.
ListRights(ctx context.Context, in *ClientIdentifiers, opts ...grpc.CallOption) (*Rights, error)
// Get the rights of a collaborator (member) of the client.
// Pseudo-rights in the response (such as the "_ALL" right) are not expanded.
GetCollaborator(ctx context.Context, in *GetClientCollaboratorRequest, opts ...grpc.CallOption) (*GetCollaboratorResponse, error)
// Set the rights of a collaborator (member) on the OAuth client.
// This method can also be used to delete the collaborator, by giving them no rights.
// The caller is required to have all assigned or/and removed rights.
SetCollaborator(ctx context.Context, in *SetClientCollaboratorRequest, opts ...grpc.CallOption) (*types.Empty, error)
// List the collaborators on this OAuth client.
ListCollaborators(ctx context.Context, in *ListClientCollaboratorsRequest, opts ...grpc.CallOption) (*Collaborators, error)
}
type clientAccessClient struct {
cc *grpc.ClientConn
}
func NewClientAccessClient(cc *grpc.ClientConn) ClientAccessClient {
return &clientAccessClient{cc}
}
func (c *clientAccessClient) ListRights(ctx context.Context, in *ClientIdentifiers, opts ...grpc.CallOption) (*Rights, error) {
out := new(Rights)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientAccess/ListRights", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clientAccessClient) GetCollaborator(ctx context.Context, in *GetClientCollaboratorRequest, opts ...grpc.CallOption) (*GetCollaboratorResponse, error) {
out := new(GetCollaboratorResponse)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientAccess/GetCollaborator", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clientAccessClient) SetCollaborator(ctx context.Context, in *SetClientCollaboratorRequest, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientAccess/SetCollaborator", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clientAccessClient) ListCollaborators(ctx context.Context, in *ListClientCollaboratorsRequest, opts ...grpc.CallOption) (*Collaborators, error) {
out := new(Collaborators)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.ClientAccess/ListCollaborators", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ClientAccessServer is the server API for ClientAccess service.
type ClientAccessServer interface {
// List the rights the caller has on this application.
ListRights(context.Context, *ClientIdentifiers) (*Rights, error)
// Get the rights of a collaborator (member) of the client.
// Pseudo-rights in the response (such as the "_ALL" right) are not expanded.
GetCollaborator(context.Context, *GetClientCollaboratorRequest) (*GetCollaboratorResponse, error)
// Set the rights of a collaborator (member) on the OAuth client.
// This method can also be used to delete the collaborator, by giving them no rights.
// The caller is required to have all assigned or/and removed rights.
SetCollaborator(context.Context, *SetClientCollaboratorRequest) (*types.Empty, error)
// List the collaborators on this OAuth client.
ListCollaborators(context.Context, *ListClientCollaboratorsRequest) (*Collaborators, error)
}
// UnimplementedClientAccessServer can be embedded to have forward compatible implementations.
type UnimplementedClientAccessServer struct {
}
func (*UnimplementedClientAccessServer) ListRights(ctx context.Context, req *ClientIdentifiers) (*Rights, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListRights not implemented")
}
func (*UnimplementedClientAccessServer) GetCollaborator(ctx context.Context, req *GetClientCollaboratorRequest) (*GetCollaboratorResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCollaborator not implemented")
}
func (*UnimplementedClientAccessServer) SetCollaborator(ctx context.Context, req *SetClientCollaboratorRequest) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetCollaborator not implemented")
}
func (*UnimplementedClientAccessServer) ListCollaborators(ctx context.Context, req *ListClientCollaboratorsRequest) (*Collaborators, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCollaborators not implemented")
}
func RegisterClientAccessServer(s *grpc.Server, srv ClientAccessServer) {
s.RegisterService(&_ClientAccess_serviceDesc, srv)
}
func _ClientAccess_ListRights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ClientIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientAccessServer).ListRights(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientAccess/ListRights",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientAccessServer).ListRights(ctx, req.(*ClientIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
func _ClientAccess_GetCollaborator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetClientCollaboratorRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientAccessServer).GetCollaborator(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientAccess/GetCollaborator",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientAccessServer).GetCollaborator(ctx, req.(*GetClientCollaboratorRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ClientAccess_SetCollaborator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetClientCollaboratorRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientAccessServer).SetCollaborator(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientAccess/SetCollaborator",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientAccessServer).SetCollaborator(ctx, req.(*SetClientCollaboratorRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ClientAccess_ListCollaborators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListClientCollaboratorsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClientAccessServer).ListCollaborators(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.ClientAccess/ListCollaborators",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClientAccessServer).ListCollaborators(ctx, req.(*ListClientCollaboratorsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ClientAccess_serviceDesc = grpc.ServiceDesc{
ServiceName: "ttn.lorawan.v3.ClientAccess",
HandlerType: (*ClientAccessServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListRights",
Handler: _ClientAccess_ListRights_Handler,
},
{
MethodName: "GetCollaborator",
Handler: _ClientAccess_GetCollaborator_Handler,
},
{
MethodName: "SetCollaborator",
Handler: _ClientAccess_SetCollaborator_Handler,
},
{
MethodName: "ListCollaborators",
Handler: _ClientAccess_ListCollaborators_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "lorawan-stack/api/client_services.proto",
}