api.pb.go 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: app/service/main/passport-sns/api/api.proto
  3. /*
  4. Package api is a generated protocol buffer package.
  5. It is generated from these files:
  6. app/service/main/passport-sns/api/api.proto
  7. It has these top-level messages:
  8. EmptyReply
  9. Info
  10. GetAuthorizeURLReq
  11. GetAuthorizeURLReply
  12. BindReq
  13. UnbindReq
  14. GetInfoReq
  15. GetInfoReply
  16. GetInfoByCodeReq
  17. GetInfoByCodeReply
  18. UpdateInfoReq
  19. */
  20. package api
  21. import proto "github.com/gogo/protobuf/proto"
  22. import fmt "fmt"
  23. import math "math"
  24. import _ "google.golang.org/genproto/googleapis/api/annotations"
  25. import _ "github.com/gogo/protobuf/gogoproto"
  26. import context "golang.org/x/net/context"
  27. import grpc "google.golang.org/grpc"
  28. import io "io"
  29. // Reference imports to suppress errors if they are not otherwise used.
  30. var _ = proto.Marshal
  31. var _ = fmt.Errorf
  32. var _ = math.Inf
  33. // This is a compile-time assertion to ensure that this generated file
  34. // is compatible with the proto package it is being compiled against.
  35. // A compilation error at this line likely means your copy of the
  36. // proto package needs to be updated.
  37. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  38. type EmptyReply struct {
  39. }
  40. func (m *EmptyReply) Reset() { *m = EmptyReply{} }
  41. func (m *EmptyReply) String() string { return proto.CompactTextString(m) }
  42. func (*EmptyReply) ProtoMessage() {}
  43. func (*EmptyReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
  44. type Info struct {
  45. Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid"`
  46. Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform"`
  47. UnionId string `protobuf:"bytes,3,opt,name=union_id,json=unionId,proto3" json:"unionid"`
  48. Expires int64 `protobuf:"varint,4,opt,name=expires,proto3" json:"expires"`
  49. }
  50. func (m *Info) Reset() { *m = Info{} }
  51. func (m *Info) String() string { return proto.CompactTextString(m) }
  52. func (*Info) ProtoMessage() {}
  53. func (*Info) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
  54. func (m *Info) GetMid() int64 {
  55. if m != nil {
  56. return m.Mid
  57. }
  58. return 0
  59. }
  60. func (m *Info) GetPlatform() string {
  61. if m != nil {
  62. return m.Platform
  63. }
  64. return ""
  65. }
  66. func (m *Info) GetUnionId() string {
  67. if m != nil {
  68. return m.UnionId
  69. }
  70. return ""
  71. }
  72. func (m *Info) GetExpires() int64 {
  73. if m != nil {
  74. return m.Expires
  75. }
  76. return 0
  77. }
  78. type GetAuthorizeURLReq struct {
  79. AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid" validate:"required"`
  80. Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
  81. RedirectUrl string `protobuf:"bytes,3,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty" form:"redirect_url" validate:"required"`
  82. Display string `protobuf:"bytes,4,opt,name=display,proto3" json:"display,omitempty" form:"display"`
  83. }
  84. func (m *GetAuthorizeURLReq) Reset() { *m = GetAuthorizeURLReq{} }
  85. func (m *GetAuthorizeURLReq) String() string { return proto.CompactTextString(m) }
  86. func (*GetAuthorizeURLReq) ProtoMessage() {}
  87. func (*GetAuthorizeURLReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
  88. func (m *GetAuthorizeURLReq) GetAppId() string {
  89. if m != nil {
  90. return m.AppId
  91. }
  92. return ""
  93. }
  94. func (m *GetAuthorizeURLReq) GetPlatform() string {
  95. if m != nil {
  96. return m.Platform
  97. }
  98. return ""
  99. }
  100. func (m *GetAuthorizeURLReq) GetRedirectUrl() string {
  101. if m != nil {
  102. return m.RedirectUrl
  103. }
  104. return ""
  105. }
  106. func (m *GetAuthorizeURLReq) GetDisplay() string {
  107. if m != nil {
  108. return m.Display
  109. }
  110. return ""
  111. }
  112. type GetAuthorizeURLReply struct {
  113. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
  114. }
  115. func (m *GetAuthorizeURLReply) Reset() { *m = GetAuthorizeURLReply{} }
  116. func (m *GetAuthorizeURLReply) String() string { return proto.CompactTextString(m) }
  117. func (*GetAuthorizeURLReply) ProtoMessage() {}
  118. func (*GetAuthorizeURLReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} }
  119. func (m *GetAuthorizeURLReply) GetUrl() string {
  120. if m != nil {
  121. return m.Url
  122. }
  123. return ""
  124. }
  125. type BindReq struct {
  126. Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
  127. Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty" form:"code" validate:"required"`
  128. AppId string `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid" validate:"required"`
  129. Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
  130. RedirectUrl string `protobuf:"bytes,5,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty" form:"redirect_url" validate:"required"`
  131. }
  132. func (m *BindReq) Reset() { *m = BindReq{} }
  133. func (m *BindReq) String() string { return proto.CompactTextString(m) }
  134. func (*BindReq) ProtoMessage() {}
  135. func (*BindReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{4} }
  136. func (m *BindReq) GetMid() int64 {
  137. if m != nil {
  138. return m.Mid
  139. }
  140. return 0
  141. }
  142. func (m *BindReq) GetCode() string {
  143. if m != nil {
  144. return m.Code
  145. }
  146. return ""
  147. }
  148. func (m *BindReq) GetAppId() string {
  149. if m != nil {
  150. return m.AppId
  151. }
  152. return ""
  153. }
  154. func (m *BindReq) GetPlatform() string {
  155. if m != nil {
  156. return m.Platform
  157. }
  158. return ""
  159. }
  160. func (m *BindReq) GetRedirectUrl() string {
  161. if m != nil {
  162. return m.RedirectUrl
  163. }
  164. return ""
  165. }
  166. type UnbindReq struct {
  167. Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
  168. AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid"`
  169. Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
  170. }
  171. func (m *UnbindReq) Reset() { *m = UnbindReq{} }
  172. func (m *UnbindReq) String() string { return proto.CompactTextString(m) }
  173. func (*UnbindReq) ProtoMessage() {}
  174. func (*UnbindReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{5} }
  175. func (m *UnbindReq) GetMid() int64 {
  176. if m != nil {
  177. return m.Mid
  178. }
  179. return 0
  180. }
  181. func (m *UnbindReq) GetAppId() string {
  182. if m != nil {
  183. return m.AppId
  184. }
  185. return ""
  186. }
  187. func (m *UnbindReq) GetPlatform() string {
  188. if m != nil {
  189. return m.Platform
  190. }
  191. return ""
  192. }
  193. type GetInfoReq struct {
  194. Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
  195. }
  196. func (m *GetInfoReq) Reset() { *m = GetInfoReq{} }
  197. func (m *GetInfoReq) String() string { return proto.CompactTextString(m) }
  198. func (*GetInfoReq) ProtoMessage() {}
  199. func (*GetInfoReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} }
  200. func (m *GetInfoReq) GetMid() int64 {
  201. if m != nil {
  202. return m.Mid
  203. }
  204. return 0
  205. }
  206. type GetInfoReply struct {
  207. Infos []*Info `protobuf:"bytes,1,rep,name=infos" json:"infos"`
  208. }
  209. func (m *GetInfoReply) Reset() { *m = GetInfoReply{} }
  210. func (m *GetInfoReply) String() string { return proto.CompactTextString(m) }
  211. func (*GetInfoReply) ProtoMessage() {}
  212. func (*GetInfoReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} }
  213. func (m *GetInfoReply) GetInfos() []*Info {
  214. if m != nil {
  215. return m.Infos
  216. }
  217. return nil
  218. }
  219. type GetInfoByCodeReq struct {
  220. Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty" form:"code" validate:"required"`
  221. AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid" validate:"required"`
  222. Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
  223. RedirectUrl string `protobuf:"bytes,4,opt,name=redirect_url,json=redirectUrl,proto3" json:"redirect_url,omitempty" form:"redirect_url" validate:"required"`
  224. }
  225. func (m *GetInfoByCodeReq) Reset() { *m = GetInfoByCodeReq{} }
  226. func (m *GetInfoByCodeReq) String() string { return proto.CompactTextString(m) }
  227. func (*GetInfoByCodeReq) ProtoMessage() {}
  228. func (*GetInfoByCodeReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{8} }
  229. func (m *GetInfoByCodeReq) GetCode() string {
  230. if m != nil {
  231. return m.Code
  232. }
  233. return ""
  234. }
  235. func (m *GetInfoByCodeReq) GetAppId() string {
  236. if m != nil {
  237. return m.AppId
  238. }
  239. return ""
  240. }
  241. func (m *GetInfoByCodeReq) GetPlatform() string {
  242. if m != nil {
  243. return m.Platform
  244. }
  245. return ""
  246. }
  247. func (m *GetInfoByCodeReq) GetRedirectUrl() string {
  248. if m != nil {
  249. return m.RedirectUrl
  250. }
  251. return ""
  252. }
  253. type GetInfoByCodeReply struct {
  254. Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid"`
  255. UnionId string `protobuf:"bytes,2,opt,name=union_id,json=unionId,proto3" json:"unionid"`
  256. OpenId string `protobuf:"bytes,3,opt,name=open_id,json=openId,proto3" json:"openid"`
  257. Expires int64 `protobuf:"varint,4,opt,name=expires,proto3" json:"expires"`
  258. Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token"`
  259. }
  260. func (m *GetInfoByCodeReply) Reset() { *m = GetInfoByCodeReply{} }
  261. func (m *GetInfoByCodeReply) String() string { return proto.CompactTextString(m) }
  262. func (*GetInfoByCodeReply) ProtoMessage() {}
  263. func (*GetInfoByCodeReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{9} }
  264. func (m *GetInfoByCodeReply) GetMid() int64 {
  265. if m != nil {
  266. return m.Mid
  267. }
  268. return 0
  269. }
  270. func (m *GetInfoByCodeReply) GetUnionId() string {
  271. if m != nil {
  272. return m.UnionId
  273. }
  274. return ""
  275. }
  276. func (m *GetInfoByCodeReply) GetOpenId() string {
  277. if m != nil {
  278. return m.OpenId
  279. }
  280. return ""
  281. }
  282. func (m *GetInfoByCodeReply) GetExpires() int64 {
  283. if m != nil {
  284. return m.Expires
  285. }
  286. return 0
  287. }
  288. func (m *GetInfoByCodeReply) GetToken() string {
  289. if m != nil {
  290. return m.Token
  291. }
  292. return ""
  293. }
  294. type UpdateInfoReq struct {
  295. Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
  296. AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid" validate:"required"`
  297. Mid int64 `protobuf:"varint,3,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
  298. OpenId string `protobuf:"bytes,4,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty" form:"openid" validate:"required"`
  299. }
  300. func (m *UpdateInfoReq) Reset() { *m = UpdateInfoReq{} }
  301. func (m *UpdateInfoReq) String() string { return proto.CompactTextString(m) }
  302. func (*UpdateInfoReq) ProtoMessage() {}
  303. func (*UpdateInfoReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{10} }
  304. func (m *UpdateInfoReq) GetPlatform() string {
  305. if m != nil {
  306. return m.Platform
  307. }
  308. return ""
  309. }
  310. func (m *UpdateInfoReq) GetAppId() string {
  311. if m != nil {
  312. return m.AppId
  313. }
  314. return ""
  315. }
  316. func (m *UpdateInfoReq) GetMid() int64 {
  317. if m != nil {
  318. return m.Mid
  319. }
  320. return 0
  321. }
  322. func (m *UpdateInfoReq) GetOpenId() string {
  323. if m != nil {
  324. return m.OpenId
  325. }
  326. return ""
  327. }
  328. func init() {
  329. proto.RegisterType((*EmptyReply)(nil), "passport.service.sns.EmptyReply")
  330. proto.RegisterType((*Info)(nil), "passport.service.sns.Info")
  331. proto.RegisterType((*GetAuthorizeURLReq)(nil), "passport.service.sns.GetAuthorizeURLReq")
  332. proto.RegisterType((*GetAuthorizeURLReply)(nil), "passport.service.sns.GetAuthorizeURLReply")
  333. proto.RegisterType((*BindReq)(nil), "passport.service.sns.BindReq")
  334. proto.RegisterType((*UnbindReq)(nil), "passport.service.sns.UnbindReq")
  335. proto.RegisterType((*GetInfoReq)(nil), "passport.service.sns.GetInfoReq")
  336. proto.RegisterType((*GetInfoReply)(nil), "passport.service.sns.GetInfoReply")
  337. proto.RegisterType((*GetInfoByCodeReq)(nil), "passport.service.sns.GetInfoByCodeReq")
  338. proto.RegisterType((*GetInfoByCodeReply)(nil), "passport.service.sns.GetInfoByCodeReply")
  339. proto.RegisterType((*UpdateInfoReq)(nil), "passport.service.sns.UpdateInfoReq")
  340. }
  341. // Reference imports to suppress errors if they are not otherwise used.
  342. var _ context.Context
  343. var _ grpc.ClientConn
  344. // This is a compile-time assertion to ensure that this generated file
  345. // is compatible with the grpc package it is being compiled against.
  346. const _ = grpc.SupportPackageIsVersion4
  347. // Client API for PassportSNS service
  348. type PassportSNSClient interface {
  349. // GetAuthorizeURL get authorize url
  350. GetAuthorizeURL(ctx context.Context, in *GetAuthorizeURLReq, opts ...grpc.CallOption) (*GetAuthorizeURLReply, error)
  351. // Bind bind sns account
  352. Bind(ctx context.Context, in *BindReq, opts ...grpc.CallOption) (*EmptyReply, error)
  353. // Unbind unbind sns account
  354. Unbind(ctx context.Context, in *UnbindReq, opts ...grpc.CallOption) (*EmptyReply, error)
  355. // GetInfo get info by mid
  356. GetInfo(ctx context.Context, in *GetInfoReq, opts ...grpc.CallOption) (*GetInfoReply, error)
  357. // GetInfoByCode get info by authorize code
  358. GetInfoByCode(ctx context.Context, in *GetInfoByCodeReq, opts ...grpc.CallOption) (*GetInfoByCodeReply, error)
  359. // UpdateInfo update info
  360. UpdateInfo(ctx context.Context, in *UpdateInfoReq, opts ...grpc.CallOption) (*EmptyReply, error)
  361. }
  362. type passportSNSClient struct {
  363. cc *grpc.ClientConn
  364. }
  365. func NewPassportSNSClient(cc *grpc.ClientConn) PassportSNSClient {
  366. return &passportSNSClient{cc}
  367. }
  368. func (c *passportSNSClient) GetAuthorizeURL(ctx context.Context, in *GetAuthorizeURLReq, opts ...grpc.CallOption) (*GetAuthorizeURLReply, error) {
  369. out := new(GetAuthorizeURLReply)
  370. err := grpc.Invoke(ctx, "/passport.service.sns.PassportSNS/GetAuthorizeURL", in, out, c.cc, opts...)
  371. if err != nil {
  372. return nil, err
  373. }
  374. return out, nil
  375. }
  376. func (c *passportSNSClient) Bind(ctx context.Context, in *BindReq, opts ...grpc.CallOption) (*EmptyReply, error) {
  377. out := new(EmptyReply)
  378. err := grpc.Invoke(ctx, "/passport.service.sns.PassportSNS/Bind", in, out, c.cc, opts...)
  379. if err != nil {
  380. return nil, err
  381. }
  382. return out, nil
  383. }
  384. func (c *passportSNSClient) Unbind(ctx context.Context, in *UnbindReq, opts ...grpc.CallOption) (*EmptyReply, error) {
  385. out := new(EmptyReply)
  386. err := grpc.Invoke(ctx, "/passport.service.sns.PassportSNS/Unbind", in, out, c.cc, opts...)
  387. if err != nil {
  388. return nil, err
  389. }
  390. return out, nil
  391. }
  392. func (c *passportSNSClient) GetInfo(ctx context.Context, in *GetInfoReq, opts ...grpc.CallOption) (*GetInfoReply, error) {
  393. out := new(GetInfoReply)
  394. err := grpc.Invoke(ctx, "/passport.service.sns.PassportSNS/GetInfo", in, out, c.cc, opts...)
  395. if err != nil {
  396. return nil, err
  397. }
  398. return out, nil
  399. }
  400. func (c *passportSNSClient) GetInfoByCode(ctx context.Context, in *GetInfoByCodeReq, opts ...grpc.CallOption) (*GetInfoByCodeReply, error) {
  401. out := new(GetInfoByCodeReply)
  402. err := grpc.Invoke(ctx, "/passport.service.sns.PassportSNS/GetInfoByCode", in, out, c.cc, opts...)
  403. if err != nil {
  404. return nil, err
  405. }
  406. return out, nil
  407. }
  408. func (c *passportSNSClient) UpdateInfo(ctx context.Context, in *UpdateInfoReq, opts ...grpc.CallOption) (*EmptyReply, error) {
  409. out := new(EmptyReply)
  410. err := grpc.Invoke(ctx, "/passport.service.sns.PassportSNS/UpdateInfo", in, out, c.cc, opts...)
  411. if err != nil {
  412. return nil, err
  413. }
  414. return out, nil
  415. }
  416. // Server API for PassportSNS service
  417. type PassportSNSServer interface {
  418. // GetAuthorizeURL get authorize url
  419. GetAuthorizeURL(context.Context, *GetAuthorizeURLReq) (*GetAuthorizeURLReply, error)
  420. // Bind bind sns account
  421. Bind(context.Context, *BindReq) (*EmptyReply, error)
  422. // Unbind unbind sns account
  423. Unbind(context.Context, *UnbindReq) (*EmptyReply, error)
  424. // GetInfo get info by mid
  425. GetInfo(context.Context, *GetInfoReq) (*GetInfoReply, error)
  426. // GetInfoByCode get info by authorize code
  427. GetInfoByCode(context.Context, *GetInfoByCodeReq) (*GetInfoByCodeReply, error)
  428. // UpdateInfo update info
  429. UpdateInfo(context.Context, *UpdateInfoReq) (*EmptyReply, error)
  430. }
  431. func RegisterPassportSNSServer(s *grpc.Server, srv PassportSNSServer) {
  432. s.RegisterService(&_PassportSNS_serviceDesc, srv)
  433. }
  434. func _PassportSNS_GetAuthorizeURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  435. in := new(GetAuthorizeURLReq)
  436. if err := dec(in); err != nil {
  437. return nil, err
  438. }
  439. if interceptor == nil {
  440. return srv.(PassportSNSServer).GetAuthorizeURL(ctx, in)
  441. }
  442. info := &grpc.UnaryServerInfo{
  443. Server: srv,
  444. FullMethod: "/passport.service.sns.PassportSNS/GetAuthorizeURL",
  445. }
  446. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  447. return srv.(PassportSNSServer).GetAuthorizeURL(ctx, req.(*GetAuthorizeURLReq))
  448. }
  449. return interceptor(ctx, in, info, handler)
  450. }
  451. func _PassportSNS_Bind_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  452. in := new(BindReq)
  453. if err := dec(in); err != nil {
  454. return nil, err
  455. }
  456. if interceptor == nil {
  457. return srv.(PassportSNSServer).Bind(ctx, in)
  458. }
  459. info := &grpc.UnaryServerInfo{
  460. Server: srv,
  461. FullMethod: "/passport.service.sns.PassportSNS/Bind",
  462. }
  463. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  464. return srv.(PassportSNSServer).Bind(ctx, req.(*BindReq))
  465. }
  466. return interceptor(ctx, in, info, handler)
  467. }
  468. func _PassportSNS_Unbind_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  469. in := new(UnbindReq)
  470. if err := dec(in); err != nil {
  471. return nil, err
  472. }
  473. if interceptor == nil {
  474. return srv.(PassportSNSServer).Unbind(ctx, in)
  475. }
  476. info := &grpc.UnaryServerInfo{
  477. Server: srv,
  478. FullMethod: "/passport.service.sns.PassportSNS/Unbind",
  479. }
  480. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  481. return srv.(PassportSNSServer).Unbind(ctx, req.(*UnbindReq))
  482. }
  483. return interceptor(ctx, in, info, handler)
  484. }
  485. func _PassportSNS_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  486. in := new(GetInfoReq)
  487. if err := dec(in); err != nil {
  488. return nil, err
  489. }
  490. if interceptor == nil {
  491. return srv.(PassportSNSServer).GetInfo(ctx, in)
  492. }
  493. info := &grpc.UnaryServerInfo{
  494. Server: srv,
  495. FullMethod: "/passport.service.sns.PassportSNS/GetInfo",
  496. }
  497. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  498. return srv.(PassportSNSServer).GetInfo(ctx, req.(*GetInfoReq))
  499. }
  500. return interceptor(ctx, in, info, handler)
  501. }
  502. func _PassportSNS_GetInfoByCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  503. in := new(GetInfoByCodeReq)
  504. if err := dec(in); err != nil {
  505. return nil, err
  506. }
  507. if interceptor == nil {
  508. return srv.(PassportSNSServer).GetInfoByCode(ctx, in)
  509. }
  510. info := &grpc.UnaryServerInfo{
  511. Server: srv,
  512. FullMethod: "/passport.service.sns.PassportSNS/GetInfoByCode",
  513. }
  514. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  515. return srv.(PassportSNSServer).GetInfoByCode(ctx, req.(*GetInfoByCodeReq))
  516. }
  517. return interceptor(ctx, in, info, handler)
  518. }
  519. func _PassportSNS_UpdateInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  520. in := new(UpdateInfoReq)
  521. if err := dec(in); err != nil {
  522. return nil, err
  523. }
  524. if interceptor == nil {
  525. return srv.(PassportSNSServer).UpdateInfo(ctx, in)
  526. }
  527. info := &grpc.UnaryServerInfo{
  528. Server: srv,
  529. FullMethod: "/passport.service.sns.PassportSNS/UpdateInfo",
  530. }
  531. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  532. return srv.(PassportSNSServer).UpdateInfo(ctx, req.(*UpdateInfoReq))
  533. }
  534. return interceptor(ctx, in, info, handler)
  535. }
  536. var _PassportSNS_serviceDesc = grpc.ServiceDesc{
  537. ServiceName: "passport.service.sns.PassportSNS",
  538. HandlerType: (*PassportSNSServer)(nil),
  539. Methods: []grpc.MethodDesc{
  540. {
  541. MethodName: "GetAuthorizeURL",
  542. Handler: _PassportSNS_GetAuthorizeURL_Handler,
  543. },
  544. {
  545. MethodName: "Bind",
  546. Handler: _PassportSNS_Bind_Handler,
  547. },
  548. {
  549. MethodName: "Unbind",
  550. Handler: _PassportSNS_Unbind_Handler,
  551. },
  552. {
  553. MethodName: "GetInfo",
  554. Handler: _PassportSNS_GetInfo_Handler,
  555. },
  556. {
  557. MethodName: "GetInfoByCode",
  558. Handler: _PassportSNS_GetInfoByCode_Handler,
  559. },
  560. {
  561. MethodName: "UpdateInfo",
  562. Handler: _PassportSNS_UpdateInfo_Handler,
  563. },
  564. },
  565. Streams: []grpc.StreamDesc{},
  566. Metadata: "app/service/main/passport-sns/api/api.proto",
  567. }
  568. func (m *EmptyReply) Marshal() (dAtA []byte, err error) {
  569. size := m.Size()
  570. dAtA = make([]byte, size)
  571. n, err := m.MarshalTo(dAtA)
  572. if err != nil {
  573. return nil, err
  574. }
  575. return dAtA[:n], nil
  576. }
  577. func (m *EmptyReply) MarshalTo(dAtA []byte) (int, error) {
  578. var i int
  579. _ = i
  580. var l int
  581. _ = l
  582. return i, nil
  583. }
  584. func (m *Info) Marshal() (dAtA []byte, err error) {
  585. size := m.Size()
  586. dAtA = make([]byte, size)
  587. n, err := m.MarshalTo(dAtA)
  588. if err != nil {
  589. return nil, err
  590. }
  591. return dAtA[:n], nil
  592. }
  593. func (m *Info) MarshalTo(dAtA []byte) (int, error) {
  594. var i int
  595. _ = i
  596. var l int
  597. _ = l
  598. if m.Mid != 0 {
  599. dAtA[i] = 0x8
  600. i++
  601. i = encodeVarintApi(dAtA, i, uint64(m.Mid))
  602. }
  603. if len(m.Platform) > 0 {
  604. dAtA[i] = 0x12
  605. i++
  606. i = encodeVarintApi(dAtA, i, uint64(len(m.Platform)))
  607. i += copy(dAtA[i:], m.Platform)
  608. }
  609. if len(m.UnionId) > 0 {
  610. dAtA[i] = 0x1a
  611. i++
  612. i = encodeVarintApi(dAtA, i, uint64(len(m.UnionId)))
  613. i += copy(dAtA[i:], m.UnionId)
  614. }
  615. if m.Expires != 0 {
  616. dAtA[i] = 0x20
  617. i++
  618. i = encodeVarintApi(dAtA, i, uint64(m.Expires))
  619. }
  620. return i, nil
  621. }
  622. func (m *GetAuthorizeURLReq) Marshal() (dAtA []byte, err error) {
  623. size := m.Size()
  624. dAtA = make([]byte, size)
  625. n, err := m.MarshalTo(dAtA)
  626. if err != nil {
  627. return nil, err
  628. }
  629. return dAtA[:n], nil
  630. }
  631. func (m *GetAuthorizeURLReq) MarshalTo(dAtA []byte) (int, error) {
  632. var i int
  633. _ = i
  634. var l int
  635. _ = l
  636. if len(m.AppId) > 0 {
  637. dAtA[i] = 0xa
  638. i++
  639. i = encodeVarintApi(dAtA, i, uint64(len(m.AppId)))
  640. i += copy(dAtA[i:], m.AppId)
  641. }
  642. if len(m.Platform) > 0 {
  643. dAtA[i] = 0x12
  644. i++
  645. i = encodeVarintApi(dAtA, i, uint64(len(m.Platform)))
  646. i += copy(dAtA[i:], m.Platform)
  647. }
  648. if len(m.RedirectUrl) > 0 {
  649. dAtA[i] = 0x1a
  650. i++
  651. i = encodeVarintApi(dAtA, i, uint64(len(m.RedirectUrl)))
  652. i += copy(dAtA[i:], m.RedirectUrl)
  653. }
  654. if len(m.Display) > 0 {
  655. dAtA[i] = 0x22
  656. i++
  657. i = encodeVarintApi(dAtA, i, uint64(len(m.Display)))
  658. i += copy(dAtA[i:], m.Display)
  659. }
  660. return i, nil
  661. }
  662. func (m *GetAuthorizeURLReply) Marshal() (dAtA []byte, err error) {
  663. size := m.Size()
  664. dAtA = make([]byte, size)
  665. n, err := m.MarshalTo(dAtA)
  666. if err != nil {
  667. return nil, err
  668. }
  669. return dAtA[:n], nil
  670. }
  671. func (m *GetAuthorizeURLReply) MarshalTo(dAtA []byte) (int, error) {
  672. var i int
  673. _ = i
  674. var l int
  675. _ = l
  676. if len(m.Url) > 0 {
  677. dAtA[i] = 0xa
  678. i++
  679. i = encodeVarintApi(dAtA, i, uint64(len(m.Url)))
  680. i += copy(dAtA[i:], m.Url)
  681. }
  682. return i, nil
  683. }
  684. func (m *BindReq) Marshal() (dAtA []byte, err error) {
  685. size := m.Size()
  686. dAtA = make([]byte, size)
  687. n, err := m.MarshalTo(dAtA)
  688. if err != nil {
  689. return nil, err
  690. }
  691. return dAtA[:n], nil
  692. }
  693. func (m *BindReq) MarshalTo(dAtA []byte) (int, error) {
  694. var i int
  695. _ = i
  696. var l int
  697. _ = l
  698. if m.Mid != 0 {
  699. dAtA[i] = 0x8
  700. i++
  701. i = encodeVarintApi(dAtA, i, uint64(m.Mid))
  702. }
  703. if len(m.Code) > 0 {
  704. dAtA[i] = 0x12
  705. i++
  706. i = encodeVarintApi(dAtA, i, uint64(len(m.Code)))
  707. i += copy(dAtA[i:], m.Code)
  708. }
  709. if len(m.AppId) > 0 {
  710. dAtA[i] = 0x1a
  711. i++
  712. i = encodeVarintApi(dAtA, i, uint64(len(m.AppId)))
  713. i += copy(dAtA[i:], m.AppId)
  714. }
  715. if len(m.Platform) > 0 {
  716. dAtA[i] = 0x22
  717. i++
  718. i = encodeVarintApi(dAtA, i, uint64(len(m.Platform)))
  719. i += copy(dAtA[i:], m.Platform)
  720. }
  721. if len(m.RedirectUrl) > 0 {
  722. dAtA[i] = 0x2a
  723. i++
  724. i = encodeVarintApi(dAtA, i, uint64(len(m.RedirectUrl)))
  725. i += copy(dAtA[i:], m.RedirectUrl)
  726. }
  727. return i, nil
  728. }
  729. func (m *UnbindReq) Marshal() (dAtA []byte, err error) {
  730. size := m.Size()
  731. dAtA = make([]byte, size)
  732. n, err := m.MarshalTo(dAtA)
  733. if err != nil {
  734. return nil, err
  735. }
  736. return dAtA[:n], nil
  737. }
  738. func (m *UnbindReq) MarshalTo(dAtA []byte) (int, error) {
  739. var i int
  740. _ = i
  741. var l int
  742. _ = l
  743. if m.Mid != 0 {
  744. dAtA[i] = 0x8
  745. i++
  746. i = encodeVarintApi(dAtA, i, uint64(m.Mid))
  747. }
  748. if len(m.AppId) > 0 {
  749. dAtA[i] = 0x12
  750. i++
  751. i = encodeVarintApi(dAtA, i, uint64(len(m.AppId)))
  752. i += copy(dAtA[i:], m.AppId)
  753. }
  754. if len(m.Platform) > 0 {
  755. dAtA[i] = 0x1a
  756. i++
  757. i = encodeVarintApi(dAtA, i, uint64(len(m.Platform)))
  758. i += copy(dAtA[i:], m.Platform)
  759. }
  760. return i, nil
  761. }
  762. func (m *GetInfoReq) Marshal() (dAtA []byte, err error) {
  763. size := m.Size()
  764. dAtA = make([]byte, size)
  765. n, err := m.MarshalTo(dAtA)
  766. if err != nil {
  767. return nil, err
  768. }
  769. return dAtA[:n], nil
  770. }
  771. func (m *GetInfoReq) MarshalTo(dAtA []byte) (int, error) {
  772. var i int
  773. _ = i
  774. var l int
  775. _ = l
  776. if m.Mid != 0 {
  777. dAtA[i] = 0x8
  778. i++
  779. i = encodeVarintApi(dAtA, i, uint64(m.Mid))
  780. }
  781. return i, nil
  782. }
  783. func (m *GetInfoReply) Marshal() (dAtA []byte, err error) {
  784. size := m.Size()
  785. dAtA = make([]byte, size)
  786. n, err := m.MarshalTo(dAtA)
  787. if err != nil {
  788. return nil, err
  789. }
  790. return dAtA[:n], nil
  791. }
  792. func (m *GetInfoReply) MarshalTo(dAtA []byte) (int, error) {
  793. var i int
  794. _ = i
  795. var l int
  796. _ = l
  797. if len(m.Infos) > 0 {
  798. for _, msg := range m.Infos {
  799. dAtA[i] = 0xa
  800. i++
  801. i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
  802. n, err := msg.MarshalTo(dAtA[i:])
  803. if err != nil {
  804. return 0, err
  805. }
  806. i += n
  807. }
  808. }
  809. return i, nil
  810. }
  811. func (m *GetInfoByCodeReq) Marshal() (dAtA []byte, err error) {
  812. size := m.Size()
  813. dAtA = make([]byte, size)
  814. n, err := m.MarshalTo(dAtA)
  815. if err != nil {
  816. return nil, err
  817. }
  818. return dAtA[:n], nil
  819. }
  820. func (m *GetInfoByCodeReq) MarshalTo(dAtA []byte) (int, error) {
  821. var i int
  822. _ = i
  823. var l int
  824. _ = l
  825. if len(m.Code) > 0 {
  826. dAtA[i] = 0xa
  827. i++
  828. i = encodeVarintApi(dAtA, i, uint64(len(m.Code)))
  829. i += copy(dAtA[i:], m.Code)
  830. }
  831. if len(m.AppId) > 0 {
  832. dAtA[i] = 0x12
  833. i++
  834. i = encodeVarintApi(dAtA, i, uint64(len(m.AppId)))
  835. i += copy(dAtA[i:], m.AppId)
  836. }
  837. if len(m.Platform) > 0 {
  838. dAtA[i] = 0x1a
  839. i++
  840. i = encodeVarintApi(dAtA, i, uint64(len(m.Platform)))
  841. i += copy(dAtA[i:], m.Platform)
  842. }
  843. if len(m.RedirectUrl) > 0 {
  844. dAtA[i] = 0x22
  845. i++
  846. i = encodeVarintApi(dAtA, i, uint64(len(m.RedirectUrl)))
  847. i += copy(dAtA[i:], m.RedirectUrl)
  848. }
  849. return i, nil
  850. }
  851. func (m *GetInfoByCodeReply) Marshal() (dAtA []byte, err error) {
  852. size := m.Size()
  853. dAtA = make([]byte, size)
  854. n, err := m.MarshalTo(dAtA)
  855. if err != nil {
  856. return nil, err
  857. }
  858. return dAtA[:n], nil
  859. }
  860. func (m *GetInfoByCodeReply) MarshalTo(dAtA []byte) (int, error) {
  861. var i int
  862. _ = i
  863. var l int
  864. _ = l
  865. if m.Mid != 0 {
  866. dAtA[i] = 0x8
  867. i++
  868. i = encodeVarintApi(dAtA, i, uint64(m.Mid))
  869. }
  870. if len(m.UnionId) > 0 {
  871. dAtA[i] = 0x12
  872. i++
  873. i = encodeVarintApi(dAtA, i, uint64(len(m.UnionId)))
  874. i += copy(dAtA[i:], m.UnionId)
  875. }
  876. if len(m.OpenId) > 0 {
  877. dAtA[i] = 0x1a
  878. i++
  879. i = encodeVarintApi(dAtA, i, uint64(len(m.OpenId)))
  880. i += copy(dAtA[i:], m.OpenId)
  881. }
  882. if m.Expires != 0 {
  883. dAtA[i] = 0x20
  884. i++
  885. i = encodeVarintApi(dAtA, i, uint64(m.Expires))
  886. }
  887. if len(m.Token) > 0 {
  888. dAtA[i] = 0x2a
  889. i++
  890. i = encodeVarintApi(dAtA, i, uint64(len(m.Token)))
  891. i += copy(dAtA[i:], m.Token)
  892. }
  893. return i, nil
  894. }
  895. func (m *UpdateInfoReq) Marshal() (dAtA []byte, err error) {
  896. size := m.Size()
  897. dAtA = make([]byte, size)
  898. n, err := m.MarshalTo(dAtA)
  899. if err != nil {
  900. return nil, err
  901. }
  902. return dAtA[:n], nil
  903. }
  904. func (m *UpdateInfoReq) MarshalTo(dAtA []byte) (int, error) {
  905. var i int
  906. _ = i
  907. var l int
  908. _ = l
  909. if len(m.Platform) > 0 {
  910. dAtA[i] = 0xa
  911. i++
  912. i = encodeVarintApi(dAtA, i, uint64(len(m.Platform)))
  913. i += copy(dAtA[i:], m.Platform)
  914. }
  915. if len(m.AppId) > 0 {
  916. dAtA[i] = 0x12
  917. i++
  918. i = encodeVarintApi(dAtA, i, uint64(len(m.AppId)))
  919. i += copy(dAtA[i:], m.AppId)
  920. }
  921. if m.Mid != 0 {
  922. dAtA[i] = 0x18
  923. i++
  924. i = encodeVarintApi(dAtA, i, uint64(m.Mid))
  925. }
  926. if len(m.OpenId) > 0 {
  927. dAtA[i] = 0x22
  928. i++
  929. i = encodeVarintApi(dAtA, i, uint64(len(m.OpenId)))
  930. i += copy(dAtA[i:], m.OpenId)
  931. }
  932. return i, nil
  933. }
  934. func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
  935. for v >= 1<<7 {
  936. dAtA[offset] = uint8(v&0x7f | 0x80)
  937. v >>= 7
  938. offset++
  939. }
  940. dAtA[offset] = uint8(v)
  941. return offset + 1
  942. }
  943. func (m *EmptyReply) Size() (n int) {
  944. var l int
  945. _ = l
  946. return n
  947. }
  948. func (m *Info) Size() (n int) {
  949. var l int
  950. _ = l
  951. if m.Mid != 0 {
  952. n += 1 + sovApi(uint64(m.Mid))
  953. }
  954. l = len(m.Platform)
  955. if l > 0 {
  956. n += 1 + l + sovApi(uint64(l))
  957. }
  958. l = len(m.UnionId)
  959. if l > 0 {
  960. n += 1 + l + sovApi(uint64(l))
  961. }
  962. if m.Expires != 0 {
  963. n += 1 + sovApi(uint64(m.Expires))
  964. }
  965. return n
  966. }
  967. func (m *GetAuthorizeURLReq) Size() (n int) {
  968. var l int
  969. _ = l
  970. l = len(m.AppId)
  971. if l > 0 {
  972. n += 1 + l + sovApi(uint64(l))
  973. }
  974. l = len(m.Platform)
  975. if l > 0 {
  976. n += 1 + l + sovApi(uint64(l))
  977. }
  978. l = len(m.RedirectUrl)
  979. if l > 0 {
  980. n += 1 + l + sovApi(uint64(l))
  981. }
  982. l = len(m.Display)
  983. if l > 0 {
  984. n += 1 + l + sovApi(uint64(l))
  985. }
  986. return n
  987. }
  988. func (m *GetAuthorizeURLReply) Size() (n int) {
  989. var l int
  990. _ = l
  991. l = len(m.Url)
  992. if l > 0 {
  993. n += 1 + l + sovApi(uint64(l))
  994. }
  995. return n
  996. }
  997. func (m *BindReq) Size() (n int) {
  998. var l int
  999. _ = l
  1000. if m.Mid != 0 {
  1001. n += 1 + sovApi(uint64(m.Mid))
  1002. }
  1003. l = len(m.Code)
  1004. if l > 0 {
  1005. n += 1 + l + sovApi(uint64(l))
  1006. }
  1007. l = len(m.AppId)
  1008. if l > 0 {
  1009. n += 1 + l + sovApi(uint64(l))
  1010. }
  1011. l = len(m.Platform)
  1012. if l > 0 {
  1013. n += 1 + l + sovApi(uint64(l))
  1014. }
  1015. l = len(m.RedirectUrl)
  1016. if l > 0 {
  1017. n += 1 + l + sovApi(uint64(l))
  1018. }
  1019. return n
  1020. }
  1021. func (m *UnbindReq) Size() (n int) {
  1022. var l int
  1023. _ = l
  1024. if m.Mid != 0 {
  1025. n += 1 + sovApi(uint64(m.Mid))
  1026. }
  1027. l = len(m.AppId)
  1028. if l > 0 {
  1029. n += 1 + l + sovApi(uint64(l))
  1030. }
  1031. l = len(m.Platform)
  1032. if l > 0 {
  1033. n += 1 + l + sovApi(uint64(l))
  1034. }
  1035. return n
  1036. }
  1037. func (m *GetInfoReq) Size() (n int) {
  1038. var l int
  1039. _ = l
  1040. if m.Mid != 0 {
  1041. n += 1 + sovApi(uint64(m.Mid))
  1042. }
  1043. return n
  1044. }
  1045. func (m *GetInfoReply) Size() (n int) {
  1046. var l int
  1047. _ = l
  1048. if len(m.Infos) > 0 {
  1049. for _, e := range m.Infos {
  1050. l = e.Size()
  1051. n += 1 + l + sovApi(uint64(l))
  1052. }
  1053. }
  1054. return n
  1055. }
  1056. func (m *GetInfoByCodeReq) Size() (n int) {
  1057. var l int
  1058. _ = l
  1059. l = len(m.Code)
  1060. if l > 0 {
  1061. n += 1 + l + sovApi(uint64(l))
  1062. }
  1063. l = len(m.AppId)
  1064. if l > 0 {
  1065. n += 1 + l + sovApi(uint64(l))
  1066. }
  1067. l = len(m.Platform)
  1068. if l > 0 {
  1069. n += 1 + l + sovApi(uint64(l))
  1070. }
  1071. l = len(m.RedirectUrl)
  1072. if l > 0 {
  1073. n += 1 + l + sovApi(uint64(l))
  1074. }
  1075. return n
  1076. }
  1077. func (m *GetInfoByCodeReply) Size() (n int) {
  1078. var l int
  1079. _ = l
  1080. if m.Mid != 0 {
  1081. n += 1 + sovApi(uint64(m.Mid))
  1082. }
  1083. l = len(m.UnionId)
  1084. if l > 0 {
  1085. n += 1 + l + sovApi(uint64(l))
  1086. }
  1087. l = len(m.OpenId)
  1088. if l > 0 {
  1089. n += 1 + l + sovApi(uint64(l))
  1090. }
  1091. if m.Expires != 0 {
  1092. n += 1 + sovApi(uint64(m.Expires))
  1093. }
  1094. l = len(m.Token)
  1095. if l > 0 {
  1096. n += 1 + l + sovApi(uint64(l))
  1097. }
  1098. return n
  1099. }
  1100. func (m *UpdateInfoReq) Size() (n int) {
  1101. var l int
  1102. _ = l
  1103. l = len(m.Platform)
  1104. if l > 0 {
  1105. n += 1 + l + sovApi(uint64(l))
  1106. }
  1107. l = len(m.AppId)
  1108. if l > 0 {
  1109. n += 1 + l + sovApi(uint64(l))
  1110. }
  1111. if m.Mid != 0 {
  1112. n += 1 + sovApi(uint64(m.Mid))
  1113. }
  1114. l = len(m.OpenId)
  1115. if l > 0 {
  1116. n += 1 + l + sovApi(uint64(l))
  1117. }
  1118. return n
  1119. }
  1120. func sovApi(x uint64) (n int) {
  1121. for {
  1122. n++
  1123. x >>= 7
  1124. if x == 0 {
  1125. break
  1126. }
  1127. }
  1128. return n
  1129. }
  1130. func sozApi(x uint64) (n int) {
  1131. return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1132. }
  1133. func (m *EmptyReply) Unmarshal(dAtA []byte) error {
  1134. l := len(dAtA)
  1135. iNdEx := 0
  1136. for iNdEx < l {
  1137. preIndex := iNdEx
  1138. var wire uint64
  1139. for shift := uint(0); ; shift += 7 {
  1140. if shift >= 64 {
  1141. return ErrIntOverflowApi
  1142. }
  1143. if iNdEx >= l {
  1144. return io.ErrUnexpectedEOF
  1145. }
  1146. b := dAtA[iNdEx]
  1147. iNdEx++
  1148. wire |= (uint64(b) & 0x7F) << shift
  1149. if b < 0x80 {
  1150. break
  1151. }
  1152. }
  1153. fieldNum := int32(wire >> 3)
  1154. wireType := int(wire & 0x7)
  1155. if wireType == 4 {
  1156. return fmt.Errorf("proto: EmptyReply: wiretype end group for non-group")
  1157. }
  1158. if fieldNum <= 0 {
  1159. return fmt.Errorf("proto: EmptyReply: illegal tag %d (wire type %d)", fieldNum, wire)
  1160. }
  1161. switch fieldNum {
  1162. default:
  1163. iNdEx = preIndex
  1164. skippy, err := skipApi(dAtA[iNdEx:])
  1165. if err != nil {
  1166. return err
  1167. }
  1168. if skippy < 0 {
  1169. return ErrInvalidLengthApi
  1170. }
  1171. if (iNdEx + skippy) > l {
  1172. return io.ErrUnexpectedEOF
  1173. }
  1174. iNdEx += skippy
  1175. }
  1176. }
  1177. if iNdEx > l {
  1178. return io.ErrUnexpectedEOF
  1179. }
  1180. return nil
  1181. }
  1182. func (m *Info) Unmarshal(dAtA []byte) error {
  1183. l := len(dAtA)
  1184. iNdEx := 0
  1185. for iNdEx < l {
  1186. preIndex := iNdEx
  1187. var wire uint64
  1188. for shift := uint(0); ; shift += 7 {
  1189. if shift >= 64 {
  1190. return ErrIntOverflowApi
  1191. }
  1192. if iNdEx >= l {
  1193. return io.ErrUnexpectedEOF
  1194. }
  1195. b := dAtA[iNdEx]
  1196. iNdEx++
  1197. wire |= (uint64(b) & 0x7F) << shift
  1198. if b < 0x80 {
  1199. break
  1200. }
  1201. }
  1202. fieldNum := int32(wire >> 3)
  1203. wireType := int(wire & 0x7)
  1204. if wireType == 4 {
  1205. return fmt.Errorf("proto: Info: wiretype end group for non-group")
  1206. }
  1207. if fieldNum <= 0 {
  1208. return fmt.Errorf("proto: Info: illegal tag %d (wire type %d)", fieldNum, wire)
  1209. }
  1210. switch fieldNum {
  1211. case 1:
  1212. if wireType != 0 {
  1213. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  1214. }
  1215. m.Mid = 0
  1216. for shift := uint(0); ; shift += 7 {
  1217. if shift >= 64 {
  1218. return ErrIntOverflowApi
  1219. }
  1220. if iNdEx >= l {
  1221. return io.ErrUnexpectedEOF
  1222. }
  1223. b := dAtA[iNdEx]
  1224. iNdEx++
  1225. m.Mid |= (int64(b) & 0x7F) << shift
  1226. if b < 0x80 {
  1227. break
  1228. }
  1229. }
  1230. case 2:
  1231. if wireType != 2 {
  1232. return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
  1233. }
  1234. var stringLen uint64
  1235. for shift := uint(0); ; shift += 7 {
  1236. if shift >= 64 {
  1237. return ErrIntOverflowApi
  1238. }
  1239. if iNdEx >= l {
  1240. return io.ErrUnexpectedEOF
  1241. }
  1242. b := dAtA[iNdEx]
  1243. iNdEx++
  1244. stringLen |= (uint64(b) & 0x7F) << shift
  1245. if b < 0x80 {
  1246. break
  1247. }
  1248. }
  1249. intStringLen := int(stringLen)
  1250. if intStringLen < 0 {
  1251. return ErrInvalidLengthApi
  1252. }
  1253. postIndex := iNdEx + intStringLen
  1254. if postIndex > l {
  1255. return io.ErrUnexpectedEOF
  1256. }
  1257. m.Platform = string(dAtA[iNdEx:postIndex])
  1258. iNdEx = postIndex
  1259. case 3:
  1260. if wireType != 2 {
  1261. return fmt.Errorf("proto: wrong wireType = %d for field UnionId", wireType)
  1262. }
  1263. var stringLen uint64
  1264. for shift := uint(0); ; shift += 7 {
  1265. if shift >= 64 {
  1266. return ErrIntOverflowApi
  1267. }
  1268. if iNdEx >= l {
  1269. return io.ErrUnexpectedEOF
  1270. }
  1271. b := dAtA[iNdEx]
  1272. iNdEx++
  1273. stringLen |= (uint64(b) & 0x7F) << shift
  1274. if b < 0x80 {
  1275. break
  1276. }
  1277. }
  1278. intStringLen := int(stringLen)
  1279. if intStringLen < 0 {
  1280. return ErrInvalidLengthApi
  1281. }
  1282. postIndex := iNdEx + intStringLen
  1283. if postIndex > l {
  1284. return io.ErrUnexpectedEOF
  1285. }
  1286. m.UnionId = string(dAtA[iNdEx:postIndex])
  1287. iNdEx = postIndex
  1288. case 4:
  1289. if wireType != 0 {
  1290. return fmt.Errorf("proto: wrong wireType = %d for field Expires", wireType)
  1291. }
  1292. m.Expires = 0
  1293. for shift := uint(0); ; shift += 7 {
  1294. if shift >= 64 {
  1295. return ErrIntOverflowApi
  1296. }
  1297. if iNdEx >= l {
  1298. return io.ErrUnexpectedEOF
  1299. }
  1300. b := dAtA[iNdEx]
  1301. iNdEx++
  1302. m.Expires |= (int64(b) & 0x7F) << shift
  1303. if b < 0x80 {
  1304. break
  1305. }
  1306. }
  1307. default:
  1308. iNdEx = preIndex
  1309. skippy, err := skipApi(dAtA[iNdEx:])
  1310. if err != nil {
  1311. return err
  1312. }
  1313. if skippy < 0 {
  1314. return ErrInvalidLengthApi
  1315. }
  1316. if (iNdEx + skippy) > l {
  1317. return io.ErrUnexpectedEOF
  1318. }
  1319. iNdEx += skippy
  1320. }
  1321. }
  1322. if iNdEx > l {
  1323. return io.ErrUnexpectedEOF
  1324. }
  1325. return nil
  1326. }
  1327. func (m *GetAuthorizeURLReq) Unmarshal(dAtA []byte) error {
  1328. l := len(dAtA)
  1329. iNdEx := 0
  1330. for iNdEx < l {
  1331. preIndex := iNdEx
  1332. var wire uint64
  1333. for shift := uint(0); ; shift += 7 {
  1334. if shift >= 64 {
  1335. return ErrIntOverflowApi
  1336. }
  1337. if iNdEx >= l {
  1338. return io.ErrUnexpectedEOF
  1339. }
  1340. b := dAtA[iNdEx]
  1341. iNdEx++
  1342. wire |= (uint64(b) & 0x7F) << shift
  1343. if b < 0x80 {
  1344. break
  1345. }
  1346. }
  1347. fieldNum := int32(wire >> 3)
  1348. wireType := int(wire & 0x7)
  1349. if wireType == 4 {
  1350. return fmt.Errorf("proto: GetAuthorizeURLReq: wiretype end group for non-group")
  1351. }
  1352. if fieldNum <= 0 {
  1353. return fmt.Errorf("proto: GetAuthorizeURLReq: illegal tag %d (wire type %d)", fieldNum, wire)
  1354. }
  1355. switch fieldNum {
  1356. case 1:
  1357. if wireType != 2 {
  1358. return fmt.Errorf("proto: wrong wireType = %d for field AppId", wireType)
  1359. }
  1360. var stringLen uint64
  1361. for shift := uint(0); ; shift += 7 {
  1362. if shift >= 64 {
  1363. return ErrIntOverflowApi
  1364. }
  1365. if iNdEx >= l {
  1366. return io.ErrUnexpectedEOF
  1367. }
  1368. b := dAtA[iNdEx]
  1369. iNdEx++
  1370. stringLen |= (uint64(b) & 0x7F) << shift
  1371. if b < 0x80 {
  1372. break
  1373. }
  1374. }
  1375. intStringLen := int(stringLen)
  1376. if intStringLen < 0 {
  1377. return ErrInvalidLengthApi
  1378. }
  1379. postIndex := iNdEx + intStringLen
  1380. if postIndex > l {
  1381. return io.ErrUnexpectedEOF
  1382. }
  1383. m.AppId = string(dAtA[iNdEx:postIndex])
  1384. iNdEx = postIndex
  1385. case 2:
  1386. if wireType != 2 {
  1387. return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
  1388. }
  1389. var stringLen uint64
  1390. for shift := uint(0); ; shift += 7 {
  1391. if shift >= 64 {
  1392. return ErrIntOverflowApi
  1393. }
  1394. if iNdEx >= l {
  1395. return io.ErrUnexpectedEOF
  1396. }
  1397. b := dAtA[iNdEx]
  1398. iNdEx++
  1399. stringLen |= (uint64(b) & 0x7F) << shift
  1400. if b < 0x80 {
  1401. break
  1402. }
  1403. }
  1404. intStringLen := int(stringLen)
  1405. if intStringLen < 0 {
  1406. return ErrInvalidLengthApi
  1407. }
  1408. postIndex := iNdEx + intStringLen
  1409. if postIndex > l {
  1410. return io.ErrUnexpectedEOF
  1411. }
  1412. m.Platform = string(dAtA[iNdEx:postIndex])
  1413. iNdEx = postIndex
  1414. case 3:
  1415. if wireType != 2 {
  1416. return fmt.Errorf("proto: wrong wireType = %d for field RedirectUrl", wireType)
  1417. }
  1418. var stringLen uint64
  1419. for shift := uint(0); ; shift += 7 {
  1420. if shift >= 64 {
  1421. return ErrIntOverflowApi
  1422. }
  1423. if iNdEx >= l {
  1424. return io.ErrUnexpectedEOF
  1425. }
  1426. b := dAtA[iNdEx]
  1427. iNdEx++
  1428. stringLen |= (uint64(b) & 0x7F) << shift
  1429. if b < 0x80 {
  1430. break
  1431. }
  1432. }
  1433. intStringLen := int(stringLen)
  1434. if intStringLen < 0 {
  1435. return ErrInvalidLengthApi
  1436. }
  1437. postIndex := iNdEx + intStringLen
  1438. if postIndex > l {
  1439. return io.ErrUnexpectedEOF
  1440. }
  1441. m.RedirectUrl = string(dAtA[iNdEx:postIndex])
  1442. iNdEx = postIndex
  1443. case 4:
  1444. if wireType != 2 {
  1445. return fmt.Errorf("proto: wrong wireType = %d for field Display", wireType)
  1446. }
  1447. var stringLen uint64
  1448. for shift := uint(0); ; shift += 7 {
  1449. if shift >= 64 {
  1450. return ErrIntOverflowApi
  1451. }
  1452. if iNdEx >= l {
  1453. return io.ErrUnexpectedEOF
  1454. }
  1455. b := dAtA[iNdEx]
  1456. iNdEx++
  1457. stringLen |= (uint64(b) & 0x7F) << shift
  1458. if b < 0x80 {
  1459. break
  1460. }
  1461. }
  1462. intStringLen := int(stringLen)
  1463. if intStringLen < 0 {
  1464. return ErrInvalidLengthApi
  1465. }
  1466. postIndex := iNdEx + intStringLen
  1467. if postIndex > l {
  1468. return io.ErrUnexpectedEOF
  1469. }
  1470. m.Display = string(dAtA[iNdEx:postIndex])
  1471. iNdEx = postIndex
  1472. default:
  1473. iNdEx = preIndex
  1474. skippy, err := skipApi(dAtA[iNdEx:])
  1475. if err != nil {
  1476. return err
  1477. }
  1478. if skippy < 0 {
  1479. return ErrInvalidLengthApi
  1480. }
  1481. if (iNdEx + skippy) > l {
  1482. return io.ErrUnexpectedEOF
  1483. }
  1484. iNdEx += skippy
  1485. }
  1486. }
  1487. if iNdEx > l {
  1488. return io.ErrUnexpectedEOF
  1489. }
  1490. return nil
  1491. }
  1492. func (m *GetAuthorizeURLReply) Unmarshal(dAtA []byte) error {
  1493. l := len(dAtA)
  1494. iNdEx := 0
  1495. for iNdEx < l {
  1496. preIndex := iNdEx
  1497. var wire uint64
  1498. for shift := uint(0); ; shift += 7 {
  1499. if shift >= 64 {
  1500. return ErrIntOverflowApi
  1501. }
  1502. if iNdEx >= l {
  1503. return io.ErrUnexpectedEOF
  1504. }
  1505. b := dAtA[iNdEx]
  1506. iNdEx++
  1507. wire |= (uint64(b) & 0x7F) << shift
  1508. if b < 0x80 {
  1509. break
  1510. }
  1511. }
  1512. fieldNum := int32(wire >> 3)
  1513. wireType := int(wire & 0x7)
  1514. if wireType == 4 {
  1515. return fmt.Errorf("proto: GetAuthorizeURLReply: wiretype end group for non-group")
  1516. }
  1517. if fieldNum <= 0 {
  1518. return fmt.Errorf("proto: GetAuthorizeURLReply: illegal tag %d (wire type %d)", fieldNum, wire)
  1519. }
  1520. switch fieldNum {
  1521. case 1:
  1522. if wireType != 2 {
  1523. return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType)
  1524. }
  1525. var stringLen uint64
  1526. for shift := uint(0); ; shift += 7 {
  1527. if shift >= 64 {
  1528. return ErrIntOverflowApi
  1529. }
  1530. if iNdEx >= l {
  1531. return io.ErrUnexpectedEOF
  1532. }
  1533. b := dAtA[iNdEx]
  1534. iNdEx++
  1535. stringLen |= (uint64(b) & 0x7F) << shift
  1536. if b < 0x80 {
  1537. break
  1538. }
  1539. }
  1540. intStringLen := int(stringLen)
  1541. if intStringLen < 0 {
  1542. return ErrInvalidLengthApi
  1543. }
  1544. postIndex := iNdEx + intStringLen
  1545. if postIndex > l {
  1546. return io.ErrUnexpectedEOF
  1547. }
  1548. m.Url = string(dAtA[iNdEx:postIndex])
  1549. iNdEx = postIndex
  1550. default:
  1551. iNdEx = preIndex
  1552. skippy, err := skipApi(dAtA[iNdEx:])
  1553. if err != nil {
  1554. return err
  1555. }
  1556. if skippy < 0 {
  1557. return ErrInvalidLengthApi
  1558. }
  1559. if (iNdEx + skippy) > l {
  1560. return io.ErrUnexpectedEOF
  1561. }
  1562. iNdEx += skippy
  1563. }
  1564. }
  1565. if iNdEx > l {
  1566. return io.ErrUnexpectedEOF
  1567. }
  1568. return nil
  1569. }
  1570. func (m *BindReq) Unmarshal(dAtA []byte) error {
  1571. l := len(dAtA)
  1572. iNdEx := 0
  1573. for iNdEx < l {
  1574. preIndex := iNdEx
  1575. var wire uint64
  1576. for shift := uint(0); ; shift += 7 {
  1577. if shift >= 64 {
  1578. return ErrIntOverflowApi
  1579. }
  1580. if iNdEx >= l {
  1581. return io.ErrUnexpectedEOF
  1582. }
  1583. b := dAtA[iNdEx]
  1584. iNdEx++
  1585. wire |= (uint64(b) & 0x7F) << shift
  1586. if b < 0x80 {
  1587. break
  1588. }
  1589. }
  1590. fieldNum := int32(wire >> 3)
  1591. wireType := int(wire & 0x7)
  1592. if wireType == 4 {
  1593. return fmt.Errorf("proto: BindReq: wiretype end group for non-group")
  1594. }
  1595. if fieldNum <= 0 {
  1596. return fmt.Errorf("proto: BindReq: illegal tag %d (wire type %d)", fieldNum, wire)
  1597. }
  1598. switch fieldNum {
  1599. case 1:
  1600. if wireType != 0 {
  1601. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  1602. }
  1603. m.Mid = 0
  1604. for shift := uint(0); ; shift += 7 {
  1605. if shift >= 64 {
  1606. return ErrIntOverflowApi
  1607. }
  1608. if iNdEx >= l {
  1609. return io.ErrUnexpectedEOF
  1610. }
  1611. b := dAtA[iNdEx]
  1612. iNdEx++
  1613. m.Mid |= (int64(b) & 0x7F) << shift
  1614. if b < 0x80 {
  1615. break
  1616. }
  1617. }
  1618. case 2:
  1619. if wireType != 2 {
  1620. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  1621. }
  1622. var stringLen uint64
  1623. for shift := uint(0); ; shift += 7 {
  1624. if shift >= 64 {
  1625. return ErrIntOverflowApi
  1626. }
  1627. if iNdEx >= l {
  1628. return io.ErrUnexpectedEOF
  1629. }
  1630. b := dAtA[iNdEx]
  1631. iNdEx++
  1632. stringLen |= (uint64(b) & 0x7F) << shift
  1633. if b < 0x80 {
  1634. break
  1635. }
  1636. }
  1637. intStringLen := int(stringLen)
  1638. if intStringLen < 0 {
  1639. return ErrInvalidLengthApi
  1640. }
  1641. postIndex := iNdEx + intStringLen
  1642. if postIndex > l {
  1643. return io.ErrUnexpectedEOF
  1644. }
  1645. m.Code = string(dAtA[iNdEx:postIndex])
  1646. iNdEx = postIndex
  1647. case 3:
  1648. if wireType != 2 {
  1649. return fmt.Errorf("proto: wrong wireType = %d for field AppId", wireType)
  1650. }
  1651. var stringLen uint64
  1652. for shift := uint(0); ; shift += 7 {
  1653. if shift >= 64 {
  1654. return ErrIntOverflowApi
  1655. }
  1656. if iNdEx >= l {
  1657. return io.ErrUnexpectedEOF
  1658. }
  1659. b := dAtA[iNdEx]
  1660. iNdEx++
  1661. stringLen |= (uint64(b) & 0x7F) << shift
  1662. if b < 0x80 {
  1663. break
  1664. }
  1665. }
  1666. intStringLen := int(stringLen)
  1667. if intStringLen < 0 {
  1668. return ErrInvalidLengthApi
  1669. }
  1670. postIndex := iNdEx + intStringLen
  1671. if postIndex > l {
  1672. return io.ErrUnexpectedEOF
  1673. }
  1674. m.AppId = string(dAtA[iNdEx:postIndex])
  1675. iNdEx = postIndex
  1676. case 4:
  1677. if wireType != 2 {
  1678. return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
  1679. }
  1680. var stringLen uint64
  1681. for shift := uint(0); ; shift += 7 {
  1682. if shift >= 64 {
  1683. return ErrIntOverflowApi
  1684. }
  1685. if iNdEx >= l {
  1686. return io.ErrUnexpectedEOF
  1687. }
  1688. b := dAtA[iNdEx]
  1689. iNdEx++
  1690. stringLen |= (uint64(b) & 0x7F) << shift
  1691. if b < 0x80 {
  1692. break
  1693. }
  1694. }
  1695. intStringLen := int(stringLen)
  1696. if intStringLen < 0 {
  1697. return ErrInvalidLengthApi
  1698. }
  1699. postIndex := iNdEx + intStringLen
  1700. if postIndex > l {
  1701. return io.ErrUnexpectedEOF
  1702. }
  1703. m.Platform = string(dAtA[iNdEx:postIndex])
  1704. iNdEx = postIndex
  1705. case 5:
  1706. if wireType != 2 {
  1707. return fmt.Errorf("proto: wrong wireType = %d for field RedirectUrl", wireType)
  1708. }
  1709. var stringLen uint64
  1710. for shift := uint(0); ; shift += 7 {
  1711. if shift >= 64 {
  1712. return ErrIntOverflowApi
  1713. }
  1714. if iNdEx >= l {
  1715. return io.ErrUnexpectedEOF
  1716. }
  1717. b := dAtA[iNdEx]
  1718. iNdEx++
  1719. stringLen |= (uint64(b) & 0x7F) << shift
  1720. if b < 0x80 {
  1721. break
  1722. }
  1723. }
  1724. intStringLen := int(stringLen)
  1725. if intStringLen < 0 {
  1726. return ErrInvalidLengthApi
  1727. }
  1728. postIndex := iNdEx + intStringLen
  1729. if postIndex > l {
  1730. return io.ErrUnexpectedEOF
  1731. }
  1732. m.RedirectUrl = string(dAtA[iNdEx:postIndex])
  1733. iNdEx = postIndex
  1734. default:
  1735. iNdEx = preIndex
  1736. skippy, err := skipApi(dAtA[iNdEx:])
  1737. if err != nil {
  1738. return err
  1739. }
  1740. if skippy < 0 {
  1741. return ErrInvalidLengthApi
  1742. }
  1743. if (iNdEx + skippy) > l {
  1744. return io.ErrUnexpectedEOF
  1745. }
  1746. iNdEx += skippy
  1747. }
  1748. }
  1749. if iNdEx > l {
  1750. return io.ErrUnexpectedEOF
  1751. }
  1752. return nil
  1753. }
  1754. func (m *UnbindReq) Unmarshal(dAtA []byte) error {
  1755. l := len(dAtA)
  1756. iNdEx := 0
  1757. for iNdEx < l {
  1758. preIndex := iNdEx
  1759. var wire uint64
  1760. for shift := uint(0); ; shift += 7 {
  1761. if shift >= 64 {
  1762. return ErrIntOverflowApi
  1763. }
  1764. if iNdEx >= l {
  1765. return io.ErrUnexpectedEOF
  1766. }
  1767. b := dAtA[iNdEx]
  1768. iNdEx++
  1769. wire |= (uint64(b) & 0x7F) << shift
  1770. if b < 0x80 {
  1771. break
  1772. }
  1773. }
  1774. fieldNum := int32(wire >> 3)
  1775. wireType := int(wire & 0x7)
  1776. if wireType == 4 {
  1777. return fmt.Errorf("proto: UnbindReq: wiretype end group for non-group")
  1778. }
  1779. if fieldNum <= 0 {
  1780. return fmt.Errorf("proto: UnbindReq: illegal tag %d (wire type %d)", fieldNum, wire)
  1781. }
  1782. switch fieldNum {
  1783. case 1:
  1784. if wireType != 0 {
  1785. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  1786. }
  1787. m.Mid = 0
  1788. for shift := uint(0); ; shift += 7 {
  1789. if shift >= 64 {
  1790. return ErrIntOverflowApi
  1791. }
  1792. if iNdEx >= l {
  1793. return io.ErrUnexpectedEOF
  1794. }
  1795. b := dAtA[iNdEx]
  1796. iNdEx++
  1797. m.Mid |= (int64(b) & 0x7F) << shift
  1798. if b < 0x80 {
  1799. break
  1800. }
  1801. }
  1802. case 2:
  1803. if wireType != 2 {
  1804. return fmt.Errorf("proto: wrong wireType = %d for field AppId", wireType)
  1805. }
  1806. var stringLen uint64
  1807. for shift := uint(0); ; shift += 7 {
  1808. if shift >= 64 {
  1809. return ErrIntOverflowApi
  1810. }
  1811. if iNdEx >= l {
  1812. return io.ErrUnexpectedEOF
  1813. }
  1814. b := dAtA[iNdEx]
  1815. iNdEx++
  1816. stringLen |= (uint64(b) & 0x7F) << shift
  1817. if b < 0x80 {
  1818. break
  1819. }
  1820. }
  1821. intStringLen := int(stringLen)
  1822. if intStringLen < 0 {
  1823. return ErrInvalidLengthApi
  1824. }
  1825. postIndex := iNdEx + intStringLen
  1826. if postIndex > l {
  1827. return io.ErrUnexpectedEOF
  1828. }
  1829. m.AppId = string(dAtA[iNdEx:postIndex])
  1830. iNdEx = postIndex
  1831. case 3:
  1832. if wireType != 2 {
  1833. return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
  1834. }
  1835. var stringLen uint64
  1836. for shift := uint(0); ; shift += 7 {
  1837. if shift >= 64 {
  1838. return ErrIntOverflowApi
  1839. }
  1840. if iNdEx >= l {
  1841. return io.ErrUnexpectedEOF
  1842. }
  1843. b := dAtA[iNdEx]
  1844. iNdEx++
  1845. stringLen |= (uint64(b) & 0x7F) << shift
  1846. if b < 0x80 {
  1847. break
  1848. }
  1849. }
  1850. intStringLen := int(stringLen)
  1851. if intStringLen < 0 {
  1852. return ErrInvalidLengthApi
  1853. }
  1854. postIndex := iNdEx + intStringLen
  1855. if postIndex > l {
  1856. return io.ErrUnexpectedEOF
  1857. }
  1858. m.Platform = string(dAtA[iNdEx:postIndex])
  1859. iNdEx = postIndex
  1860. default:
  1861. iNdEx = preIndex
  1862. skippy, err := skipApi(dAtA[iNdEx:])
  1863. if err != nil {
  1864. return err
  1865. }
  1866. if skippy < 0 {
  1867. return ErrInvalidLengthApi
  1868. }
  1869. if (iNdEx + skippy) > l {
  1870. return io.ErrUnexpectedEOF
  1871. }
  1872. iNdEx += skippy
  1873. }
  1874. }
  1875. if iNdEx > l {
  1876. return io.ErrUnexpectedEOF
  1877. }
  1878. return nil
  1879. }
  1880. func (m *GetInfoReq) Unmarshal(dAtA []byte) error {
  1881. l := len(dAtA)
  1882. iNdEx := 0
  1883. for iNdEx < l {
  1884. preIndex := iNdEx
  1885. var wire uint64
  1886. for shift := uint(0); ; shift += 7 {
  1887. if shift >= 64 {
  1888. return ErrIntOverflowApi
  1889. }
  1890. if iNdEx >= l {
  1891. return io.ErrUnexpectedEOF
  1892. }
  1893. b := dAtA[iNdEx]
  1894. iNdEx++
  1895. wire |= (uint64(b) & 0x7F) << shift
  1896. if b < 0x80 {
  1897. break
  1898. }
  1899. }
  1900. fieldNum := int32(wire >> 3)
  1901. wireType := int(wire & 0x7)
  1902. if wireType == 4 {
  1903. return fmt.Errorf("proto: GetInfoReq: wiretype end group for non-group")
  1904. }
  1905. if fieldNum <= 0 {
  1906. return fmt.Errorf("proto: GetInfoReq: illegal tag %d (wire type %d)", fieldNum, wire)
  1907. }
  1908. switch fieldNum {
  1909. case 1:
  1910. if wireType != 0 {
  1911. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  1912. }
  1913. m.Mid = 0
  1914. for shift := uint(0); ; shift += 7 {
  1915. if shift >= 64 {
  1916. return ErrIntOverflowApi
  1917. }
  1918. if iNdEx >= l {
  1919. return io.ErrUnexpectedEOF
  1920. }
  1921. b := dAtA[iNdEx]
  1922. iNdEx++
  1923. m.Mid |= (int64(b) & 0x7F) << shift
  1924. if b < 0x80 {
  1925. break
  1926. }
  1927. }
  1928. default:
  1929. iNdEx = preIndex
  1930. skippy, err := skipApi(dAtA[iNdEx:])
  1931. if err != nil {
  1932. return err
  1933. }
  1934. if skippy < 0 {
  1935. return ErrInvalidLengthApi
  1936. }
  1937. if (iNdEx + skippy) > l {
  1938. return io.ErrUnexpectedEOF
  1939. }
  1940. iNdEx += skippy
  1941. }
  1942. }
  1943. if iNdEx > l {
  1944. return io.ErrUnexpectedEOF
  1945. }
  1946. return nil
  1947. }
  1948. func (m *GetInfoReply) Unmarshal(dAtA []byte) error {
  1949. l := len(dAtA)
  1950. iNdEx := 0
  1951. for iNdEx < l {
  1952. preIndex := iNdEx
  1953. var wire uint64
  1954. for shift := uint(0); ; shift += 7 {
  1955. if shift >= 64 {
  1956. return ErrIntOverflowApi
  1957. }
  1958. if iNdEx >= l {
  1959. return io.ErrUnexpectedEOF
  1960. }
  1961. b := dAtA[iNdEx]
  1962. iNdEx++
  1963. wire |= (uint64(b) & 0x7F) << shift
  1964. if b < 0x80 {
  1965. break
  1966. }
  1967. }
  1968. fieldNum := int32(wire >> 3)
  1969. wireType := int(wire & 0x7)
  1970. if wireType == 4 {
  1971. return fmt.Errorf("proto: GetInfoReply: wiretype end group for non-group")
  1972. }
  1973. if fieldNum <= 0 {
  1974. return fmt.Errorf("proto: GetInfoReply: illegal tag %d (wire type %d)", fieldNum, wire)
  1975. }
  1976. switch fieldNum {
  1977. case 1:
  1978. if wireType != 2 {
  1979. return fmt.Errorf("proto: wrong wireType = %d for field Infos", wireType)
  1980. }
  1981. var msglen int
  1982. for shift := uint(0); ; shift += 7 {
  1983. if shift >= 64 {
  1984. return ErrIntOverflowApi
  1985. }
  1986. if iNdEx >= l {
  1987. return io.ErrUnexpectedEOF
  1988. }
  1989. b := dAtA[iNdEx]
  1990. iNdEx++
  1991. msglen |= (int(b) & 0x7F) << shift
  1992. if b < 0x80 {
  1993. break
  1994. }
  1995. }
  1996. if msglen < 0 {
  1997. return ErrInvalidLengthApi
  1998. }
  1999. postIndex := iNdEx + msglen
  2000. if postIndex > l {
  2001. return io.ErrUnexpectedEOF
  2002. }
  2003. m.Infos = append(m.Infos, &Info{})
  2004. if err := m.Infos[len(m.Infos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2005. return err
  2006. }
  2007. iNdEx = postIndex
  2008. default:
  2009. iNdEx = preIndex
  2010. skippy, err := skipApi(dAtA[iNdEx:])
  2011. if err != nil {
  2012. return err
  2013. }
  2014. if skippy < 0 {
  2015. return ErrInvalidLengthApi
  2016. }
  2017. if (iNdEx + skippy) > l {
  2018. return io.ErrUnexpectedEOF
  2019. }
  2020. iNdEx += skippy
  2021. }
  2022. }
  2023. if iNdEx > l {
  2024. return io.ErrUnexpectedEOF
  2025. }
  2026. return nil
  2027. }
  2028. func (m *GetInfoByCodeReq) Unmarshal(dAtA []byte) error {
  2029. l := len(dAtA)
  2030. iNdEx := 0
  2031. for iNdEx < l {
  2032. preIndex := iNdEx
  2033. var wire uint64
  2034. for shift := uint(0); ; shift += 7 {
  2035. if shift >= 64 {
  2036. return ErrIntOverflowApi
  2037. }
  2038. if iNdEx >= l {
  2039. return io.ErrUnexpectedEOF
  2040. }
  2041. b := dAtA[iNdEx]
  2042. iNdEx++
  2043. wire |= (uint64(b) & 0x7F) << shift
  2044. if b < 0x80 {
  2045. break
  2046. }
  2047. }
  2048. fieldNum := int32(wire >> 3)
  2049. wireType := int(wire & 0x7)
  2050. if wireType == 4 {
  2051. return fmt.Errorf("proto: GetInfoByCodeReq: wiretype end group for non-group")
  2052. }
  2053. if fieldNum <= 0 {
  2054. return fmt.Errorf("proto: GetInfoByCodeReq: illegal tag %d (wire type %d)", fieldNum, wire)
  2055. }
  2056. switch fieldNum {
  2057. case 1:
  2058. if wireType != 2 {
  2059. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  2060. }
  2061. var stringLen uint64
  2062. for shift := uint(0); ; shift += 7 {
  2063. if shift >= 64 {
  2064. return ErrIntOverflowApi
  2065. }
  2066. if iNdEx >= l {
  2067. return io.ErrUnexpectedEOF
  2068. }
  2069. b := dAtA[iNdEx]
  2070. iNdEx++
  2071. stringLen |= (uint64(b) & 0x7F) << shift
  2072. if b < 0x80 {
  2073. break
  2074. }
  2075. }
  2076. intStringLen := int(stringLen)
  2077. if intStringLen < 0 {
  2078. return ErrInvalidLengthApi
  2079. }
  2080. postIndex := iNdEx + intStringLen
  2081. if postIndex > l {
  2082. return io.ErrUnexpectedEOF
  2083. }
  2084. m.Code = string(dAtA[iNdEx:postIndex])
  2085. iNdEx = postIndex
  2086. case 2:
  2087. if wireType != 2 {
  2088. return fmt.Errorf("proto: wrong wireType = %d for field AppId", wireType)
  2089. }
  2090. var stringLen uint64
  2091. for shift := uint(0); ; shift += 7 {
  2092. if shift >= 64 {
  2093. return ErrIntOverflowApi
  2094. }
  2095. if iNdEx >= l {
  2096. return io.ErrUnexpectedEOF
  2097. }
  2098. b := dAtA[iNdEx]
  2099. iNdEx++
  2100. stringLen |= (uint64(b) & 0x7F) << shift
  2101. if b < 0x80 {
  2102. break
  2103. }
  2104. }
  2105. intStringLen := int(stringLen)
  2106. if intStringLen < 0 {
  2107. return ErrInvalidLengthApi
  2108. }
  2109. postIndex := iNdEx + intStringLen
  2110. if postIndex > l {
  2111. return io.ErrUnexpectedEOF
  2112. }
  2113. m.AppId = string(dAtA[iNdEx:postIndex])
  2114. iNdEx = postIndex
  2115. case 3:
  2116. if wireType != 2 {
  2117. return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
  2118. }
  2119. var stringLen uint64
  2120. for shift := uint(0); ; shift += 7 {
  2121. if shift >= 64 {
  2122. return ErrIntOverflowApi
  2123. }
  2124. if iNdEx >= l {
  2125. return io.ErrUnexpectedEOF
  2126. }
  2127. b := dAtA[iNdEx]
  2128. iNdEx++
  2129. stringLen |= (uint64(b) & 0x7F) << shift
  2130. if b < 0x80 {
  2131. break
  2132. }
  2133. }
  2134. intStringLen := int(stringLen)
  2135. if intStringLen < 0 {
  2136. return ErrInvalidLengthApi
  2137. }
  2138. postIndex := iNdEx + intStringLen
  2139. if postIndex > l {
  2140. return io.ErrUnexpectedEOF
  2141. }
  2142. m.Platform = string(dAtA[iNdEx:postIndex])
  2143. iNdEx = postIndex
  2144. case 4:
  2145. if wireType != 2 {
  2146. return fmt.Errorf("proto: wrong wireType = %d for field RedirectUrl", wireType)
  2147. }
  2148. var stringLen uint64
  2149. for shift := uint(0); ; shift += 7 {
  2150. if shift >= 64 {
  2151. return ErrIntOverflowApi
  2152. }
  2153. if iNdEx >= l {
  2154. return io.ErrUnexpectedEOF
  2155. }
  2156. b := dAtA[iNdEx]
  2157. iNdEx++
  2158. stringLen |= (uint64(b) & 0x7F) << shift
  2159. if b < 0x80 {
  2160. break
  2161. }
  2162. }
  2163. intStringLen := int(stringLen)
  2164. if intStringLen < 0 {
  2165. return ErrInvalidLengthApi
  2166. }
  2167. postIndex := iNdEx + intStringLen
  2168. if postIndex > l {
  2169. return io.ErrUnexpectedEOF
  2170. }
  2171. m.RedirectUrl = string(dAtA[iNdEx:postIndex])
  2172. iNdEx = postIndex
  2173. default:
  2174. iNdEx = preIndex
  2175. skippy, err := skipApi(dAtA[iNdEx:])
  2176. if err != nil {
  2177. return err
  2178. }
  2179. if skippy < 0 {
  2180. return ErrInvalidLengthApi
  2181. }
  2182. if (iNdEx + skippy) > l {
  2183. return io.ErrUnexpectedEOF
  2184. }
  2185. iNdEx += skippy
  2186. }
  2187. }
  2188. if iNdEx > l {
  2189. return io.ErrUnexpectedEOF
  2190. }
  2191. return nil
  2192. }
  2193. func (m *GetInfoByCodeReply) Unmarshal(dAtA []byte) error {
  2194. l := len(dAtA)
  2195. iNdEx := 0
  2196. for iNdEx < l {
  2197. preIndex := iNdEx
  2198. var wire uint64
  2199. for shift := uint(0); ; shift += 7 {
  2200. if shift >= 64 {
  2201. return ErrIntOverflowApi
  2202. }
  2203. if iNdEx >= l {
  2204. return io.ErrUnexpectedEOF
  2205. }
  2206. b := dAtA[iNdEx]
  2207. iNdEx++
  2208. wire |= (uint64(b) & 0x7F) << shift
  2209. if b < 0x80 {
  2210. break
  2211. }
  2212. }
  2213. fieldNum := int32(wire >> 3)
  2214. wireType := int(wire & 0x7)
  2215. if wireType == 4 {
  2216. return fmt.Errorf("proto: GetInfoByCodeReply: wiretype end group for non-group")
  2217. }
  2218. if fieldNum <= 0 {
  2219. return fmt.Errorf("proto: GetInfoByCodeReply: illegal tag %d (wire type %d)", fieldNum, wire)
  2220. }
  2221. switch fieldNum {
  2222. case 1:
  2223. if wireType != 0 {
  2224. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  2225. }
  2226. m.Mid = 0
  2227. for shift := uint(0); ; shift += 7 {
  2228. if shift >= 64 {
  2229. return ErrIntOverflowApi
  2230. }
  2231. if iNdEx >= l {
  2232. return io.ErrUnexpectedEOF
  2233. }
  2234. b := dAtA[iNdEx]
  2235. iNdEx++
  2236. m.Mid |= (int64(b) & 0x7F) << shift
  2237. if b < 0x80 {
  2238. break
  2239. }
  2240. }
  2241. case 2:
  2242. if wireType != 2 {
  2243. return fmt.Errorf("proto: wrong wireType = %d for field UnionId", wireType)
  2244. }
  2245. var stringLen uint64
  2246. for shift := uint(0); ; shift += 7 {
  2247. if shift >= 64 {
  2248. return ErrIntOverflowApi
  2249. }
  2250. if iNdEx >= l {
  2251. return io.ErrUnexpectedEOF
  2252. }
  2253. b := dAtA[iNdEx]
  2254. iNdEx++
  2255. stringLen |= (uint64(b) & 0x7F) << shift
  2256. if b < 0x80 {
  2257. break
  2258. }
  2259. }
  2260. intStringLen := int(stringLen)
  2261. if intStringLen < 0 {
  2262. return ErrInvalidLengthApi
  2263. }
  2264. postIndex := iNdEx + intStringLen
  2265. if postIndex > l {
  2266. return io.ErrUnexpectedEOF
  2267. }
  2268. m.UnionId = string(dAtA[iNdEx:postIndex])
  2269. iNdEx = postIndex
  2270. case 3:
  2271. if wireType != 2 {
  2272. return fmt.Errorf("proto: wrong wireType = %d for field OpenId", wireType)
  2273. }
  2274. var stringLen uint64
  2275. for shift := uint(0); ; shift += 7 {
  2276. if shift >= 64 {
  2277. return ErrIntOverflowApi
  2278. }
  2279. if iNdEx >= l {
  2280. return io.ErrUnexpectedEOF
  2281. }
  2282. b := dAtA[iNdEx]
  2283. iNdEx++
  2284. stringLen |= (uint64(b) & 0x7F) << shift
  2285. if b < 0x80 {
  2286. break
  2287. }
  2288. }
  2289. intStringLen := int(stringLen)
  2290. if intStringLen < 0 {
  2291. return ErrInvalidLengthApi
  2292. }
  2293. postIndex := iNdEx + intStringLen
  2294. if postIndex > l {
  2295. return io.ErrUnexpectedEOF
  2296. }
  2297. m.OpenId = string(dAtA[iNdEx:postIndex])
  2298. iNdEx = postIndex
  2299. case 4:
  2300. if wireType != 0 {
  2301. return fmt.Errorf("proto: wrong wireType = %d for field Expires", wireType)
  2302. }
  2303. m.Expires = 0
  2304. for shift := uint(0); ; shift += 7 {
  2305. if shift >= 64 {
  2306. return ErrIntOverflowApi
  2307. }
  2308. if iNdEx >= l {
  2309. return io.ErrUnexpectedEOF
  2310. }
  2311. b := dAtA[iNdEx]
  2312. iNdEx++
  2313. m.Expires |= (int64(b) & 0x7F) << shift
  2314. if b < 0x80 {
  2315. break
  2316. }
  2317. }
  2318. case 5:
  2319. if wireType != 2 {
  2320. return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
  2321. }
  2322. var stringLen uint64
  2323. for shift := uint(0); ; shift += 7 {
  2324. if shift >= 64 {
  2325. return ErrIntOverflowApi
  2326. }
  2327. if iNdEx >= l {
  2328. return io.ErrUnexpectedEOF
  2329. }
  2330. b := dAtA[iNdEx]
  2331. iNdEx++
  2332. stringLen |= (uint64(b) & 0x7F) << shift
  2333. if b < 0x80 {
  2334. break
  2335. }
  2336. }
  2337. intStringLen := int(stringLen)
  2338. if intStringLen < 0 {
  2339. return ErrInvalidLengthApi
  2340. }
  2341. postIndex := iNdEx + intStringLen
  2342. if postIndex > l {
  2343. return io.ErrUnexpectedEOF
  2344. }
  2345. m.Token = string(dAtA[iNdEx:postIndex])
  2346. iNdEx = postIndex
  2347. default:
  2348. iNdEx = preIndex
  2349. skippy, err := skipApi(dAtA[iNdEx:])
  2350. if err != nil {
  2351. return err
  2352. }
  2353. if skippy < 0 {
  2354. return ErrInvalidLengthApi
  2355. }
  2356. if (iNdEx + skippy) > l {
  2357. return io.ErrUnexpectedEOF
  2358. }
  2359. iNdEx += skippy
  2360. }
  2361. }
  2362. if iNdEx > l {
  2363. return io.ErrUnexpectedEOF
  2364. }
  2365. return nil
  2366. }
  2367. func (m *UpdateInfoReq) Unmarshal(dAtA []byte) error {
  2368. l := len(dAtA)
  2369. iNdEx := 0
  2370. for iNdEx < l {
  2371. preIndex := iNdEx
  2372. var wire uint64
  2373. for shift := uint(0); ; shift += 7 {
  2374. if shift >= 64 {
  2375. return ErrIntOverflowApi
  2376. }
  2377. if iNdEx >= l {
  2378. return io.ErrUnexpectedEOF
  2379. }
  2380. b := dAtA[iNdEx]
  2381. iNdEx++
  2382. wire |= (uint64(b) & 0x7F) << shift
  2383. if b < 0x80 {
  2384. break
  2385. }
  2386. }
  2387. fieldNum := int32(wire >> 3)
  2388. wireType := int(wire & 0x7)
  2389. if wireType == 4 {
  2390. return fmt.Errorf("proto: UpdateInfoReq: wiretype end group for non-group")
  2391. }
  2392. if fieldNum <= 0 {
  2393. return fmt.Errorf("proto: UpdateInfoReq: illegal tag %d (wire type %d)", fieldNum, wire)
  2394. }
  2395. switch fieldNum {
  2396. case 1:
  2397. if wireType != 2 {
  2398. return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
  2399. }
  2400. var stringLen uint64
  2401. for shift := uint(0); ; shift += 7 {
  2402. if shift >= 64 {
  2403. return ErrIntOverflowApi
  2404. }
  2405. if iNdEx >= l {
  2406. return io.ErrUnexpectedEOF
  2407. }
  2408. b := dAtA[iNdEx]
  2409. iNdEx++
  2410. stringLen |= (uint64(b) & 0x7F) << shift
  2411. if b < 0x80 {
  2412. break
  2413. }
  2414. }
  2415. intStringLen := int(stringLen)
  2416. if intStringLen < 0 {
  2417. return ErrInvalidLengthApi
  2418. }
  2419. postIndex := iNdEx + intStringLen
  2420. if postIndex > l {
  2421. return io.ErrUnexpectedEOF
  2422. }
  2423. m.Platform = string(dAtA[iNdEx:postIndex])
  2424. iNdEx = postIndex
  2425. case 2:
  2426. if wireType != 2 {
  2427. return fmt.Errorf("proto: wrong wireType = %d for field AppId", wireType)
  2428. }
  2429. var stringLen uint64
  2430. for shift := uint(0); ; shift += 7 {
  2431. if shift >= 64 {
  2432. return ErrIntOverflowApi
  2433. }
  2434. if iNdEx >= l {
  2435. return io.ErrUnexpectedEOF
  2436. }
  2437. b := dAtA[iNdEx]
  2438. iNdEx++
  2439. stringLen |= (uint64(b) & 0x7F) << shift
  2440. if b < 0x80 {
  2441. break
  2442. }
  2443. }
  2444. intStringLen := int(stringLen)
  2445. if intStringLen < 0 {
  2446. return ErrInvalidLengthApi
  2447. }
  2448. postIndex := iNdEx + intStringLen
  2449. if postIndex > l {
  2450. return io.ErrUnexpectedEOF
  2451. }
  2452. m.AppId = string(dAtA[iNdEx:postIndex])
  2453. iNdEx = postIndex
  2454. case 3:
  2455. if wireType != 0 {
  2456. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  2457. }
  2458. m.Mid = 0
  2459. for shift := uint(0); ; shift += 7 {
  2460. if shift >= 64 {
  2461. return ErrIntOverflowApi
  2462. }
  2463. if iNdEx >= l {
  2464. return io.ErrUnexpectedEOF
  2465. }
  2466. b := dAtA[iNdEx]
  2467. iNdEx++
  2468. m.Mid |= (int64(b) & 0x7F) << shift
  2469. if b < 0x80 {
  2470. break
  2471. }
  2472. }
  2473. case 4:
  2474. if wireType != 2 {
  2475. return fmt.Errorf("proto: wrong wireType = %d for field OpenId", wireType)
  2476. }
  2477. var stringLen uint64
  2478. for shift := uint(0); ; shift += 7 {
  2479. if shift >= 64 {
  2480. return ErrIntOverflowApi
  2481. }
  2482. if iNdEx >= l {
  2483. return io.ErrUnexpectedEOF
  2484. }
  2485. b := dAtA[iNdEx]
  2486. iNdEx++
  2487. stringLen |= (uint64(b) & 0x7F) << shift
  2488. if b < 0x80 {
  2489. break
  2490. }
  2491. }
  2492. intStringLen := int(stringLen)
  2493. if intStringLen < 0 {
  2494. return ErrInvalidLengthApi
  2495. }
  2496. postIndex := iNdEx + intStringLen
  2497. if postIndex > l {
  2498. return io.ErrUnexpectedEOF
  2499. }
  2500. m.OpenId = string(dAtA[iNdEx:postIndex])
  2501. iNdEx = postIndex
  2502. default:
  2503. iNdEx = preIndex
  2504. skippy, err := skipApi(dAtA[iNdEx:])
  2505. if err != nil {
  2506. return err
  2507. }
  2508. if skippy < 0 {
  2509. return ErrInvalidLengthApi
  2510. }
  2511. if (iNdEx + skippy) > l {
  2512. return io.ErrUnexpectedEOF
  2513. }
  2514. iNdEx += skippy
  2515. }
  2516. }
  2517. if iNdEx > l {
  2518. return io.ErrUnexpectedEOF
  2519. }
  2520. return nil
  2521. }
  2522. func skipApi(dAtA []byte) (n int, err error) {
  2523. l := len(dAtA)
  2524. iNdEx := 0
  2525. for iNdEx < l {
  2526. var wire uint64
  2527. for shift := uint(0); ; shift += 7 {
  2528. if shift >= 64 {
  2529. return 0, ErrIntOverflowApi
  2530. }
  2531. if iNdEx >= l {
  2532. return 0, io.ErrUnexpectedEOF
  2533. }
  2534. b := dAtA[iNdEx]
  2535. iNdEx++
  2536. wire |= (uint64(b) & 0x7F) << shift
  2537. if b < 0x80 {
  2538. break
  2539. }
  2540. }
  2541. wireType := int(wire & 0x7)
  2542. switch wireType {
  2543. case 0:
  2544. for shift := uint(0); ; shift += 7 {
  2545. if shift >= 64 {
  2546. return 0, ErrIntOverflowApi
  2547. }
  2548. if iNdEx >= l {
  2549. return 0, io.ErrUnexpectedEOF
  2550. }
  2551. iNdEx++
  2552. if dAtA[iNdEx-1] < 0x80 {
  2553. break
  2554. }
  2555. }
  2556. return iNdEx, nil
  2557. case 1:
  2558. iNdEx += 8
  2559. return iNdEx, nil
  2560. case 2:
  2561. var length int
  2562. for shift := uint(0); ; shift += 7 {
  2563. if shift >= 64 {
  2564. return 0, ErrIntOverflowApi
  2565. }
  2566. if iNdEx >= l {
  2567. return 0, io.ErrUnexpectedEOF
  2568. }
  2569. b := dAtA[iNdEx]
  2570. iNdEx++
  2571. length |= (int(b) & 0x7F) << shift
  2572. if b < 0x80 {
  2573. break
  2574. }
  2575. }
  2576. iNdEx += length
  2577. if length < 0 {
  2578. return 0, ErrInvalidLengthApi
  2579. }
  2580. return iNdEx, nil
  2581. case 3:
  2582. for {
  2583. var innerWire uint64
  2584. var start int = iNdEx
  2585. for shift := uint(0); ; shift += 7 {
  2586. if shift >= 64 {
  2587. return 0, ErrIntOverflowApi
  2588. }
  2589. if iNdEx >= l {
  2590. return 0, io.ErrUnexpectedEOF
  2591. }
  2592. b := dAtA[iNdEx]
  2593. iNdEx++
  2594. innerWire |= (uint64(b) & 0x7F) << shift
  2595. if b < 0x80 {
  2596. break
  2597. }
  2598. }
  2599. innerWireType := int(innerWire & 0x7)
  2600. if innerWireType == 4 {
  2601. break
  2602. }
  2603. next, err := skipApi(dAtA[start:])
  2604. if err != nil {
  2605. return 0, err
  2606. }
  2607. iNdEx = start + next
  2608. }
  2609. return iNdEx, nil
  2610. case 4:
  2611. return iNdEx, nil
  2612. case 5:
  2613. iNdEx += 4
  2614. return iNdEx, nil
  2615. default:
  2616. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2617. }
  2618. }
  2619. panic("unreachable")
  2620. }
  2621. var (
  2622. ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
  2623. ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
  2624. )
  2625. func init() { proto.RegisterFile("app/service/main/passport-sns/api/api.proto", fileDescriptorApi) }
  2626. var fileDescriptorApi = []byte{
  2627. // 904 bytes of a gzipped FileDescriptorProto
  2628. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x8f, 0xdb, 0x44,
  2629. 0x14, 0x97, 0xe3, 0x6c, 0xd2, 0xbc, 0x4d, 0xa1, 0x8c, 0x7a, 0x08, 0x11, 0xdd, 0x49, 0x67, 0xbf,
  2630. 0xa2, 0x7e, 0xc4, 0xa2, 0x20, 0x21, 0xb5, 0x12, 0x12, 0xae, 0x50, 0xb5, 0x02, 0x55, 0xc8, 0xd5,
  2631. 0x5e, 0xb8, 0xac, 0xbc, 0xeb, 0xd9, 0x74, 0x84, 0x33, 0x33, 0xf5, 0xc7, 0xaa, 0xe1, 0x06, 0x17,
  2632. 0x4e, 0x9c, 0x40, 0x42, 0x20, 0xf1, 0x37, 0xf0, 0x4f, 0x70, 0x40, 0x9c, 0x90, 0xb8, 0x5b, 0x68,
  2633. 0xc5, 0x29, 0x47, 0xff, 0x05, 0x68, 0x66, 0xec, 0xac, 0xe9, 0x3a, 0x4b, 0x48, 0x7a, 0x48, 0x3c,
  2634. 0x7e, 0xf3, 0xbe, 0xe6, 0xf7, 0xde, 0xfb, 0x8d, 0xe1, 0xae, 0x2f, 0xa5, 0x13, 0xd3, 0xe8, 0x8c,
  2635. 0x9d, 0x50, 0x67, 0xe2, 0x33, 0xee, 0x48, 0x3f, 0x8e, 0xa5, 0x88, 0x92, 0xfb, 0x31, 0x8f, 0x1d,
  2636. 0x5f, 0x32, 0xf5, 0x1b, 0xc9, 0x48, 0x24, 0x02, 0xdd, 0x2c, 0xf7, 0x46, 0x85, 0xc5, 0x28, 0xe6,
  2637. 0x71, 0xff, 0x9d, 0xb1, 0x10, 0xe3, 0x90, 0x1a, 0x5d, 0xce, 0x45, 0xe2, 0x27, 0x4c, 0xf0, 0xd8,
  2638. 0xd8, 0xf4, 0xef, 0x8f, 0x59, 0xf2, 0x3c, 0x3d, 0x1e, 0x9d, 0x88, 0x89, 0x33, 0x16, 0x63, 0xe1,
  2639. 0x68, 0xf1, 0x71, 0x7a, 0xaa, 0xdf, 0xf4, 0x8b, 0x5e, 0x19, 0x75, 0xd2, 0x05, 0xf8, 0x78, 0x22,
  2640. 0x93, 0xa9, 0x47, 0x65, 0x38, 0x25, 0x3f, 0x59, 0xd0, 0x3c, 0xe0, 0xa7, 0x02, 0xbd, 0x0d, 0xf6,
  2641. 0x84, 0x05, 0x3d, 0x6b, 0x60, 0x0d, 0x6d, 0xb7, 0x3d, 0xcb, 0xb0, 0x7a, 0xf5, 0xd4, 0x1f, 0x1a,
  2642. 0xc2, 0x35, 0x19, 0xfa, 0xc9, 0xa9, 0x88, 0x26, 0xbd, 0xc6, 0xc0, 0x1a, 0x76, 0xdc, 0xee, 0x2c,
  2643. 0xc3, 0x73, 0x99, 0x37, 0x5f, 0xa1, 0x3d, 0xb8, 0x96, 0x72, 0x26, 0xf8, 0x11, 0x0b, 0x7a, 0xb6,
  2644. 0xd6, 0xdc, 0x9c, 0x65, 0xb8, 0xad, 0x65, 0x2c, 0xf0, 0xcc, 0xe2, 0x20, 0x40, 0xbb, 0xd0, 0xa6,
  2645. 0x2f, 0x25, 0x8b, 0x68, 0xdc, 0x6b, 0xea, 0x80, 0x5a, 0xad, 0x10, 0x79, 0xe5, 0x82, 0x7c, 0xdf,
  2646. 0x00, 0xf4, 0x84, 0x26, 0x1f, 0xa5, 0xc9, 0x73, 0x11, 0xb1, 0x2f, 0xe9, 0xa1, 0xf7, 0xa9, 0x47,
  2647. 0x5f, 0xa0, 0x47, 0xd0, 0xf2, 0xa5, 0x3c, 0x2a, 0xb2, 0xed, 0xb8, 0x3b, 0x79, 0x86, 0x07, 0x2a,
  2648. 0xfe, 0x43, 0xe2, 0x4b, 0xc9, 0x02, 0x32, 0x38, 0xf3, 0x43, 0x16, 0xf8, 0x09, 0x7d, 0x48, 0x22,
  2649. 0xfa, 0x22, 0x65, 0x11, 0x0d, 0x88, 0xb7, 0xe1, 0x4b, 0x79, 0x10, 0xa0, 0xc7, 0x97, 0x0e, 0xb3,
  2650. 0x9f, 0x67, 0x78, 0xdb, 0x98, 0x97, 0x3b, 0xf5, 0x1e, 0x2e, 0xce, 0xf9, 0x14, 0xba, 0x11, 0x0d,
  2651. 0x58, 0x44, 0x4f, 0x92, 0xa3, 0x34, 0x0a, 0x8b, 0xb3, 0xde, 0xcd, 0x33, 0xbc, 0x6f, 0x1c, 0x55,
  2652. 0x77, 0xeb, 0x9d, 0x6d, 0x96, 0x2a, 0x87, 0x51, 0x88, 0xee, 0x41, 0x3b, 0x60, 0xb1, 0x0c, 0xfd,
  2653. 0xa9, 0xc6, 0xa3, 0xe3, 0xa2, 0x3c, 0xc3, 0x6f, 0x18, 0x57, 0xc5, 0x06, 0xf1, 0x4a, 0x15, 0xf2,
  2654. 0x2e, 0xdc, 0xbc, 0x84, 0x8a, 0x0c, 0xa7, 0xaa, 0x84, 0x2a, 0x19, 0x03, 0x8a, 0x2e, 0x61, 0x1a,
  2655. 0x85, 0x9e, 0xfa, 0x23, 0xbf, 0x37, 0xa0, 0xed, 0x32, 0x1e, 0x28, 0xf8, 0xde, 0xaf, 0x56, 0x9a,
  2656. 0xe4, 0x19, 0xde, 0x32, 0x81, 0x26, 0x8b, 0x90, 0xd3, 0x4d, 0xf0, 0x01, 0x34, 0x4f, 0x44, 0x40,
  2657. 0x0b, 0xcc, 0xb6, 0xf3, 0x0c, 0x63, 0x63, 0xa6, 0xa4, 0xf5, 0x76, 0xda, 0xa0, 0x52, 0x2d, 0x7b,
  2658. 0xbd, 0x6a, 0x35, 0x5f, 0x57, 0xb5, 0x36, 0xd6, 0xab, 0x16, 0xf9, 0xc5, 0x82, 0xce, 0x21, 0x3f,
  2659. 0x5e, 0x0b, 0xce, 0xfd, 0x39, 0x2a, 0x06, 0xd0, 0x1b, 0x79, 0x86, 0xbb, 0x55, 0x54, 0xea, 0x10,
  2660. 0xb0, 0x57, 0x44, 0x80, 0xb8, 0x00, 0x4f, 0x68, 0xa2, 0xe6, 0x7c, 0xe5, 0x8c, 0xc9, 0x27, 0xd0,
  2661. 0x9d, 0xfb, 0x50, 0xdd, 0xf6, 0x08, 0x36, 0x18, 0x3f, 0x15, 0x71, 0xcf, 0x1a, 0xd8, 0xc3, 0xcd,
  2662. 0x07, 0xfd, 0x51, 0x1d, 0x75, 0x8d, 0x94, 0xbe, 0xdb, 0x99, 0x65, 0xd8, 0x28, 0x7b, 0xe6, 0x41,
  2663. 0x7e, 0x6e, 0xc0, 0x8d, 0xc2, 0x9b, 0x3b, 0x7d, 0x2c, 0x02, 0xaa, 0xf2, 0x2a, 0x5b, 0xcc, 0x5a,
  2664. 0xbd, 0xc5, 0x1a, 0xeb, 0xb5, 0x98, 0xfd, 0xba, 0x5a, 0xac, 0xb9, 0x66, 0x8b, 0xfd, 0x6a, 0x69,
  2665. 0xe6, 0xab, 0xe2, 0x53, 0x4c, 0xf8, 0x22, 0x92, 0xae, 0x52, 0x6f, 0xe3, 0x0a, 0xea, 0xdd, 0x86,
  2666. 0xb6, 0x90, 0xb4, 0xc2, 0xd0, 0x30, 0xcb, 0x70, 0x4b, 0x89, 0x58, 0xe0, 0xe9, 0xe7, 0xd2, 0xfc,
  2667. 0x8c, 0x30, 0x6c, 0x24, 0xe2, 0x0b, 0xca, 0x8b, 0x89, 0xd2, 0x65, 0xd6, 0x02, 0xcf, 0x3c, 0xc8,
  2668. 0x37, 0x0d, 0xb8, 0x7e, 0x28, 0xd5, 0x49, 0xcb, 0xde, 0xab, 0xa2, 0x6d, 0xad, 0x8a, 0xf6, 0x5a,
  2669. 0xf5, 0x2e, 0xba, 0xdf, 0xfe, 0x7f, 0xf3, 0xfa, 0xe1, 0x05, 0x6c, 0xa6, 0xb6, 0xbb, 0x79, 0x86,
  2670. 0x6f, 0x1b, 0x4b, 0x03, 0x5e, 0xbd, 0x71, 0x81, 0xe8, 0x83, 0x1f, 0x5b, 0xb0, 0xf9, 0x59, 0x31,
  2671. 0x20, 0xcf, 0x9e, 0x3e, 0x43, 0x3f, 0x58, 0xf0, 0xe6, 0x2b, 0x24, 0x8e, 0x86, 0xf5, 0x23, 0x74,
  2672. 0xf9, 0x06, 0xec, 0xdf, 0x59, 0x52, 0x53, 0xdd, 0xf0, 0xa3, 0xaf, 0xff, 0xfc, 0xfb, 0xbb, 0xc6,
  2673. 0x10, 0xed, 0x39, 0x2f, 0x1d, 0xc6, 0x13, 0x1a, 0x71, 0x3f, 0x7c, 0xe5, 0x13, 0xa4, 0xb4, 0x71,
  2674. 0xd2, 0x28, 0x44, 0x1c, 0x9a, 0xea, 0xa6, 0x40, 0xb7, 0xea, 0x63, 0x14, 0xb7, 0x48, 0x7f, 0x50,
  2675. 0xbf, 0x5d, 0xf9, 0xb4, 0xd8, 0xd5, 0x81, 0x31, 0xb9, 0xb5, 0x30, 0xb0, 0xa2, 0x50, 0x94, 0x40,
  2676. 0xcb, 0x90, 0x29, 0xc2, 0xf5, 0x2e, 0xe7, 0x54, 0xbb, 0x44, 0xcc, 0x7d, 0x1d, 0xf3, 0x36, 0xc1,
  2677. 0x0b, 0x63, 0xa6, 0x26, 0xd6, 0x19, 0xb4, 0x8b, 0xf9, 0x42, 0x83, 0x85, 0x60, 0x16, 0x4d, 0xdb,
  2678. 0x27, 0xff, 0xa1, 0x51, 0x39, 0x2d, 0x5a, 0x7c, 0x5a, 0xc5, 0x7c, 0xe8, 0x5b, 0x0b, 0xae, 0xff,
  2679. 0x6b, 0xb0, 0xd1, 0xde, 0x95, 0xce, 0xe7, 0xec, 0xd8, 0x1f, 0x2e, 0xa5, 0xa7, 0x52, 0xb9, 0xa3,
  2680. 0x53, 0xd9, 0x41, 0xe4, 0xca, 0x54, 0x1c, 0x4d, 0x9d, 0x5f, 0x59, 0x00, 0x17, 0x13, 0x8a, 0xb6,
  2681. 0x17, 0x94, 0xa0, 0x3a, 0xc3, 0x4b, 0x94, 0xe1, 0x9e, 0xce, 0x60, 0x8f, 0xec, 0x5c, 0x9d, 0x41,
  2682. 0xaa, 0xdd, 0xba, 0x6f, 0xfd, 0x76, 0xbe, 0x65, 0xfd, 0x71, 0xbe, 0x65, 0xfd, 0x75, 0xbe, 0x65,
  2683. 0x7d, 0x6e, 0xfb, 0x92, 0x1d, 0xb7, 0xf4, 0xb7, 0xea, 0x7b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff,
  2684. 0x83, 0x6b, 0xfa, 0x69, 0x3d, 0x0b, 0x00, 0x00,
  2685. }