http.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: api/http/v1/http.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 XVerifyReq struct {
  19. XAnti string `protobuf:"bytes,1,opt,name=_anti,json=Anti,proto3" json:"_anti,omitempty" form:"_anti" validate:"required"`
  20. Uid int64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty" form:"uid" validate:"required"`
  21. ClientIp string `protobuf:"bytes,3,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty" form:"client_ip"`
  22. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  23. XXX_unrecognized []byte `json:"-"`
  24. XXX_sizecache int32 `json:"-"`
  25. }
  26. func (m *XVerifyReq) Reset() { *m = XVerifyReq{} }
  27. func (m *XVerifyReq) String() string { return proto.CompactTextString(m) }
  28. func (*XVerifyReq) ProtoMessage() {}
  29. func (*XVerifyReq) Descriptor() ([]byte, []int) {
  30. return fileDescriptor_http_6086dd8d3a71844a, []int{0}
  31. }
  32. func (m *XVerifyReq) XXX_Unmarshal(b []byte) error {
  33. return m.Unmarshal(b)
  34. }
  35. func (m *XVerifyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  36. if deterministic {
  37. return xxx_messageInfo_XVerifyReq.Marshal(b, m, deterministic)
  38. } else {
  39. b = b[:cap(b)]
  40. n, err := m.MarshalTo(b)
  41. if err != nil {
  42. return nil, err
  43. }
  44. return b[:n], nil
  45. }
  46. }
  47. func (dst *XVerifyReq) XXX_Merge(src proto.Message) {
  48. xxx_messageInfo_XVerifyReq.Merge(dst, src)
  49. }
  50. func (m *XVerifyReq) XXX_Size() int {
  51. return m.Size()
  52. }
  53. func (m *XVerifyReq) XXX_DiscardUnknown() {
  54. xxx_messageInfo_XVerifyReq.DiscardUnknown(m)
  55. }
  56. var xxx_messageInfo_XVerifyReq proto.InternalMessageInfo
  57. func (m *XVerifyReq) GetXAnti() string {
  58. if m != nil {
  59. return m.XAnti
  60. }
  61. return ""
  62. }
  63. func (m *XVerifyReq) GetUid() int64 {
  64. if m != nil {
  65. return m.Uid
  66. }
  67. return 0
  68. }
  69. func (m *XVerifyReq) GetClientIp() string {
  70. if m != nil {
  71. return m.ClientIp
  72. }
  73. return ""
  74. }
  75. type XVerifyResp struct {
  76. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  77. XXX_unrecognized []byte `json:"-"`
  78. XXX_sizecache int32 `json:"-"`
  79. }
  80. func (m *XVerifyResp) Reset() { *m = XVerifyResp{} }
  81. func (m *XVerifyResp) String() string { return proto.CompactTextString(m) }
  82. func (*XVerifyResp) ProtoMessage() {}
  83. func (*XVerifyResp) Descriptor() ([]byte, []int) {
  84. return fileDescriptor_http_6086dd8d3a71844a, []int{1}
  85. }
  86. func (m *XVerifyResp) XXX_Unmarshal(b []byte) error {
  87. return m.Unmarshal(b)
  88. }
  89. func (m *XVerifyResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  90. if deterministic {
  91. return xxx_messageInfo_XVerifyResp.Marshal(b, m, deterministic)
  92. } else {
  93. b = b[:cap(b)]
  94. n, err := m.MarshalTo(b)
  95. if err != nil {
  96. return nil, err
  97. }
  98. return b[:n], nil
  99. }
  100. }
  101. func (dst *XVerifyResp) XXX_Merge(src proto.Message) {
  102. xxx_messageInfo_XVerifyResp.Merge(dst, src)
  103. }
  104. func (m *XVerifyResp) XXX_Size() int {
  105. return m.Size()
  106. }
  107. func (m *XVerifyResp) XXX_DiscardUnknown() {
  108. xxx_messageInfo_XVerifyResp.DiscardUnknown(m)
  109. }
  110. var xxx_messageInfo_XVerifyResp proto.InternalMessageInfo
  111. func init() {
  112. proto.RegisterType((*XVerifyReq)(nil), "live.xcaptcha.v1.XVerifyReq")
  113. proto.RegisterType((*XVerifyResp)(nil), "live.xcaptcha.v1.XVerifyResp")
  114. }
  115. func (m *XVerifyReq) Marshal() (dAtA []byte, err error) {
  116. size := m.Size()
  117. dAtA = make([]byte, size)
  118. n, err := m.MarshalTo(dAtA)
  119. if err != nil {
  120. return nil, err
  121. }
  122. return dAtA[:n], nil
  123. }
  124. func (m *XVerifyReq) MarshalTo(dAtA []byte) (int, error) {
  125. var i int
  126. _ = i
  127. var l int
  128. _ = l
  129. if len(m.XAnti) > 0 {
  130. dAtA[i] = 0xa
  131. i++
  132. i = encodeVarintHttp(dAtA, i, uint64(len(m.XAnti)))
  133. i += copy(dAtA[i:], m.XAnti)
  134. }
  135. if m.Uid != 0 {
  136. dAtA[i] = 0x10
  137. i++
  138. i = encodeVarintHttp(dAtA, i, uint64(m.Uid))
  139. }
  140. if len(m.ClientIp) > 0 {
  141. dAtA[i] = 0x1a
  142. i++
  143. i = encodeVarintHttp(dAtA, i, uint64(len(m.ClientIp)))
  144. i += copy(dAtA[i:], m.ClientIp)
  145. }
  146. if m.XXX_unrecognized != nil {
  147. i += copy(dAtA[i:], m.XXX_unrecognized)
  148. }
  149. return i, nil
  150. }
  151. func (m *XVerifyResp) Marshal() (dAtA []byte, err error) {
  152. size := m.Size()
  153. dAtA = make([]byte, size)
  154. n, err := m.MarshalTo(dAtA)
  155. if err != nil {
  156. return nil, err
  157. }
  158. return dAtA[:n], nil
  159. }
  160. func (m *XVerifyResp) MarshalTo(dAtA []byte) (int, error) {
  161. var i int
  162. _ = i
  163. var l int
  164. _ = l
  165. if m.XXX_unrecognized != nil {
  166. i += copy(dAtA[i:], m.XXX_unrecognized)
  167. }
  168. return i, nil
  169. }
  170. func encodeVarintHttp(dAtA []byte, offset int, v uint64) int {
  171. for v >= 1<<7 {
  172. dAtA[offset] = uint8(v&0x7f | 0x80)
  173. v >>= 7
  174. offset++
  175. }
  176. dAtA[offset] = uint8(v)
  177. return offset + 1
  178. }
  179. func (m *XVerifyReq) Size() (n int) {
  180. if m == nil {
  181. return 0
  182. }
  183. var l int
  184. _ = l
  185. l = len(m.XAnti)
  186. if l > 0 {
  187. n += 1 + l + sovHttp(uint64(l))
  188. }
  189. if m.Uid != 0 {
  190. n += 1 + sovHttp(uint64(m.Uid))
  191. }
  192. l = len(m.ClientIp)
  193. if l > 0 {
  194. n += 1 + l + sovHttp(uint64(l))
  195. }
  196. if m.XXX_unrecognized != nil {
  197. n += len(m.XXX_unrecognized)
  198. }
  199. return n
  200. }
  201. func (m *XVerifyResp) Size() (n int) {
  202. if m == nil {
  203. return 0
  204. }
  205. var l int
  206. _ = l
  207. if m.XXX_unrecognized != nil {
  208. n += len(m.XXX_unrecognized)
  209. }
  210. return n
  211. }
  212. func sovHttp(x uint64) (n int) {
  213. for {
  214. n++
  215. x >>= 7
  216. if x == 0 {
  217. break
  218. }
  219. }
  220. return n
  221. }
  222. func sozHttp(x uint64) (n int) {
  223. return sovHttp(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  224. }
  225. func (m *XVerifyReq) Unmarshal(dAtA []byte) error {
  226. l := len(dAtA)
  227. iNdEx := 0
  228. for iNdEx < l {
  229. preIndex := iNdEx
  230. var wire uint64
  231. for shift := uint(0); ; shift += 7 {
  232. if shift >= 64 {
  233. return ErrIntOverflowHttp
  234. }
  235. if iNdEx >= l {
  236. return io.ErrUnexpectedEOF
  237. }
  238. b := dAtA[iNdEx]
  239. iNdEx++
  240. wire |= (uint64(b) & 0x7F) << shift
  241. if b < 0x80 {
  242. break
  243. }
  244. }
  245. fieldNum := int32(wire >> 3)
  246. wireType := int(wire & 0x7)
  247. if wireType == 4 {
  248. return fmt.Errorf("proto: XVerifyReq: wiretype end group for non-group")
  249. }
  250. if fieldNum <= 0 {
  251. return fmt.Errorf("proto: XVerifyReq: illegal tag %d (wire type %d)", fieldNum, wire)
  252. }
  253. switch fieldNum {
  254. case 1:
  255. if wireType != 2 {
  256. return fmt.Errorf("proto: wrong wireType = %d for field XAnti", wireType)
  257. }
  258. var stringLen uint64
  259. for shift := uint(0); ; shift += 7 {
  260. if shift >= 64 {
  261. return ErrIntOverflowHttp
  262. }
  263. if iNdEx >= l {
  264. return io.ErrUnexpectedEOF
  265. }
  266. b := dAtA[iNdEx]
  267. iNdEx++
  268. stringLen |= (uint64(b) & 0x7F) << shift
  269. if b < 0x80 {
  270. break
  271. }
  272. }
  273. intStringLen := int(stringLen)
  274. if intStringLen < 0 {
  275. return ErrInvalidLengthHttp
  276. }
  277. postIndex := iNdEx + intStringLen
  278. if postIndex > l {
  279. return io.ErrUnexpectedEOF
  280. }
  281. m.XAnti = string(dAtA[iNdEx:postIndex])
  282. iNdEx = postIndex
  283. case 2:
  284. if wireType != 0 {
  285. return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
  286. }
  287. m.Uid = 0
  288. for shift := uint(0); ; shift += 7 {
  289. if shift >= 64 {
  290. return ErrIntOverflowHttp
  291. }
  292. if iNdEx >= l {
  293. return io.ErrUnexpectedEOF
  294. }
  295. b := dAtA[iNdEx]
  296. iNdEx++
  297. m.Uid |= (int64(b) & 0x7F) << shift
  298. if b < 0x80 {
  299. break
  300. }
  301. }
  302. case 3:
  303. if wireType != 2 {
  304. return fmt.Errorf("proto: wrong wireType = %d for field ClientIp", wireType)
  305. }
  306. var stringLen uint64
  307. for shift := uint(0); ; shift += 7 {
  308. if shift >= 64 {
  309. return ErrIntOverflowHttp
  310. }
  311. if iNdEx >= l {
  312. return io.ErrUnexpectedEOF
  313. }
  314. b := dAtA[iNdEx]
  315. iNdEx++
  316. stringLen |= (uint64(b) & 0x7F) << shift
  317. if b < 0x80 {
  318. break
  319. }
  320. }
  321. intStringLen := int(stringLen)
  322. if intStringLen < 0 {
  323. return ErrInvalidLengthHttp
  324. }
  325. postIndex := iNdEx + intStringLen
  326. if postIndex > l {
  327. return io.ErrUnexpectedEOF
  328. }
  329. m.ClientIp = string(dAtA[iNdEx:postIndex])
  330. iNdEx = postIndex
  331. default:
  332. iNdEx = preIndex
  333. skippy, err := skipHttp(dAtA[iNdEx:])
  334. if err != nil {
  335. return err
  336. }
  337. if skippy < 0 {
  338. return ErrInvalidLengthHttp
  339. }
  340. if (iNdEx + skippy) > l {
  341. return io.ErrUnexpectedEOF
  342. }
  343. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  344. iNdEx += skippy
  345. }
  346. }
  347. if iNdEx > l {
  348. return io.ErrUnexpectedEOF
  349. }
  350. return nil
  351. }
  352. func (m *XVerifyResp) Unmarshal(dAtA []byte) error {
  353. l := len(dAtA)
  354. iNdEx := 0
  355. for iNdEx < l {
  356. preIndex := iNdEx
  357. var wire uint64
  358. for shift := uint(0); ; shift += 7 {
  359. if shift >= 64 {
  360. return ErrIntOverflowHttp
  361. }
  362. if iNdEx >= l {
  363. return io.ErrUnexpectedEOF
  364. }
  365. b := dAtA[iNdEx]
  366. iNdEx++
  367. wire |= (uint64(b) & 0x7F) << shift
  368. if b < 0x80 {
  369. break
  370. }
  371. }
  372. fieldNum := int32(wire >> 3)
  373. wireType := int(wire & 0x7)
  374. if wireType == 4 {
  375. return fmt.Errorf("proto: XVerifyResp: wiretype end group for non-group")
  376. }
  377. if fieldNum <= 0 {
  378. return fmt.Errorf("proto: XVerifyResp: illegal tag %d (wire type %d)", fieldNum, wire)
  379. }
  380. switch fieldNum {
  381. default:
  382. iNdEx = preIndex
  383. skippy, err := skipHttp(dAtA[iNdEx:])
  384. if err != nil {
  385. return err
  386. }
  387. if skippy < 0 {
  388. return ErrInvalidLengthHttp
  389. }
  390. if (iNdEx + skippy) > l {
  391. return io.ErrUnexpectedEOF
  392. }
  393. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  394. iNdEx += skippy
  395. }
  396. }
  397. if iNdEx > l {
  398. return io.ErrUnexpectedEOF
  399. }
  400. return nil
  401. }
  402. func skipHttp(dAtA []byte) (n int, err error) {
  403. l := len(dAtA)
  404. iNdEx := 0
  405. for iNdEx < l {
  406. var wire uint64
  407. for shift := uint(0); ; shift += 7 {
  408. if shift >= 64 {
  409. return 0, ErrIntOverflowHttp
  410. }
  411. if iNdEx >= l {
  412. return 0, io.ErrUnexpectedEOF
  413. }
  414. b := dAtA[iNdEx]
  415. iNdEx++
  416. wire |= (uint64(b) & 0x7F) << shift
  417. if b < 0x80 {
  418. break
  419. }
  420. }
  421. wireType := int(wire & 0x7)
  422. switch wireType {
  423. case 0:
  424. for shift := uint(0); ; shift += 7 {
  425. if shift >= 64 {
  426. return 0, ErrIntOverflowHttp
  427. }
  428. if iNdEx >= l {
  429. return 0, io.ErrUnexpectedEOF
  430. }
  431. iNdEx++
  432. if dAtA[iNdEx-1] < 0x80 {
  433. break
  434. }
  435. }
  436. return iNdEx, nil
  437. case 1:
  438. iNdEx += 8
  439. return iNdEx, nil
  440. case 2:
  441. var length int
  442. for shift := uint(0); ; shift += 7 {
  443. if shift >= 64 {
  444. return 0, ErrIntOverflowHttp
  445. }
  446. if iNdEx >= l {
  447. return 0, io.ErrUnexpectedEOF
  448. }
  449. b := dAtA[iNdEx]
  450. iNdEx++
  451. length |= (int(b) & 0x7F) << shift
  452. if b < 0x80 {
  453. break
  454. }
  455. }
  456. iNdEx += length
  457. if length < 0 {
  458. return 0, ErrInvalidLengthHttp
  459. }
  460. return iNdEx, nil
  461. case 3:
  462. for {
  463. var innerWire uint64
  464. var start int = iNdEx
  465. for shift := uint(0); ; shift += 7 {
  466. if shift >= 64 {
  467. return 0, ErrIntOverflowHttp
  468. }
  469. if iNdEx >= l {
  470. return 0, io.ErrUnexpectedEOF
  471. }
  472. b := dAtA[iNdEx]
  473. iNdEx++
  474. innerWire |= (uint64(b) & 0x7F) << shift
  475. if b < 0x80 {
  476. break
  477. }
  478. }
  479. innerWireType := int(innerWire & 0x7)
  480. if innerWireType == 4 {
  481. break
  482. }
  483. next, err := skipHttp(dAtA[start:])
  484. if err != nil {
  485. return 0, err
  486. }
  487. iNdEx = start + next
  488. }
  489. return iNdEx, nil
  490. case 4:
  491. return iNdEx, nil
  492. case 5:
  493. iNdEx += 4
  494. return iNdEx, nil
  495. default:
  496. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  497. }
  498. }
  499. panic("unreachable")
  500. }
  501. var (
  502. ErrInvalidLengthHttp = fmt.Errorf("proto: negative length found during unmarshaling")
  503. ErrIntOverflowHttp = fmt.Errorf("proto: integer overflow")
  504. )
  505. func init() { proto.RegisterFile("api/http/v1/http.proto", fileDescriptor_http_6086dd8d3a71844a) }
  506. var fileDescriptor_http_6086dd8d3a71844a = []byte{
  507. // 287 bytes of a gzipped FileDescriptorProto
  508. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0x2c, 0xc8, 0xd4,
  509. 0xcf, 0x28, 0x29, 0x29, 0xd0, 0x2f, 0x33, 0x04, 0xd3, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42,
  510. 0x02, 0x39, 0x99, 0x65, 0xa9, 0x7a, 0x15, 0xc9, 0x89, 0x05, 0x25, 0xc9, 0x19, 0x89, 0x7a, 0x65,
  511. 0x86, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9,
  512. 0xe9, 0xf9, 0xfa, 0x60, 0x85, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x0c, 0x50,
  513. 0xda, 0xc0, 0xc8, 0xc5, 0x15, 0x11, 0x96, 0x5a, 0x94, 0x99, 0x56, 0x19, 0x94, 0x5a, 0x28, 0x64,
  514. 0xc9, 0xc5, 0x1a, 0x9f, 0x98, 0x57, 0x92, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe9, 0xa4, 0xf2,
  515. 0xe9, 0x9e, 0xbc, 0x42, 0x5a, 0x7e, 0x51, 0xae, 0x95, 0x12, 0x58, 0x58, 0x49, 0xa1, 0x2c, 0x31,
  516. 0x27, 0x33, 0x25, 0xb1, 0x24, 0xd5, 0x4a, 0xa9, 0x28, 0xb5, 0xb0, 0x34, 0xb3, 0x28, 0x35, 0x45,
  517. 0x29, 0x88, 0xc5, 0x31, 0xaf, 0x24, 0x53, 0xc8, 0x84, 0x8b, 0xb9, 0x34, 0x33, 0x45, 0x82, 0x49,
  518. 0x81, 0x51, 0x83, 0xd9, 0x49, 0xe9, 0xd3, 0x3d, 0x79, 0x39, 0x88, 0xc6, 0xd2, 0xcc, 0x14, 0xec,
  519. 0xda, 0x40, 0xca, 0x85, 0x0c, 0xb9, 0x38, 0x93, 0x73, 0x32, 0x53, 0xf3, 0x4a, 0xe2, 0x33, 0x0b,
  520. 0x24, 0x98, 0xc1, 0x96, 0x8a, 0x7c, 0xba, 0x27, 0x2f, 0x00, 0xd1, 0x0b, 0x97, 0x52, 0x0a, 0xe2,
  521. 0x80, 0xb0, 0x3d, 0x0b, 0x94, 0x78, 0xb9, 0xb8, 0xe1, 0x2e, 0x2e, 0x2e, 0x30, 0x0a, 0xe0, 0x62,
  522. 0x77, 0x86, 0x78, 0x5f, 0xc8, 0x95, 0x8b, 0xad, 0x0c, 0x2c, 0x21, 0x24, 0xa3, 0x87, 0x1e, 0x30,
  523. 0x7a, 0x08, 0x5f, 0x4a, 0xc9, 0xe2, 0x91, 0x2d, 0x2e, 0x70, 0x12, 0x38, 0xf1, 0x48, 0x8e, 0xf1,
  524. 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0xa3, 0x98, 0xca, 0x0c, 0x93, 0xd8, 0xc0, 0x81,
  525. 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x50, 0xf8, 0xd1, 0xfb, 0x87, 0x01, 0x00, 0x00,
  526. }