captcha.pb.go 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: api/http/v1/captcha.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 CreateCaptchaReq struct {
  19. Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty" form:"type"`
  20. ClientType string `protobuf:"bytes,2,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty" form:"client_type"`
  21. Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty" form:"height"`
  22. Width int64 `protobuf:"varint,4,opt,name=width,proto3" json:"width,omitempty" form:"width"`
  23. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  24. XXX_unrecognized []byte `json:"-"`
  25. XXX_sizecache int32 `json:"-"`
  26. }
  27. func (m *CreateCaptchaReq) Reset() { *m = CreateCaptchaReq{} }
  28. func (m *CreateCaptchaReq) String() string { return proto.CompactTextString(m) }
  29. func (*CreateCaptchaReq) ProtoMessage() {}
  30. func (*CreateCaptchaReq) Descriptor() ([]byte, []int) {
  31. return fileDescriptor_captcha_835409ee8e660cbd, []int{0}
  32. }
  33. func (m *CreateCaptchaReq) XXX_Unmarshal(b []byte) error {
  34. return m.Unmarshal(b)
  35. }
  36. func (m *CreateCaptchaReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  37. if deterministic {
  38. return xxx_messageInfo_CreateCaptchaReq.Marshal(b, m, deterministic)
  39. } else {
  40. b = b[:cap(b)]
  41. n, err := m.MarshalTo(b)
  42. if err != nil {
  43. return nil, err
  44. }
  45. return b[:n], nil
  46. }
  47. }
  48. func (dst *CreateCaptchaReq) XXX_Merge(src proto.Message) {
  49. xxx_messageInfo_CreateCaptchaReq.Merge(dst, src)
  50. }
  51. func (m *CreateCaptchaReq) XXX_Size() int {
  52. return m.Size()
  53. }
  54. func (m *CreateCaptchaReq) XXX_DiscardUnknown() {
  55. xxx_messageInfo_CreateCaptchaReq.DiscardUnknown(m)
  56. }
  57. var xxx_messageInfo_CreateCaptchaReq proto.InternalMessageInfo
  58. func (m *CreateCaptchaReq) GetType() int64 {
  59. if m != nil {
  60. return m.Type
  61. }
  62. return 0
  63. }
  64. func (m *CreateCaptchaReq) GetClientType() string {
  65. if m != nil {
  66. return m.ClientType
  67. }
  68. return ""
  69. }
  70. func (m *CreateCaptchaReq) GetHeight() int64 {
  71. if m != nil {
  72. return m.Height
  73. }
  74. return 0
  75. }
  76. func (m *CreateCaptchaReq) GetWidth() int64 {
  77. if m != nil {
  78. return m.Width
  79. }
  80. return 0
  81. }
  82. type CreateCaptchaResp struct {
  83. Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type"`
  84. Geetest *GeeTest `protobuf:"bytes,2,opt,name=geetest" json:"geetest"`
  85. Image *Image `protobuf:"bytes,3,opt,name=image" json:"image"`
  86. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  87. XXX_unrecognized []byte `json:"-"`
  88. XXX_sizecache int32 `json:"-"`
  89. }
  90. func (m *CreateCaptchaResp) Reset() { *m = CreateCaptchaResp{} }
  91. func (m *CreateCaptchaResp) String() string { return proto.CompactTextString(m) }
  92. func (*CreateCaptchaResp) ProtoMessage() {}
  93. func (*CreateCaptchaResp) Descriptor() ([]byte, []int) {
  94. return fileDescriptor_captcha_835409ee8e660cbd, []int{1}
  95. }
  96. func (m *CreateCaptchaResp) XXX_Unmarshal(b []byte) error {
  97. return m.Unmarshal(b)
  98. }
  99. func (m *CreateCaptchaResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  100. if deterministic {
  101. return xxx_messageInfo_CreateCaptchaResp.Marshal(b, m, deterministic)
  102. } else {
  103. b = b[:cap(b)]
  104. n, err := m.MarshalTo(b)
  105. if err != nil {
  106. return nil, err
  107. }
  108. return b[:n], nil
  109. }
  110. }
  111. func (dst *CreateCaptchaResp) XXX_Merge(src proto.Message) {
  112. xxx_messageInfo_CreateCaptchaResp.Merge(dst, src)
  113. }
  114. func (m *CreateCaptchaResp) XXX_Size() int {
  115. return m.Size()
  116. }
  117. func (m *CreateCaptchaResp) XXX_DiscardUnknown() {
  118. xxx_messageInfo_CreateCaptchaResp.DiscardUnknown(m)
  119. }
  120. var xxx_messageInfo_CreateCaptchaResp proto.InternalMessageInfo
  121. func (m *CreateCaptchaResp) GetType() int64 {
  122. if m != nil {
  123. return m.Type
  124. }
  125. return 0
  126. }
  127. func (m *CreateCaptchaResp) GetGeetest() *GeeTest {
  128. if m != nil {
  129. return m.Geetest
  130. }
  131. return nil
  132. }
  133. func (m *CreateCaptchaResp) GetImage() *Image {
  134. if m != nil {
  135. return m.Image
  136. }
  137. return nil
  138. }
  139. type GeeTest struct {
  140. Gt string `protobuf:"bytes,1,opt,name=gt,proto3" json:"gt"`
  141. Challenge string `protobuf:"bytes,2,opt,name=challenge,proto3" json:"challenge"`
  142. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  143. XXX_unrecognized []byte `json:"-"`
  144. XXX_sizecache int32 `json:"-"`
  145. }
  146. func (m *GeeTest) Reset() { *m = GeeTest{} }
  147. func (m *GeeTest) String() string { return proto.CompactTextString(m) }
  148. func (*GeeTest) ProtoMessage() {}
  149. func (*GeeTest) Descriptor() ([]byte, []int) {
  150. return fileDescriptor_captcha_835409ee8e660cbd, []int{2}
  151. }
  152. func (m *GeeTest) XXX_Unmarshal(b []byte) error {
  153. return m.Unmarshal(b)
  154. }
  155. func (m *GeeTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  156. if deterministic {
  157. return xxx_messageInfo_GeeTest.Marshal(b, m, deterministic)
  158. } else {
  159. b = b[:cap(b)]
  160. n, err := m.MarshalTo(b)
  161. if err != nil {
  162. return nil, err
  163. }
  164. return b[:n], nil
  165. }
  166. }
  167. func (dst *GeeTest) XXX_Merge(src proto.Message) {
  168. xxx_messageInfo_GeeTest.Merge(dst, src)
  169. }
  170. func (m *GeeTest) XXX_Size() int {
  171. return m.Size()
  172. }
  173. func (m *GeeTest) XXX_DiscardUnknown() {
  174. xxx_messageInfo_GeeTest.DiscardUnknown(m)
  175. }
  176. var xxx_messageInfo_GeeTest proto.InternalMessageInfo
  177. func (m *GeeTest) GetGt() string {
  178. if m != nil {
  179. return m.Gt
  180. }
  181. return ""
  182. }
  183. func (m *GeeTest) GetChallenge() string {
  184. if m != nil {
  185. return m.Challenge
  186. }
  187. return ""
  188. }
  189. type Image struct {
  190. Tips string `protobuf:"bytes,1,opt,name=tips,proto3" json:"tips"`
  191. Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
  192. Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content"`
  193. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  194. XXX_unrecognized []byte `json:"-"`
  195. XXX_sizecache int32 `json:"-"`
  196. }
  197. func (m *Image) Reset() { *m = Image{} }
  198. func (m *Image) String() string { return proto.CompactTextString(m) }
  199. func (*Image) ProtoMessage() {}
  200. func (*Image) Descriptor() ([]byte, []int) {
  201. return fileDescriptor_captcha_835409ee8e660cbd, []int{3}
  202. }
  203. func (m *Image) XXX_Unmarshal(b []byte) error {
  204. return m.Unmarshal(b)
  205. }
  206. func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  207. if deterministic {
  208. return xxx_messageInfo_Image.Marshal(b, m, deterministic)
  209. } else {
  210. b = b[:cap(b)]
  211. n, err := m.MarshalTo(b)
  212. if err != nil {
  213. return nil, err
  214. }
  215. return b[:n], nil
  216. }
  217. }
  218. func (dst *Image) XXX_Merge(src proto.Message) {
  219. xxx_messageInfo_Image.Merge(dst, src)
  220. }
  221. func (m *Image) XXX_Size() int {
  222. return m.Size()
  223. }
  224. func (m *Image) XXX_DiscardUnknown() {
  225. xxx_messageInfo_Image.DiscardUnknown(m)
  226. }
  227. var xxx_messageInfo_Image proto.InternalMessageInfo
  228. func (m *Image) GetTips() string {
  229. if m != nil {
  230. return m.Tips
  231. }
  232. return ""
  233. }
  234. func (m *Image) GetToken() string {
  235. if m != nil {
  236. return m.Token
  237. }
  238. return ""
  239. }
  240. func (m *Image) GetContent() string {
  241. if m != nil {
  242. return m.Content
  243. }
  244. return ""
  245. }
  246. type VerifyReq struct {
  247. Anti string `protobuf:"bytes,1,opt,name=anti,proto3" json:"anti,omitempty" form:"anti"`
  248. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  249. XXX_unrecognized []byte `json:"-"`
  250. XXX_sizecache int32 `json:"-"`
  251. }
  252. func (m *VerifyReq) Reset() { *m = VerifyReq{} }
  253. func (m *VerifyReq) String() string { return proto.CompactTextString(m) }
  254. func (*VerifyReq) ProtoMessage() {}
  255. func (*VerifyReq) Descriptor() ([]byte, []int) {
  256. return fileDescriptor_captcha_835409ee8e660cbd, []int{4}
  257. }
  258. func (m *VerifyReq) XXX_Unmarshal(b []byte) error {
  259. return m.Unmarshal(b)
  260. }
  261. func (m *VerifyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  262. if deterministic {
  263. return xxx_messageInfo_VerifyReq.Marshal(b, m, deterministic)
  264. } else {
  265. b = b[:cap(b)]
  266. n, err := m.MarshalTo(b)
  267. if err != nil {
  268. return nil, err
  269. }
  270. return b[:n], nil
  271. }
  272. }
  273. func (dst *VerifyReq) XXX_Merge(src proto.Message) {
  274. xxx_messageInfo_VerifyReq.Merge(dst, src)
  275. }
  276. func (m *VerifyReq) XXX_Size() int {
  277. return m.Size()
  278. }
  279. func (m *VerifyReq) XXX_DiscardUnknown() {
  280. xxx_messageInfo_VerifyReq.DiscardUnknown(m)
  281. }
  282. var xxx_messageInfo_VerifyReq proto.InternalMessageInfo
  283. func (m *VerifyReq) GetAnti() string {
  284. if m != nil {
  285. return m.Anti
  286. }
  287. return ""
  288. }
  289. type VerifyResp struct {
  290. Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type"`
  291. Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
  292. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  293. XXX_unrecognized []byte `json:"-"`
  294. XXX_sizecache int32 `json:"-"`
  295. }
  296. func (m *VerifyResp) Reset() { *m = VerifyResp{} }
  297. func (m *VerifyResp) String() string { return proto.CompactTextString(m) }
  298. func (*VerifyResp) ProtoMessage() {}
  299. func (*VerifyResp) Descriptor() ([]byte, []int) {
  300. return fileDescriptor_captcha_835409ee8e660cbd, []int{5}
  301. }
  302. func (m *VerifyResp) XXX_Unmarshal(b []byte) error {
  303. return m.Unmarshal(b)
  304. }
  305. func (m *VerifyResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  306. if deterministic {
  307. return xxx_messageInfo_VerifyResp.Marshal(b, m, deterministic)
  308. } else {
  309. b = b[:cap(b)]
  310. n, err := m.MarshalTo(b)
  311. if err != nil {
  312. return nil, err
  313. }
  314. return b[:n], nil
  315. }
  316. }
  317. func (dst *VerifyResp) XXX_Merge(src proto.Message) {
  318. xxx_messageInfo_VerifyResp.Merge(dst, src)
  319. }
  320. func (m *VerifyResp) XXX_Size() int {
  321. return m.Size()
  322. }
  323. func (m *VerifyResp) XXX_DiscardUnknown() {
  324. xxx_messageInfo_VerifyResp.DiscardUnknown(m)
  325. }
  326. var xxx_messageInfo_VerifyResp proto.InternalMessageInfo
  327. func (m *VerifyResp) GetType() int64 {
  328. if m != nil {
  329. return m.Type
  330. }
  331. return 0
  332. }
  333. func (m *VerifyResp) GetToken() string {
  334. if m != nil {
  335. return m.Token
  336. }
  337. return ""
  338. }
  339. func init() {
  340. proto.RegisterType((*CreateCaptchaReq)(nil), "live.webroom.v1.CreateCaptchaReq")
  341. proto.RegisterType((*CreateCaptchaResp)(nil), "live.webroom.v1.CreateCaptchaResp")
  342. proto.RegisterType((*GeeTest)(nil), "live.webroom.v1.GeeTest")
  343. proto.RegisterType((*Image)(nil), "live.webroom.v1.Image")
  344. proto.RegisterType((*VerifyReq)(nil), "live.webroom.v1.VerifyReq")
  345. proto.RegisterType((*VerifyResp)(nil), "live.webroom.v1.VerifyResp")
  346. }
  347. func (m *CreateCaptchaReq) Marshal() (dAtA []byte, err error) {
  348. size := m.Size()
  349. dAtA = make([]byte, size)
  350. n, err := m.MarshalTo(dAtA)
  351. if err != nil {
  352. return nil, err
  353. }
  354. return dAtA[:n], nil
  355. }
  356. func (m *CreateCaptchaReq) MarshalTo(dAtA []byte) (int, error) {
  357. var i int
  358. _ = i
  359. var l int
  360. _ = l
  361. if m.Type != 0 {
  362. dAtA[i] = 0x8
  363. i++
  364. i = encodeVarintCaptcha(dAtA, i, uint64(m.Type))
  365. }
  366. if len(m.ClientType) > 0 {
  367. dAtA[i] = 0x12
  368. i++
  369. i = encodeVarintCaptcha(dAtA, i, uint64(len(m.ClientType)))
  370. i += copy(dAtA[i:], m.ClientType)
  371. }
  372. if m.Height != 0 {
  373. dAtA[i] = 0x18
  374. i++
  375. i = encodeVarintCaptcha(dAtA, i, uint64(m.Height))
  376. }
  377. if m.Width != 0 {
  378. dAtA[i] = 0x20
  379. i++
  380. i = encodeVarintCaptcha(dAtA, i, uint64(m.Width))
  381. }
  382. if m.XXX_unrecognized != nil {
  383. i += copy(dAtA[i:], m.XXX_unrecognized)
  384. }
  385. return i, nil
  386. }
  387. func (m *CreateCaptchaResp) Marshal() (dAtA []byte, err error) {
  388. size := m.Size()
  389. dAtA = make([]byte, size)
  390. n, err := m.MarshalTo(dAtA)
  391. if err != nil {
  392. return nil, err
  393. }
  394. return dAtA[:n], nil
  395. }
  396. func (m *CreateCaptchaResp) MarshalTo(dAtA []byte) (int, error) {
  397. var i int
  398. _ = i
  399. var l int
  400. _ = l
  401. if m.Type != 0 {
  402. dAtA[i] = 0x8
  403. i++
  404. i = encodeVarintCaptcha(dAtA, i, uint64(m.Type))
  405. }
  406. if m.Geetest != nil {
  407. dAtA[i] = 0x12
  408. i++
  409. i = encodeVarintCaptcha(dAtA, i, uint64(m.Geetest.Size()))
  410. n1, err := m.Geetest.MarshalTo(dAtA[i:])
  411. if err != nil {
  412. return 0, err
  413. }
  414. i += n1
  415. }
  416. if m.Image != nil {
  417. dAtA[i] = 0x1a
  418. i++
  419. i = encodeVarintCaptcha(dAtA, i, uint64(m.Image.Size()))
  420. n2, err := m.Image.MarshalTo(dAtA[i:])
  421. if err != nil {
  422. return 0, err
  423. }
  424. i += n2
  425. }
  426. if m.XXX_unrecognized != nil {
  427. i += copy(dAtA[i:], m.XXX_unrecognized)
  428. }
  429. return i, nil
  430. }
  431. func (m *GeeTest) Marshal() (dAtA []byte, err error) {
  432. size := m.Size()
  433. dAtA = make([]byte, size)
  434. n, err := m.MarshalTo(dAtA)
  435. if err != nil {
  436. return nil, err
  437. }
  438. return dAtA[:n], nil
  439. }
  440. func (m *GeeTest) MarshalTo(dAtA []byte) (int, error) {
  441. var i int
  442. _ = i
  443. var l int
  444. _ = l
  445. if len(m.Gt) > 0 {
  446. dAtA[i] = 0xa
  447. i++
  448. i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Gt)))
  449. i += copy(dAtA[i:], m.Gt)
  450. }
  451. if len(m.Challenge) > 0 {
  452. dAtA[i] = 0x12
  453. i++
  454. i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Challenge)))
  455. i += copy(dAtA[i:], m.Challenge)
  456. }
  457. if m.XXX_unrecognized != nil {
  458. i += copy(dAtA[i:], m.XXX_unrecognized)
  459. }
  460. return i, nil
  461. }
  462. func (m *Image) Marshal() (dAtA []byte, err error) {
  463. size := m.Size()
  464. dAtA = make([]byte, size)
  465. n, err := m.MarshalTo(dAtA)
  466. if err != nil {
  467. return nil, err
  468. }
  469. return dAtA[:n], nil
  470. }
  471. func (m *Image) MarshalTo(dAtA []byte) (int, error) {
  472. var i int
  473. _ = i
  474. var l int
  475. _ = l
  476. if len(m.Tips) > 0 {
  477. dAtA[i] = 0xa
  478. i++
  479. i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Tips)))
  480. i += copy(dAtA[i:], m.Tips)
  481. }
  482. if len(m.Token) > 0 {
  483. dAtA[i] = 0x12
  484. i++
  485. i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Token)))
  486. i += copy(dAtA[i:], m.Token)
  487. }
  488. if len(m.Content) > 0 {
  489. dAtA[i] = 0x1a
  490. i++
  491. i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Content)))
  492. i += copy(dAtA[i:], m.Content)
  493. }
  494. if m.XXX_unrecognized != nil {
  495. i += copy(dAtA[i:], m.XXX_unrecognized)
  496. }
  497. return i, nil
  498. }
  499. func (m *VerifyReq) Marshal() (dAtA []byte, err error) {
  500. size := m.Size()
  501. dAtA = make([]byte, size)
  502. n, err := m.MarshalTo(dAtA)
  503. if err != nil {
  504. return nil, err
  505. }
  506. return dAtA[:n], nil
  507. }
  508. func (m *VerifyReq) MarshalTo(dAtA []byte) (int, error) {
  509. var i int
  510. _ = i
  511. var l int
  512. _ = l
  513. if len(m.Anti) > 0 {
  514. dAtA[i] = 0xa
  515. i++
  516. i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Anti)))
  517. i += copy(dAtA[i:], m.Anti)
  518. }
  519. if m.XXX_unrecognized != nil {
  520. i += copy(dAtA[i:], m.XXX_unrecognized)
  521. }
  522. return i, nil
  523. }
  524. func (m *VerifyResp) Marshal() (dAtA []byte, err error) {
  525. size := m.Size()
  526. dAtA = make([]byte, size)
  527. n, err := m.MarshalTo(dAtA)
  528. if err != nil {
  529. return nil, err
  530. }
  531. return dAtA[:n], nil
  532. }
  533. func (m *VerifyResp) MarshalTo(dAtA []byte) (int, error) {
  534. var i int
  535. _ = i
  536. var l int
  537. _ = l
  538. if m.Type != 0 {
  539. dAtA[i] = 0x8
  540. i++
  541. i = encodeVarintCaptcha(dAtA, i, uint64(m.Type))
  542. }
  543. if len(m.Token) > 0 {
  544. dAtA[i] = 0x12
  545. i++
  546. i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Token)))
  547. i += copy(dAtA[i:], m.Token)
  548. }
  549. if m.XXX_unrecognized != nil {
  550. i += copy(dAtA[i:], m.XXX_unrecognized)
  551. }
  552. return i, nil
  553. }
  554. func encodeVarintCaptcha(dAtA []byte, offset int, v uint64) int {
  555. for v >= 1<<7 {
  556. dAtA[offset] = uint8(v&0x7f | 0x80)
  557. v >>= 7
  558. offset++
  559. }
  560. dAtA[offset] = uint8(v)
  561. return offset + 1
  562. }
  563. func (m *CreateCaptchaReq) Size() (n int) {
  564. if m == nil {
  565. return 0
  566. }
  567. var l int
  568. _ = l
  569. if m.Type != 0 {
  570. n += 1 + sovCaptcha(uint64(m.Type))
  571. }
  572. l = len(m.ClientType)
  573. if l > 0 {
  574. n += 1 + l + sovCaptcha(uint64(l))
  575. }
  576. if m.Height != 0 {
  577. n += 1 + sovCaptcha(uint64(m.Height))
  578. }
  579. if m.Width != 0 {
  580. n += 1 + sovCaptcha(uint64(m.Width))
  581. }
  582. if m.XXX_unrecognized != nil {
  583. n += len(m.XXX_unrecognized)
  584. }
  585. return n
  586. }
  587. func (m *CreateCaptchaResp) Size() (n int) {
  588. if m == nil {
  589. return 0
  590. }
  591. var l int
  592. _ = l
  593. if m.Type != 0 {
  594. n += 1 + sovCaptcha(uint64(m.Type))
  595. }
  596. if m.Geetest != nil {
  597. l = m.Geetest.Size()
  598. n += 1 + l + sovCaptcha(uint64(l))
  599. }
  600. if m.Image != nil {
  601. l = m.Image.Size()
  602. n += 1 + l + sovCaptcha(uint64(l))
  603. }
  604. if m.XXX_unrecognized != nil {
  605. n += len(m.XXX_unrecognized)
  606. }
  607. return n
  608. }
  609. func (m *GeeTest) Size() (n int) {
  610. if m == nil {
  611. return 0
  612. }
  613. var l int
  614. _ = l
  615. l = len(m.Gt)
  616. if l > 0 {
  617. n += 1 + l + sovCaptcha(uint64(l))
  618. }
  619. l = len(m.Challenge)
  620. if l > 0 {
  621. n += 1 + l + sovCaptcha(uint64(l))
  622. }
  623. if m.XXX_unrecognized != nil {
  624. n += len(m.XXX_unrecognized)
  625. }
  626. return n
  627. }
  628. func (m *Image) Size() (n int) {
  629. if m == nil {
  630. return 0
  631. }
  632. var l int
  633. _ = l
  634. l = len(m.Tips)
  635. if l > 0 {
  636. n += 1 + l + sovCaptcha(uint64(l))
  637. }
  638. l = len(m.Token)
  639. if l > 0 {
  640. n += 1 + l + sovCaptcha(uint64(l))
  641. }
  642. l = len(m.Content)
  643. if l > 0 {
  644. n += 1 + l + sovCaptcha(uint64(l))
  645. }
  646. if m.XXX_unrecognized != nil {
  647. n += len(m.XXX_unrecognized)
  648. }
  649. return n
  650. }
  651. func (m *VerifyReq) Size() (n int) {
  652. if m == nil {
  653. return 0
  654. }
  655. var l int
  656. _ = l
  657. l = len(m.Anti)
  658. if l > 0 {
  659. n += 1 + l + sovCaptcha(uint64(l))
  660. }
  661. if m.XXX_unrecognized != nil {
  662. n += len(m.XXX_unrecognized)
  663. }
  664. return n
  665. }
  666. func (m *VerifyResp) Size() (n int) {
  667. if m == nil {
  668. return 0
  669. }
  670. var l int
  671. _ = l
  672. if m.Type != 0 {
  673. n += 1 + sovCaptcha(uint64(m.Type))
  674. }
  675. l = len(m.Token)
  676. if l > 0 {
  677. n += 1 + l + sovCaptcha(uint64(l))
  678. }
  679. if m.XXX_unrecognized != nil {
  680. n += len(m.XXX_unrecognized)
  681. }
  682. return n
  683. }
  684. func sovCaptcha(x uint64) (n int) {
  685. for {
  686. n++
  687. x >>= 7
  688. if x == 0 {
  689. break
  690. }
  691. }
  692. return n
  693. }
  694. func sozCaptcha(x uint64) (n int) {
  695. return sovCaptcha(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  696. }
  697. func (m *CreateCaptchaReq) Unmarshal(dAtA []byte) error {
  698. l := len(dAtA)
  699. iNdEx := 0
  700. for iNdEx < l {
  701. preIndex := iNdEx
  702. var wire uint64
  703. for shift := uint(0); ; shift += 7 {
  704. if shift >= 64 {
  705. return ErrIntOverflowCaptcha
  706. }
  707. if iNdEx >= l {
  708. return io.ErrUnexpectedEOF
  709. }
  710. b := dAtA[iNdEx]
  711. iNdEx++
  712. wire |= (uint64(b) & 0x7F) << shift
  713. if b < 0x80 {
  714. break
  715. }
  716. }
  717. fieldNum := int32(wire >> 3)
  718. wireType := int(wire & 0x7)
  719. if wireType == 4 {
  720. return fmt.Errorf("proto: CreateCaptchaReq: wiretype end group for non-group")
  721. }
  722. if fieldNum <= 0 {
  723. return fmt.Errorf("proto: CreateCaptchaReq: illegal tag %d (wire type %d)", fieldNum, wire)
  724. }
  725. switch fieldNum {
  726. case 1:
  727. if wireType != 0 {
  728. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  729. }
  730. m.Type = 0
  731. for shift := uint(0); ; shift += 7 {
  732. if shift >= 64 {
  733. return ErrIntOverflowCaptcha
  734. }
  735. if iNdEx >= l {
  736. return io.ErrUnexpectedEOF
  737. }
  738. b := dAtA[iNdEx]
  739. iNdEx++
  740. m.Type |= (int64(b) & 0x7F) << shift
  741. if b < 0x80 {
  742. break
  743. }
  744. }
  745. case 2:
  746. if wireType != 2 {
  747. return fmt.Errorf("proto: wrong wireType = %d for field ClientType", wireType)
  748. }
  749. var stringLen uint64
  750. for shift := uint(0); ; shift += 7 {
  751. if shift >= 64 {
  752. return ErrIntOverflowCaptcha
  753. }
  754. if iNdEx >= l {
  755. return io.ErrUnexpectedEOF
  756. }
  757. b := dAtA[iNdEx]
  758. iNdEx++
  759. stringLen |= (uint64(b) & 0x7F) << shift
  760. if b < 0x80 {
  761. break
  762. }
  763. }
  764. intStringLen := int(stringLen)
  765. if intStringLen < 0 {
  766. return ErrInvalidLengthCaptcha
  767. }
  768. postIndex := iNdEx + intStringLen
  769. if postIndex > l {
  770. return io.ErrUnexpectedEOF
  771. }
  772. m.ClientType = string(dAtA[iNdEx:postIndex])
  773. iNdEx = postIndex
  774. case 3:
  775. if wireType != 0 {
  776. return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  777. }
  778. m.Height = 0
  779. for shift := uint(0); ; shift += 7 {
  780. if shift >= 64 {
  781. return ErrIntOverflowCaptcha
  782. }
  783. if iNdEx >= l {
  784. return io.ErrUnexpectedEOF
  785. }
  786. b := dAtA[iNdEx]
  787. iNdEx++
  788. m.Height |= (int64(b) & 0x7F) << shift
  789. if b < 0x80 {
  790. break
  791. }
  792. }
  793. case 4:
  794. if wireType != 0 {
  795. return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType)
  796. }
  797. m.Width = 0
  798. for shift := uint(0); ; shift += 7 {
  799. if shift >= 64 {
  800. return ErrIntOverflowCaptcha
  801. }
  802. if iNdEx >= l {
  803. return io.ErrUnexpectedEOF
  804. }
  805. b := dAtA[iNdEx]
  806. iNdEx++
  807. m.Width |= (int64(b) & 0x7F) << shift
  808. if b < 0x80 {
  809. break
  810. }
  811. }
  812. default:
  813. iNdEx = preIndex
  814. skippy, err := skipCaptcha(dAtA[iNdEx:])
  815. if err != nil {
  816. return err
  817. }
  818. if skippy < 0 {
  819. return ErrInvalidLengthCaptcha
  820. }
  821. if (iNdEx + skippy) > l {
  822. return io.ErrUnexpectedEOF
  823. }
  824. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  825. iNdEx += skippy
  826. }
  827. }
  828. if iNdEx > l {
  829. return io.ErrUnexpectedEOF
  830. }
  831. return nil
  832. }
  833. func (m *CreateCaptchaResp) Unmarshal(dAtA []byte) error {
  834. l := len(dAtA)
  835. iNdEx := 0
  836. for iNdEx < l {
  837. preIndex := iNdEx
  838. var wire uint64
  839. for shift := uint(0); ; shift += 7 {
  840. if shift >= 64 {
  841. return ErrIntOverflowCaptcha
  842. }
  843. if iNdEx >= l {
  844. return io.ErrUnexpectedEOF
  845. }
  846. b := dAtA[iNdEx]
  847. iNdEx++
  848. wire |= (uint64(b) & 0x7F) << shift
  849. if b < 0x80 {
  850. break
  851. }
  852. }
  853. fieldNum := int32(wire >> 3)
  854. wireType := int(wire & 0x7)
  855. if wireType == 4 {
  856. return fmt.Errorf("proto: CreateCaptchaResp: wiretype end group for non-group")
  857. }
  858. if fieldNum <= 0 {
  859. return fmt.Errorf("proto: CreateCaptchaResp: illegal tag %d (wire type %d)", fieldNum, wire)
  860. }
  861. switch fieldNum {
  862. case 1:
  863. if wireType != 0 {
  864. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  865. }
  866. m.Type = 0
  867. for shift := uint(0); ; shift += 7 {
  868. if shift >= 64 {
  869. return ErrIntOverflowCaptcha
  870. }
  871. if iNdEx >= l {
  872. return io.ErrUnexpectedEOF
  873. }
  874. b := dAtA[iNdEx]
  875. iNdEx++
  876. m.Type |= (int64(b) & 0x7F) << shift
  877. if b < 0x80 {
  878. break
  879. }
  880. }
  881. case 2:
  882. if wireType != 2 {
  883. return fmt.Errorf("proto: wrong wireType = %d for field Geetest", wireType)
  884. }
  885. var msglen int
  886. for shift := uint(0); ; shift += 7 {
  887. if shift >= 64 {
  888. return ErrIntOverflowCaptcha
  889. }
  890. if iNdEx >= l {
  891. return io.ErrUnexpectedEOF
  892. }
  893. b := dAtA[iNdEx]
  894. iNdEx++
  895. msglen |= (int(b) & 0x7F) << shift
  896. if b < 0x80 {
  897. break
  898. }
  899. }
  900. if msglen < 0 {
  901. return ErrInvalidLengthCaptcha
  902. }
  903. postIndex := iNdEx + msglen
  904. if postIndex > l {
  905. return io.ErrUnexpectedEOF
  906. }
  907. if m.Geetest == nil {
  908. m.Geetest = &GeeTest{}
  909. }
  910. if err := m.Geetest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  911. return err
  912. }
  913. iNdEx = postIndex
  914. case 3:
  915. if wireType != 2 {
  916. return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
  917. }
  918. var msglen int
  919. for shift := uint(0); ; shift += 7 {
  920. if shift >= 64 {
  921. return ErrIntOverflowCaptcha
  922. }
  923. if iNdEx >= l {
  924. return io.ErrUnexpectedEOF
  925. }
  926. b := dAtA[iNdEx]
  927. iNdEx++
  928. msglen |= (int(b) & 0x7F) << shift
  929. if b < 0x80 {
  930. break
  931. }
  932. }
  933. if msglen < 0 {
  934. return ErrInvalidLengthCaptcha
  935. }
  936. postIndex := iNdEx + msglen
  937. if postIndex > l {
  938. return io.ErrUnexpectedEOF
  939. }
  940. if m.Image == nil {
  941. m.Image = &Image{}
  942. }
  943. if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  944. return err
  945. }
  946. iNdEx = postIndex
  947. default:
  948. iNdEx = preIndex
  949. skippy, err := skipCaptcha(dAtA[iNdEx:])
  950. if err != nil {
  951. return err
  952. }
  953. if skippy < 0 {
  954. return ErrInvalidLengthCaptcha
  955. }
  956. if (iNdEx + skippy) > l {
  957. return io.ErrUnexpectedEOF
  958. }
  959. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  960. iNdEx += skippy
  961. }
  962. }
  963. if iNdEx > l {
  964. return io.ErrUnexpectedEOF
  965. }
  966. return nil
  967. }
  968. func (m *GeeTest) Unmarshal(dAtA []byte) error {
  969. l := len(dAtA)
  970. iNdEx := 0
  971. for iNdEx < l {
  972. preIndex := iNdEx
  973. var wire uint64
  974. for shift := uint(0); ; shift += 7 {
  975. if shift >= 64 {
  976. return ErrIntOverflowCaptcha
  977. }
  978. if iNdEx >= l {
  979. return io.ErrUnexpectedEOF
  980. }
  981. b := dAtA[iNdEx]
  982. iNdEx++
  983. wire |= (uint64(b) & 0x7F) << shift
  984. if b < 0x80 {
  985. break
  986. }
  987. }
  988. fieldNum := int32(wire >> 3)
  989. wireType := int(wire & 0x7)
  990. if wireType == 4 {
  991. return fmt.Errorf("proto: GeeTest: wiretype end group for non-group")
  992. }
  993. if fieldNum <= 0 {
  994. return fmt.Errorf("proto: GeeTest: illegal tag %d (wire type %d)", fieldNum, wire)
  995. }
  996. switch fieldNum {
  997. case 1:
  998. if wireType != 2 {
  999. return fmt.Errorf("proto: wrong wireType = %d for field Gt", wireType)
  1000. }
  1001. var stringLen uint64
  1002. for shift := uint(0); ; shift += 7 {
  1003. if shift >= 64 {
  1004. return ErrIntOverflowCaptcha
  1005. }
  1006. if iNdEx >= l {
  1007. return io.ErrUnexpectedEOF
  1008. }
  1009. b := dAtA[iNdEx]
  1010. iNdEx++
  1011. stringLen |= (uint64(b) & 0x7F) << shift
  1012. if b < 0x80 {
  1013. break
  1014. }
  1015. }
  1016. intStringLen := int(stringLen)
  1017. if intStringLen < 0 {
  1018. return ErrInvalidLengthCaptcha
  1019. }
  1020. postIndex := iNdEx + intStringLen
  1021. if postIndex > l {
  1022. return io.ErrUnexpectedEOF
  1023. }
  1024. m.Gt = string(dAtA[iNdEx:postIndex])
  1025. iNdEx = postIndex
  1026. case 2:
  1027. if wireType != 2 {
  1028. return fmt.Errorf("proto: wrong wireType = %d for field Challenge", wireType)
  1029. }
  1030. var stringLen uint64
  1031. for shift := uint(0); ; shift += 7 {
  1032. if shift >= 64 {
  1033. return ErrIntOverflowCaptcha
  1034. }
  1035. if iNdEx >= l {
  1036. return io.ErrUnexpectedEOF
  1037. }
  1038. b := dAtA[iNdEx]
  1039. iNdEx++
  1040. stringLen |= (uint64(b) & 0x7F) << shift
  1041. if b < 0x80 {
  1042. break
  1043. }
  1044. }
  1045. intStringLen := int(stringLen)
  1046. if intStringLen < 0 {
  1047. return ErrInvalidLengthCaptcha
  1048. }
  1049. postIndex := iNdEx + intStringLen
  1050. if postIndex > l {
  1051. return io.ErrUnexpectedEOF
  1052. }
  1053. m.Challenge = string(dAtA[iNdEx:postIndex])
  1054. iNdEx = postIndex
  1055. default:
  1056. iNdEx = preIndex
  1057. skippy, err := skipCaptcha(dAtA[iNdEx:])
  1058. if err != nil {
  1059. return err
  1060. }
  1061. if skippy < 0 {
  1062. return ErrInvalidLengthCaptcha
  1063. }
  1064. if (iNdEx + skippy) > l {
  1065. return io.ErrUnexpectedEOF
  1066. }
  1067. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1068. iNdEx += skippy
  1069. }
  1070. }
  1071. if iNdEx > l {
  1072. return io.ErrUnexpectedEOF
  1073. }
  1074. return nil
  1075. }
  1076. func (m *Image) Unmarshal(dAtA []byte) error {
  1077. l := len(dAtA)
  1078. iNdEx := 0
  1079. for iNdEx < l {
  1080. preIndex := iNdEx
  1081. var wire uint64
  1082. for shift := uint(0); ; shift += 7 {
  1083. if shift >= 64 {
  1084. return ErrIntOverflowCaptcha
  1085. }
  1086. if iNdEx >= l {
  1087. return io.ErrUnexpectedEOF
  1088. }
  1089. b := dAtA[iNdEx]
  1090. iNdEx++
  1091. wire |= (uint64(b) & 0x7F) << shift
  1092. if b < 0x80 {
  1093. break
  1094. }
  1095. }
  1096. fieldNum := int32(wire >> 3)
  1097. wireType := int(wire & 0x7)
  1098. if wireType == 4 {
  1099. return fmt.Errorf("proto: Image: wiretype end group for non-group")
  1100. }
  1101. if fieldNum <= 0 {
  1102. return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire)
  1103. }
  1104. switch fieldNum {
  1105. case 1:
  1106. if wireType != 2 {
  1107. return fmt.Errorf("proto: wrong wireType = %d for field Tips", wireType)
  1108. }
  1109. var stringLen uint64
  1110. for shift := uint(0); ; shift += 7 {
  1111. if shift >= 64 {
  1112. return ErrIntOverflowCaptcha
  1113. }
  1114. if iNdEx >= l {
  1115. return io.ErrUnexpectedEOF
  1116. }
  1117. b := dAtA[iNdEx]
  1118. iNdEx++
  1119. stringLen |= (uint64(b) & 0x7F) << shift
  1120. if b < 0x80 {
  1121. break
  1122. }
  1123. }
  1124. intStringLen := int(stringLen)
  1125. if intStringLen < 0 {
  1126. return ErrInvalidLengthCaptcha
  1127. }
  1128. postIndex := iNdEx + intStringLen
  1129. if postIndex > l {
  1130. return io.ErrUnexpectedEOF
  1131. }
  1132. m.Tips = string(dAtA[iNdEx:postIndex])
  1133. iNdEx = postIndex
  1134. case 2:
  1135. if wireType != 2 {
  1136. return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
  1137. }
  1138. var stringLen uint64
  1139. for shift := uint(0); ; shift += 7 {
  1140. if shift >= 64 {
  1141. return ErrIntOverflowCaptcha
  1142. }
  1143. if iNdEx >= l {
  1144. return io.ErrUnexpectedEOF
  1145. }
  1146. b := dAtA[iNdEx]
  1147. iNdEx++
  1148. stringLen |= (uint64(b) & 0x7F) << shift
  1149. if b < 0x80 {
  1150. break
  1151. }
  1152. }
  1153. intStringLen := int(stringLen)
  1154. if intStringLen < 0 {
  1155. return ErrInvalidLengthCaptcha
  1156. }
  1157. postIndex := iNdEx + intStringLen
  1158. if postIndex > l {
  1159. return io.ErrUnexpectedEOF
  1160. }
  1161. m.Token = string(dAtA[iNdEx:postIndex])
  1162. iNdEx = postIndex
  1163. case 3:
  1164. if wireType != 2 {
  1165. return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
  1166. }
  1167. var stringLen uint64
  1168. for shift := uint(0); ; shift += 7 {
  1169. if shift >= 64 {
  1170. return ErrIntOverflowCaptcha
  1171. }
  1172. if iNdEx >= l {
  1173. return io.ErrUnexpectedEOF
  1174. }
  1175. b := dAtA[iNdEx]
  1176. iNdEx++
  1177. stringLen |= (uint64(b) & 0x7F) << shift
  1178. if b < 0x80 {
  1179. break
  1180. }
  1181. }
  1182. intStringLen := int(stringLen)
  1183. if intStringLen < 0 {
  1184. return ErrInvalidLengthCaptcha
  1185. }
  1186. postIndex := iNdEx + intStringLen
  1187. if postIndex > l {
  1188. return io.ErrUnexpectedEOF
  1189. }
  1190. m.Content = string(dAtA[iNdEx:postIndex])
  1191. iNdEx = postIndex
  1192. default:
  1193. iNdEx = preIndex
  1194. skippy, err := skipCaptcha(dAtA[iNdEx:])
  1195. if err != nil {
  1196. return err
  1197. }
  1198. if skippy < 0 {
  1199. return ErrInvalidLengthCaptcha
  1200. }
  1201. if (iNdEx + skippy) > l {
  1202. return io.ErrUnexpectedEOF
  1203. }
  1204. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1205. iNdEx += skippy
  1206. }
  1207. }
  1208. if iNdEx > l {
  1209. return io.ErrUnexpectedEOF
  1210. }
  1211. return nil
  1212. }
  1213. func (m *VerifyReq) Unmarshal(dAtA []byte) error {
  1214. l := len(dAtA)
  1215. iNdEx := 0
  1216. for iNdEx < l {
  1217. preIndex := iNdEx
  1218. var wire uint64
  1219. for shift := uint(0); ; shift += 7 {
  1220. if shift >= 64 {
  1221. return ErrIntOverflowCaptcha
  1222. }
  1223. if iNdEx >= l {
  1224. return io.ErrUnexpectedEOF
  1225. }
  1226. b := dAtA[iNdEx]
  1227. iNdEx++
  1228. wire |= (uint64(b) & 0x7F) << shift
  1229. if b < 0x80 {
  1230. break
  1231. }
  1232. }
  1233. fieldNum := int32(wire >> 3)
  1234. wireType := int(wire & 0x7)
  1235. if wireType == 4 {
  1236. return fmt.Errorf("proto: VerifyReq: wiretype end group for non-group")
  1237. }
  1238. if fieldNum <= 0 {
  1239. return fmt.Errorf("proto: VerifyReq: illegal tag %d (wire type %d)", fieldNum, wire)
  1240. }
  1241. switch fieldNum {
  1242. case 1:
  1243. if wireType != 2 {
  1244. return fmt.Errorf("proto: wrong wireType = %d for field Anti", wireType)
  1245. }
  1246. var stringLen uint64
  1247. for shift := uint(0); ; shift += 7 {
  1248. if shift >= 64 {
  1249. return ErrIntOverflowCaptcha
  1250. }
  1251. if iNdEx >= l {
  1252. return io.ErrUnexpectedEOF
  1253. }
  1254. b := dAtA[iNdEx]
  1255. iNdEx++
  1256. stringLen |= (uint64(b) & 0x7F) << shift
  1257. if b < 0x80 {
  1258. break
  1259. }
  1260. }
  1261. intStringLen := int(stringLen)
  1262. if intStringLen < 0 {
  1263. return ErrInvalidLengthCaptcha
  1264. }
  1265. postIndex := iNdEx + intStringLen
  1266. if postIndex > l {
  1267. return io.ErrUnexpectedEOF
  1268. }
  1269. m.Anti = string(dAtA[iNdEx:postIndex])
  1270. iNdEx = postIndex
  1271. default:
  1272. iNdEx = preIndex
  1273. skippy, err := skipCaptcha(dAtA[iNdEx:])
  1274. if err != nil {
  1275. return err
  1276. }
  1277. if skippy < 0 {
  1278. return ErrInvalidLengthCaptcha
  1279. }
  1280. if (iNdEx + skippy) > l {
  1281. return io.ErrUnexpectedEOF
  1282. }
  1283. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1284. iNdEx += skippy
  1285. }
  1286. }
  1287. if iNdEx > l {
  1288. return io.ErrUnexpectedEOF
  1289. }
  1290. return nil
  1291. }
  1292. func (m *VerifyResp) Unmarshal(dAtA []byte) error {
  1293. l := len(dAtA)
  1294. iNdEx := 0
  1295. for iNdEx < l {
  1296. preIndex := iNdEx
  1297. var wire uint64
  1298. for shift := uint(0); ; shift += 7 {
  1299. if shift >= 64 {
  1300. return ErrIntOverflowCaptcha
  1301. }
  1302. if iNdEx >= l {
  1303. return io.ErrUnexpectedEOF
  1304. }
  1305. b := dAtA[iNdEx]
  1306. iNdEx++
  1307. wire |= (uint64(b) & 0x7F) << shift
  1308. if b < 0x80 {
  1309. break
  1310. }
  1311. }
  1312. fieldNum := int32(wire >> 3)
  1313. wireType := int(wire & 0x7)
  1314. if wireType == 4 {
  1315. return fmt.Errorf("proto: VerifyResp: wiretype end group for non-group")
  1316. }
  1317. if fieldNum <= 0 {
  1318. return fmt.Errorf("proto: VerifyResp: illegal tag %d (wire type %d)", fieldNum, wire)
  1319. }
  1320. switch fieldNum {
  1321. case 1:
  1322. if wireType != 0 {
  1323. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1324. }
  1325. m.Type = 0
  1326. for shift := uint(0); ; shift += 7 {
  1327. if shift >= 64 {
  1328. return ErrIntOverflowCaptcha
  1329. }
  1330. if iNdEx >= l {
  1331. return io.ErrUnexpectedEOF
  1332. }
  1333. b := dAtA[iNdEx]
  1334. iNdEx++
  1335. m.Type |= (int64(b) & 0x7F) << shift
  1336. if b < 0x80 {
  1337. break
  1338. }
  1339. }
  1340. case 2:
  1341. if wireType != 2 {
  1342. return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
  1343. }
  1344. var stringLen uint64
  1345. for shift := uint(0); ; shift += 7 {
  1346. if shift >= 64 {
  1347. return ErrIntOverflowCaptcha
  1348. }
  1349. if iNdEx >= l {
  1350. return io.ErrUnexpectedEOF
  1351. }
  1352. b := dAtA[iNdEx]
  1353. iNdEx++
  1354. stringLen |= (uint64(b) & 0x7F) << shift
  1355. if b < 0x80 {
  1356. break
  1357. }
  1358. }
  1359. intStringLen := int(stringLen)
  1360. if intStringLen < 0 {
  1361. return ErrInvalidLengthCaptcha
  1362. }
  1363. postIndex := iNdEx + intStringLen
  1364. if postIndex > l {
  1365. return io.ErrUnexpectedEOF
  1366. }
  1367. m.Token = string(dAtA[iNdEx:postIndex])
  1368. iNdEx = postIndex
  1369. default:
  1370. iNdEx = preIndex
  1371. skippy, err := skipCaptcha(dAtA[iNdEx:])
  1372. if err != nil {
  1373. return err
  1374. }
  1375. if skippy < 0 {
  1376. return ErrInvalidLengthCaptcha
  1377. }
  1378. if (iNdEx + skippy) > l {
  1379. return io.ErrUnexpectedEOF
  1380. }
  1381. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1382. iNdEx += skippy
  1383. }
  1384. }
  1385. if iNdEx > l {
  1386. return io.ErrUnexpectedEOF
  1387. }
  1388. return nil
  1389. }
  1390. func skipCaptcha(dAtA []byte) (n int, err error) {
  1391. l := len(dAtA)
  1392. iNdEx := 0
  1393. for iNdEx < l {
  1394. var wire uint64
  1395. for shift := uint(0); ; shift += 7 {
  1396. if shift >= 64 {
  1397. return 0, ErrIntOverflowCaptcha
  1398. }
  1399. if iNdEx >= l {
  1400. return 0, io.ErrUnexpectedEOF
  1401. }
  1402. b := dAtA[iNdEx]
  1403. iNdEx++
  1404. wire |= (uint64(b) & 0x7F) << shift
  1405. if b < 0x80 {
  1406. break
  1407. }
  1408. }
  1409. wireType := int(wire & 0x7)
  1410. switch wireType {
  1411. case 0:
  1412. for shift := uint(0); ; shift += 7 {
  1413. if shift >= 64 {
  1414. return 0, ErrIntOverflowCaptcha
  1415. }
  1416. if iNdEx >= l {
  1417. return 0, io.ErrUnexpectedEOF
  1418. }
  1419. iNdEx++
  1420. if dAtA[iNdEx-1] < 0x80 {
  1421. break
  1422. }
  1423. }
  1424. return iNdEx, nil
  1425. case 1:
  1426. iNdEx += 8
  1427. return iNdEx, nil
  1428. case 2:
  1429. var length int
  1430. for shift := uint(0); ; shift += 7 {
  1431. if shift >= 64 {
  1432. return 0, ErrIntOverflowCaptcha
  1433. }
  1434. if iNdEx >= l {
  1435. return 0, io.ErrUnexpectedEOF
  1436. }
  1437. b := dAtA[iNdEx]
  1438. iNdEx++
  1439. length |= (int(b) & 0x7F) << shift
  1440. if b < 0x80 {
  1441. break
  1442. }
  1443. }
  1444. iNdEx += length
  1445. if length < 0 {
  1446. return 0, ErrInvalidLengthCaptcha
  1447. }
  1448. return iNdEx, nil
  1449. case 3:
  1450. for {
  1451. var innerWire uint64
  1452. var start int = iNdEx
  1453. for shift := uint(0); ; shift += 7 {
  1454. if shift >= 64 {
  1455. return 0, ErrIntOverflowCaptcha
  1456. }
  1457. if iNdEx >= l {
  1458. return 0, io.ErrUnexpectedEOF
  1459. }
  1460. b := dAtA[iNdEx]
  1461. iNdEx++
  1462. innerWire |= (uint64(b) & 0x7F) << shift
  1463. if b < 0x80 {
  1464. break
  1465. }
  1466. }
  1467. innerWireType := int(innerWire & 0x7)
  1468. if innerWireType == 4 {
  1469. break
  1470. }
  1471. next, err := skipCaptcha(dAtA[start:])
  1472. if err != nil {
  1473. return 0, err
  1474. }
  1475. iNdEx = start + next
  1476. }
  1477. return iNdEx, nil
  1478. case 4:
  1479. return iNdEx, nil
  1480. case 5:
  1481. iNdEx += 4
  1482. return iNdEx, nil
  1483. default:
  1484. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1485. }
  1486. }
  1487. panic("unreachable")
  1488. }
  1489. var (
  1490. ErrInvalidLengthCaptcha = fmt.Errorf("proto: negative length found during unmarshaling")
  1491. ErrIntOverflowCaptcha = fmt.Errorf("proto: integer overflow")
  1492. )
  1493. func init() { proto.RegisterFile("api/http/v1/captcha.proto", fileDescriptor_captcha_835409ee8e660cbd) }
  1494. var fileDescriptor_captcha_835409ee8e660cbd = []byte{
  1495. // 512 bytes of a gzipped FileDescriptorProto
  1496. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xc1, 0x6e, 0xd3, 0x40,
  1497. 0x10, 0x95, 0xd3, 0x26, 0xc1, 0x13, 0xaa, 0xa6, 0x7b, 0x88, 0x42, 0x40, 0xd9, 0xb2, 0x08, 0x54,
  1498. 0x84, 0x70, 0x48, 0x38, 0x54, 0xe2, 0x82, 0x70, 0x0f, 0x08, 0x21, 0x81, 0xb4, 0xaa, 0x38, 0x70,
  1499. 0x41, 0x8e, 0xd9, 0xac, 0x57, 0x24, 0xde, 0x25, 0xde, 0xa6, 0xea, 0xc7, 0xf0, 0x05, 0x7c, 0x06,
  1500. 0x17, 0x8e, 0x7c, 0x81, 0x85, 0x72, 0xf4, 0x31, 0x5f, 0x80, 0x32, 0x6b, 0xd3, 0x92, 0x08, 0xe5,
  1501. 0xe2, 0x9d, 0x79, 0xf3, 0x66, 0x76, 0xde, 0xce, 0x18, 0xee, 0x44, 0x46, 0x0d, 0x12, 0x6b, 0xcd,
  1502. 0x60, 0x31, 0x1c, 0xc4, 0x91, 0xb1, 0x71, 0x12, 0x05, 0x66, 0xae, 0xad, 0x26, 0x87, 0x53, 0xb5,
  1503. 0x10, 0xc1, 0xa5, 0x18, 0xcf, 0xb5, 0x9e, 0x05, 0x8b, 0x61, 0xef, 0xa9, 0x54, 0x36, 0xb9, 0x18,
  1504. 0x07, 0xb1, 0x9e, 0x0d, 0xa4, 0x96, 0x7a, 0x80, 0xbc, 0xf1, 0xc5, 0x04, 0x3d, 0x74, 0xd0, 0x72,
  1505. 0xf9, 0xec, 0x87, 0x07, 0xed, 0xb3, 0xb9, 0x88, 0xac, 0x38, 0x73, 0x75, 0xb9, 0xf8, 0x4a, 0x1e,
  1506. 0xc0, 0xbe, 0xbd, 0x32, 0xa2, 0xeb, 0x1d, 0x7b, 0x27, 0x7b, 0xe1, 0xe1, 0x2a, 0xa7, 0xad, 0x89,
  1507. 0x9e, 0xcf, 0x5e, 0xb0, 0x35, 0xca, 0x38, 0x06, 0xc9, 0x29, 0xb4, 0xe2, 0xa9, 0x12, 0xa9, 0xfd,
  1508. 0x84, 0xdc, 0xda, 0xb1, 0x77, 0xe2, 0x87, 0x9d, 0x55, 0x4e, 0x89, 0xe3, 0xde, 0x08, 0x32, 0x0e,
  1509. 0xce, 0x3b, 0x5f, 0x27, 0x3e, 0x86, 0x46, 0x22, 0x94, 0x4c, 0x6c, 0x77, 0x0f, 0xeb, 0x1f, 0xad,
  1510. 0x72, 0x7a, 0xe0, 0x72, 0x1c, 0xce, 0x78, 0x49, 0x20, 0x8f, 0xa0, 0x7e, 0xa9, 0x3e, 0xdb, 0xa4,
  1511. 0xbb, 0x8f, 0xcc, 0xf6, 0x2a, 0xa7, 0xb7, 0x1d, 0x13, 0x61, 0xc6, 0x5d, 0x98, 0x7d, 0xf7, 0xe0,
  1512. 0x68, 0x43, 0x45, 0x66, 0xc8, 0xbd, 0x7f, 0x64, 0xdc, 0x2a, 0x72, 0x8a, 0x7e, 0xd9, 0xff, 0x4b,
  1513. 0x68, 0x4a, 0x21, 0xac, 0xc8, 0x2c, 0xf6, 0xde, 0x1a, 0x75, 0x83, 0x8d, 0xb7, 0x0c, 0x5e, 0x0b,
  1514. 0x71, 0x2e, 0x32, 0x1b, 0xb6, 0x8a, 0x9c, 0x56, 0x64, 0x5e, 0x19, 0xe4, 0x14, 0xea, 0x6a, 0x16,
  1515. 0x49, 0x81, 0x32, 0x5a, 0xa3, 0xce, 0x56, 0xfa, 0x9b, 0x75, 0x34, 0xf4, 0x8b, 0x9c, 0x3a, 0x22,
  1516. 0x77, 0x07, 0x7b, 0x07, 0xcd, 0xb2, 0x32, 0xe9, 0x40, 0x4d, 0x5a, 0x6c, 0xd0, 0x0f, 0x1b, 0x45,
  1517. 0x4e, 0x6b, 0xd2, 0xf2, 0x9a, 0xb4, 0xe4, 0x09, 0xf8, 0x71, 0x12, 0x4d, 0xa7, 0x22, 0x95, 0xd5,
  1518. 0xd3, 0x1e, 0x14, 0x39, 0xbd, 0x06, 0xf9, 0xb5, 0xc9, 0x66, 0x50, 0xc7, 0xab, 0x50, 0xb0, 0x32,
  1519. 0x59, 0x59, 0xcf, 0x09, 0x56, 0x26, 0xe3, 0xf8, 0x25, 0x14, 0xea, 0x56, 0x7f, 0x11, 0x69, 0x59,
  1520. 0x0f, 0xfb, 0x42, 0x80, 0xbb, 0x83, 0x3c, 0x84, 0x66, 0xac, 0x53, 0x2b, 0x52, 0x37, 0x19, 0xdf,
  1521. 0xe9, 0x2e, 0x21, 0x5e, 0x19, 0xec, 0x19, 0xf8, 0x1f, 0xc4, 0x5c, 0x4d, 0xae, 0xca, 0x55, 0x89,
  1522. 0x52, 0xab, 0xca, 0x2b, 0x6f, 0xac, 0xca, 0x1a, 0x65, 0x1c, 0x83, 0xec, 0x2d, 0x40, 0x95, 0xb1,
  1523. 0x73, 0x2c, 0xbb, 0xba, 0x1c, 0x7d, 0xf3, 0xa0, 0x59, 0x4e, 0x99, 0xbc, 0x87, 0x46, 0x8c, 0x63,
  1524. 0x27, 0xf7, 0xb7, 0x5e, 0x7f, 0x73, 0xab, 0x7b, 0x6c, 0x17, 0x25, 0x33, 0xe4, 0x15, 0x34, 0x16,
  1525. 0xd8, 0x29, 0xe9, 0x6d, 0xb1, 0xff, 0x8a, 0xee, 0xdd, 0xfd, 0x6f, 0x2c, 0x33, 0x61, 0xfb, 0xe7,
  1526. 0xb2, 0xef, 0xfd, 0x5a, 0xf6, 0xbd, 0xdf, 0xcb, 0xbe, 0xf7, 0xb1, 0xb6, 0x18, 0x8e, 0x1b, 0xf8,
  1527. 0xab, 0x3d, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x54, 0x0d, 0xac, 0xc7, 0x03, 0x00, 0x00,
  1528. }