Shield.pb.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: v1/Shield.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 ShieldIsShieldContentReq struct {
  19. // 房主uid
  20. Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid"`
  21. // 内容
  22. Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content"`
  23. }
  24. func (m *ShieldIsShieldContentReq) Reset() { *m = ShieldIsShieldContentReq{} }
  25. func (m *ShieldIsShieldContentReq) String() string { return proto.CompactTextString(m) }
  26. func (*ShieldIsShieldContentReq) ProtoMessage() {}
  27. func (*ShieldIsShieldContentReq) Descriptor() ([]byte, []int) {
  28. return fileDescriptor_Shield_14b4a725a4fd2eaf, []int{0}
  29. }
  30. func (m *ShieldIsShieldContentReq) XXX_Unmarshal(b []byte) error {
  31. return m.Unmarshal(b)
  32. }
  33. func (m *ShieldIsShieldContentReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  34. if deterministic {
  35. return xxx_messageInfo_ShieldIsShieldContentReq.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 *ShieldIsShieldContentReq) XXX_Merge(src proto.Message) {
  46. xxx_messageInfo_ShieldIsShieldContentReq.Merge(dst, src)
  47. }
  48. func (m *ShieldIsShieldContentReq) XXX_Size() int {
  49. return m.Size()
  50. }
  51. func (m *ShieldIsShieldContentReq) XXX_DiscardUnknown() {
  52. xxx_messageInfo_ShieldIsShieldContentReq.DiscardUnknown(m)
  53. }
  54. var xxx_messageInfo_ShieldIsShieldContentReq proto.InternalMessageInfo
  55. func (m *ShieldIsShieldContentReq) GetUid() int64 {
  56. if m != nil {
  57. return m.Uid
  58. }
  59. return 0
  60. }
  61. func (m *ShieldIsShieldContentReq) GetContent() string {
  62. if m != nil {
  63. return m.Content
  64. }
  65. return ""
  66. }
  67. type ShieldIsShieldContentResp struct {
  68. //
  69. Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code"`
  70. //
  71. Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg"`
  72. //
  73. Data *ShieldIsShieldContentResp_Data `protobuf:"bytes,3,opt,name=data" json:"data"`
  74. }
  75. func (m *ShieldIsShieldContentResp) Reset() { *m = ShieldIsShieldContentResp{} }
  76. func (m *ShieldIsShieldContentResp) String() string { return proto.CompactTextString(m) }
  77. func (*ShieldIsShieldContentResp) ProtoMessage() {}
  78. func (*ShieldIsShieldContentResp) Descriptor() ([]byte, []int) {
  79. return fileDescriptor_Shield_14b4a725a4fd2eaf, []int{1}
  80. }
  81. func (m *ShieldIsShieldContentResp) XXX_Unmarshal(b []byte) error {
  82. return m.Unmarshal(b)
  83. }
  84. func (m *ShieldIsShieldContentResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  85. if deterministic {
  86. return xxx_messageInfo_ShieldIsShieldContentResp.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 *ShieldIsShieldContentResp) XXX_Merge(src proto.Message) {
  97. xxx_messageInfo_ShieldIsShieldContentResp.Merge(dst, src)
  98. }
  99. func (m *ShieldIsShieldContentResp) XXX_Size() int {
  100. return m.Size()
  101. }
  102. func (m *ShieldIsShieldContentResp) XXX_DiscardUnknown() {
  103. xxx_messageInfo_ShieldIsShieldContentResp.DiscardUnknown(m)
  104. }
  105. var xxx_messageInfo_ShieldIsShieldContentResp proto.InternalMessageInfo
  106. func (m *ShieldIsShieldContentResp) GetCode() int64 {
  107. if m != nil {
  108. return m.Code
  109. }
  110. return 0
  111. }
  112. func (m *ShieldIsShieldContentResp) GetMsg() string {
  113. if m != nil {
  114. return m.Msg
  115. }
  116. return ""
  117. }
  118. func (m *ShieldIsShieldContentResp) GetData() *ShieldIsShieldContentResp_Data {
  119. if m != nil {
  120. return m.Data
  121. }
  122. return nil
  123. }
  124. type ShieldIsShieldContentResp_Data struct {
  125. //
  126. Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid"`
  127. // 是否是被屏蔽的内容
  128. IsShieldContent bool `protobuf:"varint,2,opt,name=is_shield_content,json=isShieldContent,proto3" json:"is_shield_content"`
  129. // 命中的屏蔽词
  130. ShieldBy string `protobuf:"bytes,3,opt,name=shield_by,json=shieldBy,proto3" json:"shield_by"`
  131. }
  132. func (m *ShieldIsShieldContentResp_Data) Reset() { *m = ShieldIsShieldContentResp_Data{} }
  133. func (m *ShieldIsShieldContentResp_Data) String() string { return proto.CompactTextString(m) }
  134. func (*ShieldIsShieldContentResp_Data) ProtoMessage() {}
  135. func (*ShieldIsShieldContentResp_Data) Descriptor() ([]byte, []int) {
  136. return fileDescriptor_Shield_14b4a725a4fd2eaf, []int{1, 0}
  137. }
  138. func (m *ShieldIsShieldContentResp_Data) XXX_Unmarshal(b []byte) error {
  139. return m.Unmarshal(b)
  140. }
  141. func (m *ShieldIsShieldContentResp_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  142. if deterministic {
  143. return xxx_messageInfo_ShieldIsShieldContentResp_Data.Marshal(b, m, deterministic)
  144. } else {
  145. b = b[:cap(b)]
  146. n, err := m.MarshalTo(b)
  147. if err != nil {
  148. return nil, err
  149. }
  150. return b[:n], nil
  151. }
  152. }
  153. func (dst *ShieldIsShieldContentResp_Data) XXX_Merge(src proto.Message) {
  154. xxx_messageInfo_ShieldIsShieldContentResp_Data.Merge(dst, src)
  155. }
  156. func (m *ShieldIsShieldContentResp_Data) XXX_Size() int {
  157. return m.Size()
  158. }
  159. func (m *ShieldIsShieldContentResp_Data) XXX_DiscardUnknown() {
  160. xxx_messageInfo_ShieldIsShieldContentResp_Data.DiscardUnknown(m)
  161. }
  162. var xxx_messageInfo_ShieldIsShieldContentResp_Data proto.InternalMessageInfo
  163. func (m *ShieldIsShieldContentResp_Data) GetUid() int64 {
  164. if m != nil {
  165. return m.Uid
  166. }
  167. return 0
  168. }
  169. func (m *ShieldIsShieldContentResp_Data) GetIsShieldContent() bool {
  170. if m != nil {
  171. return m.IsShieldContent
  172. }
  173. return false
  174. }
  175. func (m *ShieldIsShieldContentResp_Data) GetShieldBy() string {
  176. if m != nil {
  177. return m.ShieldBy
  178. }
  179. return ""
  180. }
  181. func init() {
  182. proto.RegisterType((*ShieldIsShieldContentReq)(nil), "banned_service.v1.ShieldIsShieldContentReq")
  183. proto.RegisterType((*ShieldIsShieldContentResp)(nil), "banned_service.v1.ShieldIsShieldContentResp")
  184. proto.RegisterType((*ShieldIsShieldContentResp_Data)(nil), "banned_service.v1.ShieldIsShieldContentResp.Data")
  185. }
  186. func (m *ShieldIsShieldContentReq) Marshal() (dAtA []byte, err error) {
  187. size := m.Size()
  188. dAtA = make([]byte, size)
  189. n, err := m.MarshalTo(dAtA)
  190. if err != nil {
  191. return nil, err
  192. }
  193. return dAtA[:n], nil
  194. }
  195. func (m *ShieldIsShieldContentReq) MarshalTo(dAtA []byte) (int, error) {
  196. var i int
  197. _ = i
  198. var l int
  199. _ = l
  200. if m.Uid != 0 {
  201. dAtA[i] = 0x8
  202. i++
  203. i = encodeVarintShield(dAtA, i, uint64(m.Uid))
  204. }
  205. if len(m.Content) > 0 {
  206. dAtA[i] = 0x12
  207. i++
  208. i = encodeVarintShield(dAtA, i, uint64(len(m.Content)))
  209. i += copy(dAtA[i:], m.Content)
  210. }
  211. return i, nil
  212. }
  213. func (m *ShieldIsShieldContentResp) Marshal() (dAtA []byte, err error) {
  214. size := m.Size()
  215. dAtA = make([]byte, size)
  216. n, err := m.MarshalTo(dAtA)
  217. if err != nil {
  218. return nil, err
  219. }
  220. return dAtA[:n], nil
  221. }
  222. func (m *ShieldIsShieldContentResp) MarshalTo(dAtA []byte) (int, error) {
  223. var i int
  224. _ = i
  225. var l int
  226. _ = l
  227. if m.Code != 0 {
  228. dAtA[i] = 0x8
  229. i++
  230. i = encodeVarintShield(dAtA, i, uint64(m.Code))
  231. }
  232. if len(m.Msg) > 0 {
  233. dAtA[i] = 0x12
  234. i++
  235. i = encodeVarintShield(dAtA, i, uint64(len(m.Msg)))
  236. i += copy(dAtA[i:], m.Msg)
  237. }
  238. if m.Data != nil {
  239. dAtA[i] = 0x1a
  240. i++
  241. i = encodeVarintShield(dAtA, i, uint64(m.Data.Size()))
  242. n1, err := m.Data.MarshalTo(dAtA[i:])
  243. if err != nil {
  244. return 0, err
  245. }
  246. i += n1
  247. }
  248. return i, nil
  249. }
  250. func (m *ShieldIsShieldContentResp_Data) Marshal() (dAtA []byte, err error) {
  251. size := m.Size()
  252. dAtA = make([]byte, size)
  253. n, err := m.MarshalTo(dAtA)
  254. if err != nil {
  255. return nil, err
  256. }
  257. return dAtA[:n], nil
  258. }
  259. func (m *ShieldIsShieldContentResp_Data) MarshalTo(dAtA []byte) (int, error) {
  260. var i int
  261. _ = i
  262. var l int
  263. _ = l
  264. if m.Uid != 0 {
  265. dAtA[i] = 0x8
  266. i++
  267. i = encodeVarintShield(dAtA, i, uint64(m.Uid))
  268. }
  269. if m.IsShieldContent {
  270. dAtA[i] = 0x10
  271. i++
  272. if m.IsShieldContent {
  273. dAtA[i] = 1
  274. } else {
  275. dAtA[i] = 0
  276. }
  277. i++
  278. }
  279. if len(m.ShieldBy) > 0 {
  280. dAtA[i] = 0x1a
  281. i++
  282. i = encodeVarintShield(dAtA, i, uint64(len(m.ShieldBy)))
  283. i += copy(dAtA[i:], m.ShieldBy)
  284. }
  285. return i, nil
  286. }
  287. func encodeVarintShield(dAtA []byte, offset int, v uint64) int {
  288. for v >= 1<<7 {
  289. dAtA[offset] = uint8(v&0x7f | 0x80)
  290. v >>= 7
  291. offset++
  292. }
  293. dAtA[offset] = uint8(v)
  294. return offset + 1
  295. }
  296. func (m *ShieldIsShieldContentReq) Size() (n int) {
  297. if m == nil {
  298. return 0
  299. }
  300. var l int
  301. _ = l
  302. if m.Uid != 0 {
  303. n += 1 + sovShield(uint64(m.Uid))
  304. }
  305. l = len(m.Content)
  306. if l > 0 {
  307. n += 1 + l + sovShield(uint64(l))
  308. }
  309. return n
  310. }
  311. func (m *ShieldIsShieldContentResp) Size() (n int) {
  312. if m == nil {
  313. return 0
  314. }
  315. var l int
  316. _ = l
  317. if m.Code != 0 {
  318. n += 1 + sovShield(uint64(m.Code))
  319. }
  320. l = len(m.Msg)
  321. if l > 0 {
  322. n += 1 + l + sovShield(uint64(l))
  323. }
  324. if m.Data != nil {
  325. l = m.Data.Size()
  326. n += 1 + l + sovShield(uint64(l))
  327. }
  328. return n
  329. }
  330. func (m *ShieldIsShieldContentResp_Data) Size() (n int) {
  331. if m == nil {
  332. return 0
  333. }
  334. var l int
  335. _ = l
  336. if m.Uid != 0 {
  337. n += 1 + sovShield(uint64(m.Uid))
  338. }
  339. if m.IsShieldContent {
  340. n += 2
  341. }
  342. l = len(m.ShieldBy)
  343. if l > 0 {
  344. n += 1 + l + sovShield(uint64(l))
  345. }
  346. return n
  347. }
  348. func sovShield(x uint64) (n int) {
  349. for {
  350. n++
  351. x >>= 7
  352. if x == 0 {
  353. break
  354. }
  355. }
  356. return n
  357. }
  358. func sozShield(x uint64) (n int) {
  359. return sovShield(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  360. }
  361. func (m *ShieldIsShieldContentReq) Unmarshal(dAtA []byte) error {
  362. l := len(dAtA)
  363. iNdEx := 0
  364. for iNdEx < l {
  365. preIndex := iNdEx
  366. var wire uint64
  367. for shift := uint(0); ; shift += 7 {
  368. if shift >= 64 {
  369. return ErrIntOverflowShield
  370. }
  371. if iNdEx >= l {
  372. return io.ErrUnexpectedEOF
  373. }
  374. b := dAtA[iNdEx]
  375. iNdEx++
  376. wire |= (uint64(b) & 0x7F) << shift
  377. if b < 0x80 {
  378. break
  379. }
  380. }
  381. fieldNum := int32(wire >> 3)
  382. wireType := int(wire & 0x7)
  383. if wireType == 4 {
  384. return fmt.Errorf("proto: ShieldIsShieldContentReq: wiretype end group for non-group")
  385. }
  386. if fieldNum <= 0 {
  387. return fmt.Errorf("proto: ShieldIsShieldContentReq: illegal tag %d (wire type %d)", fieldNum, wire)
  388. }
  389. switch fieldNum {
  390. case 1:
  391. if wireType != 0 {
  392. return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
  393. }
  394. m.Uid = 0
  395. for shift := uint(0); ; shift += 7 {
  396. if shift >= 64 {
  397. return ErrIntOverflowShield
  398. }
  399. if iNdEx >= l {
  400. return io.ErrUnexpectedEOF
  401. }
  402. b := dAtA[iNdEx]
  403. iNdEx++
  404. m.Uid |= (int64(b) & 0x7F) << shift
  405. if b < 0x80 {
  406. break
  407. }
  408. }
  409. case 2:
  410. if wireType != 2 {
  411. return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
  412. }
  413. var stringLen uint64
  414. for shift := uint(0); ; shift += 7 {
  415. if shift >= 64 {
  416. return ErrIntOverflowShield
  417. }
  418. if iNdEx >= l {
  419. return io.ErrUnexpectedEOF
  420. }
  421. b := dAtA[iNdEx]
  422. iNdEx++
  423. stringLen |= (uint64(b) & 0x7F) << shift
  424. if b < 0x80 {
  425. break
  426. }
  427. }
  428. intStringLen := int(stringLen)
  429. if intStringLen < 0 {
  430. return ErrInvalidLengthShield
  431. }
  432. postIndex := iNdEx + intStringLen
  433. if postIndex > l {
  434. return io.ErrUnexpectedEOF
  435. }
  436. m.Content = string(dAtA[iNdEx:postIndex])
  437. iNdEx = postIndex
  438. default:
  439. iNdEx = preIndex
  440. skippy, err := skipShield(dAtA[iNdEx:])
  441. if err != nil {
  442. return err
  443. }
  444. if skippy < 0 {
  445. return ErrInvalidLengthShield
  446. }
  447. if (iNdEx + skippy) > l {
  448. return io.ErrUnexpectedEOF
  449. }
  450. iNdEx += skippy
  451. }
  452. }
  453. if iNdEx > l {
  454. return io.ErrUnexpectedEOF
  455. }
  456. return nil
  457. }
  458. func (m *ShieldIsShieldContentResp) Unmarshal(dAtA []byte) error {
  459. l := len(dAtA)
  460. iNdEx := 0
  461. for iNdEx < l {
  462. preIndex := iNdEx
  463. var wire uint64
  464. for shift := uint(0); ; shift += 7 {
  465. if shift >= 64 {
  466. return ErrIntOverflowShield
  467. }
  468. if iNdEx >= l {
  469. return io.ErrUnexpectedEOF
  470. }
  471. b := dAtA[iNdEx]
  472. iNdEx++
  473. wire |= (uint64(b) & 0x7F) << shift
  474. if b < 0x80 {
  475. break
  476. }
  477. }
  478. fieldNum := int32(wire >> 3)
  479. wireType := int(wire & 0x7)
  480. if wireType == 4 {
  481. return fmt.Errorf("proto: ShieldIsShieldContentResp: wiretype end group for non-group")
  482. }
  483. if fieldNum <= 0 {
  484. return fmt.Errorf("proto: ShieldIsShieldContentResp: illegal tag %d (wire type %d)", fieldNum, wire)
  485. }
  486. switch fieldNum {
  487. case 1:
  488. if wireType != 0 {
  489. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  490. }
  491. m.Code = 0
  492. for shift := uint(0); ; shift += 7 {
  493. if shift >= 64 {
  494. return ErrIntOverflowShield
  495. }
  496. if iNdEx >= l {
  497. return io.ErrUnexpectedEOF
  498. }
  499. b := dAtA[iNdEx]
  500. iNdEx++
  501. m.Code |= (int64(b) & 0x7F) << shift
  502. if b < 0x80 {
  503. break
  504. }
  505. }
  506. case 2:
  507. if wireType != 2 {
  508. return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType)
  509. }
  510. var stringLen uint64
  511. for shift := uint(0); ; shift += 7 {
  512. if shift >= 64 {
  513. return ErrIntOverflowShield
  514. }
  515. if iNdEx >= l {
  516. return io.ErrUnexpectedEOF
  517. }
  518. b := dAtA[iNdEx]
  519. iNdEx++
  520. stringLen |= (uint64(b) & 0x7F) << shift
  521. if b < 0x80 {
  522. break
  523. }
  524. }
  525. intStringLen := int(stringLen)
  526. if intStringLen < 0 {
  527. return ErrInvalidLengthShield
  528. }
  529. postIndex := iNdEx + intStringLen
  530. if postIndex > l {
  531. return io.ErrUnexpectedEOF
  532. }
  533. m.Msg = string(dAtA[iNdEx:postIndex])
  534. iNdEx = postIndex
  535. case 3:
  536. if wireType != 2 {
  537. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  538. }
  539. var msglen int
  540. for shift := uint(0); ; shift += 7 {
  541. if shift >= 64 {
  542. return ErrIntOverflowShield
  543. }
  544. if iNdEx >= l {
  545. return io.ErrUnexpectedEOF
  546. }
  547. b := dAtA[iNdEx]
  548. iNdEx++
  549. msglen |= (int(b) & 0x7F) << shift
  550. if b < 0x80 {
  551. break
  552. }
  553. }
  554. if msglen < 0 {
  555. return ErrInvalidLengthShield
  556. }
  557. postIndex := iNdEx + msglen
  558. if postIndex > l {
  559. return io.ErrUnexpectedEOF
  560. }
  561. if m.Data == nil {
  562. m.Data = &ShieldIsShieldContentResp_Data{}
  563. }
  564. if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  565. return err
  566. }
  567. iNdEx = postIndex
  568. default:
  569. iNdEx = preIndex
  570. skippy, err := skipShield(dAtA[iNdEx:])
  571. if err != nil {
  572. return err
  573. }
  574. if skippy < 0 {
  575. return ErrInvalidLengthShield
  576. }
  577. if (iNdEx + skippy) > l {
  578. return io.ErrUnexpectedEOF
  579. }
  580. iNdEx += skippy
  581. }
  582. }
  583. if iNdEx > l {
  584. return io.ErrUnexpectedEOF
  585. }
  586. return nil
  587. }
  588. func (m *ShieldIsShieldContentResp_Data) Unmarshal(dAtA []byte) error {
  589. l := len(dAtA)
  590. iNdEx := 0
  591. for iNdEx < l {
  592. preIndex := iNdEx
  593. var wire uint64
  594. for shift := uint(0); ; shift += 7 {
  595. if shift >= 64 {
  596. return ErrIntOverflowShield
  597. }
  598. if iNdEx >= l {
  599. return io.ErrUnexpectedEOF
  600. }
  601. b := dAtA[iNdEx]
  602. iNdEx++
  603. wire |= (uint64(b) & 0x7F) << shift
  604. if b < 0x80 {
  605. break
  606. }
  607. }
  608. fieldNum := int32(wire >> 3)
  609. wireType := int(wire & 0x7)
  610. if wireType == 4 {
  611. return fmt.Errorf("proto: Data: wiretype end group for non-group")
  612. }
  613. if fieldNum <= 0 {
  614. return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire)
  615. }
  616. switch fieldNum {
  617. case 1:
  618. if wireType != 0 {
  619. return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
  620. }
  621. m.Uid = 0
  622. for shift := uint(0); ; shift += 7 {
  623. if shift >= 64 {
  624. return ErrIntOverflowShield
  625. }
  626. if iNdEx >= l {
  627. return io.ErrUnexpectedEOF
  628. }
  629. b := dAtA[iNdEx]
  630. iNdEx++
  631. m.Uid |= (int64(b) & 0x7F) << shift
  632. if b < 0x80 {
  633. break
  634. }
  635. }
  636. case 2:
  637. if wireType != 0 {
  638. return fmt.Errorf("proto: wrong wireType = %d for field IsShieldContent", wireType)
  639. }
  640. var v int
  641. for shift := uint(0); ; shift += 7 {
  642. if shift >= 64 {
  643. return ErrIntOverflowShield
  644. }
  645. if iNdEx >= l {
  646. return io.ErrUnexpectedEOF
  647. }
  648. b := dAtA[iNdEx]
  649. iNdEx++
  650. v |= (int(b) & 0x7F) << shift
  651. if b < 0x80 {
  652. break
  653. }
  654. }
  655. m.IsShieldContent = bool(v != 0)
  656. case 3:
  657. if wireType != 2 {
  658. return fmt.Errorf("proto: wrong wireType = %d for field ShieldBy", wireType)
  659. }
  660. var stringLen uint64
  661. for shift := uint(0); ; shift += 7 {
  662. if shift >= 64 {
  663. return ErrIntOverflowShield
  664. }
  665. if iNdEx >= l {
  666. return io.ErrUnexpectedEOF
  667. }
  668. b := dAtA[iNdEx]
  669. iNdEx++
  670. stringLen |= (uint64(b) & 0x7F) << shift
  671. if b < 0x80 {
  672. break
  673. }
  674. }
  675. intStringLen := int(stringLen)
  676. if intStringLen < 0 {
  677. return ErrInvalidLengthShield
  678. }
  679. postIndex := iNdEx + intStringLen
  680. if postIndex > l {
  681. return io.ErrUnexpectedEOF
  682. }
  683. m.ShieldBy = string(dAtA[iNdEx:postIndex])
  684. iNdEx = postIndex
  685. default:
  686. iNdEx = preIndex
  687. skippy, err := skipShield(dAtA[iNdEx:])
  688. if err != nil {
  689. return err
  690. }
  691. if skippy < 0 {
  692. return ErrInvalidLengthShield
  693. }
  694. if (iNdEx + skippy) > l {
  695. return io.ErrUnexpectedEOF
  696. }
  697. iNdEx += skippy
  698. }
  699. }
  700. if iNdEx > l {
  701. return io.ErrUnexpectedEOF
  702. }
  703. return nil
  704. }
  705. func skipShield(dAtA []byte) (n int, err error) {
  706. l := len(dAtA)
  707. iNdEx := 0
  708. for iNdEx < l {
  709. var wire uint64
  710. for shift := uint(0); ; shift += 7 {
  711. if shift >= 64 {
  712. return 0, ErrIntOverflowShield
  713. }
  714. if iNdEx >= l {
  715. return 0, io.ErrUnexpectedEOF
  716. }
  717. b := dAtA[iNdEx]
  718. iNdEx++
  719. wire |= (uint64(b) & 0x7F) << shift
  720. if b < 0x80 {
  721. break
  722. }
  723. }
  724. wireType := int(wire & 0x7)
  725. switch wireType {
  726. case 0:
  727. for shift := uint(0); ; shift += 7 {
  728. if shift >= 64 {
  729. return 0, ErrIntOverflowShield
  730. }
  731. if iNdEx >= l {
  732. return 0, io.ErrUnexpectedEOF
  733. }
  734. iNdEx++
  735. if dAtA[iNdEx-1] < 0x80 {
  736. break
  737. }
  738. }
  739. return iNdEx, nil
  740. case 1:
  741. iNdEx += 8
  742. return iNdEx, nil
  743. case 2:
  744. var length int
  745. for shift := uint(0); ; shift += 7 {
  746. if shift >= 64 {
  747. return 0, ErrIntOverflowShield
  748. }
  749. if iNdEx >= l {
  750. return 0, io.ErrUnexpectedEOF
  751. }
  752. b := dAtA[iNdEx]
  753. iNdEx++
  754. length |= (int(b) & 0x7F) << shift
  755. if b < 0x80 {
  756. break
  757. }
  758. }
  759. iNdEx += length
  760. if length < 0 {
  761. return 0, ErrInvalidLengthShield
  762. }
  763. return iNdEx, nil
  764. case 3:
  765. for {
  766. var innerWire uint64
  767. var start int = iNdEx
  768. for shift := uint(0); ; shift += 7 {
  769. if shift >= 64 {
  770. return 0, ErrIntOverflowShield
  771. }
  772. if iNdEx >= l {
  773. return 0, io.ErrUnexpectedEOF
  774. }
  775. b := dAtA[iNdEx]
  776. iNdEx++
  777. innerWire |= (uint64(b) & 0x7F) << shift
  778. if b < 0x80 {
  779. break
  780. }
  781. }
  782. innerWireType := int(innerWire & 0x7)
  783. if innerWireType == 4 {
  784. break
  785. }
  786. next, err := skipShield(dAtA[start:])
  787. if err != nil {
  788. return 0, err
  789. }
  790. iNdEx = start + next
  791. }
  792. return iNdEx, nil
  793. case 4:
  794. return iNdEx, nil
  795. case 5:
  796. iNdEx += 4
  797. return iNdEx, nil
  798. default:
  799. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  800. }
  801. }
  802. panic("unreachable")
  803. }
  804. var (
  805. ErrInvalidLengthShield = fmt.Errorf("proto: negative length found during unmarshaling")
  806. ErrIntOverflowShield = fmt.Errorf("proto: integer overflow")
  807. )
  808. func init() { proto.RegisterFile("v1/Shield.proto", fileDescriptor_Shield_14b4a725a4fd2eaf) }
  809. var fileDescriptor_Shield_14b4a725a4fd2eaf = []byte{
  810. // 351 bytes of a gzipped FileDescriptorProto
  811. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x33, 0xd4, 0x0f,
  812. 0xce, 0xc8, 0x4c, 0xcd, 0x49, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4c, 0x4a, 0xcc,
  813. 0xcb, 0x4b, 0x4d, 0x89, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x33, 0x94, 0xd2,
  814. 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7,
  815. 0x07, 0xab, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x82, 0x52, 0x0c, 0x97,
  816. 0x04, 0xc4, 0x44, 0xcf, 0x62, 0x08, 0xed, 0x9c, 0x9f, 0x57, 0x92, 0x9a, 0x57, 0x12, 0x94, 0x5a,
  817. 0x28, 0x24, 0xc9, 0xc5, 0x5c, 0x9a, 0x99, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xec, 0xc4, 0xfe,
  818. 0xea, 0x9e, 0x3c, 0x88, 0x1b, 0x04, 0x22, 0x84, 0x54, 0xb9, 0xd8, 0x93, 0x21, 0x0a, 0x25, 0x98,
  819. 0x14, 0x18, 0x35, 0x38, 0x9d, 0xb8, 0x5f, 0xdd, 0x93, 0x87, 0x09, 0x05, 0xc1, 0x18, 0x4a, 0x3b,
  820. 0x98, 0xb8, 0x24, 0x71, 0x18, 0x5f, 0x5c, 0x20, 0x24, 0xc3, 0xc5, 0x92, 0x9c, 0x9f, 0x92, 0x0a,
  821. 0xb5, 0x80, 0xe3, 0xd5, 0x3d, 0x79, 0x30, 0x3f, 0x08, 0x4c, 0x82, 0x6c, 0xcf, 0x2d, 0x4e, 0x87,
  822. 0x1a, 0x0f, 0xb6, 0x3d, 0xb7, 0x38, 0x3d, 0x08, 0x44, 0x08, 0xf9, 0x73, 0xb1, 0xa4, 0x24, 0x96,
  823. 0x24, 0x4a, 0x30, 0x2b, 0x30, 0x6a, 0x70, 0x1b, 0x19, 0xea, 0x61, 0x84, 0x82, 0x1e, 0x4e, 0x4b,
  824. 0xf5, 0x5c, 0x12, 0x4b, 0x12, 0x21, 0x76, 0x81, 0x8c, 0x08, 0x02, 0x93, 0x52, 0x13, 0x18, 0xb9,
  825. 0x58, 0x40, 0x12, 0xf8, 0xbc, 0xec, 0xc8, 0x25, 0x98, 0x59, 0x1c, 0x5f, 0x0c, 0x36, 0x30, 0x1e,
  826. 0xd9, 0xf3, 0x1c, 0x4e, 0xa2, 0xaf, 0xee, 0xc9, 0x63, 0x4a, 0x06, 0xf1, 0x67, 0xa2, 0xda, 0x2f,
  827. 0xa4, 0xc5, 0xc5, 0x09, 0x55, 0x92, 0x54, 0x09, 0x76, 0x3c, 0xa7, 0x13, 0xef, 0xab, 0x7b, 0xf2,
  828. 0x08, 0xc1, 0x20, 0x0e, 0x08, 0xd3, 0xa9, 0xd2, 0xa8, 0x82, 0x8b, 0x0d, 0xa2, 0x59, 0x28, 0x0f,
  829. 0x8b, 0xc5, 0x42, 0xda, 0xc4, 0x7b, 0xba, 0x50, 0x4a, 0x87, 0x94, 0x10, 0x72, 0x92, 0x39, 0xf1,
  830. 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8,
  831. 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa6, 0x32, 0xc3, 0x24, 0x36, 0x70, 0xba,
  832. 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x49, 0x4c, 0xac, 0x53, 0x8c, 0x02, 0x00, 0x00,
  833. }