auth.pb.go 19 KB

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