auth.pb.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: auth.proto
  3. /*
  4. Package authpb is a generated protocol buffer package.
  5. It is generated from these files:
  6. auth.proto
  7. It has these top-level messages:
  8. User
  9. Permission
  10. Role
  11. */
  12. package authpb
  13. import (
  14. "fmt"
  15. proto "github.com/golang/protobuf/proto"
  16. math "math"
  17. _ "github.com/gogo/protobuf/gogoproto"
  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 encodeVarintAuth(dAtA []byte, offset int, v uint64) int {
  195. for v >= 1<<7 {
  196. dAtA[offset] = uint8(v&0x7f | 0x80)
  197. v >>= 7
  198. offset++
  199. }
  200. dAtA[offset] = uint8(v)
  201. return offset + 1
  202. }
  203. func (m *User) Size() (n int) {
  204. var l int
  205. _ = l
  206. l = len(m.Name)
  207. if l > 0 {
  208. n += 1 + l + sovAuth(uint64(l))
  209. }
  210. l = len(m.Password)
  211. if l > 0 {
  212. n += 1 + l + sovAuth(uint64(l))
  213. }
  214. if len(m.Roles) > 0 {
  215. for _, s := range m.Roles {
  216. l = len(s)
  217. n += 1 + l + sovAuth(uint64(l))
  218. }
  219. }
  220. return n
  221. }
  222. func (m *Permission) Size() (n int) {
  223. var l int
  224. _ = l
  225. if m.PermType != 0 {
  226. n += 1 + sovAuth(uint64(m.PermType))
  227. }
  228. l = len(m.Key)
  229. if l > 0 {
  230. n += 1 + l + sovAuth(uint64(l))
  231. }
  232. l = len(m.RangeEnd)
  233. if l > 0 {
  234. n += 1 + l + sovAuth(uint64(l))
  235. }
  236. return n
  237. }
  238. func (m *Role) Size() (n int) {
  239. var l int
  240. _ = l
  241. l = len(m.Name)
  242. if l > 0 {
  243. n += 1 + l + sovAuth(uint64(l))
  244. }
  245. if len(m.KeyPermission) > 0 {
  246. for _, e := range m.KeyPermission {
  247. l = e.Size()
  248. n += 1 + l + sovAuth(uint64(l))
  249. }
  250. }
  251. return n
  252. }
  253. func sovAuth(x uint64) (n int) {
  254. for {
  255. n++
  256. x >>= 7
  257. if x == 0 {
  258. break
  259. }
  260. }
  261. return n
  262. }
  263. func sozAuth(x uint64) (n int) {
  264. return sovAuth(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  265. }
  266. func (m *User) Unmarshal(dAtA []byte) error {
  267. l := len(dAtA)
  268. iNdEx := 0
  269. for iNdEx < l {
  270. preIndex := iNdEx
  271. var wire uint64
  272. for shift := uint(0); ; shift += 7 {
  273. if shift >= 64 {
  274. return ErrIntOverflowAuth
  275. }
  276. if iNdEx >= l {
  277. return io.ErrUnexpectedEOF
  278. }
  279. b := dAtA[iNdEx]
  280. iNdEx++
  281. wire |= (uint64(b) & 0x7F) << shift
  282. if b < 0x80 {
  283. break
  284. }
  285. }
  286. fieldNum := int32(wire >> 3)
  287. wireType := int(wire & 0x7)
  288. if wireType == 4 {
  289. return fmt.Errorf("proto: User: wiretype end group for non-group")
  290. }
  291. if fieldNum <= 0 {
  292. return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire)
  293. }
  294. switch fieldNum {
  295. case 1:
  296. if wireType != 2 {
  297. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  298. }
  299. var byteLen int
  300. for shift := uint(0); ; shift += 7 {
  301. if shift >= 64 {
  302. return ErrIntOverflowAuth
  303. }
  304. if iNdEx >= l {
  305. return io.ErrUnexpectedEOF
  306. }
  307. b := dAtA[iNdEx]
  308. iNdEx++
  309. byteLen |= (int(b) & 0x7F) << shift
  310. if b < 0x80 {
  311. break
  312. }
  313. }
  314. if byteLen < 0 {
  315. return ErrInvalidLengthAuth
  316. }
  317. postIndex := iNdEx + byteLen
  318. if postIndex > l {
  319. return io.ErrUnexpectedEOF
  320. }
  321. m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...)
  322. if m.Name == nil {
  323. m.Name = []byte{}
  324. }
  325. iNdEx = postIndex
  326. case 2:
  327. if wireType != 2 {
  328. return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
  329. }
  330. var byteLen int
  331. for shift := uint(0); ; shift += 7 {
  332. if shift >= 64 {
  333. return ErrIntOverflowAuth
  334. }
  335. if iNdEx >= l {
  336. return io.ErrUnexpectedEOF
  337. }
  338. b := dAtA[iNdEx]
  339. iNdEx++
  340. byteLen |= (int(b) & 0x7F) << shift
  341. if b < 0x80 {
  342. break
  343. }
  344. }
  345. if byteLen < 0 {
  346. return ErrInvalidLengthAuth
  347. }
  348. postIndex := iNdEx + byteLen
  349. if postIndex > l {
  350. return io.ErrUnexpectedEOF
  351. }
  352. m.Password = append(m.Password[:0], dAtA[iNdEx:postIndex]...)
  353. if m.Password == nil {
  354. m.Password = []byte{}
  355. }
  356. iNdEx = postIndex
  357. case 3:
  358. if wireType != 2 {
  359. return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType)
  360. }
  361. var stringLen uint64
  362. for shift := uint(0); ; shift += 7 {
  363. if shift >= 64 {
  364. return ErrIntOverflowAuth
  365. }
  366. if iNdEx >= l {
  367. return io.ErrUnexpectedEOF
  368. }
  369. b := dAtA[iNdEx]
  370. iNdEx++
  371. stringLen |= (uint64(b) & 0x7F) << shift
  372. if b < 0x80 {
  373. break
  374. }
  375. }
  376. intStringLen := int(stringLen)
  377. if intStringLen < 0 {
  378. return ErrInvalidLengthAuth
  379. }
  380. postIndex := iNdEx + intStringLen
  381. if postIndex > l {
  382. return io.ErrUnexpectedEOF
  383. }
  384. m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex]))
  385. iNdEx = postIndex
  386. default:
  387. iNdEx = preIndex
  388. skippy, err := skipAuth(dAtA[iNdEx:])
  389. if err != nil {
  390. return err
  391. }
  392. if skippy < 0 {
  393. return ErrInvalidLengthAuth
  394. }
  395. if (iNdEx + skippy) > l {
  396. return io.ErrUnexpectedEOF
  397. }
  398. iNdEx += skippy
  399. }
  400. }
  401. if iNdEx > l {
  402. return io.ErrUnexpectedEOF
  403. }
  404. return nil
  405. }
  406. func (m *Permission) Unmarshal(dAtA []byte) error {
  407. l := len(dAtA)
  408. iNdEx := 0
  409. for iNdEx < l {
  410. preIndex := iNdEx
  411. var wire uint64
  412. for shift := uint(0); ; shift += 7 {
  413. if shift >= 64 {
  414. return ErrIntOverflowAuth
  415. }
  416. if iNdEx >= l {
  417. return io.ErrUnexpectedEOF
  418. }
  419. b := dAtA[iNdEx]
  420. iNdEx++
  421. wire |= (uint64(b) & 0x7F) << shift
  422. if b < 0x80 {
  423. break
  424. }
  425. }
  426. fieldNum := int32(wire >> 3)
  427. wireType := int(wire & 0x7)
  428. if wireType == 4 {
  429. return fmt.Errorf("proto: Permission: wiretype end group for non-group")
  430. }
  431. if fieldNum <= 0 {
  432. return fmt.Errorf("proto: Permission: illegal tag %d (wire type %d)", fieldNum, wire)
  433. }
  434. switch fieldNum {
  435. case 1:
  436. if wireType != 0 {
  437. return fmt.Errorf("proto: wrong wireType = %d for field PermType", wireType)
  438. }
  439. m.PermType = 0
  440. for shift := uint(0); ; shift += 7 {
  441. if shift >= 64 {
  442. return ErrIntOverflowAuth
  443. }
  444. if iNdEx >= l {
  445. return io.ErrUnexpectedEOF
  446. }
  447. b := dAtA[iNdEx]
  448. iNdEx++
  449. m.PermType |= (Permission_Type(b) & 0x7F) << shift
  450. if b < 0x80 {
  451. break
  452. }
  453. }
  454. case 2:
  455. if wireType != 2 {
  456. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  457. }
  458. var byteLen int
  459. for shift := uint(0); ; shift += 7 {
  460. if shift >= 64 {
  461. return ErrIntOverflowAuth
  462. }
  463. if iNdEx >= l {
  464. return io.ErrUnexpectedEOF
  465. }
  466. b := dAtA[iNdEx]
  467. iNdEx++
  468. byteLen |= (int(b) & 0x7F) << shift
  469. if b < 0x80 {
  470. break
  471. }
  472. }
  473. if byteLen < 0 {
  474. return ErrInvalidLengthAuth
  475. }
  476. postIndex := iNdEx + byteLen
  477. if postIndex > l {
  478. return io.ErrUnexpectedEOF
  479. }
  480. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  481. if m.Key == nil {
  482. m.Key = []byte{}
  483. }
  484. iNdEx = postIndex
  485. case 3:
  486. if wireType != 2 {
  487. return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType)
  488. }
  489. var byteLen int
  490. for shift := uint(0); ; shift += 7 {
  491. if shift >= 64 {
  492. return ErrIntOverflowAuth
  493. }
  494. if iNdEx >= l {
  495. return io.ErrUnexpectedEOF
  496. }
  497. b := dAtA[iNdEx]
  498. iNdEx++
  499. byteLen |= (int(b) & 0x7F) << shift
  500. if b < 0x80 {
  501. break
  502. }
  503. }
  504. if byteLen < 0 {
  505. return ErrInvalidLengthAuth
  506. }
  507. postIndex := iNdEx + byteLen
  508. if postIndex > l {
  509. return io.ErrUnexpectedEOF
  510. }
  511. m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...)
  512. if m.RangeEnd == nil {
  513. m.RangeEnd = []byte{}
  514. }
  515. iNdEx = postIndex
  516. default:
  517. iNdEx = preIndex
  518. skippy, err := skipAuth(dAtA[iNdEx:])
  519. if err != nil {
  520. return err
  521. }
  522. if skippy < 0 {
  523. return ErrInvalidLengthAuth
  524. }
  525. if (iNdEx + skippy) > l {
  526. return io.ErrUnexpectedEOF
  527. }
  528. iNdEx += skippy
  529. }
  530. }
  531. if iNdEx > l {
  532. return io.ErrUnexpectedEOF
  533. }
  534. return nil
  535. }
  536. func (m *Role) Unmarshal(dAtA []byte) error {
  537. l := len(dAtA)
  538. iNdEx := 0
  539. for iNdEx < l {
  540. preIndex := iNdEx
  541. var wire uint64
  542. for shift := uint(0); ; shift += 7 {
  543. if shift >= 64 {
  544. return ErrIntOverflowAuth
  545. }
  546. if iNdEx >= l {
  547. return io.ErrUnexpectedEOF
  548. }
  549. b := dAtA[iNdEx]
  550. iNdEx++
  551. wire |= (uint64(b) & 0x7F) << shift
  552. if b < 0x80 {
  553. break
  554. }
  555. }
  556. fieldNum := int32(wire >> 3)
  557. wireType := int(wire & 0x7)
  558. if wireType == 4 {
  559. return fmt.Errorf("proto: Role: wiretype end group for non-group")
  560. }
  561. if fieldNum <= 0 {
  562. return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
  563. }
  564. switch fieldNum {
  565. case 1:
  566. if wireType != 2 {
  567. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  568. }
  569. var byteLen int
  570. for shift := uint(0); ; shift += 7 {
  571. if shift >= 64 {
  572. return ErrIntOverflowAuth
  573. }
  574. if iNdEx >= l {
  575. return io.ErrUnexpectedEOF
  576. }
  577. b := dAtA[iNdEx]
  578. iNdEx++
  579. byteLen |= (int(b) & 0x7F) << shift
  580. if b < 0x80 {
  581. break
  582. }
  583. }
  584. if byteLen < 0 {
  585. return ErrInvalidLengthAuth
  586. }
  587. postIndex := iNdEx + byteLen
  588. if postIndex > l {
  589. return io.ErrUnexpectedEOF
  590. }
  591. m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...)
  592. if m.Name == nil {
  593. m.Name = []byte{}
  594. }
  595. iNdEx = postIndex
  596. case 2:
  597. if wireType != 2 {
  598. return fmt.Errorf("proto: wrong wireType = %d for field KeyPermission", wireType)
  599. }
  600. var msglen int
  601. for shift := uint(0); ; shift += 7 {
  602. if shift >= 64 {
  603. return ErrIntOverflowAuth
  604. }
  605. if iNdEx >= l {
  606. return io.ErrUnexpectedEOF
  607. }
  608. b := dAtA[iNdEx]
  609. iNdEx++
  610. msglen |= (int(b) & 0x7F) << shift
  611. if b < 0x80 {
  612. break
  613. }
  614. }
  615. if msglen < 0 {
  616. return ErrInvalidLengthAuth
  617. }
  618. postIndex := iNdEx + msglen
  619. if postIndex > l {
  620. return io.ErrUnexpectedEOF
  621. }
  622. m.KeyPermission = append(m.KeyPermission, &Permission{})
  623. if err := m.KeyPermission[len(m.KeyPermission)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  624. return err
  625. }
  626. iNdEx = postIndex
  627. default:
  628. iNdEx = preIndex
  629. skippy, err := skipAuth(dAtA[iNdEx:])
  630. if err != nil {
  631. return err
  632. }
  633. if skippy < 0 {
  634. return ErrInvalidLengthAuth
  635. }
  636. if (iNdEx + skippy) > l {
  637. return io.ErrUnexpectedEOF
  638. }
  639. iNdEx += skippy
  640. }
  641. }
  642. if iNdEx > l {
  643. return io.ErrUnexpectedEOF
  644. }
  645. return nil
  646. }
  647. func skipAuth(dAtA []byte) (n int, err error) {
  648. l := len(dAtA)
  649. iNdEx := 0
  650. for iNdEx < l {
  651. var wire uint64
  652. for shift := uint(0); ; shift += 7 {
  653. if shift >= 64 {
  654. return 0, ErrIntOverflowAuth
  655. }
  656. if iNdEx >= l {
  657. return 0, io.ErrUnexpectedEOF
  658. }
  659. b := dAtA[iNdEx]
  660. iNdEx++
  661. wire |= (uint64(b) & 0x7F) << shift
  662. if b < 0x80 {
  663. break
  664. }
  665. }
  666. wireType := int(wire & 0x7)
  667. switch wireType {
  668. case 0:
  669. for shift := uint(0); ; shift += 7 {
  670. if shift >= 64 {
  671. return 0, ErrIntOverflowAuth
  672. }
  673. if iNdEx >= l {
  674. return 0, io.ErrUnexpectedEOF
  675. }
  676. iNdEx++
  677. if dAtA[iNdEx-1] < 0x80 {
  678. break
  679. }
  680. }
  681. return iNdEx, nil
  682. case 1:
  683. iNdEx += 8
  684. return iNdEx, nil
  685. case 2:
  686. var length int
  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. b := dAtA[iNdEx]
  695. iNdEx++
  696. length |= (int(b) & 0x7F) << shift
  697. if b < 0x80 {
  698. break
  699. }
  700. }
  701. iNdEx += length
  702. if length < 0 {
  703. return 0, ErrInvalidLengthAuth
  704. }
  705. return iNdEx, nil
  706. case 3:
  707. for {
  708. var innerWire uint64
  709. var start int = iNdEx
  710. for shift := uint(0); ; shift += 7 {
  711. if shift >= 64 {
  712. return 0, ErrIntOverflowAuth
  713. }
  714. if iNdEx >= l {
  715. return 0, io.ErrUnexpectedEOF
  716. }
  717. b := dAtA[iNdEx]
  718. iNdEx++
  719. innerWire |= (uint64(b) & 0x7F) << shift
  720. if b < 0x80 {
  721. break
  722. }
  723. }
  724. innerWireType := int(innerWire & 0x7)
  725. if innerWireType == 4 {
  726. break
  727. }
  728. next, err := skipAuth(dAtA[start:])
  729. if err != nil {
  730. return 0, err
  731. }
  732. iNdEx = start + next
  733. }
  734. return iNdEx, nil
  735. case 4:
  736. return iNdEx, nil
  737. case 5:
  738. iNdEx += 4
  739. return iNdEx, nil
  740. default:
  741. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  742. }
  743. }
  744. panic("unreachable")
  745. }
  746. var (
  747. ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling")
  748. ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow")
  749. )
  750. func init() { proto.RegisterFile("auth.proto", fileDescriptorAuth) }
  751. var fileDescriptorAuth = []byte{
  752. // 288 bytes of a gzipped FileDescriptorProto
  753. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xc3, 0x30,
  754. 0x1c, 0xc6, 0x9b, 0xb6, 0x1b, 0xed, 0x5f, 0x27, 0x25, 0x0c, 0x0c, 0x13, 0x42, 0xe9, 0xa9, 0x78,
  755. 0xa8, 0xb0, 0x5d, 0xbc, 0x2a, 0xf6, 0x20, 0x78, 0x90, 0x50, 0xf1, 0x28, 0x1d, 0x0d, 0x75, 0x6c,
  756. 0x6d, 0x4a, 0x32, 0x91, 0xbe, 0x89, 0x07, 0x1f, 0x68, 0xc7, 0x3d, 0x82, 0xab, 0x2f, 0x22, 0x4d,
  757. 0x64, 0x43, 0xdc, 0xed, 0xfb, 0xbe, 0xff, 0x97, 0xe4, 0x97, 0x3f, 0x40, 0xfe, 0xb6, 0x7e, 0x4d,
  758. 0x1a, 0x29, 0xd6, 0x02, 0x0f, 0x7b, 0xdd, 0xcc, 0x27, 0xe3, 0x52, 0x94, 0x42, 0x47, 0x57, 0xbd,
  759. 0x32, 0xd3, 0xe8, 0x01, 0xdc, 0x27, 0xc5, 0x25, 0xc6, 0xe0, 0xd6, 0x79, 0xc5, 0x09, 0x0a, 0x51,
  760. 0x7c, 0xca, 0xb4, 0xc6, 0x13, 0xf0, 0x9a, 0x5c, 0xa9, 0x77, 0x21, 0x0b, 0x62, 0xeb, 0x7c, 0xef,
  761. 0xf1, 0x18, 0x06, 0x52, 0xac, 0xb8, 0x22, 0x4e, 0xe8, 0xc4, 0x3e, 0x33, 0x26, 0xfa, 0x44, 0x00,
  762. 0x8f, 0x5c, 0x56, 0x0b, 0xa5, 0x16, 0xa2, 0xc6, 0x33, 0xf0, 0x1a, 0x2e, 0xab, 0xac, 0x6d, 0xcc,
  763. 0xc5, 0x67, 0xd3, 0xf3, 0xc4, 0xd0, 0x24, 0x87, 0x56, 0xd2, 0x8f, 0xd9, 0xbe, 0x88, 0x03, 0x70,
  764. 0x96, 0xbc, 0xfd, 0x7d, 0xb0, 0x97, 0xf8, 0x02, 0x7c, 0x99, 0xd7, 0x25, 0x7f, 0xe1, 0x75, 0x41,
  765. 0x1c, 0x03, 0xa2, 0x83, 0xb4, 0x2e, 0xa2, 0x4b, 0x70, 0xf5, 0x31, 0x0f, 0x5c, 0x96, 0xde, 0xdc,
  766. 0x05, 0x16, 0xf6, 0x61, 0xf0, 0xcc, 0xee, 0xb3, 0x34, 0x40, 0x78, 0x04, 0x7e, 0x1f, 0x1a, 0x6b,
  767. 0x47, 0x19, 0xb8, 0x4c, 0xac, 0xf8, 0xd1, 0xcf, 0x5e, 0xc3, 0x68, 0xc9, 0xdb, 0x03, 0x16, 0xb1,
  768. 0x43, 0x27, 0x3e, 0x99, 0xe2, 0xff, 0xc0, 0xec, 0x6f, 0xf1, 0x96, 0x6c, 0x76, 0xd4, 0xda, 0xee,
  769. 0xa8, 0xb5, 0xe9, 0x28, 0xda, 0x76, 0x14, 0x7d, 0x75, 0x14, 0x7d, 0x7c, 0x53, 0x6b, 0x3e, 0xd4,
  770. 0x3b, 0x9e, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x76, 0x8d, 0x4f, 0x8f, 0x01, 0x00, 0x00,
  771. }