blob: 7e038df0146cc53a462a38aca15c8c53fc007a5f [file] [log] [blame]
William Kurkianea869482019-04-09 15:16:11 -04001// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: auth.proto
3
4/*
5 Package authpb is a generated protocol buffer package.
6
7 It is generated from these files:
8 auth.proto
9
10 It has these top-level messages:
Abhilash S.L3b494632019-07-16 15:51:09 +053011 UserAddOptions
William Kurkianea869482019-04-09 15:16:11 -040012 User
13 Permission
14 Role
15*/
16package authpb
17
18import (
19 "fmt"
20
21 proto "github.com/golang/protobuf/proto"
22
23 math "math"
24
25 _ "github.com/gogo/protobuf/gogoproto"
26
27 io "io"
28)
29
30// Reference imports to suppress errors if they are not otherwise used.
31var _ = proto.Marshal
32var _ = fmt.Errorf
33var _ = math.Inf
34
35// This is a compile-time assertion to ensure that this generated file
36// is compatible with the proto package it is being compiled against.
37// A compilation error at this line likely means your copy of the
38// proto package needs to be updated.
39const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
40
41type Permission_Type int32
42
43const (
44 READ Permission_Type = 0
45 WRITE Permission_Type = 1
46 READWRITE Permission_Type = 2
47)
48
49var Permission_Type_name = map[int32]string{
50 0: "READ",
51 1: "WRITE",
52 2: "READWRITE",
53}
54var Permission_Type_value = map[string]int32{
55 "READ": 0,
56 "WRITE": 1,
57 "READWRITE": 2,
58}
59
60func (x Permission_Type) String() string {
61 return proto.EnumName(Permission_Type_name, int32(x))
62}
Abhilash S.L3b494632019-07-16 15:51:09 +053063func (Permission_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorAuth, []int{2, 0} }
64
65type UserAddOptions struct {
66 NoPassword bool `protobuf:"varint,1,opt,name=no_password,json=noPassword,proto3" json:"no_password,omitempty"`
67}
68
69func (m *UserAddOptions) Reset() { *m = UserAddOptions{} }
70func (m *UserAddOptions) String() string { return proto.CompactTextString(m) }
71func (*UserAddOptions) ProtoMessage() {}
72func (*UserAddOptions) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{0} }
William Kurkianea869482019-04-09 15:16:11 -040073
74// User is a single entry in the bucket authUsers
75type User struct {
Abhilash S.L3b494632019-07-16 15:51:09 +053076 Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
77 Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
78 Roles []string `protobuf:"bytes,3,rep,name=roles" json:"roles,omitempty"`
79 Options *UserAddOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"`
William Kurkianea869482019-04-09 15:16:11 -040080}
81
82func (m *User) Reset() { *m = User{} }
83func (m *User) String() string { return proto.CompactTextString(m) }
84func (*User) ProtoMessage() {}
Abhilash S.L3b494632019-07-16 15:51:09 +053085func (*User) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{1} }
William Kurkianea869482019-04-09 15:16:11 -040086
87// Permission is a single entity
88type Permission struct {
89 PermType Permission_Type `protobuf:"varint,1,opt,name=permType,proto3,enum=authpb.Permission_Type" json:"permType,omitempty"`
90 Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
91 RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
92}
93
94func (m *Permission) Reset() { *m = Permission{} }
95func (m *Permission) String() string { return proto.CompactTextString(m) }
96func (*Permission) ProtoMessage() {}
Abhilash S.L3b494632019-07-16 15:51:09 +053097func (*Permission) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{2} }
William Kurkianea869482019-04-09 15:16:11 -040098
99// Role is a single entry in the bucket authRoles
100type Role struct {
101 Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
102 KeyPermission []*Permission `protobuf:"bytes,2,rep,name=keyPermission" json:"keyPermission,omitempty"`
103}
104
105func (m *Role) Reset() { *m = Role{} }
106func (m *Role) String() string { return proto.CompactTextString(m) }
107func (*Role) ProtoMessage() {}
Abhilash S.L3b494632019-07-16 15:51:09 +0530108func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{3} }
William Kurkianea869482019-04-09 15:16:11 -0400109
110func init() {
Abhilash S.L3b494632019-07-16 15:51:09 +0530111 proto.RegisterType((*UserAddOptions)(nil), "authpb.UserAddOptions")
William Kurkianea869482019-04-09 15:16:11 -0400112 proto.RegisterType((*User)(nil), "authpb.User")
113 proto.RegisterType((*Permission)(nil), "authpb.Permission")
114 proto.RegisterType((*Role)(nil), "authpb.Role")
115 proto.RegisterEnum("authpb.Permission_Type", Permission_Type_name, Permission_Type_value)
116}
Abhilash S.L3b494632019-07-16 15:51:09 +0530117func (m *UserAddOptions) Marshal() (dAtA []byte, err error) {
118 size := m.Size()
119 dAtA = make([]byte, size)
120 n, err := m.MarshalTo(dAtA)
121 if err != nil {
122 return nil, err
123 }
124 return dAtA[:n], nil
125}
126
127func (m *UserAddOptions) MarshalTo(dAtA []byte) (int, error) {
128 var i int
129 _ = i
130 var l int
131 _ = l
132 if m.NoPassword {
133 dAtA[i] = 0x8
134 i++
135 if m.NoPassword {
136 dAtA[i] = 1
137 } else {
138 dAtA[i] = 0
139 }
140 i++
141 }
142 return i, nil
143}
144
William Kurkianea869482019-04-09 15:16:11 -0400145func (m *User) Marshal() (dAtA []byte, err error) {
146 size := m.Size()
147 dAtA = make([]byte, size)
148 n, err := m.MarshalTo(dAtA)
149 if err != nil {
150 return nil, err
151 }
152 return dAtA[:n], nil
153}
154
155func (m *User) MarshalTo(dAtA []byte) (int, error) {
156 var i int
157 _ = i
158 var l int
159 _ = l
160 if len(m.Name) > 0 {
161 dAtA[i] = 0xa
162 i++
163 i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
164 i += copy(dAtA[i:], m.Name)
165 }
166 if len(m.Password) > 0 {
167 dAtA[i] = 0x12
168 i++
169 i = encodeVarintAuth(dAtA, i, uint64(len(m.Password)))
170 i += copy(dAtA[i:], m.Password)
171 }
172 if len(m.Roles) > 0 {
173 for _, s := range m.Roles {
174 dAtA[i] = 0x1a
175 i++
176 l = len(s)
177 for l >= 1<<7 {
178 dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
179 l >>= 7
180 i++
181 }
182 dAtA[i] = uint8(l)
183 i++
184 i += copy(dAtA[i:], s)
185 }
186 }
Abhilash S.L3b494632019-07-16 15:51:09 +0530187 if m.Options != nil {
188 dAtA[i] = 0x22
189 i++
190 i = encodeVarintAuth(dAtA, i, uint64(m.Options.Size()))
191 n1, err := m.Options.MarshalTo(dAtA[i:])
192 if err != nil {
193 return 0, err
194 }
195 i += n1
196 }
William Kurkianea869482019-04-09 15:16:11 -0400197 return i, nil
198}
199
200func (m *Permission) Marshal() (dAtA []byte, err error) {
201 size := m.Size()
202 dAtA = make([]byte, size)
203 n, err := m.MarshalTo(dAtA)
204 if err != nil {
205 return nil, err
206 }
207 return dAtA[:n], nil
208}
209
210func (m *Permission) MarshalTo(dAtA []byte) (int, error) {
211 var i int
212 _ = i
213 var l int
214 _ = l
215 if m.PermType != 0 {
216 dAtA[i] = 0x8
217 i++
218 i = encodeVarintAuth(dAtA, i, uint64(m.PermType))
219 }
220 if len(m.Key) > 0 {
221 dAtA[i] = 0x12
222 i++
223 i = encodeVarintAuth(dAtA, i, uint64(len(m.Key)))
224 i += copy(dAtA[i:], m.Key)
225 }
226 if len(m.RangeEnd) > 0 {
227 dAtA[i] = 0x1a
228 i++
229 i = encodeVarintAuth(dAtA, i, uint64(len(m.RangeEnd)))
230 i += copy(dAtA[i:], m.RangeEnd)
231 }
232 return i, nil
233}
234
235func (m *Role) Marshal() (dAtA []byte, err error) {
236 size := m.Size()
237 dAtA = make([]byte, size)
238 n, err := m.MarshalTo(dAtA)
239 if err != nil {
240 return nil, err
241 }
242 return dAtA[:n], nil
243}
244
245func (m *Role) MarshalTo(dAtA []byte) (int, error) {
246 var i int
247 _ = i
248 var l int
249 _ = l
250 if len(m.Name) > 0 {
251 dAtA[i] = 0xa
252 i++
253 i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
254 i += copy(dAtA[i:], m.Name)
255 }
256 if len(m.KeyPermission) > 0 {
257 for _, msg := range m.KeyPermission {
258 dAtA[i] = 0x12
259 i++
260 i = encodeVarintAuth(dAtA, i, uint64(msg.Size()))
261 n, err := msg.MarshalTo(dAtA[i:])
262 if err != nil {
263 return 0, err
264 }
265 i += n
266 }
267 }
268 return i, nil
269}
270
271func encodeVarintAuth(dAtA []byte, offset int, v uint64) int {
272 for v >= 1<<7 {
273 dAtA[offset] = uint8(v&0x7f | 0x80)
274 v >>= 7
275 offset++
276 }
277 dAtA[offset] = uint8(v)
278 return offset + 1
279}
Abhilash S.L3b494632019-07-16 15:51:09 +0530280func (m *UserAddOptions) Size() (n int) {
281 var l int
282 _ = l
283 if m.NoPassword {
284 n += 2
285 }
286 return n
287}
288
William Kurkianea869482019-04-09 15:16:11 -0400289func (m *User) Size() (n int) {
290 var l int
291 _ = l
292 l = len(m.Name)
293 if l > 0 {
294 n += 1 + l + sovAuth(uint64(l))
295 }
296 l = len(m.Password)
297 if l > 0 {
298 n += 1 + l + sovAuth(uint64(l))
299 }
300 if len(m.Roles) > 0 {
301 for _, s := range m.Roles {
302 l = len(s)
303 n += 1 + l + sovAuth(uint64(l))
304 }
305 }
Abhilash S.L3b494632019-07-16 15:51:09 +0530306 if m.Options != nil {
307 l = m.Options.Size()
308 n += 1 + l + sovAuth(uint64(l))
309 }
William Kurkianea869482019-04-09 15:16:11 -0400310 return n
311}
312
313func (m *Permission) Size() (n int) {
314 var l int
315 _ = l
316 if m.PermType != 0 {
317 n += 1 + sovAuth(uint64(m.PermType))
318 }
319 l = len(m.Key)
320 if l > 0 {
321 n += 1 + l + sovAuth(uint64(l))
322 }
323 l = len(m.RangeEnd)
324 if l > 0 {
325 n += 1 + l + sovAuth(uint64(l))
326 }
327 return n
328}
329
330func (m *Role) Size() (n int) {
331 var l int
332 _ = l
333 l = len(m.Name)
334 if l > 0 {
335 n += 1 + l + sovAuth(uint64(l))
336 }
337 if len(m.KeyPermission) > 0 {
338 for _, e := range m.KeyPermission {
339 l = e.Size()
340 n += 1 + l + sovAuth(uint64(l))
341 }
342 }
343 return n
344}
345
346func sovAuth(x uint64) (n int) {
347 for {
348 n++
349 x >>= 7
350 if x == 0 {
351 break
352 }
353 }
354 return n
355}
356func sozAuth(x uint64) (n int) {
357 return sovAuth(uint64((x << 1) ^ uint64((int64(x) >> 63))))
358}
Abhilash S.L3b494632019-07-16 15:51:09 +0530359func (m *UserAddOptions) Unmarshal(dAtA []byte) error {
360 l := len(dAtA)
361 iNdEx := 0
362 for iNdEx < l {
363 preIndex := iNdEx
364 var wire uint64
365 for shift := uint(0); ; shift += 7 {
366 if shift >= 64 {
367 return ErrIntOverflowAuth
368 }
369 if iNdEx >= l {
370 return io.ErrUnexpectedEOF
371 }
372 b := dAtA[iNdEx]
373 iNdEx++
374 wire |= (uint64(b) & 0x7F) << shift
375 if b < 0x80 {
376 break
377 }
378 }
379 fieldNum := int32(wire >> 3)
380 wireType := int(wire & 0x7)
381 if wireType == 4 {
382 return fmt.Errorf("proto: UserAddOptions: wiretype end group for non-group")
383 }
384 if fieldNum <= 0 {
385 return fmt.Errorf("proto: UserAddOptions: illegal tag %d (wire type %d)", fieldNum, wire)
386 }
387 switch fieldNum {
388 case 1:
389 if wireType != 0 {
390 return fmt.Errorf("proto: wrong wireType = %d for field NoPassword", wireType)
391 }
392 var v int
393 for shift := uint(0); ; shift += 7 {
394 if shift >= 64 {
395 return ErrIntOverflowAuth
396 }
397 if iNdEx >= l {
398 return io.ErrUnexpectedEOF
399 }
400 b := dAtA[iNdEx]
401 iNdEx++
402 v |= (int(b) & 0x7F) << shift
403 if b < 0x80 {
404 break
405 }
406 }
407 m.NoPassword = bool(v != 0)
408 default:
409 iNdEx = preIndex
410 skippy, err := skipAuth(dAtA[iNdEx:])
411 if err != nil {
412 return err
413 }
414 if skippy < 0 {
415 return ErrInvalidLengthAuth
416 }
417 if (iNdEx + skippy) > l {
418 return io.ErrUnexpectedEOF
419 }
420 iNdEx += skippy
421 }
422 }
423
424 if iNdEx > l {
425 return io.ErrUnexpectedEOF
426 }
427 return nil
428}
William Kurkianea869482019-04-09 15:16:11 -0400429func (m *User) Unmarshal(dAtA []byte) error {
430 l := len(dAtA)
431 iNdEx := 0
432 for iNdEx < l {
433 preIndex := iNdEx
434 var wire uint64
435 for shift := uint(0); ; shift += 7 {
436 if shift >= 64 {
437 return ErrIntOverflowAuth
438 }
439 if iNdEx >= l {
440 return io.ErrUnexpectedEOF
441 }
442 b := dAtA[iNdEx]
443 iNdEx++
444 wire |= (uint64(b) & 0x7F) << shift
445 if b < 0x80 {
446 break
447 }
448 }
449 fieldNum := int32(wire >> 3)
450 wireType := int(wire & 0x7)
451 if wireType == 4 {
452 return fmt.Errorf("proto: User: wiretype end group for non-group")
453 }
454 if fieldNum <= 0 {
455 return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire)
456 }
457 switch fieldNum {
458 case 1:
459 if wireType != 2 {
460 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
461 }
462 var byteLen int
463 for shift := uint(0); ; shift += 7 {
464 if shift >= 64 {
465 return ErrIntOverflowAuth
466 }
467 if iNdEx >= l {
468 return io.ErrUnexpectedEOF
469 }
470 b := dAtA[iNdEx]
471 iNdEx++
472 byteLen |= (int(b) & 0x7F) << shift
473 if b < 0x80 {
474 break
475 }
476 }
477 if byteLen < 0 {
478 return ErrInvalidLengthAuth
479 }
480 postIndex := iNdEx + byteLen
481 if postIndex > l {
482 return io.ErrUnexpectedEOF
483 }
484 m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...)
485 if m.Name == nil {
486 m.Name = []byte{}
487 }
488 iNdEx = postIndex
489 case 2:
490 if wireType != 2 {
491 return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
492 }
493 var byteLen int
494 for shift := uint(0); ; shift += 7 {
495 if shift >= 64 {
496 return ErrIntOverflowAuth
497 }
498 if iNdEx >= l {
499 return io.ErrUnexpectedEOF
500 }
501 b := dAtA[iNdEx]
502 iNdEx++
503 byteLen |= (int(b) & 0x7F) << shift
504 if b < 0x80 {
505 break
506 }
507 }
508 if byteLen < 0 {
509 return ErrInvalidLengthAuth
510 }
511 postIndex := iNdEx + byteLen
512 if postIndex > l {
513 return io.ErrUnexpectedEOF
514 }
515 m.Password = append(m.Password[:0], dAtA[iNdEx:postIndex]...)
516 if m.Password == nil {
517 m.Password = []byte{}
518 }
519 iNdEx = postIndex
520 case 3:
521 if wireType != 2 {
522 return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType)
523 }
524 var stringLen uint64
525 for shift := uint(0); ; shift += 7 {
526 if shift >= 64 {
527 return ErrIntOverflowAuth
528 }
529 if iNdEx >= l {
530 return io.ErrUnexpectedEOF
531 }
532 b := dAtA[iNdEx]
533 iNdEx++
534 stringLen |= (uint64(b) & 0x7F) << shift
535 if b < 0x80 {
536 break
537 }
538 }
539 intStringLen := int(stringLen)
540 if intStringLen < 0 {
541 return ErrInvalidLengthAuth
542 }
543 postIndex := iNdEx + intStringLen
544 if postIndex > l {
545 return io.ErrUnexpectedEOF
546 }
547 m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex]))
548 iNdEx = postIndex
Abhilash S.L3b494632019-07-16 15:51:09 +0530549 case 4:
550 if wireType != 2 {
551 return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
552 }
553 var msglen int
554 for shift := uint(0); ; shift += 7 {
555 if shift >= 64 {
556 return ErrIntOverflowAuth
557 }
558 if iNdEx >= l {
559 return io.ErrUnexpectedEOF
560 }
561 b := dAtA[iNdEx]
562 iNdEx++
563 msglen |= (int(b) & 0x7F) << shift
564 if b < 0x80 {
565 break
566 }
567 }
568 if msglen < 0 {
569 return ErrInvalidLengthAuth
570 }
571 postIndex := iNdEx + msglen
572 if postIndex > l {
573 return io.ErrUnexpectedEOF
574 }
575 if m.Options == nil {
576 m.Options = &UserAddOptions{}
577 }
578 if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
579 return err
580 }
581 iNdEx = postIndex
William Kurkianea869482019-04-09 15:16:11 -0400582 default:
583 iNdEx = preIndex
584 skippy, err := skipAuth(dAtA[iNdEx:])
585 if err != nil {
586 return err
587 }
588 if skippy < 0 {
589 return ErrInvalidLengthAuth
590 }
591 if (iNdEx + skippy) > l {
592 return io.ErrUnexpectedEOF
593 }
594 iNdEx += skippy
595 }
596 }
597
598 if iNdEx > l {
599 return io.ErrUnexpectedEOF
600 }
601 return nil
602}
603func (m *Permission) Unmarshal(dAtA []byte) error {
604 l := len(dAtA)
605 iNdEx := 0
606 for iNdEx < l {
607 preIndex := iNdEx
608 var wire uint64
609 for shift := uint(0); ; shift += 7 {
610 if shift >= 64 {
611 return ErrIntOverflowAuth
612 }
613 if iNdEx >= l {
614 return io.ErrUnexpectedEOF
615 }
616 b := dAtA[iNdEx]
617 iNdEx++
618 wire |= (uint64(b) & 0x7F) << shift
619 if b < 0x80 {
620 break
621 }
622 }
623 fieldNum := int32(wire >> 3)
624 wireType := int(wire & 0x7)
625 if wireType == 4 {
626 return fmt.Errorf("proto: Permission: wiretype end group for non-group")
627 }
628 if fieldNum <= 0 {
629 return fmt.Errorf("proto: Permission: illegal tag %d (wire type %d)", fieldNum, wire)
630 }
631 switch fieldNum {
632 case 1:
633 if wireType != 0 {
634 return fmt.Errorf("proto: wrong wireType = %d for field PermType", wireType)
635 }
636 m.PermType = 0
637 for shift := uint(0); ; shift += 7 {
638 if shift >= 64 {
639 return ErrIntOverflowAuth
640 }
641 if iNdEx >= l {
642 return io.ErrUnexpectedEOF
643 }
644 b := dAtA[iNdEx]
645 iNdEx++
646 m.PermType |= (Permission_Type(b) & 0x7F) << shift
647 if b < 0x80 {
648 break
649 }
650 }
651 case 2:
652 if wireType != 2 {
653 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
654 }
655 var byteLen int
656 for shift := uint(0); ; shift += 7 {
657 if shift >= 64 {
658 return ErrIntOverflowAuth
659 }
660 if iNdEx >= l {
661 return io.ErrUnexpectedEOF
662 }
663 b := dAtA[iNdEx]
664 iNdEx++
665 byteLen |= (int(b) & 0x7F) << shift
666 if b < 0x80 {
667 break
668 }
669 }
670 if byteLen < 0 {
671 return ErrInvalidLengthAuth
672 }
673 postIndex := iNdEx + byteLen
674 if postIndex > l {
675 return io.ErrUnexpectedEOF
676 }
677 m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
678 if m.Key == nil {
679 m.Key = []byte{}
680 }
681 iNdEx = postIndex
682 case 3:
683 if wireType != 2 {
684 return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType)
685 }
686 var byteLen int
687 for shift := uint(0); ; shift += 7 {
688 if shift >= 64 {
689 return ErrIntOverflowAuth
690 }
691 if iNdEx >= l {
692 return io.ErrUnexpectedEOF
693 }
694 b := dAtA[iNdEx]
695 iNdEx++
696 byteLen |= (int(b) & 0x7F) << shift
697 if b < 0x80 {
698 break
699 }
700 }
701 if byteLen < 0 {
702 return ErrInvalidLengthAuth
703 }
704 postIndex := iNdEx + byteLen
705 if postIndex > l {
706 return io.ErrUnexpectedEOF
707 }
708 m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...)
709 if m.RangeEnd == nil {
710 m.RangeEnd = []byte{}
711 }
712 iNdEx = postIndex
713 default:
714 iNdEx = preIndex
715 skippy, err := skipAuth(dAtA[iNdEx:])
716 if err != nil {
717 return err
718 }
719 if skippy < 0 {
720 return ErrInvalidLengthAuth
721 }
722 if (iNdEx + skippy) > l {
723 return io.ErrUnexpectedEOF
724 }
725 iNdEx += skippy
726 }
727 }
728
729 if iNdEx > l {
730 return io.ErrUnexpectedEOF
731 }
732 return nil
733}
734func (m *Role) Unmarshal(dAtA []byte) error {
735 l := len(dAtA)
736 iNdEx := 0
737 for iNdEx < l {
738 preIndex := iNdEx
739 var wire uint64
740 for shift := uint(0); ; shift += 7 {
741 if shift >= 64 {
742 return ErrIntOverflowAuth
743 }
744 if iNdEx >= l {
745 return io.ErrUnexpectedEOF
746 }
747 b := dAtA[iNdEx]
748 iNdEx++
749 wire |= (uint64(b) & 0x7F) << shift
750 if b < 0x80 {
751 break
752 }
753 }
754 fieldNum := int32(wire >> 3)
755 wireType := int(wire & 0x7)
756 if wireType == 4 {
757 return fmt.Errorf("proto: Role: wiretype end group for non-group")
758 }
759 if fieldNum <= 0 {
760 return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
761 }
762 switch fieldNum {
763 case 1:
764 if wireType != 2 {
765 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
766 }
767 var byteLen int
768 for shift := uint(0); ; shift += 7 {
769 if shift >= 64 {
770 return ErrIntOverflowAuth
771 }
772 if iNdEx >= l {
773 return io.ErrUnexpectedEOF
774 }
775 b := dAtA[iNdEx]
776 iNdEx++
777 byteLen |= (int(b) & 0x7F) << shift
778 if b < 0x80 {
779 break
780 }
781 }
782 if byteLen < 0 {
783 return ErrInvalidLengthAuth
784 }
785 postIndex := iNdEx + byteLen
786 if postIndex > l {
787 return io.ErrUnexpectedEOF
788 }
789 m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...)
790 if m.Name == nil {
791 m.Name = []byte{}
792 }
793 iNdEx = postIndex
794 case 2:
795 if wireType != 2 {
796 return fmt.Errorf("proto: wrong wireType = %d for field KeyPermission", wireType)
797 }
798 var msglen int
799 for shift := uint(0); ; shift += 7 {
800 if shift >= 64 {
801 return ErrIntOverflowAuth
802 }
803 if iNdEx >= l {
804 return io.ErrUnexpectedEOF
805 }
806 b := dAtA[iNdEx]
807 iNdEx++
808 msglen |= (int(b) & 0x7F) << shift
809 if b < 0x80 {
810 break
811 }
812 }
813 if msglen < 0 {
814 return ErrInvalidLengthAuth
815 }
816 postIndex := iNdEx + msglen
817 if postIndex > l {
818 return io.ErrUnexpectedEOF
819 }
820 m.KeyPermission = append(m.KeyPermission, &Permission{})
821 if err := m.KeyPermission[len(m.KeyPermission)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
822 return err
823 }
824 iNdEx = postIndex
825 default:
826 iNdEx = preIndex
827 skippy, err := skipAuth(dAtA[iNdEx:])
828 if err != nil {
829 return err
830 }
831 if skippy < 0 {
832 return ErrInvalidLengthAuth
833 }
834 if (iNdEx + skippy) > l {
835 return io.ErrUnexpectedEOF
836 }
837 iNdEx += skippy
838 }
839 }
840
841 if iNdEx > l {
842 return io.ErrUnexpectedEOF
843 }
844 return nil
845}
846func skipAuth(dAtA []byte) (n int, err error) {
847 l := len(dAtA)
848 iNdEx := 0
849 for iNdEx < l {
850 var wire uint64
851 for shift := uint(0); ; shift += 7 {
852 if shift >= 64 {
853 return 0, ErrIntOverflowAuth
854 }
855 if iNdEx >= l {
856 return 0, io.ErrUnexpectedEOF
857 }
858 b := dAtA[iNdEx]
859 iNdEx++
860 wire |= (uint64(b) & 0x7F) << shift
861 if b < 0x80 {
862 break
863 }
864 }
865 wireType := int(wire & 0x7)
866 switch wireType {
867 case 0:
868 for shift := uint(0); ; shift += 7 {
869 if shift >= 64 {
870 return 0, ErrIntOverflowAuth
871 }
872 if iNdEx >= l {
873 return 0, io.ErrUnexpectedEOF
874 }
875 iNdEx++
876 if dAtA[iNdEx-1] < 0x80 {
877 break
878 }
879 }
880 return iNdEx, nil
881 case 1:
882 iNdEx += 8
883 return iNdEx, nil
884 case 2:
885 var length int
886 for shift := uint(0); ; shift += 7 {
887 if shift >= 64 {
888 return 0, ErrIntOverflowAuth
889 }
890 if iNdEx >= l {
891 return 0, io.ErrUnexpectedEOF
892 }
893 b := dAtA[iNdEx]
894 iNdEx++
895 length |= (int(b) & 0x7F) << shift
896 if b < 0x80 {
897 break
898 }
899 }
900 iNdEx += length
901 if length < 0 {
902 return 0, ErrInvalidLengthAuth
903 }
904 return iNdEx, nil
905 case 3:
906 for {
907 var innerWire uint64
908 var start int = iNdEx
909 for shift := uint(0); ; shift += 7 {
910 if shift >= 64 {
911 return 0, ErrIntOverflowAuth
912 }
913 if iNdEx >= l {
914 return 0, io.ErrUnexpectedEOF
915 }
916 b := dAtA[iNdEx]
917 iNdEx++
918 innerWire |= (uint64(b) & 0x7F) << shift
919 if b < 0x80 {
920 break
921 }
922 }
923 innerWireType := int(innerWire & 0x7)
924 if innerWireType == 4 {
925 break
926 }
927 next, err := skipAuth(dAtA[start:])
928 if err != nil {
929 return 0, err
930 }
931 iNdEx = start + next
932 }
933 return iNdEx, nil
934 case 4:
935 return iNdEx, nil
936 case 5:
937 iNdEx += 4
938 return iNdEx, nil
939 default:
940 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
941 }
942 }
943 panic("unreachable")
944}
945
946var (
947 ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling")
948 ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow")
949)
950
951func init() { proto.RegisterFile("auth.proto", fileDescriptorAuth) }
952
953var fileDescriptorAuth = []byte{
Abhilash S.L3b494632019-07-16 15:51:09 +0530954 // 338 bytes of a gzipped FileDescriptorProto
955 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcf, 0x4e, 0xea, 0x40,
956 0x14, 0xc6, 0x3b, 0xb4, 0x70, 0xdb, 0xc3, 0x85, 0x90, 0x13, 0x72, 0x6f, 0x83, 0x49, 0x6d, 0xba,
957 0x6a, 0x5c, 0x54, 0x85, 0x8d, 0x5b, 0x8c, 0x2c, 0x5c, 0x49, 0x26, 0x18, 0x97, 0xa4, 0xa4, 0x13,
958 0x24, 0xc0, 0x4c, 0x33, 0x83, 0x31, 0x6c, 0x7c, 0x0e, 0x17, 0x3e, 0x10, 0x4b, 0x1e, 0x41, 0xf0,
959 0x45, 0x4c, 0x67, 0xf8, 0x13, 0xa2, 0xbb, 0xef, 0x7c, 0xe7, 0xfb, 0x66, 0x7e, 0x99, 0x01, 0x48,
960 0x5f, 0x16, 0xcf, 0x49, 0x2e, 0xc5, 0x42, 0x60, 0xa5, 0xd0, 0xf9, 0xa8, 0xd5, 0x1c, 0x8b, 0xb1,
961 0xd0, 0xd6, 0x65, 0xa1, 0xcc, 0x36, 0xba, 0x86, 0xfa, 0xa3, 0x62, 0xb2, 0x9b, 0x65, 0x0f, 0xf9,
962 0x62, 0x22, 0xb8, 0xc2, 0x73, 0xa8, 0x72, 0x31, 0xcc, 0x53, 0xa5, 0x5e, 0x85, 0xcc, 0x7c, 0x12,
963 0x92, 0xd8, 0xa5, 0xc0, 0x45, 0x7f, 0xe7, 0x44, 0x6f, 0xe0, 0x14, 0x15, 0x44, 0x70, 0x78, 0x3a,
964 0x67, 0x3a, 0xf1, 0x97, 0x6a, 0x8d, 0x2d, 0x70, 0x0f, 0xcd, 0x92, 0xf6, 0x0f, 0x33, 0x36, 0xa1,
965 0x2c, 0xc5, 0x8c, 0x29, 0xdf, 0x0e, 0xed, 0xd8, 0xa3, 0x66, 0xc0, 0x2b, 0xf8, 0x23, 0xcc, 0xcd,
966 0xbe, 0x13, 0x92, 0xb8, 0xda, 0xfe, 0x97, 0x18, 0xe0, 0xe4, 0x94, 0x8b, 0xee, 0x63, 0xd1, 0x07,
967 0x01, 0xe8, 0x33, 0x39, 0x9f, 0x28, 0x35, 0x11, 0x1c, 0x3b, 0xe0, 0xe6, 0x4c, 0xce, 0x07, 0xcb,
968 0xdc, 0xa0, 0xd4, 0xdb, 0xff, 0xf7, 0x27, 0x1c, 0x53, 0x49, 0xb1, 0xa6, 0x87, 0x20, 0x36, 0xc0,
969 0x9e, 0xb2, 0xe5, 0x0e, 0xb1, 0x90, 0x78, 0x06, 0x9e, 0x4c, 0xf9, 0x98, 0x0d, 0x19, 0xcf, 0x7c,
970 0xdb, 0xa0, 0x6b, 0xa3, 0xc7, 0xb3, 0xe8, 0x02, 0x1c, 0x5d, 0x73, 0xc1, 0xa1, 0xbd, 0xee, 0x5d,
971 0xc3, 0x42, 0x0f, 0xca, 0x4f, 0xf4, 0x7e, 0xd0, 0x6b, 0x10, 0xac, 0x81, 0x57, 0x98, 0x66, 0x2c,
972 0x45, 0x03, 0x70, 0xa8, 0x98, 0xb1, 0x5f, 0x9f, 0xe7, 0x06, 0x6a, 0x53, 0xb6, 0x3c, 0x62, 0xf9,
973 0xa5, 0xd0, 0x8e, 0xab, 0x6d, 0xfc, 0x09, 0x4c, 0x4f, 0x83, 0xb7, 0xfe, 0x6a, 0x13, 0x58, 0xeb,
974 0x4d, 0x60, 0xad, 0xb6, 0x01, 0x59, 0x6f, 0x03, 0xf2, 0xb9, 0x0d, 0xc8, 0xfb, 0x57, 0x60, 0x8d,
975 0x2a, 0xfa, 0x23, 0x3b, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x61, 0x66, 0xc6, 0x9d, 0xf4, 0x01,
976 0x00, 0x00,
William Kurkianea869482019-04-09 15:16:11 -0400977}