-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathremote.pb.go
574 lines (502 loc) · 19.3 KB
/
remote.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: remote.proto
package remote
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
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 _ = 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.ProtoPackageIsVersion3 // please upgrade the proto package
type AddPasswordReq struct {
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
OverrideConfiguration *Configuration `protobuf:"bytes,3,opt,name=overrideConfiguration,proto3" json:"overrideConfiguration,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AddPasswordReq) Reset() { *m = AddPasswordReq{} }
func (m *AddPasswordReq) String() string { return proto.CompactTextString(m) }
func (*AddPasswordReq) ProtoMessage() {}
func (*AddPasswordReq) Descriptor() ([]byte, []int) {
return fileDescriptor_eefc82927d57d89b, []int{0}
}
func (m *AddPasswordReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddPasswordReq.Unmarshal(m, b)
}
func (m *AddPasswordReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddPasswordReq.Marshal(b, m, deterministic)
}
func (m *AddPasswordReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddPasswordReq.Merge(m, src)
}
func (m *AddPasswordReq) XXX_Size() int {
return xxx_messageInfo_AddPasswordReq.Size(m)
}
func (m *AddPasswordReq) XXX_DiscardUnknown() {
xxx_messageInfo_AddPasswordReq.DiscardUnknown(m)
}
var xxx_messageInfo_AddPasswordReq proto.InternalMessageInfo
func (m *AddPasswordReq) GetTag() string {
if m != nil {
return m.Tag
}
return ""
}
func (m *AddPasswordReq) GetUsername() string {
if m != nil {
return m.Username
}
return ""
}
func (m *AddPasswordReq) GetOverrideConfiguration() *Configuration {
if m != nil {
return m.OverrideConfiguration
}
return nil
}
type Configuration struct {
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
Seed string `protobuf:"bytes,2,opt,name=seed,proto3" json:"seed,omitempty"`
Factor int32 `protobuf:"varint,3,opt,name=factor,proto3" json:"factor,omitempty"`
Storage string `protobuf:"bytes,4,opt,name=storage,proto3" json:"storage,omitempty"`
Output bool `protobuf:"varint,5,opt,name=output,proto3" json:"output,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Configuration) Reset() { *m = Configuration{} }
func (m *Configuration) String() string { return proto.CompactTextString(m) }
func (*Configuration) ProtoMessage() {}
func (*Configuration) Descriptor() ([]byte, []int) {
return fileDescriptor_eefc82927d57d89b, []int{1}
}
func (m *Configuration) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Configuration.Unmarshal(m, b)
}
func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Configuration.Marshal(b, m, deterministic)
}
func (m *Configuration) XXX_Merge(src proto.Message) {
xxx_messageInfo_Configuration.Merge(m, src)
}
func (m *Configuration) XXX_Size() int {
return xxx_messageInfo_Configuration.Size(m)
}
func (m *Configuration) XXX_DiscardUnknown() {
xxx_messageInfo_Configuration.DiscardUnknown(m)
}
var xxx_messageInfo_Configuration proto.InternalMessageInfo
func (m *Configuration) GetMethod() string {
if m != nil {
return m.Method
}
return ""
}
func (m *Configuration) GetSeed() string {
if m != nil {
return m.Seed
}
return ""
}
func (m *Configuration) GetFactor() int32 {
if m != nil {
return m.Factor
}
return 0
}
func (m *Configuration) GetStorage() string {
if m != nil {
return m.Storage
}
return ""
}
func (m *Configuration) GetOutput() bool {
if m != nil {
return m.Output
}
return false
}
type GetPasswordReq struct {
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetPasswordReq) Reset() { *m = GetPasswordReq{} }
func (m *GetPasswordReq) String() string { return proto.CompactTextString(m) }
func (*GetPasswordReq) ProtoMessage() {}
func (*GetPasswordReq) Descriptor() ([]byte, []int) {
return fileDescriptor_eefc82927d57d89b, []int{2}
}
func (m *GetPasswordReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPasswordReq.Unmarshal(m, b)
}
func (m *GetPasswordReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetPasswordReq.Marshal(b, m, deterministic)
}
func (m *GetPasswordReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetPasswordReq.Merge(m, src)
}
func (m *GetPasswordReq) XXX_Size() int {
return xxx_messageInfo_GetPasswordReq.Size(m)
}
func (m *GetPasswordReq) XXX_DiscardUnknown() {
xxx_messageInfo_GetPasswordReq.DiscardUnknown(m)
}
var xxx_messageInfo_GetPasswordReq proto.InternalMessageInfo
func (m *GetPasswordReq) GetTag() string {
if m != nil {
return m.Tag
}
return ""
}
func (m *GetPasswordReq) GetUsername() string {
if m != nil {
return m.Username
}
return ""
}
type PasswordValue struct {
Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
Fingerprint string `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PasswordValue) Reset() { *m = PasswordValue{} }
func (m *PasswordValue) String() string { return proto.CompactTextString(m) }
func (*PasswordValue) ProtoMessage() {}
func (*PasswordValue) Descriptor() ([]byte, []int) {
return fileDescriptor_eefc82927d57d89b, []int{3}
}
func (m *PasswordValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PasswordValue.Unmarshal(m, b)
}
func (m *PasswordValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PasswordValue.Marshal(b, m, deterministic)
}
func (m *PasswordValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_PasswordValue.Merge(m, src)
}
func (m *PasswordValue) XXX_Size() int {
return xxx_messageInfo_PasswordValue.Size(m)
}
func (m *PasswordValue) XXX_DiscardUnknown() {
xxx_messageInfo_PasswordValue.DiscardUnknown(m)
}
var xxx_messageInfo_PasswordValue proto.InternalMessageInfo
func (m *PasswordValue) GetPassword() string {
if m != nil {
return m.Password
}
return ""
}
func (m *PasswordValue) GetFingerprint() string {
if m != nil {
return m.Fingerprint
}
return ""
}
type AddTenantReq struct {
PubKey string `protobuf:"bytes,1,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
TenantName string `protobuf:"bytes,2,opt,name=tenantName,proto3" json:"tenantName,omitempty"`
InitialConfiguration *Configuration `protobuf:"bytes,3,opt,name=initialConfiguration,proto3" json:"initialConfiguration,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AddTenantReq) Reset() { *m = AddTenantReq{} }
func (m *AddTenantReq) String() string { return proto.CompactTextString(m) }
func (*AddTenantReq) ProtoMessage() {}
func (*AddTenantReq) Descriptor() ([]byte, []int) {
return fileDescriptor_eefc82927d57d89b, []int{4}
}
func (m *AddTenantReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddTenantReq.Unmarshal(m, b)
}
func (m *AddTenantReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddTenantReq.Marshal(b, m, deterministic)
}
func (m *AddTenantReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddTenantReq.Merge(m, src)
}
func (m *AddTenantReq) XXX_Size() int {
return xxx_messageInfo_AddTenantReq.Size(m)
}
func (m *AddTenantReq) XXX_DiscardUnknown() {
xxx_messageInfo_AddTenantReq.DiscardUnknown(m)
}
var xxx_messageInfo_AddTenantReq proto.InternalMessageInfo
func (m *AddTenantReq) GetPubKey() string {
if m != nil {
return m.PubKey
}
return ""
}
func (m *AddTenantReq) GetTenantName() string {
if m != nil {
return m.TenantName
}
return ""
}
func (m *AddTenantReq) GetInitialConfiguration() *Configuration {
if m != nil {
return m.InitialConfiguration
}
return nil
}
type TenantValue struct {
Port string `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"`
Fingerprint string `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TenantValue) Reset() { *m = TenantValue{} }
func (m *TenantValue) String() string { return proto.CompactTextString(m) }
func (*TenantValue) ProtoMessage() {}
func (*TenantValue) Descriptor() ([]byte, []int) {
return fileDescriptor_eefc82927d57d89b, []int{5}
}
func (m *TenantValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TenantValue.Unmarshal(m, b)
}
func (m *TenantValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TenantValue.Marshal(b, m, deterministic)
}
func (m *TenantValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_TenantValue.Merge(m, src)
}
func (m *TenantValue) XXX_Size() int {
return xxx_messageInfo_TenantValue.Size(m)
}
func (m *TenantValue) XXX_DiscardUnknown() {
xxx_messageInfo_TenantValue.DiscardUnknown(m)
}
var xxx_messageInfo_TenantValue proto.InternalMessageInfo
func (m *TenantValue) GetPort() string {
if m != nil {
return m.Port
}
return ""
}
func (m *TenantValue) GetFingerprint() string {
if m != nil {
return m.Fingerprint
}
return ""
}
func init() {
proto.RegisterType((*AddPasswordReq)(nil), "AddPasswordReq")
proto.RegisterType((*Configuration)(nil), "Configuration")
proto.RegisterType((*GetPasswordReq)(nil), "GetPasswordReq")
proto.RegisterType((*PasswordValue)(nil), "PasswordValue")
proto.RegisterType((*AddTenantReq)(nil), "AddTenantReq")
proto.RegisterType((*TenantValue)(nil), "TenantValue")
}
func init() { proto.RegisterFile("remote.proto", fileDescriptor_eefc82927d57d89b) }
var fileDescriptor_eefc82927d57d89b = []byte{
// 380 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x41, 0xcb, 0xd3, 0x40,
0x10, 0x25, 0xa6, 0x5f, 0xbe, 0xcf, 0x69, 0x9b, 0xca, 0xa0, 0x25, 0xf4, 0x20, 0x21, 0x87, 0xd2,
0x53, 0x90, 0x7a, 0x17, 0x6a, 0x85, 0x1e, 0xa4, 0x22, 0x41, 0xbc, 0x6f, 0xbb, 0xd3, 0xb8, 0xd0,
0xee, 0xc6, 0xcd, 0x44, 0xf1, 0xae, 0x17, 0x7f, 0xb5, 0x24, 0xd9, 0xd4, 0x44, 0x0a, 0x8a, 0xb7,
0x79, 0x8f, 0x37, 0x93, 0x37, 0x6f, 0xb2, 0x30, 0xb1, 0x74, 0x31, 0x4c, 0x69, 0x61, 0x0d, 0x9b,
0xe4, 0xbb, 0x07, 0xe1, 0x46, 0xca, 0xf7, 0xa2, 0x2c, 0xbf, 0x1a, 0x2b, 0x33, 0xfa, 0x8c, 0x4f,
0xc0, 0x67, 0x91, 0x47, 0x5e, 0xec, 0xad, 0x1e, 0x67, 0x75, 0x89, 0x0b, 0x78, 0xa8, 0x4a, 0xb2,
0x5a, 0x5c, 0x28, 0x7a, 0xd4, 0xd0, 0x57, 0x8c, 0x6f, 0xe0, 0x99, 0xf9, 0x42, 0xd6, 0x2a, 0x49,
0x5b, 0xa3, 0x4f, 0x2a, 0xaf, 0xac, 0x60, 0x65, 0x74, 0xe4, 0xc7, 0xde, 0x6a, 0xbc, 0x0e, 0xd3,
0x01, 0x9b, 0xdd, 0x16, 0x27, 0x3f, 0x3c, 0x98, 0x0e, 0x18, 0x9c, 0x43, 0x70, 0x21, 0xfe, 0x64,
0xa4, 0x33, 0xe2, 0x10, 0x22, 0x8c, 0x4a, 0x22, 0xe9, 0x7c, 0x34, 0x75, 0xad, 0x3d, 0x89, 0x23,
0x1b, 0xdb, 0x7c, 0xf4, 0x2e, 0x73, 0x08, 0x23, 0xb8, 0x2f, 0xd9, 0x58, 0x91, 0x53, 0x34, 0x6a,
0xe4, 0x1d, 0xac, 0x3b, 0x4c, 0xc5, 0x45, 0xc5, 0xd1, 0x5d, 0xec, 0xad, 0x1e, 0x32, 0x87, 0x92,
0x57, 0x10, 0xee, 0x88, 0xff, 0x3b, 0x8d, 0x64, 0x0f, 0xd3, 0xae, 0xf9, 0xa3, 0x38, 0x57, 0x54,
0x8b, 0x0b, 0x47, 0xb8, 0x19, 0x57, 0x8c, 0x31, 0x8c, 0x4f, 0x4a, 0xe7, 0x64, 0x0b, 0xab, 0x34,
0xbb, 0x59, 0x7d, 0x2a, 0xf9, 0xe9, 0xc1, 0x64, 0x23, 0xe5, 0x07, 0xd2, 0x42, 0x73, 0xed, 0x66,
0x0e, 0x41, 0x51, 0x1d, 0xde, 0xd2, 0xb7, 0x2e, 0x95, 0x16, 0xe1, 0x73, 0x00, 0x6e, 0x44, 0xef,
0x7e, 0xbb, 0xea, 0x31, 0xf8, 0x1a, 0x9e, 0x2a, 0xad, 0x58, 0x89, 0xf3, 0xbf, 0x1c, 0xe9, 0xa6,
0x36, 0xd9, 0xc2, 0xb8, 0x35, 0xd2, 0x6e, 0x86, 0x30, 0x2a, 0x8c, 0x65, 0x67, 0xa4, 0xa9, 0xff,
0xbe, 0xd1, 0x5a, 0xc0, 0xac, 0x0b, 0x68, 0x2f, 0xb4, 0xc8, 0xc9, 0xe2, 0x12, 0xfc, 0x8d, 0x94,
0x38, 0x4b, 0x87, 0xff, 0xe1, 0x22, 0x4c, 0x87, 0x51, 0x2e, 0xc1, 0xdf, 0x11, 0xe3, 0x2c, 0x1d,
0x5e, 0xe8, 0x4f, 0xdd, 0xfa, 0x05, 0x04, 0xad, 0x4f, 0x5c, 0xc2, 0xfd, 0xd6, 0x68, 0x4d, 0x47,
0xc6, 0x69, 0xda, 0xcf, 0x71, 0x31, 0x49, 0x7b, 0xab, 0x1c, 0x82, 0xe6, 0x2d, 0xbc, 0xfc, 0x15,
0x00, 0x00, 0xff, 0xff, 0xf0, 0x59, 0x9e, 0x03, 0x1b, 0x03, 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
// PasswordManagerClient is the client API for PasswordManager service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type PasswordManagerClient interface {
Add(ctx context.Context, in *AddPasswordReq, opts ...grpc.CallOption) (*PasswordValue, error)
Get(ctx context.Context, in *GetPasswordReq, opts ...grpc.CallOption) (*PasswordValue, error)
}
type passwordManagerClient struct {
cc *grpc.ClientConn
}
func NewPasswordManagerClient(cc *grpc.ClientConn) PasswordManagerClient {
return &passwordManagerClient{cc}
}
func (c *passwordManagerClient) Add(ctx context.Context, in *AddPasswordReq, opts ...grpc.CallOption) (*PasswordValue, error) {
out := new(PasswordValue)
err := c.cc.Invoke(ctx, "/PasswordManager/Add", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *passwordManagerClient) Get(ctx context.Context, in *GetPasswordReq, opts ...grpc.CallOption) (*PasswordValue, error) {
out := new(PasswordValue)
err := c.cc.Invoke(ctx, "/PasswordManager/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PasswordManagerServer is the server API for PasswordManager service.
type PasswordManagerServer interface {
Add(context.Context, *AddPasswordReq) (*PasswordValue, error)
Get(context.Context, *GetPasswordReq) (*PasswordValue, error)
}
// UnimplementedPasswordManagerServer can be embedded to have forward compatible implementations.
type UnimplementedPasswordManagerServer struct {
}
func (*UnimplementedPasswordManagerServer) Add(ctx context.Context, req *AddPasswordReq) (*PasswordValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
}
func (*UnimplementedPasswordManagerServer) Get(ctx context.Context, req *GetPasswordReq) (*PasswordValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func RegisterPasswordManagerServer(s *grpc.Server, srv PasswordManagerServer) {
s.RegisterService(&_PasswordManager_serviceDesc, srv)
}
func _PasswordManager_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddPasswordReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PasswordManagerServer).Add(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/PasswordManager/Add",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PasswordManagerServer).Add(ctx, req.(*AddPasswordReq))
}
return interceptor(ctx, in, info, handler)
}
func _PasswordManager_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPasswordReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PasswordManagerServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/PasswordManager/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PasswordManagerServer).Get(ctx, req.(*GetPasswordReq))
}
return interceptor(ctx, in, info, handler)
}
var _PasswordManager_serviceDesc = grpc.ServiceDesc{
ServiceName: "PasswordManager",
HandlerType: (*PasswordManagerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Add",
Handler: _PasswordManager_Add_Handler,
},
{
MethodName: "Get",
Handler: _PasswordManager_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "remote.proto",
}
// TenantClient is the client API for Tenant service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TenantClient interface {
Connect(ctx context.Context, in *AddTenantReq, opts ...grpc.CallOption) (*TenantValue, error)
}
type tenantClient struct {
cc *grpc.ClientConn
}
func NewTenantClient(cc *grpc.ClientConn) TenantClient {
return &tenantClient{cc}
}
func (c *tenantClient) Connect(ctx context.Context, in *AddTenantReq, opts ...grpc.CallOption) (*TenantValue, error) {
out := new(TenantValue)
err := c.cc.Invoke(ctx, "/Tenant/Connect", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TenantServer is the server API for Tenant service.
type TenantServer interface {
Connect(context.Context, *AddTenantReq) (*TenantValue, error)
}
// UnimplementedTenantServer can be embedded to have forward compatible implementations.
type UnimplementedTenantServer struct {
}
func (*UnimplementedTenantServer) Connect(ctx context.Context, req *AddTenantReq) (*TenantValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method Connect not implemented")
}
func RegisterTenantServer(s *grpc.Server, srv TenantServer) {
s.RegisterService(&_Tenant_serviceDesc, srv)
}
func _Tenant_Connect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddTenantReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServer).Connect(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Tenant/Connect",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServer).Connect(ctx, req.(*AddTenantReq))
}
return interceptor(ctx, in, info, handler)
}
var _Tenant_serviceDesc = grpc.ServiceDesc{
ServiceName: "Tenant",
HandlerType: (*TenantServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Connect",
Handler: _Tenant_Connect_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "remote.proto",
}