auth.pb.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  1. // Code generated by protoc-gen-gogo.
  2. // source: auth.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package authpb is a generated protocol buffer package.
  6. It is generated from these files:
  7. auth.proto
  8. It has these top-level messages:
  9. User
  10. Permission
  11. Role
  12. */
  13. package authpb
  14. import (
  15. "fmt"
  16. proto "github.com/golang/protobuf/proto"
  17. math "math"
  18. io "io"
  19. )
  20. // Reference imports to suppress errors if they are not otherwise used.
  21. var _ = proto.Marshal
  22. var _ = fmt.Errorf
  23. var _ = math.Inf
  24. // This is a compile-time assertion to ensure that this generated file
  25. // is compatible with the proto package it is being compiled against.
  26. // A compilation error at this line likely means your copy of the
  27. // proto package needs to be updated.
  28. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  29. type Permission_Type int32
  30. const (
  31. READ Permission_Type = 0
  32. WRITE Permission_Type = 1
  33. READWRITE Permission_Type = 2
  34. )
  35. var Permission_Type_name = map[int32]string{
  36. 0: "READ",
  37. 1: "WRITE",
  38. 2: "READWRITE",
  39. }
  40. var Permission_Type_value = map[string]int32{
  41. "READ": 0,
  42. "WRITE": 1,
  43. "READWRITE": 2,
  44. }
  45. func (x Permission_Type) String() string {
  46. return proto.EnumName(Permission_Type_name, int32(x))
  47. }
  48. func (Permission_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorAuth, []int{1, 0} }
  49. // User is a single entry in the bucket authUsers
  50. type User struct {
  51. Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  52. Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  53. Roles []string `protobuf:"bytes,3,rep,name=roles" json:"roles,omitempty"`
  54. }
  55. func (m *User) Reset() { *m = User{} }
  56. func (m *User) String() string { return proto.CompactTextString(m) }
  57. func (*User) ProtoMessage() {}
  58. func (*User) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{0} }
  59. // Permission is a single entity
  60. type Permission struct {
  61. PermType Permission_Type `protobuf:"varint,1,opt,name=permType,proto3,enum=authpb.Permission_Type" json:"permType,omitempty"`
  62. Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
  63. RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
  64. }
  65. func (m *Permission) Reset() { *m = Permission{} }
  66. func (m *Permission) String() string { return proto.CompactTextString(m) }
  67. func (*Permission) ProtoMessage() {}
  68. func (*Permission) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{1} }
  69. // Role is a single entry in the bucket authRoles
  70. type Role struct {
  71. Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  72. KeyPermission []*Permission `protobuf:"bytes,2,rep,name=keyPermission" json:"keyPermission,omitempty"`
  73. }
  74. func (m *Role) Reset() { *m = Role{} }
  75. func (m *Role) String() string { return proto.CompactTextString(m) }
  76. func (*Role) ProtoMessage() {}
  77. func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{2} }
  78. func init() {
  79. proto.RegisterType((*User)(nil), "authpb.User")
  80. proto.RegisterType((*Permission)(nil), "authpb.Permission")
  81. proto.RegisterType((*Role)(nil), "authpb.Role")
  82. proto.RegisterEnum("authpb.Permission_Type", Permission_Type_name, Permission_Type_value)
  83. }
  84. func (m *User) Marshal() (dAtA []byte, err error) {
  85. size := m.Size()
  86. dAtA = make([]byte, size)
  87. n, err := m.MarshalTo(dAtA)
  88. if err != nil {
  89. return nil, err
  90. }
  91. return dAtA[:n], nil
  92. }
  93. func (m *User) MarshalTo(dAtA []byte) (int, error) {
  94. var i int
  95. _ = i
  96. var l int
  97. _ = l
  98. if len(m.Name) > 0 {
  99. dAtA[i] = 0xa
  100. i++
  101. i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
  102. i += copy(dAtA[i:], m.Name)
  103. }
  104. if len(m.Password) > 0 {
  105. dAtA[i] = 0x12
  106. i++
  107. i = encodeVarintAuth(dAtA, i, uint64(len(m.Password)))
  108. i += copy(dAtA[i:], m.Password)
  109. }
  110. if len(m.Roles) > 0 {
  111. for _, s := range m.Roles {
  112. dAtA[i] = 0x1a
  113. i++
  114. l = len(s)
  115. for l >= 1<<7 {
  116. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  117. l >>= 7
  118. i++
  119. }
  120. dAtA[i] = uint8(l)
  121. i++
  122. i += copy(dAtA[i:], s)
  123. }
  124. }
  125. return i, nil
  126. }
  127. func (m *Permission) Marshal() (dAtA []byte, err error) {
  128. size := m.Size()
  129. dAtA = make([]byte, size)
  130. n, err := m.MarshalTo(dAtA)
  131. if err != nil {
  132. return nil, err
  133. }
  134. return dAtA[:n], nil
  135. }
  136. func (m *Permission) MarshalTo(dAtA []byte) (int, error) {
  137. var i int
  138. _ = i
  139. var l int
  140. _ = l
  141. if m.PermType != 0 {
  142. dAtA[i] = 0x8
  143. i++
  144. i = encodeVarintAuth(dAtA, i, uint64(m.PermType))
  145. }
  146. if len(m.Key) > 0 {
  147. dAtA[i] = 0x12
  148. i++
  149. i = encodeVarintAuth(dAtA, i, uint64(len(m.Key)))
  150. i += copy(dAtA[i:], m.Key)
  151. }
  152. if len(m.RangeEnd) > 0 {
  153. dAtA[i] = 0x1a
  154. i++
  155. i = encodeVarintAuth(dAtA, i, uint64(len(m.RangeEnd)))
  156. i += copy(dAtA[i:], m.RangeEnd)
  157. }
  158. return i, nil
  159. }
  160. func (m *Role) Marshal() (dAtA []byte, err error) {
  161. size := m.Size()
  162. dAtA = make([]byte, size)
  163. n, err := m.MarshalTo(dAtA)
  164. if err != nil {
  165. return nil, err
  166. }
  167. return dAtA[:n], nil
  168. }
  169. func (m *Role) MarshalTo(dAtA []byte) (int, error) {
  170. var i int
  171. _ = i
  172. var l int
  173. _ = l
  174. if len(m.Name) > 0 {
  175. dAtA[i] = 0xa
  176. i++
  177. i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
  178. i += copy(dAtA[i:], m.Name)
  179. }
  180. if len(m.KeyPermission) > 0 {
  181. for _, msg := range m.KeyPermission {
  182. dAtA[i] = 0x12
  183. i++
  184. i = encodeVarintAuth(dAtA, i, uint64(msg.Size()))
  185. n, err := msg.MarshalTo(dAtA[i:])
  186. if err != nil {
  187. return 0, err
  188. }
  189. i += n
  190. }
  191. }
  192. return i, nil
  193. }
  194. func encodeFixed64Auth(dAtA []byte, offset int, v uint64) int {
  195. dAtA[offset] = uint8(v)
  196. dAtA[offset+1] = uint8(v >> 8)
  197. dAtA[offset+2] = uint8(v >> 16)
  198. dAtA[offset+3] = uint8(v >> 24)
  199. dAtA[offset+4] = uint8(v >> 32)
  200. dAtA[offset+5] = uint8(v >> 40)
  201. dAtA[offset+6] = uint8(v >> 48)
  202. dAtA[offset+7] = uint8(v >> 56)
  203. return offset + 8
  204. }
  205. func encodeFixed32Auth(dAtA []byte, offset int, v uint32) int {
  206. dAtA[offset] = uint8(v)
  207. dAtA[offset+1] = uint8(v >> 8)
  208. dAtA[offset+2] = uint8(v >> 16)
  209. dAtA[offset+3] = uint8(v >> 24)
  210. return offset + 4
  211. }
  212. func encodeVarintAuth(dAtA []byte, offset int, v uint64) int {
  213. for v >= 1<<7 {
  214. dAtA[offset] = uint8(v&0x7f | 0x80)
  215. v >>= 7
  216. offset++
  217. }
  218. dAtA[offset] = uint8(v)
  219. return offset + 1
  220. }
  221. func (m *User) Size() (n int) {
  222. var l int
  223. _ = l
  224. l = len(m.Name)
  225. if l > 0 {
  226. n += 1 + l + sovAuth(uint64(l))
  227. }
  228. l = len(m.Password)
  229. if l > 0 {
  230. n += 1 + l + sovAuth(uint64(l))
  231. }
  232. if len(m.Roles) > 0 {
  233. for _, s := range m.Roles {
  234. l = len(s)
  235. n += 1 + l + sovAuth(uint64(l))
  236. }
  237. }
  238. return n
  239. }
  240. func (m *Permission) Size() (n int) {
  241. var l int
  242. _ = l
  243. if m.PermType != 0 {
  244. n += 1 + sovAuth(uint64(m.PermType))
  245. }
  246. l = len(m.Key)
  247. if l > 0 {
  248. n += 1 + l + sovAuth(uint64(l))
  249. }
  250. l = len(m.RangeEnd)
  251. if l > 0 {
  252. n += 1 + l + sovAuth(uint64(l))
  253. }
  254. return n
  255. }
  256. func (m *Role) Size() (n int) {
  257. var l int
  258. _ = l
  259. l = len(m.Name)
  260. if l > 0 {
  261. n += 1 + l + sovAuth(uint64(l))
  262. }
  263. if len(m.KeyPermission) > 0 {
  264. for _, e := range m.KeyPermission {
  265. l = e.Size()
  266. n += 1 + l + sovAuth(uint64(l))
  267. }
  268. }
  269. return n
  270. }
  271. func sovAuth(x uint64) (n int) {
  272. for {
  273. n++
  274. x >>= 7
  275. if x == 0 {
  276. break
  277. }
  278. }
  279. return n
  280. }
  281. func sozAuth(x uint64) (n int) {
  282. return sovAuth(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  283. }
  284. func (m *User) Unmarshal(dAtA []byte) error {
  285. l := len(dAtA)
  286. iNdEx := 0
  287. for iNdEx < l {
  288. preIndex := iNdEx
  289. var wire uint64
  290. for shift := uint(0); ; shift += 7 {
  291. if shift >= 64 {
  292. return ErrIntOverflowAuth
  293. }
  294. if iNdEx >= l {
  295. return io.ErrUnexpectedEOF
  296. }
  297. b := dAtA[iNdEx]
  298. iNdEx++
  299. wire |= (uint64(b) & 0x7F) << shift
  300. if b < 0x80 {
  301. break
  302. }
  303. }
  304. fieldNum := int32(wire >> 3)
  305. wireType := int(wire & 0x7)
  306. if wireType == 4 {
  307. return fmt.Errorf("proto: User: wiretype end group for non-group")
  308. }
  309. if fieldNum <= 0 {
  310. return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire)
  311. }
  312. switch fieldNum {
  313. case 1:
  314. if wireType != 2 {
  315. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  316. }
  317. var byteLen int
  318. for shift := uint(0); ; shift += 7 {
  319. if shift >= 64 {
  320. return ErrIntOverflowAuth
  321. }
  322. if iNdEx >= l {
  323. return io.ErrUnexpectedEOF
  324. }
  325. b := dAtA[iNdEx]
  326. iNdEx++
  327. byteLen |= (int(b) & 0x7F) << shift
  328. if b < 0x80 {
  329. break
  330. }
  331. }
  332. if byteLen < 0 {
  333. return ErrInvalidLengthAuth
  334. }
  335. postIndex := iNdEx + byteLen
  336. if postIndex > l {
  337. return io.ErrUnexpectedEOF
  338. }
  339. m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...)
  340. if m.Name == nil {
  341. m.Name = []byte{}
  342. }
  343. iNdEx = postIndex
  344. case 2:
  345. if wireType != 2 {
  346. return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
  347. }
  348. var byteLen int
  349. for shift := uint(0); ; shift += 7 {
  350. if shift >= 64 {
  351. return ErrIntOverflowAuth
  352. }
  353. if iNdEx >= l {
  354. return io.ErrUnexpectedEOF
  355. }
  356. b := dAtA[iNdEx]
  357. iNdEx++
  358. byteLen |= (int(b) & 0x7F) << shift
  359. if b < 0x80 {
  360. break
  361. }
  362. }
  363. if byteLen < 0 {
  364. return ErrInvalidLengthAuth
  365. }
  366. postIndex := iNdEx + byteLen
  367. if postIndex > l {
  368. return io.ErrUnexpectedEOF
  369. }
  370. m.Password = append(m.Password[:0], dAtA[iNdEx:postIndex]...)
  371. if m.Password == nil {
  372. m.Password = []byte{}
  373. }
  374. iNdEx = postIndex
  375. case 3:
  376. if wireType != 2 {
  377. return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType)
  378. }
  379. var stringLen uint64
  380. for shift := uint(0); ; shift += 7 {
  381. if shift >= 64 {
  382. return ErrIntOverflowAuth
  383. }
  384. if iNdEx >= l {
  385. return io.ErrUnexpectedEOF
  386. }
  387. b := dAtA[iNdEx]
  388. iNdEx++
  389. stringLen |= (uint64(b) & 0x7F) << shift
  390. if b < 0x80 {
  391. break
  392. }
  393. }
  394. intStringLen := int(stringLen)
  395. if intStringLen < 0 {
  396. return ErrInvalidLengthAuth
  397. }
  398. postIndex := iNdEx + intStringLen
  399. if postIndex > l {
  400. return io.ErrUnexpectedEOF
  401. }
  402. m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex]))
  403. iNdEx = postIndex
  404. default:
  405. iNdEx = preIndex
  406. skippy, err := skipAuth(dAtA[iNdEx:])
  407. if err != nil {
  408. return err
  409. }
  410. if skippy < 0 {
  411. return ErrInvalidLengthAuth
  412. }
  413. if (iNdEx + skippy) > l {
  414. return io.ErrUnexpectedEOF
  415. }
  416. iNdEx += skippy
  417. }
  418. }
  419. if iNdEx > l {
  420. return io.ErrUnexpectedEOF
  421. }
  422. return nil
  423. }
  424. func (m *Permission) Unmarshal(dAtA []byte) error {
  425. l := len(dAtA)
  426. iNdEx := 0
  427. for iNdEx < l {
  428. preIndex := iNdEx
  429. var wire uint64
  430. for shift := uint(0); ; shift += 7 {
  431. if shift >= 64 {
  432. return ErrIntOverflowAuth
  433. }
  434. if iNdEx >= l {
  435. return io.ErrUnexpectedEOF
  436. }
  437. b := dAtA[iNdEx]
  438. iNdEx++
  439. wire |= (uint64(b) & 0x7F) << shift
  440. if b < 0x80 {
  441. break
  442. }
  443. }
  444. fieldNum := int32(wire >> 3)
  445. wireType := int(wire & 0x7)
  446. if wireType == 4 {
  447. return fmt.Errorf("proto: Permission: wiretype end group for non-group")
  448. }
  449. if fieldNum <= 0 {
  450. return fmt.Errorf("proto: Permission: illegal tag %d (wire type %d)", fieldNum, wire)
  451. }
  452. switch fieldNum {
  453. case 1:
  454. if wireType != 0 {
  455. return fmt.Errorf("proto: wrong wireType = %d for field PermType", wireType)
  456. }
  457. m.PermType = 0
  458. for shift := uint(0); ; shift += 7 {
  459. if shift >= 64 {
  460. return ErrIntOverflowAuth
  461. }
  462. if iNdEx >= l {
  463. return io.ErrUnexpectedEOF
  464. }
  465. b := dAtA[iNdEx]
  466. iNdEx++
  467. m.PermType |= (Permission_Type(b) & 0x7F) << shift
  468. if b < 0x80 {
  469. break
  470. }
  471. }
  472. case 2:
  473. if wireType != 2 {
  474. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  475. }
  476. var byteLen int
  477. for shift := uint(0); ; shift += 7 {
  478. if shift >= 64 {
  479. return ErrIntOverflowAuth
  480. }
  481. if iNdEx >= l {
  482. return io.ErrUnexpectedEOF
  483. }
  484. b := dAtA[iNdEx]
  485. iNdEx++
  486. byteLen |= (int(b) & 0x7F) << shift
  487. if b < 0x80 {
  488. break
  489. }
  490. }
  491. if byteLen < 0 {
  492. return ErrInvalidLengthAuth
  493. }
  494. postIndex := iNdEx + byteLen
  495. if postIndex > l {
  496. return io.ErrUnexpectedEOF
  497. }
  498. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  499. if m.Key == nil {
  500. m.Key = []byte{}
  501. }
  502. iNdEx = postIndex
  503. case 3:
  504. if wireType != 2 {
  505. return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType)
  506. }
  507. var byteLen int
  508. for shift := uint(0); ; shift += 7 {
  509. if shift >= 64 {
  510. return ErrIntOverflowAuth
  511. }
  512. if iNdEx >= l {
  513. return io.ErrUnexpectedEOF
  514. }
  515. b := dAtA[iNdEx]
  516. iNdEx++
  517. byteLen |= (int(b) & 0x7F) << shift
  518. if b < 0x80 {
  519. break
  520. }
  521. }
  522. if byteLen < 0 {
  523. return ErrInvalidLengthAuth
  524. }
  525. postIndex := iNdEx + byteLen
  526. if postIndex > l {
  527. return io.ErrUnexpectedEOF
  528. }
  529. m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...)
  530. if m.RangeEnd == nil {
  531. m.RangeEnd = []byte{}
  532. }
  533. iNdEx = postIndex
  534. default:
  535. iNdEx = preIndex
  536. skippy, err := skipAuth(dAtA[iNdEx:])
  537. if err != nil {
  538. return err
  539. }
  540. if skippy < 0 {
  541. return ErrInvalidLengthAuth
  542. }
  543. if (iNdEx + skippy) > l {
  544. return io.ErrUnexpectedEOF
  545. }
  546. iNdEx += skippy
  547. }
  548. }
  549. if iNdEx > l {
  550. return io.ErrUnexpectedEOF
  551. }
  552. return nil
  553. }
  554. func (m *Role) Unmarshal(dAtA []byte) error {
  555. l := len(dAtA)
  556. iNdEx := 0
  557. for iNdEx < l {
  558. preIndex := iNdEx
  559. var wire uint64
  560. for shift := uint(0); ; shift += 7 {
  561. if shift >= 64 {
  562. return ErrIntOverflowAuth
  563. }
  564. if iNdEx >= l {
  565. return io.ErrUnexpectedEOF
  566. }
  567. b := dAtA[iNdEx]
  568. iNdEx++
  569. wire |= (uint64(b) & 0x7F) << shift
  570. if b < 0x80 {
  571. break
  572. }
  573. }
  574. fieldNum := int32(wire >> 3)
  575. wireType := int(wire & 0x7)
  576. if wireType == 4 {
  577. return fmt.Errorf("proto: Role: wiretype end group for non-group")
  578. }
  579. if fieldNum <= 0 {
  580. return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
  581. }
  582. switch fieldNum {
  583. case 1:
  584. if wireType != 2 {
  585. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  586. }
  587. var byteLen int
  588. for shift := uint(0); ; shift += 7 {
  589. if shift >= 64 {
  590. return ErrIntOverflowAuth
  591. }
  592. if iNdEx >= l {
  593. return io.ErrUnexpectedEOF
  594. }
  595. b := dAtA[iNdEx]
  596. iNdEx++
  597. byteLen |= (int(b) & 0x7F) << shift
  598. if b < 0x80 {
  599. break
  600. }
  601. }
  602. if byteLen < 0 {
  603. return ErrInvalidLengthAuth
  604. }
  605. postIndex := iNdEx + byteLen
  606. if postIndex > l {
  607. return io.ErrUnexpectedEOF
  608. }
  609. m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...)
  610. if m.Name == nil {
  611. m.Name = []byte{}
  612. }
  613. iNdEx = postIndex
  614. case 2:
  615. if wireType != 2 {
  616. return fmt.Errorf("proto: wrong wireType = %d for field KeyPermission", wireType)
  617. }
  618. var msglen int
  619. for shift := uint(0); ; shift += 7 {
  620. if shift >= 64 {
  621. return ErrIntOverflowAuth
  622. }
  623. if iNdEx >= l {
  624. return io.ErrUnexpectedEOF
  625. }
  626. b := dAtA[iNdEx]
  627. iNdEx++
  628. msglen |= (int(b) & 0x7F) << shift
  629. if b < 0x80 {
  630. break
  631. }
  632. }
  633. if msglen < 0 {
  634. return ErrInvalidLengthAuth
  635. }
  636. postIndex := iNdEx + msglen
  637. if postIndex > l {
  638. return io.ErrUnexpectedEOF
  639. }
  640. m.KeyPermission = append(m.KeyPermission, &Permission{})
  641. if err := m.KeyPermission[len(m.KeyPermission)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  642. return err
  643. }
  644. iNdEx = postIndex
  645. default:
  646. iNdEx = preIndex
  647. skippy, err := skipAuth(dAtA[iNdEx:])
  648. if err != nil {
  649. return err
  650. }
  651. if skippy < 0 {
  652. return ErrInvalidLengthAuth
  653. }
  654. if (iNdEx + skippy) > l {
  655. return io.ErrUnexpectedEOF
  656. }
  657. iNdEx += skippy
  658. }
  659. }
  660. if iNdEx > l {
  661. return io.ErrUnexpectedEOF
  662. }
  663. return nil
  664. }
  665. func skipAuth(dAtA []byte) (n int, err error) {
  666. l := len(dAtA)
  667. iNdEx := 0
  668. for iNdEx < l {
  669. var wire uint64
  670. for shift := uint(0); ; shift += 7 {
  671. if shift >= 64 {
  672. return 0, ErrIntOverflowAuth
  673. }
  674. if iNdEx >= l {
  675. return 0, io.ErrUnexpectedEOF
  676. }
  677. b := dAtA[iNdEx]
  678. iNdEx++
  679. wire |= (uint64(b) & 0x7F) << shift
  680. if b < 0x80 {
  681. break
  682. }
  683. }
  684. wireType := int(wire & 0x7)
  685. switch wireType {
  686. case 0:
  687. for shift := uint(0); ; shift += 7 {
  688. if shift >= 64 {
  689. return 0, ErrIntOverflowAuth
  690. }
  691. if iNdEx >= l {
  692. return 0, io.ErrUnexpectedEOF
  693. }
  694. iNdEx++
  695. if dAtA[iNdEx-1] < 0x80 {
  696. break
  697. }
  698. }
  699. return iNdEx, nil
  700. case 1:
  701. iNdEx += 8
  702. return iNdEx, nil
  703. case 2:
  704. var length int
  705. for shift := uint(0); ; shift += 7 {
  706. if shift >= 64 {
  707. return 0, ErrIntOverflowAuth
  708. }
  709. if iNdEx >= l {
  710. return 0, io.ErrUnexpectedEOF
  711. }
  712. b := dAtA[iNdEx]
  713. iNdEx++
  714. length |= (int(b) & 0x7F) << shift
  715. if b < 0x80 {
  716. break
  717. }
  718. }
  719. iNdEx += length
  720. if length < 0 {
  721. return 0, ErrInvalidLengthAuth
  722. }
  723. return iNdEx, nil
  724. case 3:
  725. for {
  726. var innerWire uint64
  727. var start int = iNdEx
  728. for shift := uint(0); ; shift += 7 {
  729. if shift >= 64 {
  730. return 0, ErrIntOverflowAuth
  731. }
  732. if iNdEx >= l {
  733. return 0, io.ErrUnexpectedEOF
  734. }
  735. b := dAtA[iNdEx]
  736. iNdEx++
  737. innerWire |= (uint64(b) & 0x7F) << shift
  738. if b < 0x80 {
  739. break
  740. }
  741. }
  742. innerWireType := int(innerWire & 0x7)
  743. if innerWireType == 4 {
  744. break
  745. }
  746. next, err := skipAuth(dAtA[start:])
  747. if err != nil {
  748. return 0, err
  749. }
  750. iNdEx = start + next
  751. }
  752. return iNdEx, nil
  753. case 4:
  754. return iNdEx, nil
  755. case 5:
  756. iNdEx += 4
  757. return iNdEx, nil
  758. default:
  759. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  760. }
  761. }
  762. panic("unreachable")
  763. }
  764. var (
  765. ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling")
  766. ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow")
  767. )
  768. func init() { proto.RegisterFile("auth.proto", fileDescriptorAuth) }
  769. var fileDescriptorAuth = []byte{
  770. // 288 bytes of a gzipped FileDescriptorProto
  771. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xc3, 0x30,
  772. 0x1c, 0xc6, 0x9b, 0xb6, 0x1b, 0xed, 0x5f, 0x27, 0x25, 0x0c, 0x0c, 0x13, 0x42, 0xe9, 0xa9, 0x78,
  773. 0xa8, 0xb0, 0x5d, 0xbc, 0x2a, 0xf6, 0x20, 0x78, 0x90, 0x50, 0xf1, 0x28, 0x1d, 0x0d, 0x75, 0x6c,
  774. 0x6d, 0x4a, 0x32, 0x91, 0xbe, 0x89, 0x07, 0x1f, 0x68, 0xc7, 0x3d, 0x82, 0xab, 0x2f, 0x22, 0x4d,
  775. 0x64, 0x43, 0xdc, 0xed, 0xfb, 0xbe, 0xff, 0x97, 0xe4, 0x97, 0x3f, 0x40, 0xfe, 0xb6, 0x7e, 0x4d,
  776. 0x1a, 0x29, 0xd6, 0x02, 0x0f, 0x7b, 0xdd, 0xcc, 0x27, 0xe3, 0x52, 0x94, 0x42, 0x47, 0x57, 0xbd,
  777. 0x32, 0xd3, 0xe8, 0x01, 0xdc, 0x27, 0xc5, 0x25, 0xc6, 0xe0, 0xd6, 0x79, 0xc5, 0x09, 0x0a, 0x51,
  778. 0x7c, 0xca, 0xb4, 0xc6, 0x13, 0xf0, 0x9a, 0x5c, 0xa9, 0x77, 0x21, 0x0b, 0x62, 0xeb, 0x7c, 0xef,
  779. 0xf1, 0x18, 0x06, 0x52, 0xac, 0xb8, 0x22, 0x4e, 0xe8, 0xc4, 0x3e, 0x33, 0x26, 0xfa, 0x44, 0x00,
  780. 0x8f, 0x5c, 0x56, 0x0b, 0xa5, 0x16, 0xa2, 0xc6, 0x33, 0xf0, 0x1a, 0x2e, 0xab, 0xac, 0x6d, 0xcc,
  781. 0xc5, 0x67, 0xd3, 0xf3, 0xc4, 0xd0, 0x24, 0x87, 0x56, 0xd2, 0x8f, 0xd9, 0xbe, 0x88, 0x03, 0x70,
  782. 0x96, 0xbc, 0xfd, 0x7d, 0xb0, 0x97, 0xf8, 0x02, 0x7c, 0x99, 0xd7, 0x25, 0x7f, 0xe1, 0x75, 0x41,
  783. 0x1c, 0x03, 0xa2, 0x83, 0xb4, 0x2e, 0xa2, 0x4b, 0x70, 0xf5, 0x31, 0x0f, 0x5c, 0x96, 0xde, 0xdc,
  784. 0x05, 0x16, 0xf6, 0x61, 0xf0, 0xcc, 0xee, 0xb3, 0x34, 0x40, 0x78, 0x04, 0x7e, 0x1f, 0x1a, 0x6b,
  785. 0x47, 0x19, 0xb8, 0x4c, 0xac, 0xf8, 0xd1, 0xcf, 0x5e, 0xc3, 0x68, 0xc9, 0xdb, 0x03, 0x16, 0xb1,
  786. 0x43, 0x27, 0x3e, 0x99, 0xe2, 0xff, 0xc0, 0xec, 0x6f, 0xf1, 0x96, 0x6c, 0x76, 0xd4, 0xda, 0xee,
  787. 0xa8, 0xb5, 0xe9, 0x28, 0xda, 0x76, 0x14, 0x7d, 0x75, 0x14, 0x7d, 0x7c, 0x53, 0x6b, 0x3e, 0xd4,
  788. 0x3b, 0x9e, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x76, 0x8d, 0x4f, 0x8f, 0x01, 0x00, 0x00,
  789. }