Note.pb.go 19 KB

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