UserRank.pb.go 19 KB

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