model.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: model.proto
  3. /*
  4. Package model is a generated protocol buffer package.
  5. It is generated from these files:
  6. model.proto
  7. It has these top-level messages:
  8. Perm
  9. */
  10. package model
  11. import proto "github.com/golang/protobuf/proto"
  12. import fmt "fmt"
  13. import math "math"
  14. import _ "github.com/gogo/protobuf/gogoproto"
  15. import io "io"
  16. // Reference imports to suppress errors if they are not otherwise used.
  17. var _ = proto.Marshal
  18. var _ = fmt.Errorf
  19. var _ = math.Inf
  20. // This is a compile-time assertion to ensure that this generated file
  21. // is compatible with the proto package it is being compiled against.
  22. // A compilation error at this line likely means your copy of the
  23. // proto package needs to be updated.
  24. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  25. // Perm token.
  26. type Perm struct {
  27. Mid int64 `protobuf:"varint,1,opt,name=Mid,proto3" json:"mid"`
  28. AppID int32 `protobuf:"varint,2,opt,name=AppID,proto3" json:"appid"`
  29. AppSubID int32 `protobuf:"varint,3,opt,name=AppSubID,proto3" json:"app_subid"`
  30. AccessToken string `protobuf:"bytes,4,opt,name=AccessToken,proto3" json:"access_token"`
  31. RefreshToken string `protobuf:"bytes,5,opt,name=RefreshToken,proto3" json:"refresh_token"`
  32. CreateAt int64 `protobuf:"varint,6,opt,name=CreateAt,proto3" json:"create_at"`
  33. Expires int64 `protobuf:"varint,7,opt,name=Expires,proto3" json:"expires"`
  34. }
  35. func (m *Perm) Reset() { *m = Perm{} }
  36. func (m *Perm) String() string { return proto.CompactTextString(m) }
  37. func (*Perm) ProtoMessage() {}
  38. func (*Perm) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{0} }
  39. func (m *Perm) GetMid() int64 {
  40. if m != nil {
  41. return m.Mid
  42. }
  43. return 0
  44. }
  45. func (m *Perm) GetAppID() int32 {
  46. if m != nil {
  47. return m.AppID
  48. }
  49. return 0
  50. }
  51. func (m *Perm) GetAppSubID() int32 {
  52. if m != nil {
  53. return m.AppSubID
  54. }
  55. return 0
  56. }
  57. func (m *Perm) GetAccessToken() string {
  58. if m != nil {
  59. return m.AccessToken
  60. }
  61. return ""
  62. }
  63. func (m *Perm) GetRefreshToken() string {
  64. if m != nil {
  65. return m.RefreshToken
  66. }
  67. return ""
  68. }
  69. func (m *Perm) GetCreateAt() int64 {
  70. if m != nil {
  71. return m.CreateAt
  72. }
  73. return 0
  74. }
  75. func (m *Perm) GetExpires() int64 {
  76. if m != nil {
  77. return m.Expires
  78. }
  79. return 0
  80. }
  81. func init() {
  82. proto.RegisterType((*Perm)(nil), "model.Perm")
  83. }
  84. func (m *Perm) 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 *Perm) MarshalTo(dAtA []byte) (int, error) {
  94. var i int
  95. _ = i
  96. var l int
  97. _ = l
  98. if m.Mid != 0 {
  99. dAtA[i] = 0x8
  100. i++
  101. i = encodeVarintModel(dAtA, i, uint64(m.Mid))
  102. }
  103. if m.AppID != 0 {
  104. dAtA[i] = 0x10
  105. i++
  106. i = encodeVarintModel(dAtA, i, uint64(m.AppID))
  107. }
  108. if m.AppSubID != 0 {
  109. dAtA[i] = 0x18
  110. i++
  111. i = encodeVarintModel(dAtA, i, uint64(m.AppSubID))
  112. }
  113. if len(m.AccessToken) > 0 {
  114. dAtA[i] = 0x22
  115. i++
  116. i = encodeVarintModel(dAtA, i, uint64(len(m.AccessToken)))
  117. i += copy(dAtA[i:], m.AccessToken)
  118. }
  119. if len(m.RefreshToken) > 0 {
  120. dAtA[i] = 0x2a
  121. i++
  122. i = encodeVarintModel(dAtA, i, uint64(len(m.RefreshToken)))
  123. i += copy(dAtA[i:], m.RefreshToken)
  124. }
  125. if m.CreateAt != 0 {
  126. dAtA[i] = 0x30
  127. i++
  128. i = encodeVarintModel(dAtA, i, uint64(m.CreateAt))
  129. }
  130. if m.Expires != 0 {
  131. dAtA[i] = 0x38
  132. i++
  133. i = encodeVarintModel(dAtA, i, uint64(m.Expires))
  134. }
  135. return i, nil
  136. }
  137. func encodeFixed64Model(dAtA []byte, offset int, v uint64) int {
  138. dAtA[offset] = uint8(v)
  139. dAtA[offset+1] = uint8(v >> 8)
  140. dAtA[offset+2] = uint8(v >> 16)
  141. dAtA[offset+3] = uint8(v >> 24)
  142. dAtA[offset+4] = uint8(v >> 32)
  143. dAtA[offset+5] = uint8(v >> 40)
  144. dAtA[offset+6] = uint8(v >> 48)
  145. dAtA[offset+7] = uint8(v >> 56)
  146. return offset + 8
  147. }
  148. func encodeFixed32Model(dAtA []byte, offset int, v uint32) int {
  149. dAtA[offset] = uint8(v)
  150. dAtA[offset+1] = uint8(v >> 8)
  151. dAtA[offset+2] = uint8(v >> 16)
  152. dAtA[offset+3] = uint8(v >> 24)
  153. return offset + 4
  154. }
  155. func encodeVarintModel(dAtA []byte, offset int, v uint64) int {
  156. for v >= 1<<7 {
  157. dAtA[offset] = uint8(v&0x7f | 0x80)
  158. v >>= 7
  159. offset++
  160. }
  161. dAtA[offset] = uint8(v)
  162. return offset + 1
  163. }
  164. func (m *Perm) Size() (n int) {
  165. var l int
  166. _ = l
  167. if m.Mid != 0 {
  168. n += 1 + sovModel(uint64(m.Mid))
  169. }
  170. if m.AppID != 0 {
  171. n += 1 + sovModel(uint64(m.AppID))
  172. }
  173. if m.AppSubID != 0 {
  174. n += 1 + sovModel(uint64(m.AppSubID))
  175. }
  176. l = len(m.AccessToken)
  177. if l > 0 {
  178. n += 1 + l + sovModel(uint64(l))
  179. }
  180. l = len(m.RefreshToken)
  181. if l > 0 {
  182. n += 1 + l + sovModel(uint64(l))
  183. }
  184. if m.CreateAt != 0 {
  185. n += 1 + sovModel(uint64(m.CreateAt))
  186. }
  187. if m.Expires != 0 {
  188. n += 1 + sovModel(uint64(m.Expires))
  189. }
  190. return n
  191. }
  192. func sovModel(x uint64) (n int) {
  193. for {
  194. n++
  195. x >>= 7
  196. if x == 0 {
  197. break
  198. }
  199. }
  200. return n
  201. }
  202. func sozModel(x uint64) (n int) {
  203. return sovModel(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  204. }
  205. func (m *Perm) Unmarshal(dAtA []byte) error {
  206. l := len(dAtA)
  207. iNdEx := 0
  208. for iNdEx < l {
  209. preIndex := iNdEx
  210. var wire uint64
  211. for shift := uint(0); ; shift += 7 {
  212. if shift >= 64 {
  213. return ErrIntOverflowModel
  214. }
  215. if iNdEx >= l {
  216. return io.ErrUnexpectedEOF
  217. }
  218. b := dAtA[iNdEx]
  219. iNdEx++
  220. wire |= (uint64(b) & 0x7F) << shift
  221. if b < 0x80 {
  222. break
  223. }
  224. }
  225. fieldNum := int32(wire >> 3)
  226. wireType := int(wire & 0x7)
  227. if wireType == 4 {
  228. return fmt.Errorf("proto: Perm: wiretype end group for non-group")
  229. }
  230. if fieldNum <= 0 {
  231. return fmt.Errorf("proto: Perm: illegal tag %d (wire type %d)", fieldNum, wire)
  232. }
  233. switch fieldNum {
  234. case 1:
  235. if wireType != 0 {
  236. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  237. }
  238. m.Mid = 0
  239. for shift := uint(0); ; shift += 7 {
  240. if shift >= 64 {
  241. return ErrIntOverflowModel
  242. }
  243. if iNdEx >= l {
  244. return io.ErrUnexpectedEOF
  245. }
  246. b := dAtA[iNdEx]
  247. iNdEx++
  248. m.Mid |= (int64(b) & 0x7F) << shift
  249. if b < 0x80 {
  250. break
  251. }
  252. }
  253. case 2:
  254. if wireType != 0 {
  255. return fmt.Errorf("proto: wrong wireType = %d for field AppID", wireType)
  256. }
  257. m.AppID = 0
  258. for shift := uint(0); ; shift += 7 {
  259. if shift >= 64 {
  260. return ErrIntOverflowModel
  261. }
  262. if iNdEx >= l {
  263. return io.ErrUnexpectedEOF
  264. }
  265. b := dAtA[iNdEx]
  266. iNdEx++
  267. m.AppID |= (int32(b) & 0x7F) << shift
  268. if b < 0x80 {
  269. break
  270. }
  271. }
  272. case 3:
  273. if wireType != 0 {
  274. return fmt.Errorf("proto: wrong wireType = %d for field AppSubID", wireType)
  275. }
  276. m.AppSubID = 0
  277. for shift := uint(0); ; shift += 7 {
  278. if shift >= 64 {
  279. return ErrIntOverflowModel
  280. }
  281. if iNdEx >= l {
  282. return io.ErrUnexpectedEOF
  283. }
  284. b := dAtA[iNdEx]
  285. iNdEx++
  286. m.AppSubID |= (int32(b) & 0x7F) << shift
  287. if b < 0x80 {
  288. break
  289. }
  290. }
  291. case 4:
  292. if wireType != 2 {
  293. return fmt.Errorf("proto: wrong wireType = %d for field AccessToken", wireType)
  294. }
  295. var stringLen uint64
  296. for shift := uint(0); ; shift += 7 {
  297. if shift >= 64 {
  298. return ErrIntOverflowModel
  299. }
  300. if iNdEx >= l {
  301. return io.ErrUnexpectedEOF
  302. }
  303. b := dAtA[iNdEx]
  304. iNdEx++
  305. stringLen |= (uint64(b) & 0x7F) << shift
  306. if b < 0x80 {
  307. break
  308. }
  309. }
  310. intStringLen := int(stringLen)
  311. if intStringLen < 0 {
  312. return ErrInvalidLengthModel
  313. }
  314. postIndex := iNdEx + intStringLen
  315. if postIndex > l {
  316. return io.ErrUnexpectedEOF
  317. }
  318. m.AccessToken = string(dAtA[iNdEx:postIndex])
  319. iNdEx = postIndex
  320. case 5:
  321. if wireType != 2 {
  322. return fmt.Errorf("proto: wrong wireType = %d for field RefreshToken", wireType)
  323. }
  324. var stringLen uint64
  325. for shift := uint(0); ; shift += 7 {
  326. if shift >= 64 {
  327. return ErrIntOverflowModel
  328. }
  329. if iNdEx >= l {
  330. return io.ErrUnexpectedEOF
  331. }
  332. b := dAtA[iNdEx]
  333. iNdEx++
  334. stringLen |= (uint64(b) & 0x7F) << shift
  335. if b < 0x80 {
  336. break
  337. }
  338. }
  339. intStringLen := int(stringLen)
  340. if intStringLen < 0 {
  341. return ErrInvalidLengthModel
  342. }
  343. postIndex := iNdEx + intStringLen
  344. if postIndex > l {
  345. return io.ErrUnexpectedEOF
  346. }
  347. m.RefreshToken = string(dAtA[iNdEx:postIndex])
  348. iNdEx = postIndex
  349. case 6:
  350. if wireType != 0 {
  351. return fmt.Errorf("proto: wrong wireType = %d for field CreateAt", wireType)
  352. }
  353. m.CreateAt = 0
  354. for shift := uint(0); ; shift += 7 {
  355. if shift >= 64 {
  356. return ErrIntOverflowModel
  357. }
  358. if iNdEx >= l {
  359. return io.ErrUnexpectedEOF
  360. }
  361. b := dAtA[iNdEx]
  362. iNdEx++
  363. m.CreateAt |= (int64(b) & 0x7F) << shift
  364. if b < 0x80 {
  365. break
  366. }
  367. }
  368. case 7:
  369. if wireType != 0 {
  370. return fmt.Errorf("proto: wrong wireType = %d for field Expires", wireType)
  371. }
  372. m.Expires = 0
  373. for shift := uint(0); ; shift += 7 {
  374. if shift >= 64 {
  375. return ErrIntOverflowModel
  376. }
  377. if iNdEx >= l {
  378. return io.ErrUnexpectedEOF
  379. }
  380. b := dAtA[iNdEx]
  381. iNdEx++
  382. m.Expires |= (int64(b) & 0x7F) << shift
  383. if b < 0x80 {
  384. break
  385. }
  386. }
  387. default:
  388. iNdEx = preIndex
  389. skippy, err := skipModel(dAtA[iNdEx:])
  390. if err != nil {
  391. return err
  392. }
  393. if skippy < 0 {
  394. return ErrInvalidLengthModel
  395. }
  396. if (iNdEx + skippy) > l {
  397. return io.ErrUnexpectedEOF
  398. }
  399. iNdEx += skippy
  400. }
  401. }
  402. if iNdEx > l {
  403. return io.ErrUnexpectedEOF
  404. }
  405. return nil
  406. }
  407. func skipModel(dAtA []byte) (n int, err error) {
  408. l := len(dAtA)
  409. iNdEx := 0
  410. for iNdEx < l {
  411. var wire uint64
  412. for shift := uint(0); ; shift += 7 {
  413. if shift >= 64 {
  414. return 0, ErrIntOverflowModel
  415. }
  416. if iNdEx >= l {
  417. return 0, io.ErrUnexpectedEOF
  418. }
  419. b := dAtA[iNdEx]
  420. iNdEx++
  421. wire |= (uint64(b) & 0x7F) << shift
  422. if b < 0x80 {
  423. break
  424. }
  425. }
  426. wireType := int(wire & 0x7)
  427. switch wireType {
  428. case 0:
  429. for shift := uint(0); ; shift += 7 {
  430. if shift >= 64 {
  431. return 0, ErrIntOverflowModel
  432. }
  433. if iNdEx >= l {
  434. return 0, io.ErrUnexpectedEOF
  435. }
  436. iNdEx++
  437. if dAtA[iNdEx-1] < 0x80 {
  438. break
  439. }
  440. }
  441. return iNdEx, nil
  442. case 1:
  443. iNdEx += 8
  444. return iNdEx, nil
  445. case 2:
  446. var length int
  447. for shift := uint(0); ; shift += 7 {
  448. if shift >= 64 {
  449. return 0, ErrIntOverflowModel
  450. }
  451. if iNdEx >= l {
  452. return 0, io.ErrUnexpectedEOF
  453. }
  454. b := dAtA[iNdEx]
  455. iNdEx++
  456. length |= (int(b) & 0x7F) << shift
  457. if b < 0x80 {
  458. break
  459. }
  460. }
  461. iNdEx += length
  462. if length < 0 {
  463. return 0, ErrInvalidLengthModel
  464. }
  465. return iNdEx, nil
  466. case 3:
  467. for {
  468. var innerWire uint64
  469. var start int = iNdEx
  470. for shift := uint(0); ; shift += 7 {
  471. if shift >= 64 {
  472. return 0, ErrIntOverflowModel
  473. }
  474. if iNdEx >= l {
  475. return 0, io.ErrUnexpectedEOF
  476. }
  477. b := dAtA[iNdEx]
  478. iNdEx++
  479. innerWire |= (uint64(b) & 0x7F) << shift
  480. if b < 0x80 {
  481. break
  482. }
  483. }
  484. innerWireType := int(innerWire & 0x7)
  485. if innerWireType == 4 {
  486. break
  487. }
  488. next, err := skipModel(dAtA[start:])
  489. if err != nil {
  490. return 0, err
  491. }
  492. iNdEx = start + next
  493. }
  494. return iNdEx, nil
  495. case 4:
  496. return iNdEx, nil
  497. case 5:
  498. iNdEx += 4
  499. return iNdEx, nil
  500. default:
  501. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  502. }
  503. }
  504. panic("unreachable")
  505. }
  506. var (
  507. ErrInvalidLengthModel = fmt.Errorf("proto: negative length found during unmarshaling")
  508. ErrIntOverflowModel = fmt.Errorf("proto: integer overflow")
  509. )
  510. func init() { proto.RegisterFile("model.proto", fileDescriptorModel) }
  511. var fileDescriptorModel = []byte{
  512. // 304 bytes of a gzipped FileDescriptorProto
  513. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x4f, 0x4a, 0x3b, 0x31,
  514. 0x1c, 0xc5, 0x7f, 0xe9, 0x74, 0x3a, 0xbf, 0xa6, 0x2d, 0xd4, 0xac, 0x46, 0x17, 0x93, 0x22, 0x08,
  515. 0x75, 0x61, 0x0b, 0x8a, 0x07, 0x98, 0xb1, 0x2e, 0xba, 0x10, 0x24, 0xba, 0x2f, 0xf3, 0x27, 0x6d,
  516. 0x83, 0x8e, 0x09, 0x99, 0x0c, 0x78, 0x14, 0xcf, 0xe0, 0x49, 0x5c, 0x7a, 0x82, 0x20, 0x75, 0x97,
  517. 0x53, 0xc8, 0x7c, 0x47, 0x8b, 0xee, 0xf2, 0x3e, 0xef, 0x3d, 0x78, 0xf9, 0xe2, 0x41, 0x29, 0x0b,
  518. 0xfe, 0x38, 0x53, 0x5a, 0x1a, 0x49, 0x7c, 0x10, 0x47, 0x67, 0x1b, 0x61, 0xb6, 0x75, 0x36, 0xcb,
  519. 0x65, 0x39, 0xdf, 0xc8, 0x8d, 0x9c, 0x83, 0x9b, 0xd5, 0x6b, 0x50, 0x20, 0xe0, 0xd5, 0xb6, 0x8e,
  520. 0x5f, 0x3b, 0xb8, 0x7b, 0xcb, 0x75, 0x49, 0x0e, 0xb1, 0x77, 0x23, 0x8a, 0x10, 0x4d, 0xd0, 0xd4,
  521. 0x4b, 0x02, 0x67, 0xa9, 0x57, 0x8a, 0x82, 0x35, 0x8c, 0x50, 0xec, 0xc7, 0x4a, 0x2d, 0x17, 0x61,
  522. 0x67, 0x82, 0xa6, 0x7e, 0xd2, 0x77, 0x96, 0xfa, 0xa9, 0x52, 0xa2, 0x60, 0x2d, 0x27, 0xa7, 0xf8,
  523. 0x7f, 0xac, 0xd4, 0x5d, 0x9d, 0x2d, 0x17, 0xa1, 0x07, 0x99, 0x91, 0xb3, 0xb4, 0x9f, 0x2a, 0xb5,
  524. 0xaa, 0xea, 0x4c, 0x14, 0x6c, 0x6f, 0x93, 0x73, 0x3c, 0x88, 0xf3, 0x9c, 0x57, 0xd5, 0xbd, 0x7c,
  525. 0xe0, 0x4f, 0x61, 0x77, 0x82, 0xa6, 0xfd, 0x64, 0xec, 0x2c, 0x1d, 0xa6, 0x80, 0x57, 0xa6, 0xe1,
  526. 0xec, 0x77, 0x88, 0x5c, 0xe2, 0x21, 0xe3, 0x6b, 0xcd, 0xab, 0x6d, 0x5b, 0xf2, 0xa1, 0x74, 0xe0,
  527. 0x2c, 0x1d, 0xe9, 0x96, 0x7f, 0xb7, 0xfe, 0xc4, 0x9a, 0x55, 0x57, 0x9a, 0xa7, 0x86, 0xc7, 0x26,
  528. 0xec, 0xc1, 0xb7, 0x60, 0x55, 0x0e, 0x6c, 0x95, 0x1a, 0xb6, 0xb7, 0xc9, 0x09, 0x0e, 0xae, 0x9f,
  529. 0x95, 0xd0, 0xbc, 0x0a, 0x03, 0x48, 0x0e, 0x9c, 0xa5, 0x01, 0x6f, 0x11, 0xfb, 0xf1, 0x92, 0xf1,
  530. 0xdb, 0x2e, 0x42, 0xef, 0xbb, 0x08, 0x7d, 0xec, 0x22, 0xf4, 0xf2, 0x19, 0xfd, 0xcb, 0x7a, 0x70,
  531. 0xc5, 0x8b, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xc7, 0xd0, 0xe6, 0x8a, 0x01, 0x00, 0x00,
  532. }