-
Notifications
You must be signed in to change notification settings - Fork 302
/
organization_services.pb.go
783 lines (729 loc) · 35.6 KB
/
organization_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
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: lorawan-stack/api/organization_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/organization_services.proto", fileDescriptor_1a990e3af7846fd3)
}
func init() {
golang_proto.RegisterFile("lorawan-stack/api/organization_services.proto", fileDescriptor_1a990e3af7846fd3)
}
var fileDescriptor_1a990e3af7846fd3 = []byte{
// 789 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x4f, 0x13, 0x41,
0x14, 0xc7, 0x19, 0x7f, 0x94, 0x38, 0x12, 0x88, 0x13, 0xa3, 0xc9, 0x8a, 0x1b, 0xb3, 0x1a, 0x28,
0x8d, 0x9d, 0x51, 0x4a, 0x48, 0x20, 0x24, 0x84, 0x5f, 0xa9, 0x08, 0x2a, 0x29, 0xf1, 0xc2, 0x85,
0x6c, 0xcb, 0xb0, 0xdd, 0xb4, 0xec, 0xac, 0x33, 0x53, 0xb0, 0x22, 0xc6, 0x78, 0xf0, 0xaa, 0xd1,
0x9b, 0x07, 0xbd, 0x6a, 0x3c, 0xf9, 0x1f, 0xf8, 0x3f, 0x18, 0x13, 0x2f, 0x1e, 0x28, 0x1e, 0x3c,
0xfa, 0x27, 0x98, 0x9d, 0xdd, 0xea, 0x6e, 0x5b, 0xba, 0x94, 0x72, 0xeb, 0xce, 0xbe, 0x79, 0xdf,
0xcf, 0x7b, 0x33, 0xef, 0xbb, 0x85, 0xe9, 0x32, 0xe3, 0xe6, 0x8e, 0xe9, 0xa4, 0x85, 0x34, 0x0b,
0x25, 0x62, 0xba, 0x36, 0x61, 0xdc, 0x32, 0x1d, 0xfb, 0x89, 0x29, 0x6d, 0xe6, 0xac, 0x0b, 0xca,
0xb7, 0xed, 0x02, 0x15, 0xd8, 0xe5, 0x4c, 0x32, 0xd4, 0x2f, 0xa5, 0x83, 0x83, 0x2d, 0x78, 0x3b,
0xa3, 0xa5, 0x2d, 0x5b, 0x16, 0x2b, 0x79, 0x5c, 0x60, 0x5b, 0xc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, 0x55, 0xd8, 0x33, 0xa8, 0x5b, 0xec, 0xd9, 0x7b, 0x3f, 0xf6, 0xf5,
0x9e, 0xe7, 0x35, 0x1d, 0x7c, 0xac, 0xe9, 0xe0, 0x77, 0x4d, 0xef, 0xf9, 0x53, 0xd3, 0xc1, 0xeb,
0x03, 0xbd, 0xe7, 0xeb, 0x81, 0x0e, 0xd6, 0x88, 0xc5, 0xb0, 0x2c, 0x52, 0x59, 0xb4, 0x1d, 0x4b,
0x60, 0x87, 0xca, 0x1d, 0xc6, 0x4b, 0x24, 0xfa, 0x77, 0x6c, 0x3b, 0x43, 0xdc, 0x92, 0x45, 0xa4,
0x74, 0xdc, 0x7c, 0x3e, 0xa1, 0xda, 0x9b, 0xf9, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x93, 0x9e, 0xf2,
0x22, 0xa7, 0x0a, 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
// OrganizationRegistryClient is the client API for OrganizationRegistry service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OrganizationRegistryClient interface {
// Create a new organization. This also sets the given user as
// first collaborator with all possible rights.
Create(ctx context.Context, in *CreateOrganizationRequest, opts ...grpc.CallOption) (*Organization, error)
// Get the organization 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 *GetOrganizationRequest, opts ...grpc.CallOption) (*Organization, error)
// List organizations where the given user or organization is a direct collaborator.
// If no user or organization is given, this returns the organizations the caller
// has access to.
// Similar to Get, this selects the fields given by the field mask.
// More or less fields may be returned, depending on the rights of the caller.
List(ctx context.Context, in *ListOrganizationsRequest, opts ...grpc.CallOption) (*Organizations, error)
// Update the organization, changing the fields specified by the field mask to the provided values.
Update(ctx context.Context, in *UpdateOrganizationRequest, opts ...grpc.CallOption) (*Organization, error)
// Delete the organization. This may not release the organization ID for reuse.
Delete(ctx context.Context, in *OrganizationIdentifiers, opts ...grpc.CallOption) (*types.Empty, error)
// Restore a recently deleted organization.
//
// Deployment configuration may specify if, and for how long after deletion,
// entities can be restored.
Restore(ctx context.Context, in *OrganizationIdentifiers, opts ...grpc.CallOption) (*types.Empty, error)
// Purge the organization. This will release the organization ID for reuse.
// The user is responsible for clearing data from any (external) integrations
// that may store and expose data by user or organization ID.
Purge(ctx context.Context, in *OrganizationIdentifiers, opts ...grpc.CallOption) (*types.Empty, error)
}
type organizationRegistryClient struct {
cc *grpc.ClientConn
}
func NewOrganizationRegistryClient(cc *grpc.ClientConn) OrganizationRegistryClient {
return &organizationRegistryClient{cc}
}
func (c *organizationRegistryClient) Create(ctx context.Context, in *CreateOrganizationRequest, opts ...grpc.CallOption) (*Organization, error) {
out := new(Organization)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationRegistry/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationRegistryClient) Get(ctx context.Context, in *GetOrganizationRequest, opts ...grpc.CallOption) (*Organization, error) {
out := new(Organization)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationRegistry/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationRegistryClient) List(ctx context.Context, in *ListOrganizationsRequest, opts ...grpc.CallOption) (*Organizations, error) {
out := new(Organizations)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationRegistry/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationRegistryClient) Update(ctx context.Context, in *UpdateOrganizationRequest, opts ...grpc.CallOption) (*Organization, error) {
out := new(Organization)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationRegistry/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationRegistryClient) Delete(ctx context.Context, in *OrganizationIdentifiers, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationRegistry/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationRegistryClient) Restore(ctx context.Context, in *OrganizationIdentifiers, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationRegistry/Restore", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationRegistryClient) Purge(ctx context.Context, in *OrganizationIdentifiers, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationRegistry/Purge", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OrganizationRegistryServer is the server API for OrganizationRegistry service.
type OrganizationRegistryServer interface {
// Create a new organization. This also sets the given user as
// first collaborator with all possible rights.
Create(context.Context, *CreateOrganizationRequest) (*Organization, error)
// Get the organization 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, *GetOrganizationRequest) (*Organization, error)
// List organizations where the given user or organization is a direct collaborator.
// If no user or organization is given, this returns the organizations the caller
// has access to.
// Similar to Get, this selects the fields given by the field mask.
// More or less fields may be returned, depending on the rights of the caller.
List(context.Context, *ListOrganizationsRequest) (*Organizations, error)
// Update the organization, changing the fields specified by the field mask to the provided values.
Update(context.Context, *UpdateOrganizationRequest) (*Organization, error)
// Delete the organization. This may not release the organization ID for reuse.
Delete(context.Context, *OrganizationIdentifiers) (*types.Empty, error)
// Restore a recently deleted organization.
//
// Deployment configuration may specify if, and for how long after deletion,
// entities can be restored.
Restore(context.Context, *OrganizationIdentifiers) (*types.Empty, error)
// Purge the organization. This will release the organization ID for reuse.
// The user is responsible for clearing data from any (external) integrations
// that may store and expose data by user or organization ID.
Purge(context.Context, *OrganizationIdentifiers) (*types.Empty, error)
}
// UnimplementedOrganizationRegistryServer can be embedded to have forward compatible implementations.
type UnimplementedOrganizationRegistryServer struct {
}
func (*UnimplementedOrganizationRegistryServer) Create(ctx context.Context, req *CreateOrganizationRequest) (*Organization, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (*UnimplementedOrganizationRegistryServer) Get(ctx context.Context, req *GetOrganizationRequest) (*Organization, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (*UnimplementedOrganizationRegistryServer) List(ctx context.Context, req *ListOrganizationsRequest) (*Organizations, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (*UnimplementedOrganizationRegistryServer) Update(ctx context.Context, req *UpdateOrganizationRequest) (*Organization, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (*UnimplementedOrganizationRegistryServer) Delete(ctx context.Context, req *OrganizationIdentifiers) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (*UnimplementedOrganizationRegistryServer) Restore(ctx context.Context, req *OrganizationIdentifiers) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Restore not implemented")
}
func (*UnimplementedOrganizationRegistryServer) Purge(ctx context.Context, req *OrganizationIdentifiers) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Purge not implemented")
}
func RegisterOrganizationRegistryServer(s *grpc.Server, srv OrganizationRegistryServer) {
s.RegisterService(&_OrganizationRegistry_serviceDesc, srv)
}
func _OrganizationRegistry_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateOrganizationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationRegistryServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationRegistry/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationRegistryServer).Create(ctx, req.(*CreateOrganizationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationRegistry_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOrganizationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationRegistryServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationRegistry/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationRegistryServer).Get(ctx, req.(*GetOrganizationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationRegistry_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListOrganizationsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationRegistryServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationRegistry/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationRegistryServer).List(ctx, req.(*ListOrganizationsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationRegistry_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateOrganizationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationRegistryServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationRegistry/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationRegistryServer).Update(ctx, req.(*UpdateOrganizationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationRegistry_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OrganizationIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationRegistryServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationRegistry/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationRegistryServer).Delete(ctx, req.(*OrganizationIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationRegistry_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OrganizationIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationRegistryServer).Restore(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationRegistry/Restore",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationRegistryServer).Restore(ctx, req.(*OrganizationIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationRegistry_Purge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OrganizationIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationRegistryServer).Purge(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationRegistry/Purge",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationRegistryServer).Purge(ctx, req.(*OrganizationIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
var _OrganizationRegistry_serviceDesc = grpc.ServiceDesc{
ServiceName: "ttn.lorawan.v3.OrganizationRegistry",
HandlerType: (*OrganizationRegistryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _OrganizationRegistry_Create_Handler,
},
{
MethodName: "Get",
Handler: _OrganizationRegistry_Get_Handler,
},
{
MethodName: "List",
Handler: _OrganizationRegistry_List_Handler,
},
{
MethodName: "Update",
Handler: _OrganizationRegistry_Update_Handler,
},
{
MethodName: "Delete",
Handler: _OrganizationRegistry_Delete_Handler,
},
{
MethodName: "Restore",
Handler: _OrganizationRegistry_Restore_Handler,
},
{
MethodName: "Purge",
Handler: _OrganizationRegistry_Purge_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "lorawan-stack/api/organization_services.proto",
}
// OrganizationAccessClient is the client API for OrganizationAccess service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OrganizationAccessClient interface {
// List the rights the caller has on this organization.
ListRights(ctx context.Context, in *OrganizationIdentifiers, opts ...grpc.CallOption) (*Rights, error)
// Create an API key scoped to this organization.
// Organization API keys can give access to the organization itself, as well as
// any application, gateway and OAuth client this organization is a collaborator of.
CreateAPIKey(ctx context.Context, in *CreateOrganizationAPIKeyRequest, opts ...grpc.CallOption) (*APIKey, error)
// List the API keys for this organization.
ListAPIKeys(ctx context.Context, in *ListOrganizationAPIKeysRequest, opts ...grpc.CallOption) (*APIKeys, error)
// Get a single API key of this organization.
GetAPIKey(ctx context.Context, in *GetOrganizationAPIKeyRequest, opts ...grpc.CallOption) (*APIKey, error)
// Update the rights of an API key of the organization.
// This method can also be used to delete the API key, by giving it no rights.
// The caller is required to have all assigned or/and removed rights.
UpdateAPIKey(ctx context.Context, in *UpdateOrganizationAPIKeyRequest, opts ...grpc.CallOption) (*APIKey, error)
// Get the rights of a collaborator (member) of the organization.
// Pseudo-rights in the response (such as the "_ALL" right) are not expanded.
GetCollaborator(ctx context.Context, in *GetOrganizationCollaboratorRequest, opts ...grpc.CallOption) (*GetCollaboratorResponse, error)
// Set the rights of a collaborator (member) on the organization.
// Organization collaborators can get access to the organization itself, as well as
// any application, gateway and OAuth client this organization is a collaborator of.
// 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 *SetOrganizationCollaboratorRequest, opts ...grpc.CallOption) (*types.Empty, error)
// List the collaborators on this organization.
ListCollaborators(ctx context.Context, in *ListOrganizationCollaboratorsRequest, opts ...grpc.CallOption) (*Collaborators, error)
}
type organizationAccessClient struct {
cc *grpc.ClientConn
}
func NewOrganizationAccessClient(cc *grpc.ClientConn) OrganizationAccessClient {
return &organizationAccessClient{cc}
}
func (c *organizationAccessClient) ListRights(ctx context.Context, in *OrganizationIdentifiers, opts ...grpc.CallOption) (*Rights, error) {
out := new(Rights)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationAccess/ListRights", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationAccessClient) CreateAPIKey(ctx context.Context, in *CreateOrganizationAPIKeyRequest, opts ...grpc.CallOption) (*APIKey, error) {
out := new(APIKey)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationAccess/CreateAPIKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationAccessClient) ListAPIKeys(ctx context.Context, in *ListOrganizationAPIKeysRequest, opts ...grpc.CallOption) (*APIKeys, error) {
out := new(APIKeys)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationAccess/ListAPIKeys", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationAccessClient) GetAPIKey(ctx context.Context, in *GetOrganizationAPIKeyRequest, opts ...grpc.CallOption) (*APIKey, error) {
out := new(APIKey)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationAccess/GetAPIKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationAccessClient) UpdateAPIKey(ctx context.Context, in *UpdateOrganizationAPIKeyRequest, opts ...grpc.CallOption) (*APIKey, error) {
out := new(APIKey)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationAccess/UpdateAPIKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationAccessClient) GetCollaborator(ctx context.Context, in *GetOrganizationCollaboratorRequest, opts ...grpc.CallOption) (*GetCollaboratorResponse, error) {
out := new(GetCollaboratorResponse)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationAccess/GetCollaborator", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationAccessClient) SetCollaborator(ctx context.Context, in *SetOrganizationCollaboratorRequest, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationAccess/SetCollaborator", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *organizationAccessClient) ListCollaborators(ctx context.Context, in *ListOrganizationCollaboratorsRequest, opts ...grpc.CallOption) (*Collaborators, error) {
out := new(Collaborators)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.OrganizationAccess/ListCollaborators", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OrganizationAccessServer is the server API for OrganizationAccess service.
type OrganizationAccessServer interface {
// List the rights the caller has on this organization.
ListRights(context.Context, *OrganizationIdentifiers) (*Rights, error)
// Create an API key scoped to this organization.
// Organization API keys can give access to the organization itself, as well as
// any application, gateway and OAuth client this organization is a collaborator of.
CreateAPIKey(context.Context, *CreateOrganizationAPIKeyRequest) (*APIKey, error)
// List the API keys for this organization.
ListAPIKeys(context.Context, *ListOrganizationAPIKeysRequest) (*APIKeys, error)
// Get a single API key of this organization.
GetAPIKey(context.Context, *GetOrganizationAPIKeyRequest) (*APIKey, error)
// Update the rights of an API key of the organization.
// This method can also be used to delete the API key, by giving it no rights.
// The caller is required to have all assigned or/and removed rights.
UpdateAPIKey(context.Context, *UpdateOrganizationAPIKeyRequest) (*APIKey, error)
// Get the rights of a collaborator (member) of the organization.
// Pseudo-rights in the response (such as the "_ALL" right) are not expanded.
GetCollaborator(context.Context, *GetOrganizationCollaboratorRequest) (*GetCollaboratorResponse, error)
// Set the rights of a collaborator (member) on the organization.
// Organization collaborators can get access to the organization itself, as well as
// any application, gateway and OAuth client this organization is a collaborator of.
// 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, *SetOrganizationCollaboratorRequest) (*types.Empty, error)
// List the collaborators on this organization.
ListCollaborators(context.Context, *ListOrganizationCollaboratorsRequest) (*Collaborators, error)
}
// UnimplementedOrganizationAccessServer can be embedded to have forward compatible implementations.
type UnimplementedOrganizationAccessServer struct {
}
func (*UnimplementedOrganizationAccessServer) ListRights(ctx context.Context, req *OrganizationIdentifiers) (*Rights, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListRights not implemented")
}
func (*UnimplementedOrganizationAccessServer) CreateAPIKey(ctx context.Context, req *CreateOrganizationAPIKeyRequest) (*APIKey, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateAPIKey not implemented")
}
func (*UnimplementedOrganizationAccessServer) ListAPIKeys(ctx context.Context, req *ListOrganizationAPIKeysRequest) (*APIKeys, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAPIKeys not implemented")
}
func (*UnimplementedOrganizationAccessServer) GetAPIKey(ctx context.Context, req *GetOrganizationAPIKeyRequest) (*APIKey, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAPIKey not implemented")
}
func (*UnimplementedOrganizationAccessServer) UpdateAPIKey(ctx context.Context, req *UpdateOrganizationAPIKeyRequest) (*APIKey, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateAPIKey not implemented")
}
func (*UnimplementedOrganizationAccessServer) GetCollaborator(ctx context.Context, req *GetOrganizationCollaboratorRequest) (*GetCollaboratorResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCollaborator not implemented")
}
func (*UnimplementedOrganizationAccessServer) SetCollaborator(ctx context.Context, req *SetOrganizationCollaboratorRequest) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetCollaborator not implemented")
}
func (*UnimplementedOrganizationAccessServer) ListCollaborators(ctx context.Context, req *ListOrganizationCollaboratorsRequest) (*Collaborators, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCollaborators not implemented")
}
func RegisterOrganizationAccessServer(s *grpc.Server, srv OrganizationAccessServer) {
s.RegisterService(&_OrganizationAccess_serviceDesc, srv)
}
func _OrganizationAccess_ListRights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OrganizationIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationAccessServer).ListRights(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationAccess/ListRights",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationAccessServer).ListRights(ctx, req.(*OrganizationIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationAccess_CreateAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateOrganizationAPIKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationAccessServer).CreateAPIKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationAccess/CreateAPIKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationAccessServer).CreateAPIKey(ctx, req.(*CreateOrganizationAPIKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationAccess_ListAPIKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListOrganizationAPIKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationAccessServer).ListAPIKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationAccess/ListAPIKeys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationAccessServer).ListAPIKeys(ctx, req.(*ListOrganizationAPIKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationAccess_GetAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOrganizationAPIKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationAccessServer).GetAPIKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationAccess/GetAPIKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationAccessServer).GetAPIKey(ctx, req.(*GetOrganizationAPIKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationAccess_UpdateAPIKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateOrganizationAPIKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationAccessServer).UpdateAPIKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationAccess/UpdateAPIKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationAccessServer).UpdateAPIKey(ctx, req.(*UpdateOrganizationAPIKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationAccess_GetCollaborator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetOrganizationCollaboratorRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationAccessServer).GetCollaborator(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationAccess/GetCollaborator",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationAccessServer).GetCollaborator(ctx, req.(*GetOrganizationCollaboratorRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationAccess_SetCollaborator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetOrganizationCollaboratorRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationAccessServer).SetCollaborator(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationAccess/SetCollaborator",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationAccessServer).SetCollaborator(ctx, req.(*SetOrganizationCollaboratorRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OrganizationAccess_ListCollaborators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListOrganizationCollaboratorsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationAccessServer).ListCollaborators(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.OrganizationAccess/ListCollaborators",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationAccessServer).ListCollaborators(ctx, req.(*ListOrganizationCollaboratorsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _OrganizationAccess_serviceDesc = grpc.ServiceDesc{
ServiceName: "ttn.lorawan.v3.OrganizationAccess",
HandlerType: (*OrganizationAccessServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListRights",
Handler: _OrganizationAccess_ListRights_Handler,
},
{
MethodName: "CreateAPIKey",
Handler: _OrganizationAccess_CreateAPIKey_Handler,
},
{
MethodName: "ListAPIKeys",
Handler: _OrganizationAccess_ListAPIKeys_Handler,
},
{
MethodName: "GetAPIKey",
Handler: _OrganizationAccess_GetAPIKey_Handler,
},
{
MethodName: "UpdateAPIKey",
Handler: _OrganizationAccess_UpdateAPIKey_Handler,
},
{
MethodName: "GetCollaborator",
Handler: _OrganizationAccess_GetCollaborator_Handler,
},
{
MethodName: "SetCollaborator",
Handler: _OrganizationAccess_SetCollaborator_Handler,
},
{
MethodName: "ListCollaborators",
Handler: _OrganizationAccess_ListCollaborators_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "lorawan-stack/api/organization_services.proto",
}