-
Notifications
You must be signed in to change notification settings - Fork 12
/
authd_grpc.pb.go
755 lines (700 loc) · 28.2 KB
/
authd_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
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
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v3.21.12
// source: authd.proto
package authd
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
PAM_AvailableBrokers_FullMethodName = "/authd.PAM/AvailableBrokers"
PAM_GetPreviousBroker_FullMethodName = "/authd.PAM/GetPreviousBroker"
PAM_SelectBroker_FullMethodName = "/authd.PAM/SelectBroker"
PAM_GetAuthenticationModes_FullMethodName = "/authd.PAM/GetAuthenticationModes"
PAM_SelectAuthenticationMode_FullMethodName = "/authd.PAM/SelectAuthenticationMode"
PAM_IsAuthenticated_FullMethodName = "/authd.PAM/IsAuthenticated"
PAM_EndSession_FullMethodName = "/authd.PAM/EndSession"
PAM_SetDefaultBrokerForUser_FullMethodName = "/authd.PAM/SetDefaultBrokerForUser"
)
// PAMClient is the client API for PAM 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 PAMClient interface {
AvailableBrokers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ABResponse, error)
GetPreviousBroker(ctx context.Context, in *GPBRequest, opts ...grpc.CallOption) (*GPBResponse, error)
SelectBroker(ctx context.Context, in *SBRequest, opts ...grpc.CallOption) (*SBResponse, error)
GetAuthenticationModes(ctx context.Context, in *GAMRequest, opts ...grpc.CallOption) (*GAMResponse, error)
SelectAuthenticationMode(ctx context.Context, in *SAMRequest, opts ...grpc.CallOption) (*SAMResponse, error)
IsAuthenticated(ctx context.Context, in *IARequest, opts ...grpc.CallOption) (*IAResponse, error)
EndSession(ctx context.Context, in *ESRequest, opts ...grpc.CallOption) (*Empty, error)
SetDefaultBrokerForUser(ctx context.Context, in *SDBFURequest, opts ...grpc.CallOption) (*Empty, error)
}
type pAMClient struct {
cc grpc.ClientConnInterface
}
func NewPAMClient(cc grpc.ClientConnInterface) PAMClient {
return &pAMClient{cc}
}
func (c *pAMClient) AvailableBrokers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ABResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ABResponse)
err := c.cc.Invoke(ctx, PAM_AvailableBrokers_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pAMClient) GetPreviousBroker(ctx context.Context, in *GPBRequest, opts ...grpc.CallOption) (*GPBResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GPBResponse)
err := c.cc.Invoke(ctx, PAM_GetPreviousBroker_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pAMClient) SelectBroker(ctx context.Context, in *SBRequest, opts ...grpc.CallOption) (*SBResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SBResponse)
err := c.cc.Invoke(ctx, PAM_SelectBroker_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pAMClient) GetAuthenticationModes(ctx context.Context, in *GAMRequest, opts ...grpc.CallOption) (*GAMResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GAMResponse)
err := c.cc.Invoke(ctx, PAM_GetAuthenticationModes_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pAMClient) SelectAuthenticationMode(ctx context.Context, in *SAMRequest, opts ...grpc.CallOption) (*SAMResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SAMResponse)
err := c.cc.Invoke(ctx, PAM_SelectAuthenticationMode_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pAMClient) IsAuthenticated(ctx context.Context, in *IARequest, opts ...grpc.CallOption) (*IAResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(IAResponse)
err := c.cc.Invoke(ctx, PAM_IsAuthenticated_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pAMClient) EndSession(ctx context.Context, in *ESRequest, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, PAM_EndSession_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pAMClient) SetDefaultBrokerForUser(ctx context.Context, in *SDBFURequest, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, PAM_SetDefaultBrokerForUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PAMServer is the server API for PAM service.
// All implementations must embed UnimplementedPAMServer
// for forward compatibility.
type PAMServer interface {
AvailableBrokers(context.Context, *Empty) (*ABResponse, error)
GetPreviousBroker(context.Context, *GPBRequest) (*GPBResponse, error)
SelectBroker(context.Context, *SBRequest) (*SBResponse, error)
GetAuthenticationModes(context.Context, *GAMRequest) (*GAMResponse, error)
SelectAuthenticationMode(context.Context, *SAMRequest) (*SAMResponse, error)
IsAuthenticated(context.Context, *IARequest) (*IAResponse, error)
EndSession(context.Context, *ESRequest) (*Empty, error)
SetDefaultBrokerForUser(context.Context, *SDBFURequest) (*Empty, error)
mustEmbedUnimplementedPAMServer()
}
// UnimplementedPAMServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPAMServer struct{}
func (UnimplementedPAMServer) AvailableBrokers(context.Context, *Empty) (*ABResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AvailableBrokers not implemented")
}
func (UnimplementedPAMServer) GetPreviousBroker(context.Context, *GPBRequest) (*GPBResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPreviousBroker not implemented")
}
func (UnimplementedPAMServer) SelectBroker(context.Context, *SBRequest) (*SBResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SelectBroker not implemented")
}
func (UnimplementedPAMServer) GetAuthenticationModes(context.Context, *GAMRequest) (*GAMResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAuthenticationModes not implemented")
}
func (UnimplementedPAMServer) SelectAuthenticationMode(context.Context, *SAMRequest) (*SAMResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SelectAuthenticationMode not implemented")
}
func (UnimplementedPAMServer) IsAuthenticated(context.Context, *IARequest) (*IAResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsAuthenticated not implemented")
}
func (UnimplementedPAMServer) EndSession(context.Context, *ESRequest) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method EndSession not implemented")
}
func (UnimplementedPAMServer) SetDefaultBrokerForUser(context.Context, *SDBFURequest) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetDefaultBrokerForUser not implemented")
}
func (UnimplementedPAMServer) mustEmbedUnimplementedPAMServer() {}
func (UnimplementedPAMServer) testEmbeddedByValue() {}
// UnsafePAMServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PAMServer will
// result in compilation errors.
type UnsafePAMServer interface {
mustEmbedUnimplementedPAMServer()
}
func RegisterPAMServer(s grpc.ServiceRegistrar, srv PAMServer) {
// If the following call pancis, it indicates UnimplementedPAMServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&PAM_ServiceDesc, srv)
}
func _PAM_AvailableBrokers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PAMServer).AvailableBrokers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PAM_AvailableBrokers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PAMServer).AvailableBrokers(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _PAM_GetPreviousBroker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GPBRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PAMServer).GetPreviousBroker(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PAM_GetPreviousBroker_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PAMServer).GetPreviousBroker(ctx, req.(*GPBRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PAM_SelectBroker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SBRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PAMServer).SelectBroker(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PAM_SelectBroker_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PAMServer).SelectBroker(ctx, req.(*SBRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PAM_GetAuthenticationModes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GAMRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PAMServer).GetAuthenticationModes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PAM_GetAuthenticationModes_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PAMServer).GetAuthenticationModes(ctx, req.(*GAMRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PAM_SelectAuthenticationMode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SAMRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PAMServer).SelectAuthenticationMode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PAM_SelectAuthenticationMode_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PAMServer).SelectAuthenticationMode(ctx, req.(*SAMRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PAM_IsAuthenticated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IARequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PAMServer).IsAuthenticated(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PAM_IsAuthenticated_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PAMServer).IsAuthenticated(ctx, req.(*IARequest))
}
return interceptor(ctx, in, info, handler)
}
func _PAM_EndSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ESRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PAMServer).EndSession(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PAM_EndSession_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PAMServer).EndSession(ctx, req.(*ESRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PAM_SetDefaultBrokerForUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SDBFURequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PAMServer).SetDefaultBrokerForUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PAM_SetDefaultBrokerForUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PAMServer).SetDefaultBrokerForUser(ctx, req.(*SDBFURequest))
}
return interceptor(ctx, in, info, handler)
}
// PAM_ServiceDesc is the grpc.ServiceDesc for PAM service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PAM_ServiceDesc = grpc.ServiceDesc{
ServiceName: "authd.PAM",
HandlerType: (*PAMServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AvailableBrokers",
Handler: _PAM_AvailableBrokers_Handler,
},
{
MethodName: "GetPreviousBroker",
Handler: _PAM_GetPreviousBroker_Handler,
},
{
MethodName: "SelectBroker",
Handler: _PAM_SelectBroker_Handler,
},
{
MethodName: "GetAuthenticationModes",
Handler: _PAM_GetAuthenticationModes_Handler,
},
{
MethodName: "SelectAuthenticationMode",
Handler: _PAM_SelectAuthenticationMode_Handler,
},
{
MethodName: "IsAuthenticated",
Handler: _PAM_IsAuthenticated_Handler,
},
{
MethodName: "EndSession",
Handler: _PAM_EndSession_Handler,
},
{
MethodName: "SetDefaultBrokerForUser",
Handler: _PAM_SetDefaultBrokerForUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "authd.proto",
}
const (
NSS_GetPasswdByName_FullMethodName = "/authd.NSS/GetPasswdByName"
NSS_GetPasswdByUID_FullMethodName = "/authd.NSS/GetPasswdByUID"
NSS_GetPasswdEntries_FullMethodName = "/authd.NSS/GetPasswdEntries"
NSS_GetGroupByName_FullMethodName = "/authd.NSS/GetGroupByName"
NSS_GetGroupByGID_FullMethodName = "/authd.NSS/GetGroupByGID"
NSS_GetGroupEntries_FullMethodName = "/authd.NSS/GetGroupEntries"
NSS_GetShadowByName_FullMethodName = "/authd.NSS/GetShadowByName"
NSS_GetShadowEntries_FullMethodName = "/authd.NSS/GetShadowEntries"
)
// NSSClient is the client API for NSS 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 NSSClient interface {
GetPasswdByName(ctx context.Context, in *GetPasswdByNameRequest, opts ...grpc.CallOption) (*PasswdEntry, error)
GetPasswdByUID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*PasswdEntry, error)
GetPasswdEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PasswdEntries, error)
GetGroupByName(ctx context.Context, in *GetGroupByNameRequest, opts ...grpc.CallOption) (*GroupEntry, error)
GetGroupByGID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*GroupEntry, error)
GetGroupEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupEntries, error)
GetShadowByName(ctx context.Context, in *GetShadowByNameRequest, opts ...grpc.CallOption) (*ShadowEntry, error)
GetShadowEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ShadowEntries, error)
}
type nSSClient struct {
cc grpc.ClientConnInterface
}
func NewNSSClient(cc grpc.ClientConnInterface) NSSClient {
return &nSSClient{cc}
}
func (c *nSSClient) GetPasswdByName(ctx context.Context, in *GetPasswdByNameRequest, opts ...grpc.CallOption) (*PasswdEntry, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PasswdEntry)
err := c.cc.Invoke(ctx, NSS_GetPasswdByName_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSSClient) GetPasswdByUID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*PasswdEntry, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PasswdEntry)
err := c.cc.Invoke(ctx, NSS_GetPasswdByUID_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSSClient) GetPasswdEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PasswdEntries, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PasswdEntries)
err := c.cc.Invoke(ctx, NSS_GetPasswdEntries_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSSClient) GetGroupByName(ctx context.Context, in *GetGroupByNameRequest, opts ...grpc.CallOption) (*GroupEntry, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GroupEntry)
err := c.cc.Invoke(ctx, NSS_GetGroupByName_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSSClient) GetGroupByGID(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*GroupEntry, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GroupEntry)
err := c.cc.Invoke(ctx, NSS_GetGroupByGID_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSSClient) GetGroupEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupEntries, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GroupEntries)
err := c.cc.Invoke(ctx, NSS_GetGroupEntries_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSSClient) GetShadowByName(ctx context.Context, in *GetShadowByNameRequest, opts ...grpc.CallOption) (*ShadowEntry, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ShadowEntry)
err := c.cc.Invoke(ctx, NSS_GetShadowByName_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSSClient) GetShadowEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ShadowEntries, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ShadowEntries)
err := c.cc.Invoke(ctx, NSS_GetShadowEntries_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// NSSServer is the server API for NSS service.
// All implementations must embed UnimplementedNSSServer
// for forward compatibility.
type NSSServer interface {
GetPasswdByName(context.Context, *GetPasswdByNameRequest) (*PasswdEntry, error)
GetPasswdByUID(context.Context, *GetByIDRequest) (*PasswdEntry, error)
GetPasswdEntries(context.Context, *Empty) (*PasswdEntries, error)
GetGroupByName(context.Context, *GetGroupByNameRequest) (*GroupEntry, error)
GetGroupByGID(context.Context, *GetByIDRequest) (*GroupEntry, error)
GetGroupEntries(context.Context, *Empty) (*GroupEntries, error)
GetShadowByName(context.Context, *GetShadowByNameRequest) (*ShadowEntry, error)
GetShadowEntries(context.Context, *Empty) (*ShadowEntries, error)
mustEmbedUnimplementedNSSServer()
}
// UnimplementedNSSServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedNSSServer struct{}
func (UnimplementedNSSServer) GetPasswdByName(context.Context, *GetPasswdByNameRequest) (*PasswdEntry, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPasswdByName not implemented")
}
func (UnimplementedNSSServer) GetPasswdByUID(context.Context, *GetByIDRequest) (*PasswdEntry, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPasswdByUID not implemented")
}
func (UnimplementedNSSServer) GetPasswdEntries(context.Context, *Empty) (*PasswdEntries, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPasswdEntries not implemented")
}
func (UnimplementedNSSServer) GetGroupByName(context.Context, *GetGroupByNameRequest) (*GroupEntry, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetGroupByName not implemented")
}
func (UnimplementedNSSServer) GetGroupByGID(context.Context, *GetByIDRequest) (*GroupEntry, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetGroupByGID not implemented")
}
func (UnimplementedNSSServer) GetGroupEntries(context.Context, *Empty) (*GroupEntries, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetGroupEntries not implemented")
}
func (UnimplementedNSSServer) GetShadowByName(context.Context, *GetShadowByNameRequest) (*ShadowEntry, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetShadowByName not implemented")
}
func (UnimplementedNSSServer) GetShadowEntries(context.Context, *Empty) (*ShadowEntries, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetShadowEntries not implemented")
}
func (UnimplementedNSSServer) mustEmbedUnimplementedNSSServer() {}
func (UnimplementedNSSServer) testEmbeddedByValue() {}
// UnsafeNSSServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NSSServer will
// result in compilation errors.
type UnsafeNSSServer interface {
mustEmbedUnimplementedNSSServer()
}
func RegisterNSSServer(s grpc.ServiceRegistrar, srv NSSServer) {
// If the following call pancis, it indicates UnimplementedNSSServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&NSS_ServiceDesc, srv)
}
func _NSS_GetPasswdByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPasswdByNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSSServer).GetPasswdByName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NSS_GetPasswdByName_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSSServer).GetPasswdByName(ctx, req.(*GetPasswdByNameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSS_GetPasswdByUID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetByIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSSServer).GetPasswdByUID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NSS_GetPasswdByUID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSSServer).GetPasswdByUID(ctx, req.(*GetByIDRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSS_GetPasswdEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSSServer).GetPasswdEntries(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NSS_GetPasswdEntries_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSSServer).GetPasswdEntries(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _NSS_GetGroupByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGroupByNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSSServer).GetGroupByName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NSS_GetGroupByName_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSSServer).GetGroupByName(ctx, req.(*GetGroupByNameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSS_GetGroupByGID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetByIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSSServer).GetGroupByGID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NSS_GetGroupByGID_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSSServer).GetGroupByGID(ctx, req.(*GetByIDRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSS_GetGroupEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSSServer).GetGroupEntries(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NSS_GetGroupEntries_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSSServer).GetGroupEntries(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _NSS_GetShadowByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetShadowByNameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSSServer).GetShadowByName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NSS_GetShadowByName_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSSServer).GetShadowByName(ctx, req.(*GetShadowByNameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSS_GetShadowEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSSServer).GetShadowEntries(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NSS_GetShadowEntries_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSSServer).GetShadowEntries(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
// NSS_ServiceDesc is the grpc.ServiceDesc for NSS service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var NSS_ServiceDesc = grpc.ServiceDesc{
ServiceName: "authd.NSS",
HandlerType: (*NSSServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPasswdByName",
Handler: _NSS_GetPasswdByName_Handler,
},
{
MethodName: "GetPasswdByUID",
Handler: _NSS_GetPasswdByUID_Handler,
},
{
MethodName: "GetPasswdEntries",
Handler: _NSS_GetPasswdEntries_Handler,
},
{
MethodName: "GetGroupByName",
Handler: _NSS_GetGroupByName_Handler,
},
{
MethodName: "GetGroupByGID",
Handler: _NSS_GetGroupByGID_Handler,
},
{
MethodName: "GetGroupEntries",
Handler: _NSS_GetGroupEntries_Handler,
},
{
MethodName: "GetShadowByName",
Handler: _NSS_GetShadowByName_Handler,
},
{
MethodName: "GetShadowEntries",
Handler: _NSS_GetShadowEntries_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "authd.proto",
}