-
Notifications
You must be signed in to change notification settings - Fork 302
/
client_services.pb.go
512 lines (469 loc) · 21.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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: lorawan-stack/api/client_services.proto
package ttnpb
import (
context "context"
fmt "fmt"
math "math"
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"
)
// 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{
// 711 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x3f, 0x4c, 0x14, 0x4d,
0x14, 0x9f, 0xe1, 0xfb, 0xbe, 0xcb, 0x97, 0x8d, 0x81, 0x38, 0x31, 0x98, 0x1c, 0xf0, 0x94, 0xc5,
0x84, 0x84, 0xc0, 0xac, 0x81, 0x98, 0x18, 0x3b, 0x45, 0x45, 0xa3, 0x8d, 0x10, 0x9b, 0x6b, 0xc8,
0xde, 0x31, 0xec, 0x4d, 0xee, 0xdc, 0x39, 0x76, 0x06, 0x08, 0x12, 0x12, 0x62, 0xa1, 0x34, 0x26,
0x12, 0x1b, 0xed, 0x6c, 0x4c, 0x28, 0x29, 0x29, 0x29, 0xe9, 0x24, 0xa1, 0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e8, 0x44, 0x03, 0x3e, 0xd5, 0x80, 0xce, 0x34, 0xe0, 0x73, 0x0d, 0x68, 0x33, 0x04, 0xb4,
0x15, 0x02, 0xfe, 0x10, 0x02, 0xfa, 0x14, 0x02, 0xfe, 0x12, 0x02, 0xda, 0x09, 0x01, 0xed, 0x86,
0x80, 0xf7, 0x42, 0xc0, 0xfb, 0x21, 0xe0, 0x82, 0xe3, 0x09, 0xaa, 0xca, 0x4c, 0x95, 0xb9, 0xef,
0x49, 0xea, 0x33, 0xb5, 0x2a, 0x82, 0x8a, 0xd3, 0xf8, 0xd7, 0xb5, 0x32, 0xe5, 0xd4, 0x2a, 0x9e,
0xa3, 0x94, 0x5f, 0x2b, 0x16, 0x73, 0x66, 0x1a, 0x53, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x27,
0x35, 0x0d, 0xa1, 0x98, 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 given
// by the field mask. The method may return more or less fields, depending on
// the rights of the caller.
Get(ctx context.Context, in *GetClientRequest, opts ...grpc.CallOption) (*Client, error)
// List OAuth clients. See request message for details.
List(ctx context.Context, in *ListClientsRequest, opts ...grpc.CallOption) (*Clients, error)
Update(ctx context.Context, in *UpdateClientRequest, opts ...grpc.CallOption) (*Client, error)
Delete(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
}
// 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 given
// by the field mask. The method may return more or less fields, depending on
// the rights of the caller.
Get(context.Context, *GetClientRequest) (*Client, error)
// List OAuth clients. See request message for details.
List(context.Context, *ListClientsRequest) (*Clients, error)
Update(context.Context, *UpdateClientRequest) (*Client, error)
Delete(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 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)
}
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,
},
},
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 {
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 client. It is required for the caller to
// have all assigned or/and removed rights.
// Setting a collaborator without rights, removes them.
SetCollaborator(ctx context.Context, in *SetClientCollaboratorRequest, opts ...grpc.CallOption) (*types.Empty, error)
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 {
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 client. It is required for the caller to
// have all assigned or/and removed rights.
// Setting a collaborator without rights, removes them.
SetCollaborator(context.Context, *SetClientCollaboratorRequest) (*types.Empty, error)
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",
}