rpc.pb.go 305 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491
  1. // Code generated by protoc-gen-gogo.
  2. // source: rpc.proto
  3. // DO NOT EDIT!
  4. package etcdserverpb
  5. import (
  6. "fmt"
  7. proto "github.com/gogo/protobuf/proto"
  8. )
  9. import math "math"
  10. import storagepb "github.com/coreos/etcd/storage/storagepb"
  11. import authpb "github.com/coreos/etcd/auth/authpb"
  12. import (
  13. context "golang.org/x/net/context"
  14. grpc "google.golang.org/grpc"
  15. )
  16. import io "io"
  17. // Reference imports to suppress errors if they are not otherwise used.
  18. var _ = proto.Marshal
  19. var _ = fmt.Errorf
  20. var _ = math.Inf
  21. type AlarmType int32
  22. const (
  23. AlarmType_NONE AlarmType = 0
  24. AlarmType_NOSPACE AlarmType = 1
  25. )
  26. var AlarmType_name = map[int32]string{
  27. 0: "NONE",
  28. 1: "NOSPACE",
  29. }
  30. var AlarmType_value = map[string]int32{
  31. "NONE": 0,
  32. "NOSPACE": 1,
  33. }
  34. func (x AlarmType) String() string {
  35. return proto.EnumName(AlarmType_name, int32(x))
  36. }
  37. type RangeRequest_SortOrder int32
  38. const (
  39. RangeRequest_NONE RangeRequest_SortOrder = 0
  40. RangeRequest_ASCEND RangeRequest_SortOrder = 1
  41. RangeRequest_DESCEND RangeRequest_SortOrder = 2
  42. )
  43. var RangeRequest_SortOrder_name = map[int32]string{
  44. 0: "NONE",
  45. 1: "ASCEND",
  46. 2: "DESCEND",
  47. }
  48. var RangeRequest_SortOrder_value = map[string]int32{
  49. "NONE": 0,
  50. "ASCEND": 1,
  51. "DESCEND": 2,
  52. }
  53. func (x RangeRequest_SortOrder) String() string {
  54. return proto.EnumName(RangeRequest_SortOrder_name, int32(x))
  55. }
  56. type RangeRequest_SortTarget int32
  57. const (
  58. RangeRequest_KEY RangeRequest_SortTarget = 0
  59. RangeRequest_VERSION RangeRequest_SortTarget = 1
  60. RangeRequest_CREATE RangeRequest_SortTarget = 2
  61. RangeRequest_MOD RangeRequest_SortTarget = 3
  62. RangeRequest_VALUE RangeRequest_SortTarget = 4
  63. )
  64. var RangeRequest_SortTarget_name = map[int32]string{
  65. 0: "KEY",
  66. 1: "VERSION",
  67. 2: "CREATE",
  68. 3: "MOD",
  69. 4: "VALUE",
  70. }
  71. var RangeRequest_SortTarget_value = map[string]int32{
  72. "KEY": 0,
  73. "VERSION": 1,
  74. "CREATE": 2,
  75. "MOD": 3,
  76. "VALUE": 4,
  77. }
  78. func (x RangeRequest_SortTarget) String() string {
  79. return proto.EnumName(RangeRequest_SortTarget_name, int32(x))
  80. }
  81. type Compare_CompareResult int32
  82. const (
  83. Compare_EQUAL Compare_CompareResult = 0
  84. Compare_GREATER Compare_CompareResult = 1
  85. Compare_LESS Compare_CompareResult = 2
  86. )
  87. var Compare_CompareResult_name = map[int32]string{
  88. 0: "EQUAL",
  89. 1: "GREATER",
  90. 2: "LESS",
  91. }
  92. var Compare_CompareResult_value = map[string]int32{
  93. "EQUAL": 0,
  94. "GREATER": 1,
  95. "LESS": 2,
  96. }
  97. func (x Compare_CompareResult) String() string {
  98. return proto.EnumName(Compare_CompareResult_name, int32(x))
  99. }
  100. type Compare_CompareTarget int32
  101. const (
  102. Compare_VERSION Compare_CompareTarget = 0
  103. Compare_CREATE Compare_CompareTarget = 1
  104. Compare_MOD Compare_CompareTarget = 2
  105. Compare_VALUE Compare_CompareTarget = 3
  106. )
  107. var Compare_CompareTarget_name = map[int32]string{
  108. 0: "VERSION",
  109. 1: "CREATE",
  110. 2: "MOD",
  111. 3: "VALUE",
  112. }
  113. var Compare_CompareTarget_value = map[string]int32{
  114. "VERSION": 0,
  115. "CREATE": 1,
  116. "MOD": 2,
  117. "VALUE": 3,
  118. }
  119. func (x Compare_CompareTarget) String() string {
  120. return proto.EnumName(Compare_CompareTarget_name, int32(x))
  121. }
  122. type AlarmRequest_AlarmAction int32
  123. const (
  124. AlarmRequest_GET AlarmRequest_AlarmAction = 0
  125. AlarmRequest_ACTIVATE AlarmRequest_AlarmAction = 1
  126. AlarmRequest_DEACTIVATE AlarmRequest_AlarmAction = 2
  127. )
  128. var AlarmRequest_AlarmAction_name = map[int32]string{
  129. 0: "GET",
  130. 1: "ACTIVATE",
  131. 2: "DEACTIVATE",
  132. }
  133. var AlarmRequest_AlarmAction_value = map[string]int32{
  134. "GET": 0,
  135. "ACTIVATE": 1,
  136. "DEACTIVATE": 2,
  137. }
  138. func (x AlarmRequest_AlarmAction) String() string {
  139. return proto.EnumName(AlarmRequest_AlarmAction_name, int32(x))
  140. }
  141. type ResponseHeader struct {
  142. ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,proto3" json:"cluster_id,omitempty"`
  143. MemberId uint64 `protobuf:"varint,2,opt,name=member_id,proto3" json:"member_id,omitempty"`
  144. // revision of the store when the request was applied.
  145. Revision int64 `protobuf:"varint,3,opt,name=revision,proto3" json:"revision,omitempty"`
  146. // term of raft when the request was applied.
  147. RaftTerm uint64 `protobuf:"varint,4,opt,name=raft_term,proto3" json:"raft_term,omitempty"`
  148. }
  149. func (m *ResponseHeader) Reset() { *m = ResponseHeader{} }
  150. func (m *ResponseHeader) String() string { return proto.CompactTextString(m) }
  151. func (*ResponseHeader) ProtoMessage() {}
  152. type RangeRequest struct {
  153. // if the range_end is not given, the request returns the key.
  154. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  155. // if the range_end is given, it gets the keys in range [key, range_end)
  156. // if range_end is nonempty, otherwise it returns all keys >= key.
  157. RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,proto3" json:"range_end,omitempty"`
  158. // limit the number of keys returned.
  159. Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
  160. // range over the store at the given revision.
  161. // if revision is less or equal to zero, range over the newest store.
  162. // if the revision has been compacted, ErrCompaction will be returned in
  163. // response.
  164. Revision int64 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"`
  165. // sort_order is the requested order for returned the results
  166. SortOrder RangeRequest_SortOrder `protobuf:"varint,5,opt,name=sort_order,proto3,enum=etcdserverpb.RangeRequest_SortOrder" json:"sort_order,omitempty"`
  167. // sort_target is the kv field to use for sorting
  168. SortTarget RangeRequest_SortTarget `protobuf:"varint,6,opt,name=sort_target,proto3,enum=etcdserverpb.RangeRequest_SortTarget" json:"sort_target,omitempty"`
  169. // range request is linearizable by default. Linearizable requests has a higher
  170. // latency and lower throughput than serializable request.
  171. // To reduce latency, serializable can be set. If serializable is set, range request
  172. // will be serializable, but not linearizable with other requests.
  173. // Serializable range can be served locally without waiting for other nodes in the cluster.
  174. Serializable bool `protobuf:"varint,7,opt,name=serializable,proto3" json:"serializable,omitempty"`
  175. }
  176. func (m *RangeRequest) Reset() { *m = RangeRequest{} }
  177. func (m *RangeRequest) String() string { return proto.CompactTextString(m) }
  178. func (*RangeRequest) ProtoMessage() {}
  179. type RangeResponse struct {
  180. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  181. Kvs []*storagepb.KeyValue `protobuf:"bytes,2,rep,name=kvs" json:"kvs,omitempty"`
  182. // more indicates if there are more keys to return in the requested range.
  183. More bool `protobuf:"varint,3,opt,name=more,proto3" json:"more,omitempty"`
  184. }
  185. func (m *RangeResponse) Reset() { *m = RangeResponse{} }
  186. func (m *RangeResponse) String() string { return proto.CompactTextString(m) }
  187. func (*RangeResponse) ProtoMessage() {}
  188. func (m *RangeResponse) GetHeader() *ResponseHeader {
  189. if m != nil {
  190. return m.Header
  191. }
  192. return nil
  193. }
  194. func (m *RangeResponse) GetKvs() []*storagepb.KeyValue {
  195. if m != nil {
  196. return m.Kvs
  197. }
  198. return nil
  199. }
  200. type PutRequest struct {
  201. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  202. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  203. Lease int64 `protobuf:"varint,3,opt,name=lease,proto3" json:"lease,omitempty"`
  204. }
  205. func (m *PutRequest) Reset() { *m = PutRequest{} }
  206. func (m *PutRequest) String() string { return proto.CompactTextString(m) }
  207. func (*PutRequest) ProtoMessage() {}
  208. type PutResponse struct {
  209. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  210. }
  211. func (m *PutResponse) Reset() { *m = PutResponse{} }
  212. func (m *PutResponse) String() string { return proto.CompactTextString(m) }
  213. func (*PutResponse) ProtoMessage() {}
  214. func (m *PutResponse) GetHeader() *ResponseHeader {
  215. if m != nil {
  216. return m.Header
  217. }
  218. return nil
  219. }
  220. type DeleteRangeRequest struct {
  221. // if the range_end is not given, the request deletes the key.
  222. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  223. // if the range_end is given, it deletes the keys in range [key, range_end).
  224. RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,proto3" json:"range_end,omitempty"`
  225. }
  226. func (m *DeleteRangeRequest) Reset() { *m = DeleteRangeRequest{} }
  227. func (m *DeleteRangeRequest) String() string { return proto.CompactTextString(m) }
  228. func (*DeleteRangeRequest) ProtoMessage() {}
  229. type DeleteRangeResponse struct {
  230. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  231. // Deleted is the number of keys that got deleted.
  232. Deleted int64 `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
  233. }
  234. func (m *DeleteRangeResponse) Reset() { *m = DeleteRangeResponse{} }
  235. func (m *DeleteRangeResponse) String() string { return proto.CompactTextString(m) }
  236. func (*DeleteRangeResponse) ProtoMessage() {}
  237. func (m *DeleteRangeResponse) GetHeader() *ResponseHeader {
  238. if m != nil {
  239. return m.Header
  240. }
  241. return nil
  242. }
  243. type RequestUnion struct {
  244. // Types that are valid to be assigned to Request:
  245. // *RequestUnion_RequestRange
  246. // *RequestUnion_RequestPut
  247. // *RequestUnion_RequestDeleteRange
  248. Request isRequestUnion_Request `protobuf_oneof:"request"`
  249. }
  250. func (m *RequestUnion) Reset() { *m = RequestUnion{} }
  251. func (m *RequestUnion) String() string { return proto.CompactTextString(m) }
  252. func (*RequestUnion) ProtoMessage() {}
  253. type isRequestUnion_Request interface {
  254. isRequestUnion_Request()
  255. MarshalTo([]byte) (int, error)
  256. Size() int
  257. }
  258. type RequestUnion_RequestRange struct {
  259. RequestRange *RangeRequest `protobuf:"bytes,1,opt,name=request_range,oneof"`
  260. }
  261. type RequestUnion_RequestPut struct {
  262. RequestPut *PutRequest `protobuf:"bytes,2,opt,name=request_put,oneof"`
  263. }
  264. type RequestUnion_RequestDeleteRange struct {
  265. RequestDeleteRange *DeleteRangeRequest `protobuf:"bytes,3,opt,name=request_delete_range,oneof"`
  266. }
  267. func (*RequestUnion_RequestRange) isRequestUnion_Request() {}
  268. func (*RequestUnion_RequestPut) isRequestUnion_Request() {}
  269. func (*RequestUnion_RequestDeleteRange) isRequestUnion_Request() {}
  270. func (m *RequestUnion) GetRequest() isRequestUnion_Request {
  271. if m != nil {
  272. return m.Request
  273. }
  274. return nil
  275. }
  276. func (m *RequestUnion) GetRequestRange() *RangeRequest {
  277. if x, ok := m.GetRequest().(*RequestUnion_RequestRange); ok {
  278. return x.RequestRange
  279. }
  280. return nil
  281. }
  282. func (m *RequestUnion) GetRequestPut() *PutRequest {
  283. if x, ok := m.GetRequest().(*RequestUnion_RequestPut); ok {
  284. return x.RequestPut
  285. }
  286. return nil
  287. }
  288. func (m *RequestUnion) GetRequestDeleteRange() *DeleteRangeRequest {
  289. if x, ok := m.GetRequest().(*RequestUnion_RequestDeleteRange); ok {
  290. return x.RequestDeleteRange
  291. }
  292. return nil
  293. }
  294. // XXX_OneofFuncs is for the internal use of the proto package.
  295. func (*RequestUnion) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) {
  296. return _RequestUnion_OneofMarshaler, _RequestUnion_OneofUnmarshaler, []interface{}{
  297. (*RequestUnion_RequestRange)(nil),
  298. (*RequestUnion_RequestPut)(nil),
  299. (*RequestUnion_RequestDeleteRange)(nil),
  300. }
  301. }
  302. func _RequestUnion_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  303. m := msg.(*RequestUnion)
  304. // request
  305. switch x := m.Request.(type) {
  306. case *RequestUnion_RequestRange:
  307. _ = b.EncodeVarint(1<<3 | proto.WireBytes)
  308. if err := b.EncodeMessage(x.RequestRange); err != nil {
  309. return err
  310. }
  311. case *RequestUnion_RequestPut:
  312. _ = b.EncodeVarint(2<<3 | proto.WireBytes)
  313. if err := b.EncodeMessage(x.RequestPut); err != nil {
  314. return err
  315. }
  316. case *RequestUnion_RequestDeleteRange:
  317. _ = b.EncodeVarint(3<<3 | proto.WireBytes)
  318. if err := b.EncodeMessage(x.RequestDeleteRange); err != nil {
  319. return err
  320. }
  321. case nil:
  322. default:
  323. return fmt.Errorf("RequestUnion.Request has unexpected type %T", x)
  324. }
  325. return nil
  326. }
  327. func _RequestUnion_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  328. m := msg.(*RequestUnion)
  329. switch tag {
  330. case 1: // request.request_range
  331. if wire != proto.WireBytes {
  332. return true, proto.ErrInternalBadWireType
  333. }
  334. msg := new(RangeRequest)
  335. err := b.DecodeMessage(msg)
  336. m.Request = &RequestUnion_RequestRange{msg}
  337. return true, err
  338. case 2: // request.request_put
  339. if wire != proto.WireBytes {
  340. return true, proto.ErrInternalBadWireType
  341. }
  342. msg := new(PutRequest)
  343. err := b.DecodeMessage(msg)
  344. m.Request = &RequestUnion_RequestPut{msg}
  345. return true, err
  346. case 3: // request.request_delete_range
  347. if wire != proto.WireBytes {
  348. return true, proto.ErrInternalBadWireType
  349. }
  350. msg := new(DeleteRangeRequest)
  351. err := b.DecodeMessage(msg)
  352. m.Request = &RequestUnion_RequestDeleteRange{msg}
  353. return true, err
  354. default:
  355. return false, nil
  356. }
  357. }
  358. type ResponseUnion struct {
  359. // Types that are valid to be assigned to Response:
  360. // *ResponseUnion_ResponseRange
  361. // *ResponseUnion_ResponsePut
  362. // *ResponseUnion_ResponseDeleteRange
  363. Response isResponseUnion_Response `protobuf_oneof:"response"`
  364. }
  365. func (m *ResponseUnion) Reset() { *m = ResponseUnion{} }
  366. func (m *ResponseUnion) String() string { return proto.CompactTextString(m) }
  367. func (*ResponseUnion) ProtoMessage() {}
  368. type isResponseUnion_Response interface {
  369. isResponseUnion_Response()
  370. MarshalTo([]byte) (int, error)
  371. Size() int
  372. }
  373. type ResponseUnion_ResponseRange struct {
  374. ResponseRange *RangeResponse `protobuf:"bytes,1,opt,name=response_range,oneof"`
  375. }
  376. type ResponseUnion_ResponsePut struct {
  377. ResponsePut *PutResponse `protobuf:"bytes,2,opt,name=response_put,oneof"`
  378. }
  379. type ResponseUnion_ResponseDeleteRange struct {
  380. ResponseDeleteRange *DeleteRangeResponse `protobuf:"bytes,3,opt,name=response_delete_range,oneof"`
  381. }
  382. func (*ResponseUnion_ResponseRange) isResponseUnion_Response() {}
  383. func (*ResponseUnion_ResponsePut) isResponseUnion_Response() {}
  384. func (*ResponseUnion_ResponseDeleteRange) isResponseUnion_Response() {}
  385. func (m *ResponseUnion) GetResponse() isResponseUnion_Response {
  386. if m != nil {
  387. return m.Response
  388. }
  389. return nil
  390. }
  391. func (m *ResponseUnion) GetResponseRange() *RangeResponse {
  392. if x, ok := m.GetResponse().(*ResponseUnion_ResponseRange); ok {
  393. return x.ResponseRange
  394. }
  395. return nil
  396. }
  397. func (m *ResponseUnion) GetResponsePut() *PutResponse {
  398. if x, ok := m.GetResponse().(*ResponseUnion_ResponsePut); ok {
  399. return x.ResponsePut
  400. }
  401. return nil
  402. }
  403. func (m *ResponseUnion) GetResponseDeleteRange() *DeleteRangeResponse {
  404. if x, ok := m.GetResponse().(*ResponseUnion_ResponseDeleteRange); ok {
  405. return x.ResponseDeleteRange
  406. }
  407. return nil
  408. }
  409. // XXX_OneofFuncs is for the internal use of the proto package.
  410. func (*ResponseUnion) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) {
  411. return _ResponseUnion_OneofMarshaler, _ResponseUnion_OneofUnmarshaler, []interface{}{
  412. (*ResponseUnion_ResponseRange)(nil),
  413. (*ResponseUnion_ResponsePut)(nil),
  414. (*ResponseUnion_ResponseDeleteRange)(nil),
  415. }
  416. }
  417. func _ResponseUnion_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  418. m := msg.(*ResponseUnion)
  419. // response
  420. switch x := m.Response.(type) {
  421. case *ResponseUnion_ResponseRange:
  422. _ = b.EncodeVarint(1<<3 | proto.WireBytes)
  423. if err := b.EncodeMessage(x.ResponseRange); err != nil {
  424. return err
  425. }
  426. case *ResponseUnion_ResponsePut:
  427. _ = b.EncodeVarint(2<<3 | proto.WireBytes)
  428. if err := b.EncodeMessage(x.ResponsePut); err != nil {
  429. return err
  430. }
  431. case *ResponseUnion_ResponseDeleteRange:
  432. _ = b.EncodeVarint(3<<3 | proto.WireBytes)
  433. if err := b.EncodeMessage(x.ResponseDeleteRange); err != nil {
  434. return err
  435. }
  436. case nil:
  437. default:
  438. return fmt.Errorf("ResponseUnion.Response has unexpected type %T", x)
  439. }
  440. return nil
  441. }
  442. func _ResponseUnion_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  443. m := msg.(*ResponseUnion)
  444. switch tag {
  445. case 1: // response.response_range
  446. if wire != proto.WireBytes {
  447. return true, proto.ErrInternalBadWireType
  448. }
  449. msg := new(RangeResponse)
  450. err := b.DecodeMessage(msg)
  451. m.Response = &ResponseUnion_ResponseRange{msg}
  452. return true, err
  453. case 2: // response.response_put
  454. if wire != proto.WireBytes {
  455. return true, proto.ErrInternalBadWireType
  456. }
  457. msg := new(PutResponse)
  458. err := b.DecodeMessage(msg)
  459. m.Response = &ResponseUnion_ResponsePut{msg}
  460. return true, err
  461. case 3: // response.response_delete_range
  462. if wire != proto.WireBytes {
  463. return true, proto.ErrInternalBadWireType
  464. }
  465. msg := new(DeleteRangeResponse)
  466. err := b.DecodeMessage(msg)
  467. m.Response = &ResponseUnion_ResponseDeleteRange{msg}
  468. return true, err
  469. default:
  470. return false, nil
  471. }
  472. }
  473. type Compare struct {
  474. Result Compare_CompareResult `protobuf:"varint,1,opt,name=result,proto3,enum=etcdserverpb.Compare_CompareResult" json:"result,omitempty"`
  475. Target Compare_CompareTarget `protobuf:"varint,2,opt,name=target,proto3,enum=etcdserverpb.Compare_CompareTarget" json:"target,omitempty"`
  476. // key path
  477. Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
  478. // Types that are valid to be assigned to TargetUnion:
  479. // *Compare_Version
  480. // *Compare_CreateRevision
  481. // *Compare_ModRevision
  482. // *Compare_Value
  483. TargetUnion isCompare_TargetUnion `protobuf_oneof:"target_union"`
  484. }
  485. func (m *Compare) Reset() { *m = Compare{} }
  486. func (m *Compare) String() string { return proto.CompactTextString(m) }
  487. func (*Compare) ProtoMessage() {}
  488. type isCompare_TargetUnion interface {
  489. isCompare_TargetUnion()
  490. MarshalTo([]byte) (int, error)
  491. Size() int
  492. }
  493. type Compare_Version struct {
  494. Version int64 `protobuf:"varint,4,opt,name=version,proto3,oneof"`
  495. }
  496. type Compare_CreateRevision struct {
  497. CreateRevision int64 `protobuf:"varint,5,opt,name=create_revision,proto3,oneof"`
  498. }
  499. type Compare_ModRevision struct {
  500. ModRevision int64 `protobuf:"varint,6,opt,name=mod_revision,proto3,oneof"`
  501. }
  502. type Compare_Value struct {
  503. Value []byte `protobuf:"bytes,7,opt,name=value,proto3,oneof"`
  504. }
  505. func (*Compare_Version) isCompare_TargetUnion() {}
  506. func (*Compare_CreateRevision) isCompare_TargetUnion() {}
  507. func (*Compare_ModRevision) isCompare_TargetUnion() {}
  508. func (*Compare_Value) isCompare_TargetUnion() {}
  509. func (m *Compare) GetTargetUnion() isCompare_TargetUnion {
  510. if m != nil {
  511. return m.TargetUnion
  512. }
  513. return nil
  514. }
  515. func (m *Compare) GetVersion() int64 {
  516. if x, ok := m.GetTargetUnion().(*Compare_Version); ok {
  517. return x.Version
  518. }
  519. return 0
  520. }
  521. func (m *Compare) GetCreateRevision() int64 {
  522. if x, ok := m.GetTargetUnion().(*Compare_CreateRevision); ok {
  523. return x.CreateRevision
  524. }
  525. return 0
  526. }
  527. func (m *Compare) GetModRevision() int64 {
  528. if x, ok := m.GetTargetUnion().(*Compare_ModRevision); ok {
  529. return x.ModRevision
  530. }
  531. return 0
  532. }
  533. func (m *Compare) GetValue() []byte {
  534. if x, ok := m.GetTargetUnion().(*Compare_Value); ok {
  535. return x.Value
  536. }
  537. return nil
  538. }
  539. // XXX_OneofFuncs is for the internal use of the proto package.
  540. func (*Compare) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) {
  541. return _Compare_OneofMarshaler, _Compare_OneofUnmarshaler, []interface{}{
  542. (*Compare_Version)(nil),
  543. (*Compare_CreateRevision)(nil),
  544. (*Compare_ModRevision)(nil),
  545. (*Compare_Value)(nil),
  546. }
  547. }
  548. func _Compare_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  549. m := msg.(*Compare)
  550. // target_union
  551. switch x := m.TargetUnion.(type) {
  552. case *Compare_Version:
  553. _ = b.EncodeVarint(4<<3 | proto.WireVarint)
  554. _ = b.EncodeVarint(uint64(x.Version))
  555. case *Compare_CreateRevision:
  556. _ = b.EncodeVarint(5<<3 | proto.WireVarint)
  557. _ = b.EncodeVarint(uint64(x.CreateRevision))
  558. case *Compare_ModRevision:
  559. _ = b.EncodeVarint(6<<3 | proto.WireVarint)
  560. _ = b.EncodeVarint(uint64(x.ModRevision))
  561. case *Compare_Value:
  562. _ = b.EncodeVarint(7<<3 | proto.WireBytes)
  563. _ = b.EncodeRawBytes(x.Value)
  564. case nil:
  565. default:
  566. return fmt.Errorf("Compare.TargetUnion has unexpected type %T", x)
  567. }
  568. return nil
  569. }
  570. func _Compare_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  571. m := msg.(*Compare)
  572. switch tag {
  573. case 4: // target_union.version
  574. if wire != proto.WireVarint {
  575. return true, proto.ErrInternalBadWireType
  576. }
  577. x, err := b.DecodeVarint()
  578. m.TargetUnion = &Compare_Version{int64(x)}
  579. return true, err
  580. case 5: // target_union.create_revision
  581. if wire != proto.WireVarint {
  582. return true, proto.ErrInternalBadWireType
  583. }
  584. x, err := b.DecodeVarint()
  585. m.TargetUnion = &Compare_CreateRevision{int64(x)}
  586. return true, err
  587. case 6: // target_union.mod_revision
  588. if wire != proto.WireVarint {
  589. return true, proto.ErrInternalBadWireType
  590. }
  591. x, err := b.DecodeVarint()
  592. m.TargetUnion = &Compare_ModRevision{int64(x)}
  593. return true, err
  594. case 7: // target_union.value
  595. if wire != proto.WireBytes {
  596. return true, proto.ErrInternalBadWireType
  597. }
  598. x, err := b.DecodeRawBytes(true)
  599. m.TargetUnion = &Compare_Value{x}
  600. return true, err
  601. default:
  602. return false, nil
  603. }
  604. }
  605. // From google paxosdb paper:
  606. // Our implementation hinges around a powerful primitive which we call MultiOp. All other database
  607. // operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically
  608. // and consists of three components:
  609. // 1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check
  610. // for the absence or presence of a value, or compare with a given value. Two different tests in the guard
  611. // may apply to the same or different entries in the database. All tests in the guard are applied and
  612. // MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise
  613. // it executes f op (see item 3 below).
  614. // 2. A list of database operations called t op. Each operation in the list is either an insert, delete, or
  615. // lookup operation, and applies to a single database entry. Two different operations in the list may apply
  616. // to the same or different entries in the database. These operations are executed
  617. // if guard evaluates to
  618. // true.
  619. // 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false.
  620. type TxnRequest struct {
  621. Compare []*Compare `protobuf:"bytes,1,rep,name=compare" json:"compare,omitempty"`
  622. Success []*RequestUnion `protobuf:"bytes,2,rep,name=success" json:"success,omitempty"`
  623. Failure []*RequestUnion `protobuf:"bytes,3,rep,name=failure" json:"failure,omitempty"`
  624. }
  625. func (m *TxnRequest) Reset() { *m = TxnRequest{} }
  626. func (m *TxnRequest) String() string { return proto.CompactTextString(m) }
  627. func (*TxnRequest) ProtoMessage() {}
  628. func (m *TxnRequest) GetCompare() []*Compare {
  629. if m != nil {
  630. return m.Compare
  631. }
  632. return nil
  633. }
  634. func (m *TxnRequest) GetSuccess() []*RequestUnion {
  635. if m != nil {
  636. return m.Success
  637. }
  638. return nil
  639. }
  640. func (m *TxnRequest) GetFailure() []*RequestUnion {
  641. if m != nil {
  642. return m.Failure
  643. }
  644. return nil
  645. }
  646. type TxnResponse struct {
  647. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  648. Succeeded bool `protobuf:"varint,2,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
  649. Responses []*ResponseUnion `protobuf:"bytes,3,rep,name=responses" json:"responses,omitempty"`
  650. }
  651. func (m *TxnResponse) Reset() { *m = TxnResponse{} }
  652. func (m *TxnResponse) String() string { return proto.CompactTextString(m) }
  653. func (*TxnResponse) ProtoMessage() {}
  654. func (m *TxnResponse) GetHeader() *ResponseHeader {
  655. if m != nil {
  656. return m.Header
  657. }
  658. return nil
  659. }
  660. func (m *TxnResponse) GetResponses() []*ResponseUnion {
  661. if m != nil {
  662. return m.Responses
  663. }
  664. return nil
  665. }
  666. // Compaction compacts the kv store upto the given revision (including).
  667. // It removes the old versions of a key. It keeps the newest version of
  668. // the key even if its latest modification revision is smaller than the given
  669. // revision.
  670. type CompactionRequest struct {
  671. Revision int64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
  672. // physical is set so the RPC will wait until the compaction is physically
  673. // applied to the local database such that compacted entries are totally
  674. // removed from the backing store.
  675. Physical bool `protobuf:"varint,2,opt,name=physical,proto3" json:"physical,omitempty"`
  676. }
  677. func (m *CompactionRequest) Reset() { *m = CompactionRequest{} }
  678. func (m *CompactionRequest) String() string { return proto.CompactTextString(m) }
  679. func (*CompactionRequest) ProtoMessage() {}
  680. type CompactionResponse struct {
  681. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  682. }
  683. func (m *CompactionResponse) Reset() { *m = CompactionResponse{} }
  684. func (m *CompactionResponse) String() string { return proto.CompactTextString(m) }
  685. func (*CompactionResponse) ProtoMessage() {}
  686. func (m *CompactionResponse) GetHeader() *ResponseHeader {
  687. if m != nil {
  688. return m.Header
  689. }
  690. return nil
  691. }
  692. type HashRequest struct {
  693. }
  694. func (m *HashRequest) Reset() { *m = HashRequest{} }
  695. func (m *HashRequest) String() string { return proto.CompactTextString(m) }
  696. func (*HashRequest) ProtoMessage() {}
  697. type HashResponse struct {
  698. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  699. Hash uint32 `protobuf:"varint,2,opt,name=hash,proto3" json:"hash,omitempty"`
  700. }
  701. func (m *HashResponse) Reset() { *m = HashResponse{} }
  702. func (m *HashResponse) String() string { return proto.CompactTextString(m) }
  703. func (*HashResponse) ProtoMessage() {}
  704. func (m *HashResponse) GetHeader() *ResponseHeader {
  705. if m != nil {
  706. return m.Header
  707. }
  708. return nil
  709. }
  710. type SnapshotRequest struct {
  711. }
  712. func (m *SnapshotRequest) Reset() { *m = SnapshotRequest{} }
  713. func (m *SnapshotRequest) String() string { return proto.CompactTextString(m) }
  714. func (*SnapshotRequest) ProtoMessage() {}
  715. type SnapshotResponse struct {
  716. // header has the current store information. The first header in the snapshot
  717. // stream indicates the point in time of the snapshot.
  718. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  719. // remaining_bytes is the number of blob bytes to be sent after this message
  720. RemainingBytes uint64 `protobuf:"varint,2,opt,name=remaining_bytes,proto3" json:"remaining_bytes,omitempty"`
  721. // blob has the next chunk of the snapshot in the snapshot stream.
  722. Blob []byte `protobuf:"bytes,3,opt,name=blob,proto3" json:"blob,omitempty"`
  723. }
  724. func (m *SnapshotResponse) Reset() { *m = SnapshotResponse{} }
  725. func (m *SnapshotResponse) String() string { return proto.CompactTextString(m) }
  726. func (*SnapshotResponse) ProtoMessage() {}
  727. func (m *SnapshotResponse) GetHeader() *ResponseHeader {
  728. if m != nil {
  729. return m.Header
  730. }
  731. return nil
  732. }
  733. type WatchRequest struct {
  734. // Types that are valid to be assigned to RequestUnion:
  735. // *WatchRequest_CreateRequest
  736. // *WatchRequest_CancelRequest
  737. RequestUnion isWatchRequest_RequestUnion `protobuf_oneof:"request_union"`
  738. }
  739. func (m *WatchRequest) Reset() { *m = WatchRequest{} }
  740. func (m *WatchRequest) String() string { return proto.CompactTextString(m) }
  741. func (*WatchRequest) ProtoMessage() {}
  742. type isWatchRequest_RequestUnion interface {
  743. isWatchRequest_RequestUnion()
  744. MarshalTo([]byte) (int, error)
  745. Size() int
  746. }
  747. type WatchRequest_CreateRequest struct {
  748. CreateRequest *WatchCreateRequest `protobuf:"bytes,1,opt,name=create_request,oneof"`
  749. }
  750. type WatchRequest_CancelRequest struct {
  751. CancelRequest *WatchCancelRequest `protobuf:"bytes,2,opt,name=cancel_request,oneof"`
  752. }
  753. func (*WatchRequest_CreateRequest) isWatchRequest_RequestUnion() {}
  754. func (*WatchRequest_CancelRequest) isWatchRequest_RequestUnion() {}
  755. func (m *WatchRequest) GetRequestUnion() isWatchRequest_RequestUnion {
  756. if m != nil {
  757. return m.RequestUnion
  758. }
  759. return nil
  760. }
  761. func (m *WatchRequest) GetCreateRequest() *WatchCreateRequest {
  762. if x, ok := m.GetRequestUnion().(*WatchRequest_CreateRequest); ok {
  763. return x.CreateRequest
  764. }
  765. return nil
  766. }
  767. func (m *WatchRequest) GetCancelRequest() *WatchCancelRequest {
  768. if x, ok := m.GetRequestUnion().(*WatchRequest_CancelRequest); ok {
  769. return x.CancelRequest
  770. }
  771. return nil
  772. }
  773. // XXX_OneofFuncs is for the internal use of the proto package.
  774. func (*WatchRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), []interface{}) {
  775. return _WatchRequest_OneofMarshaler, _WatchRequest_OneofUnmarshaler, []interface{}{
  776. (*WatchRequest_CreateRequest)(nil),
  777. (*WatchRequest_CancelRequest)(nil),
  778. }
  779. }
  780. func _WatchRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  781. m := msg.(*WatchRequest)
  782. // request_union
  783. switch x := m.RequestUnion.(type) {
  784. case *WatchRequest_CreateRequest:
  785. _ = b.EncodeVarint(1<<3 | proto.WireBytes)
  786. if err := b.EncodeMessage(x.CreateRequest); err != nil {
  787. return err
  788. }
  789. case *WatchRequest_CancelRequest:
  790. _ = b.EncodeVarint(2<<3 | proto.WireBytes)
  791. if err := b.EncodeMessage(x.CancelRequest); err != nil {
  792. return err
  793. }
  794. case nil:
  795. default:
  796. return fmt.Errorf("WatchRequest.RequestUnion has unexpected type %T", x)
  797. }
  798. return nil
  799. }
  800. func _WatchRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  801. m := msg.(*WatchRequest)
  802. switch tag {
  803. case 1: // request_union.create_request
  804. if wire != proto.WireBytes {
  805. return true, proto.ErrInternalBadWireType
  806. }
  807. msg := new(WatchCreateRequest)
  808. err := b.DecodeMessage(msg)
  809. m.RequestUnion = &WatchRequest_CreateRequest{msg}
  810. return true, err
  811. case 2: // request_union.cancel_request
  812. if wire != proto.WireBytes {
  813. return true, proto.ErrInternalBadWireType
  814. }
  815. msg := new(WatchCancelRequest)
  816. err := b.DecodeMessage(msg)
  817. m.RequestUnion = &WatchRequest_CancelRequest{msg}
  818. return true, err
  819. default:
  820. return false, nil
  821. }
  822. }
  823. type WatchCreateRequest struct {
  824. // the key to be watched
  825. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  826. // if the range_end is given, keys in [key, range_end) are watched
  827. // NOTE: only range_end == prefixEnd(key) is accepted now
  828. RangeEnd []byte `protobuf:"bytes,2,opt,name=range_end,proto3" json:"range_end,omitempty"`
  829. // start_revision is an optional revision (including) to watch from. No start_revision is "now".
  830. StartRevision int64 `protobuf:"varint,3,opt,name=start_revision,proto3" json:"start_revision,omitempty"`
  831. // if progress_notify is set, etcd server sends WatchResponse with empty events to the
  832. // created watcher when there are no recent events. It is useful when clients want always to be
  833. // able to recover a disconnected watcher from a recent known revision.
  834. // etcdsever can decide how long it should send a notification based on current load.
  835. ProgressNotify bool `protobuf:"varint,4,opt,name=progress_notify,proto3" json:"progress_notify,omitempty"`
  836. }
  837. func (m *WatchCreateRequest) Reset() { *m = WatchCreateRequest{} }
  838. func (m *WatchCreateRequest) String() string { return proto.CompactTextString(m) }
  839. func (*WatchCreateRequest) ProtoMessage() {}
  840. type WatchCancelRequest struct {
  841. WatchId int64 `protobuf:"varint,1,opt,name=watch_id,proto3" json:"watch_id,omitempty"`
  842. }
  843. func (m *WatchCancelRequest) Reset() { *m = WatchCancelRequest{} }
  844. func (m *WatchCancelRequest) String() string { return proto.CompactTextString(m) }
  845. func (*WatchCancelRequest) ProtoMessage() {}
  846. type WatchResponse struct {
  847. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  848. // watch_id is the ID of the watching the response sent to.
  849. WatchId int64 `protobuf:"varint,2,opt,name=watch_id,proto3" json:"watch_id,omitempty"`
  850. // If the response is for a create watch request, created is set to true.
  851. // Client should record the watch_id and prepare for receiving events for
  852. // that watching from the same stream.
  853. // All events sent to the created watching will attach with the same watch_id.
  854. Created bool `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
  855. // If the response is for a cancel watch request, cancel is set to true.
  856. // No further events will be sent to the canceled watching.
  857. Canceled bool `protobuf:"varint,4,opt,name=canceled,proto3" json:"canceled,omitempty"`
  858. // CompactRevision is set to the minimum index if a watching tries to watch
  859. // at a compacted index.
  860. //
  861. // This happens when creating a watching at a compacted revision or the watching cannot
  862. // catch up with the progress of the KV.
  863. //
  864. // Client should treat the watching as canceled and should not try to create any
  865. // watching with same start_revision again.
  866. CompactRevision int64 `protobuf:"varint,5,opt,name=compact_revision,proto3" json:"compact_revision,omitempty"`
  867. Events []*storagepb.Event `protobuf:"bytes,11,rep,name=events" json:"events,omitempty"`
  868. }
  869. func (m *WatchResponse) Reset() { *m = WatchResponse{} }
  870. func (m *WatchResponse) String() string { return proto.CompactTextString(m) }
  871. func (*WatchResponse) ProtoMessage() {}
  872. func (m *WatchResponse) GetHeader() *ResponseHeader {
  873. if m != nil {
  874. return m.Header
  875. }
  876. return nil
  877. }
  878. func (m *WatchResponse) GetEvents() []*storagepb.Event {
  879. if m != nil {
  880. return m.Events
  881. }
  882. return nil
  883. }
  884. type LeaseGrantRequest struct {
  885. // advisory ttl in seconds
  886. TTL int64 `protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"`
  887. // requested ID to create; 0 lets lessor choose
  888. ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"`
  889. }
  890. func (m *LeaseGrantRequest) Reset() { *m = LeaseGrantRequest{} }
  891. func (m *LeaseGrantRequest) String() string { return proto.CompactTextString(m) }
  892. func (*LeaseGrantRequest) ProtoMessage() {}
  893. type LeaseGrantResponse struct {
  894. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  895. ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"`
  896. // server decided ttl in second
  897. TTL int64 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"`
  898. Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
  899. }
  900. func (m *LeaseGrantResponse) Reset() { *m = LeaseGrantResponse{} }
  901. func (m *LeaseGrantResponse) String() string { return proto.CompactTextString(m) }
  902. func (*LeaseGrantResponse) ProtoMessage() {}
  903. func (m *LeaseGrantResponse) GetHeader() *ResponseHeader {
  904. if m != nil {
  905. return m.Header
  906. }
  907. return nil
  908. }
  909. type LeaseRevokeRequest struct {
  910. ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
  911. }
  912. func (m *LeaseRevokeRequest) Reset() { *m = LeaseRevokeRequest{} }
  913. func (m *LeaseRevokeRequest) String() string { return proto.CompactTextString(m) }
  914. func (*LeaseRevokeRequest) ProtoMessage() {}
  915. type LeaseRevokeResponse struct {
  916. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  917. }
  918. func (m *LeaseRevokeResponse) Reset() { *m = LeaseRevokeResponse{} }
  919. func (m *LeaseRevokeResponse) String() string { return proto.CompactTextString(m) }
  920. func (*LeaseRevokeResponse) ProtoMessage() {}
  921. func (m *LeaseRevokeResponse) GetHeader() *ResponseHeader {
  922. if m != nil {
  923. return m.Header
  924. }
  925. return nil
  926. }
  927. type LeaseKeepAliveRequest struct {
  928. ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
  929. }
  930. func (m *LeaseKeepAliveRequest) Reset() { *m = LeaseKeepAliveRequest{} }
  931. func (m *LeaseKeepAliveRequest) String() string { return proto.CompactTextString(m) }
  932. func (*LeaseKeepAliveRequest) ProtoMessage() {}
  933. type LeaseKeepAliveResponse struct {
  934. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  935. ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"`
  936. TTL int64 `protobuf:"varint,3,opt,name=TTL,proto3" json:"TTL,omitempty"`
  937. }
  938. func (m *LeaseKeepAliveResponse) Reset() { *m = LeaseKeepAliveResponse{} }
  939. func (m *LeaseKeepAliveResponse) String() string { return proto.CompactTextString(m) }
  940. func (*LeaseKeepAliveResponse) ProtoMessage() {}
  941. func (m *LeaseKeepAliveResponse) GetHeader() *ResponseHeader {
  942. if m != nil {
  943. return m.Header
  944. }
  945. return nil
  946. }
  947. type Member struct {
  948. ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
  949. // If the member is not started, name will be an empty string.
  950. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  951. IsLeader bool `protobuf:"varint,3,opt,name=IsLeader,proto3" json:"IsLeader,omitempty"`
  952. PeerURLs []string `protobuf:"bytes,4,rep,name=peerURLs" json:"peerURLs,omitempty"`
  953. // If the member is not started, client_URLs will be an zero length
  954. // string array.
  955. ClientURLs []string `protobuf:"bytes,5,rep,name=clientURLs" json:"clientURLs,omitempty"`
  956. }
  957. func (m *Member) Reset() { *m = Member{} }
  958. func (m *Member) String() string { return proto.CompactTextString(m) }
  959. func (*Member) ProtoMessage() {}
  960. type MemberAddRequest struct {
  961. PeerURLs []string `protobuf:"bytes,1,rep,name=peerURLs" json:"peerURLs,omitempty"`
  962. }
  963. func (m *MemberAddRequest) Reset() { *m = MemberAddRequest{} }
  964. func (m *MemberAddRequest) String() string { return proto.CompactTextString(m) }
  965. func (*MemberAddRequest) ProtoMessage() {}
  966. type MemberAddResponse struct {
  967. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  968. Member *Member `protobuf:"bytes,2,opt,name=member" json:"member,omitempty"`
  969. }
  970. func (m *MemberAddResponse) Reset() { *m = MemberAddResponse{} }
  971. func (m *MemberAddResponse) String() string { return proto.CompactTextString(m) }
  972. func (*MemberAddResponse) ProtoMessage() {}
  973. func (m *MemberAddResponse) GetHeader() *ResponseHeader {
  974. if m != nil {
  975. return m.Header
  976. }
  977. return nil
  978. }
  979. func (m *MemberAddResponse) GetMember() *Member {
  980. if m != nil {
  981. return m.Member
  982. }
  983. return nil
  984. }
  985. type MemberRemoveRequest struct {
  986. ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
  987. }
  988. func (m *MemberRemoveRequest) Reset() { *m = MemberRemoveRequest{} }
  989. func (m *MemberRemoveRequest) String() string { return proto.CompactTextString(m) }
  990. func (*MemberRemoveRequest) ProtoMessage() {}
  991. type MemberRemoveResponse struct {
  992. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  993. }
  994. func (m *MemberRemoveResponse) Reset() { *m = MemberRemoveResponse{} }
  995. func (m *MemberRemoveResponse) String() string { return proto.CompactTextString(m) }
  996. func (*MemberRemoveResponse) ProtoMessage() {}
  997. func (m *MemberRemoveResponse) GetHeader() *ResponseHeader {
  998. if m != nil {
  999. return m.Header
  1000. }
  1001. return nil
  1002. }
  1003. type MemberUpdateRequest struct {
  1004. ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
  1005. PeerURLs []string `protobuf:"bytes,2,rep,name=peerURLs" json:"peerURLs,omitempty"`
  1006. }
  1007. func (m *MemberUpdateRequest) Reset() { *m = MemberUpdateRequest{} }
  1008. func (m *MemberUpdateRequest) String() string { return proto.CompactTextString(m) }
  1009. func (*MemberUpdateRequest) ProtoMessage() {}
  1010. type MemberUpdateResponse struct {
  1011. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1012. }
  1013. func (m *MemberUpdateResponse) Reset() { *m = MemberUpdateResponse{} }
  1014. func (m *MemberUpdateResponse) String() string { return proto.CompactTextString(m) }
  1015. func (*MemberUpdateResponse) ProtoMessage() {}
  1016. func (m *MemberUpdateResponse) GetHeader() *ResponseHeader {
  1017. if m != nil {
  1018. return m.Header
  1019. }
  1020. return nil
  1021. }
  1022. type MemberListRequest struct {
  1023. }
  1024. func (m *MemberListRequest) Reset() { *m = MemberListRequest{} }
  1025. func (m *MemberListRequest) String() string { return proto.CompactTextString(m) }
  1026. func (*MemberListRequest) ProtoMessage() {}
  1027. type MemberListResponse struct {
  1028. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1029. Members []*Member `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"`
  1030. }
  1031. func (m *MemberListResponse) Reset() { *m = MemberListResponse{} }
  1032. func (m *MemberListResponse) String() string { return proto.CompactTextString(m) }
  1033. func (*MemberListResponse) ProtoMessage() {}
  1034. func (m *MemberListResponse) GetHeader() *ResponseHeader {
  1035. if m != nil {
  1036. return m.Header
  1037. }
  1038. return nil
  1039. }
  1040. func (m *MemberListResponse) GetMembers() []*Member {
  1041. if m != nil {
  1042. return m.Members
  1043. }
  1044. return nil
  1045. }
  1046. type DefragmentRequest struct {
  1047. }
  1048. func (m *DefragmentRequest) Reset() { *m = DefragmentRequest{} }
  1049. func (m *DefragmentRequest) String() string { return proto.CompactTextString(m) }
  1050. func (*DefragmentRequest) ProtoMessage() {}
  1051. type DefragmentResponse struct {
  1052. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1053. }
  1054. func (m *DefragmentResponse) Reset() { *m = DefragmentResponse{} }
  1055. func (m *DefragmentResponse) String() string { return proto.CompactTextString(m) }
  1056. func (*DefragmentResponse) ProtoMessage() {}
  1057. func (m *DefragmentResponse) GetHeader() *ResponseHeader {
  1058. if m != nil {
  1059. return m.Header
  1060. }
  1061. return nil
  1062. }
  1063. type AlarmRequest struct {
  1064. Action AlarmRequest_AlarmAction `protobuf:"varint,1,opt,name=action,proto3,enum=etcdserverpb.AlarmRequest_AlarmAction" json:"action,omitempty"`
  1065. // MemberID is the member raising the alarm request
  1066. MemberID uint64 `protobuf:"varint,2,opt,name=memberID,proto3" json:"memberID,omitempty"`
  1067. Alarm AlarmType `protobuf:"varint,3,opt,name=alarm,proto3,enum=etcdserverpb.AlarmType" json:"alarm,omitempty"`
  1068. }
  1069. func (m *AlarmRequest) Reset() { *m = AlarmRequest{} }
  1070. func (m *AlarmRequest) String() string { return proto.CompactTextString(m) }
  1071. func (*AlarmRequest) ProtoMessage() {}
  1072. type AlarmMember struct {
  1073. MemberID uint64 `protobuf:"varint,1,opt,name=memberID,proto3" json:"memberID,omitempty"`
  1074. Alarm AlarmType `protobuf:"varint,2,opt,name=alarm,proto3,enum=etcdserverpb.AlarmType" json:"alarm,omitempty"`
  1075. }
  1076. func (m *AlarmMember) Reset() { *m = AlarmMember{} }
  1077. func (m *AlarmMember) String() string { return proto.CompactTextString(m) }
  1078. func (*AlarmMember) ProtoMessage() {}
  1079. type AlarmResponse struct {
  1080. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1081. Alarms []*AlarmMember `protobuf:"bytes,2,rep,name=alarms" json:"alarms,omitempty"`
  1082. }
  1083. func (m *AlarmResponse) Reset() { *m = AlarmResponse{} }
  1084. func (m *AlarmResponse) String() string { return proto.CompactTextString(m) }
  1085. func (*AlarmResponse) ProtoMessage() {}
  1086. func (m *AlarmResponse) GetHeader() *ResponseHeader {
  1087. if m != nil {
  1088. return m.Header
  1089. }
  1090. return nil
  1091. }
  1092. func (m *AlarmResponse) GetAlarms() []*AlarmMember {
  1093. if m != nil {
  1094. return m.Alarms
  1095. }
  1096. return nil
  1097. }
  1098. type StatusRequest struct {
  1099. }
  1100. func (m *StatusRequest) Reset() { *m = StatusRequest{} }
  1101. func (m *StatusRequest) String() string { return proto.CompactTextString(m) }
  1102. func (*StatusRequest) ProtoMessage() {}
  1103. type StatusResponse struct {
  1104. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1105. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
  1106. DbSize int64 `protobuf:"varint,3,opt,name=dbSize,proto3" json:"dbSize,omitempty"`
  1107. Leader uint64 `protobuf:"varint,4,opt,name=leader,proto3" json:"leader,omitempty"`
  1108. RaftIndex uint64 `protobuf:"varint,5,opt,name=raftIndex,proto3" json:"raftIndex,omitempty"`
  1109. RaftTerm uint64 `protobuf:"varint,6,opt,name=raftTerm,proto3" json:"raftTerm,omitempty"`
  1110. }
  1111. func (m *StatusResponse) Reset() { *m = StatusResponse{} }
  1112. func (m *StatusResponse) String() string { return proto.CompactTextString(m) }
  1113. func (*StatusResponse) ProtoMessage() {}
  1114. func (m *StatusResponse) GetHeader() *ResponseHeader {
  1115. if m != nil {
  1116. return m.Header
  1117. }
  1118. return nil
  1119. }
  1120. type AuthEnableRequest struct {
  1121. }
  1122. func (m *AuthEnableRequest) Reset() { *m = AuthEnableRequest{} }
  1123. func (m *AuthEnableRequest) String() string { return proto.CompactTextString(m) }
  1124. func (*AuthEnableRequest) ProtoMessage() {}
  1125. type AuthDisableRequest struct {
  1126. }
  1127. func (m *AuthDisableRequest) Reset() { *m = AuthDisableRequest{} }
  1128. func (m *AuthDisableRequest) String() string { return proto.CompactTextString(m) }
  1129. func (*AuthDisableRequest) ProtoMessage() {}
  1130. type AuthenticateRequest struct {
  1131. }
  1132. func (m *AuthenticateRequest) Reset() { *m = AuthenticateRequest{} }
  1133. func (m *AuthenticateRequest) String() string { return proto.CompactTextString(m) }
  1134. func (*AuthenticateRequest) ProtoMessage() {}
  1135. type AuthUserAddRequest struct {
  1136. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  1137. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  1138. }
  1139. func (m *AuthUserAddRequest) Reset() { *m = AuthUserAddRequest{} }
  1140. func (m *AuthUserAddRequest) String() string { return proto.CompactTextString(m) }
  1141. func (*AuthUserAddRequest) ProtoMessage() {}
  1142. type AuthUserGetRequest struct {
  1143. }
  1144. func (m *AuthUserGetRequest) Reset() { *m = AuthUserGetRequest{} }
  1145. func (m *AuthUserGetRequest) String() string { return proto.CompactTextString(m) }
  1146. func (*AuthUserGetRequest) ProtoMessage() {}
  1147. type AuthUserDeleteRequest struct {
  1148. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  1149. }
  1150. func (m *AuthUserDeleteRequest) Reset() { *m = AuthUserDeleteRequest{} }
  1151. func (m *AuthUserDeleteRequest) String() string { return proto.CompactTextString(m) }
  1152. func (*AuthUserDeleteRequest) ProtoMessage() {}
  1153. type AuthUserChangePasswordRequest struct {
  1154. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  1155. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  1156. }
  1157. func (m *AuthUserChangePasswordRequest) Reset() { *m = AuthUserChangePasswordRequest{} }
  1158. func (m *AuthUserChangePasswordRequest) String() string { return proto.CompactTextString(m) }
  1159. func (*AuthUserChangePasswordRequest) ProtoMessage() {}
  1160. type AuthUserGrantRequest struct {
  1161. User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
  1162. Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
  1163. }
  1164. func (m *AuthUserGrantRequest) Reset() { *m = AuthUserGrantRequest{} }
  1165. func (m *AuthUserGrantRequest) String() string { return proto.CompactTextString(m) }
  1166. func (*AuthUserGrantRequest) ProtoMessage() {}
  1167. type AuthUserRevokeRequest struct {
  1168. }
  1169. func (m *AuthUserRevokeRequest) Reset() { *m = AuthUserRevokeRequest{} }
  1170. func (m *AuthUserRevokeRequest) String() string { return proto.CompactTextString(m) }
  1171. func (*AuthUserRevokeRequest) ProtoMessage() {}
  1172. type AuthRoleAddRequest struct {
  1173. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  1174. }
  1175. func (m *AuthRoleAddRequest) Reset() { *m = AuthRoleAddRequest{} }
  1176. func (m *AuthRoleAddRequest) String() string { return proto.CompactTextString(m) }
  1177. func (*AuthRoleAddRequest) ProtoMessage() {}
  1178. type AuthRoleGetRequest struct {
  1179. }
  1180. func (m *AuthRoleGetRequest) Reset() { *m = AuthRoleGetRequest{} }
  1181. func (m *AuthRoleGetRequest) String() string { return proto.CompactTextString(m) }
  1182. func (*AuthRoleGetRequest) ProtoMessage() {}
  1183. type AuthRoleDeleteRequest struct {
  1184. }
  1185. func (m *AuthRoleDeleteRequest) Reset() { *m = AuthRoleDeleteRequest{} }
  1186. func (m *AuthRoleDeleteRequest) String() string { return proto.CompactTextString(m) }
  1187. func (*AuthRoleDeleteRequest) ProtoMessage() {}
  1188. type AuthRoleGrantRequest struct {
  1189. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  1190. Perm *authpb.Permission `protobuf:"bytes,2,opt,name=perm" json:"perm,omitempty"`
  1191. }
  1192. func (m *AuthRoleGrantRequest) Reset() { *m = AuthRoleGrantRequest{} }
  1193. func (m *AuthRoleGrantRequest) String() string { return proto.CompactTextString(m) }
  1194. func (*AuthRoleGrantRequest) ProtoMessage() {}
  1195. func (m *AuthRoleGrantRequest) GetPerm() *authpb.Permission {
  1196. if m != nil {
  1197. return m.Perm
  1198. }
  1199. return nil
  1200. }
  1201. type AuthRoleRevokeRequest struct {
  1202. }
  1203. func (m *AuthRoleRevokeRequest) Reset() { *m = AuthRoleRevokeRequest{} }
  1204. func (m *AuthRoleRevokeRequest) String() string { return proto.CompactTextString(m) }
  1205. func (*AuthRoleRevokeRequest) ProtoMessage() {}
  1206. type AuthEnableResponse struct {
  1207. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1208. }
  1209. func (m *AuthEnableResponse) Reset() { *m = AuthEnableResponse{} }
  1210. func (m *AuthEnableResponse) String() string { return proto.CompactTextString(m) }
  1211. func (*AuthEnableResponse) ProtoMessage() {}
  1212. func (m *AuthEnableResponse) GetHeader() *ResponseHeader {
  1213. if m != nil {
  1214. return m.Header
  1215. }
  1216. return nil
  1217. }
  1218. type AuthDisableResponse struct {
  1219. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1220. }
  1221. func (m *AuthDisableResponse) Reset() { *m = AuthDisableResponse{} }
  1222. func (m *AuthDisableResponse) String() string { return proto.CompactTextString(m) }
  1223. func (*AuthDisableResponse) ProtoMessage() {}
  1224. func (m *AuthDisableResponse) GetHeader() *ResponseHeader {
  1225. if m != nil {
  1226. return m.Header
  1227. }
  1228. return nil
  1229. }
  1230. type AuthenticateResponse struct {
  1231. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1232. }
  1233. func (m *AuthenticateResponse) Reset() { *m = AuthenticateResponse{} }
  1234. func (m *AuthenticateResponse) String() string { return proto.CompactTextString(m) }
  1235. func (*AuthenticateResponse) ProtoMessage() {}
  1236. func (m *AuthenticateResponse) GetHeader() *ResponseHeader {
  1237. if m != nil {
  1238. return m.Header
  1239. }
  1240. return nil
  1241. }
  1242. type AuthUserAddResponse struct {
  1243. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1244. }
  1245. func (m *AuthUserAddResponse) Reset() { *m = AuthUserAddResponse{} }
  1246. func (m *AuthUserAddResponse) String() string { return proto.CompactTextString(m) }
  1247. func (*AuthUserAddResponse) ProtoMessage() {}
  1248. func (m *AuthUserAddResponse) GetHeader() *ResponseHeader {
  1249. if m != nil {
  1250. return m.Header
  1251. }
  1252. return nil
  1253. }
  1254. type AuthUserGetResponse struct {
  1255. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1256. }
  1257. func (m *AuthUserGetResponse) Reset() { *m = AuthUserGetResponse{} }
  1258. func (m *AuthUserGetResponse) String() string { return proto.CompactTextString(m) }
  1259. func (*AuthUserGetResponse) ProtoMessage() {}
  1260. func (m *AuthUserGetResponse) GetHeader() *ResponseHeader {
  1261. if m != nil {
  1262. return m.Header
  1263. }
  1264. return nil
  1265. }
  1266. type AuthUserDeleteResponse struct {
  1267. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1268. }
  1269. func (m *AuthUserDeleteResponse) Reset() { *m = AuthUserDeleteResponse{} }
  1270. func (m *AuthUserDeleteResponse) String() string { return proto.CompactTextString(m) }
  1271. func (*AuthUserDeleteResponse) ProtoMessage() {}
  1272. func (m *AuthUserDeleteResponse) GetHeader() *ResponseHeader {
  1273. if m != nil {
  1274. return m.Header
  1275. }
  1276. return nil
  1277. }
  1278. type AuthUserChangePasswordResponse struct {
  1279. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1280. }
  1281. func (m *AuthUserChangePasswordResponse) Reset() { *m = AuthUserChangePasswordResponse{} }
  1282. func (m *AuthUserChangePasswordResponse) String() string { return proto.CompactTextString(m) }
  1283. func (*AuthUserChangePasswordResponse) ProtoMessage() {}
  1284. func (m *AuthUserChangePasswordResponse) GetHeader() *ResponseHeader {
  1285. if m != nil {
  1286. return m.Header
  1287. }
  1288. return nil
  1289. }
  1290. type AuthUserGrantResponse struct {
  1291. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1292. }
  1293. func (m *AuthUserGrantResponse) Reset() { *m = AuthUserGrantResponse{} }
  1294. func (m *AuthUserGrantResponse) String() string { return proto.CompactTextString(m) }
  1295. func (*AuthUserGrantResponse) ProtoMessage() {}
  1296. func (m *AuthUserGrantResponse) GetHeader() *ResponseHeader {
  1297. if m != nil {
  1298. return m.Header
  1299. }
  1300. return nil
  1301. }
  1302. type AuthUserRevokeResponse struct {
  1303. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1304. }
  1305. func (m *AuthUserRevokeResponse) Reset() { *m = AuthUserRevokeResponse{} }
  1306. func (m *AuthUserRevokeResponse) String() string { return proto.CompactTextString(m) }
  1307. func (*AuthUserRevokeResponse) ProtoMessage() {}
  1308. func (m *AuthUserRevokeResponse) GetHeader() *ResponseHeader {
  1309. if m != nil {
  1310. return m.Header
  1311. }
  1312. return nil
  1313. }
  1314. type AuthRoleAddResponse struct {
  1315. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1316. }
  1317. func (m *AuthRoleAddResponse) Reset() { *m = AuthRoleAddResponse{} }
  1318. func (m *AuthRoleAddResponse) String() string { return proto.CompactTextString(m) }
  1319. func (*AuthRoleAddResponse) ProtoMessage() {}
  1320. func (m *AuthRoleAddResponse) GetHeader() *ResponseHeader {
  1321. if m != nil {
  1322. return m.Header
  1323. }
  1324. return nil
  1325. }
  1326. type AuthRoleGetResponse struct {
  1327. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1328. }
  1329. func (m *AuthRoleGetResponse) Reset() { *m = AuthRoleGetResponse{} }
  1330. func (m *AuthRoleGetResponse) String() string { return proto.CompactTextString(m) }
  1331. func (*AuthRoleGetResponse) ProtoMessage() {}
  1332. func (m *AuthRoleGetResponse) GetHeader() *ResponseHeader {
  1333. if m != nil {
  1334. return m.Header
  1335. }
  1336. return nil
  1337. }
  1338. type AuthRoleDeleteResponse struct {
  1339. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1340. }
  1341. func (m *AuthRoleDeleteResponse) Reset() { *m = AuthRoleDeleteResponse{} }
  1342. func (m *AuthRoleDeleteResponse) String() string { return proto.CompactTextString(m) }
  1343. func (*AuthRoleDeleteResponse) ProtoMessage() {}
  1344. func (m *AuthRoleDeleteResponse) GetHeader() *ResponseHeader {
  1345. if m != nil {
  1346. return m.Header
  1347. }
  1348. return nil
  1349. }
  1350. type AuthRoleGrantResponse struct {
  1351. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1352. }
  1353. func (m *AuthRoleGrantResponse) Reset() { *m = AuthRoleGrantResponse{} }
  1354. func (m *AuthRoleGrantResponse) String() string { return proto.CompactTextString(m) }
  1355. func (*AuthRoleGrantResponse) ProtoMessage() {}
  1356. func (m *AuthRoleGrantResponse) GetHeader() *ResponseHeader {
  1357. if m != nil {
  1358. return m.Header
  1359. }
  1360. return nil
  1361. }
  1362. type AuthRoleRevokeResponse struct {
  1363. Header *ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
  1364. }
  1365. func (m *AuthRoleRevokeResponse) Reset() { *m = AuthRoleRevokeResponse{} }
  1366. func (m *AuthRoleRevokeResponse) String() string { return proto.CompactTextString(m) }
  1367. func (*AuthRoleRevokeResponse) ProtoMessage() {}
  1368. func (m *AuthRoleRevokeResponse) GetHeader() *ResponseHeader {
  1369. if m != nil {
  1370. return m.Header
  1371. }
  1372. return nil
  1373. }
  1374. func init() {
  1375. proto.RegisterType((*ResponseHeader)(nil), "etcdserverpb.ResponseHeader")
  1376. proto.RegisterType((*RangeRequest)(nil), "etcdserverpb.RangeRequest")
  1377. proto.RegisterType((*RangeResponse)(nil), "etcdserverpb.RangeResponse")
  1378. proto.RegisterType((*PutRequest)(nil), "etcdserverpb.PutRequest")
  1379. proto.RegisterType((*PutResponse)(nil), "etcdserverpb.PutResponse")
  1380. proto.RegisterType((*DeleteRangeRequest)(nil), "etcdserverpb.DeleteRangeRequest")
  1381. proto.RegisterType((*DeleteRangeResponse)(nil), "etcdserverpb.DeleteRangeResponse")
  1382. proto.RegisterType((*RequestUnion)(nil), "etcdserverpb.RequestUnion")
  1383. proto.RegisterType((*ResponseUnion)(nil), "etcdserverpb.ResponseUnion")
  1384. proto.RegisterType((*Compare)(nil), "etcdserverpb.Compare")
  1385. proto.RegisterType((*TxnRequest)(nil), "etcdserverpb.TxnRequest")
  1386. proto.RegisterType((*TxnResponse)(nil), "etcdserverpb.TxnResponse")
  1387. proto.RegisterType((*CompactionRequest)(nil), "etcdserverpb.CompactionRequest")
  1388. proto.RegisterType((*CompactionResponse)(nil), "etcdserverpb.CompactionResponse")
  1389. proto.RegisterType((*HashRequest)(nil), "etcdserverpb.HashRequest")
  1390. proto.RegisterType((*HashResponse)(nil), "etcdserverpb.HashResponse")
  1391. proto.RegisterType((*SnapshotRequest)(nil), "etcdserverpb.SnapshotRequest")
  1392. proto.RegisterType((*SnapshotResponse)(nil), "etcdserverpb.SnapshotResponse")
  1393. proto.RegisterType((*WatchRequest)(nil), "etcdserverpb.WatchRequest")
  1394. proto.RegisterType((*WatchCreateRequest)(nil), "etcdserverpb.WatchCreateRequest")
  1395. proto.RegisterType((*WatchCancelRequest)(nil), "etcdserverpb.WatchCancelRequest")
  1396. proto.RegisterType((*WatchResponse)(nil), "etcdserverpb.WatchResponse")
  1397. proto.RegisterType((*LeaseGrantRequest)(nil), "etcdserverpb.LeaseGrantRequest")
  1398. proto.RegisterType((*LeaseGrantResponse)(nil), "etcdserverpb.LeaseGrantResponse")
  1399. proto.RegisterType((*LeaseRevokeRequest)(nil), "etcdserverpb.LeaseRevokeRequest")
  1400. proto.RegisterType((*LeaseRevokeResponse)(nil), "etcdserverpb.LeaseRevokeResponse")
  1401. proto.RegisterType((*LeaseKeepAliveRequest)(nil), "etcdserverpb.LeaseKeepAliveRequest")
  1402. proto.RegisterType((*LeaseKeepAliveResponse)(nil), "etcdserverpb.LeaseKeepAliveResponse")
  1403. proto.RegisterType((*Member)(nil), "etcdserverpb.Member")
  1404. proto.RegisterType((*MemberAddRequest)(nil), "etcdserverpb.MemberAddRequest")
  1405. proto.RegisterType((*MemberAddResponse)(nil), "etcdserverpb.MemberAddResponse")
  1406. proto.RegisterType((*MemberRemoveRequest)(nil), "etcdserverpb.MemberRemoveRequest")
  1407. proto.RegisterType((*MemberRemoveResponse)(nil), "etcdserverpb.MemberRemoveResponse")
  1408. proto.RegisterType((*MemberUpdateRequest)(nil), "etcdserverpb.MemberUpdateRequest")
  1409. proto.RegisterType((*MemberUpdateResponse)(nil), "etcdserverpb.MemberUpdateResponse")
  1410. proto.RegisterType((*MemberListRequest)(nil), "etcdserverpb.MemberListRequest")
  1411. proto.RegisterType((*MemberListResponse)(nil), "etcdserverpb.MemberListResponse")
  1412. proto.RegisterType((*DefragmentRequest)(nil), "etcdserverpb.DefragmentRequest")
  1413. proto.RegisterType((*DefragmentResponse)(nil), "etcdserverpb.DefragmentResponse")
  1414. proto.RegisterType((*AlarmRequest)(nil), "etcdserverpb.AlarmRequest")
  1415. proto.RegisterType((*AlarmMember)(nil), "etcdserverpb.AlarmMember")
  1416. proto.RegisterType((*AlarmResponse)(nil), "etcdserverpb.AlarmResponse")
  1417. proto.RegisterType((*StatusRequest)(nil), "etcdserverpb.StatusRequest")
  1418. proto.RegisterType((*StatusResponse)(nil), "etcdserverpb.StatusResponse")
  1419. proto.RegisterType((*AuthEnableRequest)(nil), "etcdserverpb.AuthEnableRequest")
  1420. proto.RegisterType((*AuthDisableRequest)(nil), "etcdserverpb.AuthDisableRequest")
  1421. proto.RegisterType((*AuthenticateRequest)(nil), "etcdserverpb.AuthenticateRequest")
  1422. proto.RegisterType((*AuthUserAddRequest)(nil), "etcdserverpb.AuthUserAddRequest")
  1423. proto.RegisterType((*AuthUserGetRequest)(nil), "etcdserverpb.AuthUserGetRequest")
  1424. proto.RegisterType((*AuthUserDeleteRequest)(nil), "etcdserverpb.AuthUserDeleteRequest")
  1425. proto.RegisterType((*AuthUserChangePasswordRequest)(nil), "etcdserverpb.AuthUserChangePasswordRequest")
  1426. proto.RegisterType((*AuthUserGrantRequest)(nil), "etcdserverpb.AuthUserGrantRequest")
  1427. proto.RegisterType((*AuthUserRevokeRequest)(nil), "etcdserverpb.AuthUserRevokeRequest")
  1428. proto.RegisterType((*AuthRoleAddRequest)(nil), "etcdserverpb.AuthRoleAddRequest")
  1429. proto.RegisterType((*AuthRoleGetRequest)(nil), "etcdserverpb.AuthRoleGetRequest")
  1430. proto.RegisterType((*AuthRoleDeleteRequest)(nil), "etcdserverpb.AuthRoleDeleteRequest")
  1431. proto.RegisterType((*AuthRoleGrantRequest)(nil), "etcdserverpb.AuthRoleGrantRequest")
  1432. proto.RegisterType((*AuthRoleRevokeRequest)(nil), "etcdserverpb.AuthRoleRevokeRequest")
  1433. proto.RegisterType((*AuthEnableResponse)(nil), "etcdserverpb.AuthEnableResponse")
  1434. proto.RegisterType((*AuthDisableResponse)(nil), "etcdserverpb.AuthDisableResponse")
  1435. proto.RegisterType((*AuthenticateResponse)(nil), "etcdserverpb.AuthenticateResponse")
  1436. proto.RegisterType((*AuthUserAddResponse)(nil), "etcdserverpb.AuthUserAddResponse")
  1437. proto.RegisterType((*AuthUserGetResponse)(nil), "etcdserverpb.AuthUserGetResponse")
  1438. proto.RegisterType((*AuthUserDeleteResponse)(nil), "etcdserverpb.AuthUserDeleteResponse")
  1439. proto.RegisterType((*AuthUserChangePasswordResponse)(nil), "etcdserverpb.AuthUserChangePasswordResponse")
  1440. proto.RegisterType((*AuthUserGrantResponse)(nil), "etcdserverpb.AuthUserGrantResponse")
  1441. proto.RegisterType((*AuthUserRevokeResponse)(nil), "etcdserverpb.AuthUserRevokeResponse")
  1442. proto.RegisterType((*AuthRoleAddResponse)(nil), "etcdserverpb.AuthRoleAddResponse")
  1443. proto.RegisterType((*AuthRoleGetResponse)(nil), "etcdserverpb.AuthRoleGetResponse")
  1444. proto.RegisterType((*AuthRoleDeleteResponse)(nil), "etcdserverpb.AuthRoleDeleteResponse")
  1445. proto.RegisterType((*AuthRoleGrantResponse)(nil), "etcdserverpb.AuthRoleGrantResponse")
  1446. proto.RegisterType((*AuthRoleRevokeResponse)(nil), "etcdserverpb.AuthRoleRevokeResponse")
  1447. proto.RegisterEnum("etcdserverpb.AlarmType", AlarmType_name, AlarmType_value)
  1448. proto.RegisterEnum("etcdserverpb.RangeRequest_SortOrder", RangeRequest_SortOrder_name, RangeRequest_SortOrder_value)
  1449. proto.RegisterEnum("etcdserverpb.RangeRequest_SortTarget", RangeRequest_SortTarget_name, RangeRequest_SortTarget_value)
  1450. proto.RegisterEnum("etcdserverpb.Compare_CompareResult", Compare_CompareResult_name, Compare_CompareResult_value)
  1451. proto.RegisterEnum("etcdserverpb.Compare_CompareTarget", Compare_CompareTarget_name, Compare_CompareTarget_value)
  1452. proto.RegisterEnum("etcdserverpb.AlarmRequest_AlarmAction", AlarmRequest_AlarmAction_name, AlarmRequest_AlarmAction_value)
  1453. }
  1454. // Reference imports to suppress errors if they are not otherwise used.
  1455. var _ context.Context
  1456. var _ grpc.ClientConn
  1457. // Client API for KV service
  1458. type KVClient interface {
  1459. // Range gets the keys in the range from the store.
  1460. Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error)
  1461. // Put puts the given key into the store.
  1462. // A put request increases the revision of the store,
  1463. // and generates one event in the event history.
  1464. Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
  1465. // Delete deletes the given range from the store.
  1466. // A delete request increase the revision of the store,
  1467. // and generates one event in the event history.
  1468. DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error)
  1469. // Txn processes all the requests in one transaction.
  1470. // A txn request increases the revision of the store,
  1471. // and generates events with the same revision in the event history.
  1472. // It is not allowed to modify the same key several times within one txn.
  1473. Txn(ctx context.Context, in *TxnRequest, opts ...grpc.CallOption) (*TxnResponse, error)
  1474. // Compact compacts the event history in etcd. User should compact the
  1475. // event history periodically, or it will grow infinitely.
  1476. Compact(ctx context.Context, in *CompactionRequest, opts ...grpc.CallOption) (*CompactionResponse, error)
  1477. }
  1478. type kVClient struct {
  1479. cc *grpc.ClientConn
  1480. }
  1481. func NewKVClient(cc *grpc.ClientConn) KVClient {
  1482. return &kVClient{cc}
  1483. }
  1484. func (c *kVClient) Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error) {
  1485. out := new(RangeResponse)
  1486. err := grpc.Invoke(ctx, "/etcdserverpb.KV/Range", in, out, c.cc, opts...)
  1487. if err != nil {
  1488. return nil, err
  1489. }
  1490. return out, nil
  1491. }
  1492. func (c *kVClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) {
  1493. out := new(PutResponse)
  1494. err := grpc.Invoke(ctx, "/etcdserverpb.KV/Put", in, out, c.cc, opts...)
  1495. if err != nil {
  1496. return nil, err
  1497. }
  1498. return out, nil
  1499. }
  1500. func (c *kVClient) DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error) {
  1501. out := new(DeleteRangeResponse)
  1502. err := grpc.Invoke(ctx, "/etcdserverpb.KV/DeleteRange", in, out, c.cc, opts...)
  1503. if err != nil {
  1504. return nil, err
  1505. }
  1506. return out, nil
  1507. }
  1508. func (c *kVClient) Txn(ctx context.Context, in *TxnRequest, opts ...grpc.CallOption) (*TxnResponse, error) {
  1509. out := new(TxnResponse)
  1510. err := grpc.Invoke(ctx, "/etcdserverpb.KV/Txn", in, out, c.cc, opts...)
  1511. if err != nil {
  1512. return nil, err
  1513. }
  1514. return out, nil
  1515. }
  1516. func (c *kVClient) Compact(ctx context.Context, in *CompactionRequest, opts ...grpc.CallOption) (*CompactionResponse, error) {
  1517. out := new(CompactionResponse)
  1518. err := grpc.Invoke(ctx, "/etcdserverpb.KV/Compact", in, out, c.cc, opts...)
  1519. if err != nil {
  1520. return nil, err
  1521. }
  1522. return out, nil
  1523. }
  1524. // Server API for KV service
  1525. type KVServer interface {
  1526. // Range gets the keys in the range from the store.
  1527. Range(context.Context, *RangeRequest) (*RangeResponse, error)
  1528. // Put puts the given key into the store.
  1529. // A put request increases the revision of the store,
  1530. // and generates one event in the event history.
  1531. Put(context.Context, *PutRequest) (*PutResponse, error)
  1532. // Delete deletes the given range from the store.
  1533. // A delete request increase the revision of the store,
  1534. // and generates one event in the event history.
  1535. DeleteRange(context.Context, *DeleteRangeRequest) (*DeleteRangeResponse, error)
  1536. // Txn processes all the requests in one transaction.
  1537. // A txn request increases the revision of the store,
  1538. // and generates events with the same revision in the event history.
  1539. // It is not allowed to modify the same key several times within one txn.
  1540. Txn(context.Context, *TxnRequest) (*TxnResponse, error)
  1541. // Compact compacts the event history in etcd. User should compact the
  1542. // event history periodically, or it will grow infinitely.
  1543. Compact(context.Context, *CompactionRequest) (*CompactionResponse, error)
  1544. }
  1545. func RegisterKVServer(s *grpc.Server, srv KVServer) {
  1546. s.RegisterService(&_KV_serviceDesc, srv)
  1547. }
  1548. func _KV_Range_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1549. in := new(RangeRequest)
  1550. if err := dec(in); err != nil {
  1551. return nil, err
  1552. }
  1553. out, err := srv.(KVServer).Range(ctx, in)
  1554. if err != nil {
  1555. return nil, err
  1556. }
  1557. return out, nil
  1558. }
  1559. func _KV_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1560. in := new(PutRequest)
  1561. if err := dec(in); err != nil {
  1562. return nil, err
  1563. }
  1564. out, err := srv.(KVServer).Put(ctx, in)
  1565. if err != nil {
  1566. return nil, err
  1567. }
  1568. return out, nil
  1569. }
  1570. func _KV_DeleteRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1571. in := new(DeleteRangeRequest)
  1572. if err := dec(in); err != nil {
  1573. return nil, err
  1574. }
  1575. out, err := srv.(KVServer).DeleteRange(ctx, in)
  1576. if err != nil {
  1577. return nil, err
  1578. }
  1579. return out, nil
  1580. }
  1581. func _KV_Txn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1582. in := new(TxnRequest)
  1583. if err := dec(in); err != nil {
  1584. return nil, err
  1585. }
  1586. out, err := srv.(KVServer).Txn(ctx, in)
  1587. if err != nil {
  1588. return nil, err
  1589. }
  1590. return out, nil
  1591. }
  1592. func _KV_Compact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1593. in := new(CompactionRequest)
  1594. if err := dec(in); err != nil {
  1595. return nil, err
  1596. }
  1597. out, err := srv.(KVServer).Compact(ctx, in)
  1598. if err != nil {
  1599. return nil, err
  1600. }
  1601. return out, nil
  1602. }
  1603. var _KV_serviceDesc = grpc.ServiceDesc{
  1604. ServiceName: "etcdserverpb.KV",
  1605. HandlerType: (*KVServer)(nil),
  1606. Methods: []grpc.MethodDesc{
  1607. {
  1608. MethodName: "Range",
  1609. Handler: _KV_Range_Handler,
  1610. },
  1611. {
  1612. MethodName: "Put",
  1613. Handler: _KV_Put_Handler,
  1614. },
  1615. {
  1616. MethodName: "DeleteRange",
  1617. Handler: _KV_DeleteRange_Handler,
  1618. },
  1619. {
  1620. MethodName: "Txn",
  1621. Handler: _KV_Txn_Handler,
  1622. },
  1623. {
  1624. MethodName: "Compact",
  1625. Handler: _KV_Compact_Handler,
  1626. },
  1627. },
  1628. Streams: []grpc.StreamDesc{},
  1629. }
  1630. // Client API for Watch service
  1631. type WatchClient interface {
  1632. // Watch watches the events happening or happened. Both input and output
  1633. // are stream. One watch rpc can watch for multiple keys or prefixs and
  1634. // get a stream of events. The whole events history can be watched unless
  1635. // compacted.
  1636. Watch(ctx context.Context, opts ...grpc.CallOption) (Watch_WatchClient, error)
  1637. }
  1638. type watchClient struct {
  1639. cc *grpc.ClientConn
  1640. }
  1641. func NewWatchClient(cc *grpc.ClientConn) WatchClient {
  1642. return &watchClient{cc}
  1643. }
  1644. func (c *watchClient) Watch(ctx context.Context, opts ...grpc.CallOption) (Watch_WatchClient, error) {
  1645. stream, err := grpc.NewClientStream(ctx, &_Watch_serviceDesc.Streams[0], c.cc, "/etcdserverpb.Watch/Watch", opts...)
  1646. if err != nil {
  1647. return nil, err
  1648. }
  1649. x := &watchWatchClient{stream}
  1650. return x, nil
  1651. }
  1652. type Watch_WatchClient interface {
  1653. Send(*WatchRequest) error
  1654. Recv() (*WatchResponse, error)
  1655. grpc.ClientStream
  1656. }
  1657. type watchWatchClient struct {
  1658. grpc.ClientStream
  1659. }
  1660. func (x *watchWatchClient) Send(m *WatchRequest) error {
  1661. return x.ClientStream.SendMsg(m)
  1662. }
  1663. func (x *watchWatchClient) Recv() (*WatchResponse, error) {
  1664. m := new(WatchResponse)
  1665. if err := x.ClientStream.RecvMsg(m); err != nil {
  1666. return nil, err
  1667. }
  1668. return m, nil
  1669. }
  1670. // Server API for Watch service
  1671. type WatchServer interface {
  1672. // Watch watches the events happening or happened. Both input and output
  1673. // are stream. One watch rpc can watch for multiple keys or prefixs and
  1674. // get a stream of events. The whole events history can be watched unless
  1675. // compacted.
  1676. Watch(Watch_WatchServer) error
  1677. }
  1678. func RegisterWatchServer(s *grpc.Server, srv WatchServer) {
  1679. s.RegisterService(&_Watch_serviceDesc, srv)
  1680. }
  1681. func _Watch_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
  1682. return srv.(WatchServer).Watch(&watchWatchServer{stream})
  1683. }
  1684. type Watch_WatchServer interface {
  1685. Send(*WatchResponse) error
  1686. Recv() (*WatchRequest, error)
  1687. grpc.ServerStream
  1688. }
  1689. type watchWatchServer struct {
  1690. grpc.ServerStream
  1691. }
  1692. func (x *watchWatchServer) Send(m *WatchResponse) error {
  1693. return x.ServerStream.SendMsg(m)
  1694. }
  1695. func (x *watchWatchServer) Recv() (*WatchRequest, error) {
  1696. m := new(WatchRequest)
  1697. if err := x.ServerStream.RecvMsg(m); err != nil {
  1698. return nil, err
  1699. }
  1700. return m, nil
  1701. }
  1702. var _Watch_serviceDesc = grpc.ServiceDesc{
  1703. ServiceName: "etcdserverpb.Watch",
  1704. HandlerType: (*WatchServer)(nil),
  1705. Methods: []grpc.MethodDesc{},
  1706. Streams: []grpc.StreamDesc{
  1707. {
  1708. StreamName: "Watch",
  1709. Handler: _Watch_Watch_Handler,
  1710. ServerStreams: true,
  1711. ClientStreams: true,
  1712. },
  1713. },
  1714. }
  1715. // Client API for Lease service
  1716. type LeaseClient interface {
  1717. // LeaseGrant creates a lease. A lease has a TTL. The lease will expire if the
  1718. // server does not receive a keepAlive within TTL from the lease holder.
  1719. // All keys attached to the lease will be expired and deleted if the lease expires.
  1720. // The key expiration generates an event in event history.
  1721. LeaseGrant(ctx context.Context, in *LeaseGrantRequest, opts ...grpc.CallOption) (*LeaseGrantResponse, error)
  1722. // LeaseRevoke revokes a lease. All the key attached to the lease will be expired and deleted.
  1723. LeaseRevoke(ctx context.Context, in *LeaseRevokeRequest, opts ...grpc.CallOption) (*LeaseRevokeResponse, error)
  1724. // KeepAlive keeps the lease alive.
  1725. LeaseKeepAlive(ctx context.Context, opts ...grpc.CallOption) (Lease_LeaseKeepAliveClient, error)
  1726. }
  1727. type leaseClient struct {
  1728. cc *grpc.ClientConn
  1729. }
  1730. func NewLeaseClient(cc *grpc.ClientConn) LeaseClient {
  1731. return &leaseClient{cc}
  1732. }
  1733. func (c *leaseClient) LeaseGrant(ctx context.Context, in *LeaseGrantRequest, opts ...grpc.CallOption) (*LeaseGrantResponse, error) {
  1734. out := new(LeaseGrantResponse)
  1735. err := grpc.Invoke(ctx, "/etcdserverpb.Lease/LeaseGrant", in, out, c.cc, opts...)
  1736. if err != nil {
  1737. return nil, err
  1738. }
  1739. return out, nil
  1740. }
  1741. func (c *leaseClient) LeaseRevoke(ctx context.Context, in *LeaseRevokeRequest, opts ...grpc.CallOption) (*LeaseRevokeResponse, error) {
  1742. out := new(LeaseRevokeResponse)
  1743. err := grpc.Invoke(ctx, "/etcdserverpb.Lease/LeaseRevoke", in, out, c.cc, opts...)
  1744. if err != nil {
  1745. return nil, err
  1746. }
  1747. return out, nil
  1748. }
  1749. func (c *leaseClient) LeaseKeepAlive(ctx context.Context, opts ...grpc.CallOption) (Lease_LeaseKeepAliveClient, error) {
  1750. stream, err := grpc.NewClientStream(ctx, &_Lease_serviceDesc.Streams[0], c.cc, "/etcdserverpb.Lease/LeaseKeepAlive", opts...)
  1751. if err != nil {
  1752. return nil, err
  1753. }
  1754. x := &leaseLeaseKeepAliveClient{stream}
  1755. return x, nil
  1756. }
  1757. type Lease_LeaseKeepAliveClient interface {
  1758. Send(*LeaseKeepAliveRequest) error
  1759. Recv() (*LeaseKeepAliveResponse, error)
  1760. grpc.ClientStream
  1761. }
  1762. type leaseLeaseKeepAliveClient struct {
  1763. grpc.ClientStream
  1764. }
  1765. func (x *leaseLeaseKeepAliveClient) Send(m *LeaseKeepAliveRequest) error {
  1766. return x.ClientStream.SendMsg(m)
  1767. }
  1768. func (x *leaseLeaseKeepAliveClient) Recv() (*LeaseKeepAliveResponse, error) {
  1769. m := new(LeaseKeepAliveResponse)
  1770. if err := x.ClientStream.RecvMsg(m); err != nil {
  1771. return nil, err
  1772. }
  1773. return m, nil
  1774. }
  1775. // Server API for Lease service
  1776. type LeaseServer interface {
  1777. // LeaseGrant creates a lease. A lease has a TTL. The lease will expire if the
  1778. // server does not receive a keepAlive within TTL from the lease holder.
  1779. // All keys attached to the lease will be expired and deleted if the lease expires.
  1780. // The key expiration generates an event in event history.
  1781. LeaseGrant(context.Context, *LeaseGrantRequest) (*LeaseGrantResponse, error)
  1782. // LeaseRevoke revokes a lease. All the key attached to the lease will be expired and deleted.
  1783. LeaseRevoke(context.Context, *LeaseRevokeRequest) (*LeaseRevokeResponse, error)
  1784. // KeepAlive keeps the lease alive.
  1785. LeaseKeepAlive(Lease_LeaseKeepAliveServer) error
  1786. }
  1787. func RegisterLeaseServer(s *grpc.Server, srv LeaseServer) {
  1788. s.RegisterService(&_Lease_serviceDesc, srv)
  1789. }
  1790. func _Lease_LeaseGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1791. in := new(LeaseGrantRequest)
  1792. if err := dec(in); err != nil {
  1793. return nil, err
  1794. }
  1795. out, err := srv.(LeaseServer).LeaseGrant(ctx, in)
  1796. if err != nil {
  1797. return nil, err
  1798. }
  1799. return out, nil
  1800. }
  1801. func _Lease_LeaseRevoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1802. in := new(LeaseRevokeRequest)
  1803. if err := dec(in); err != nil {
  1804. return nil, err
  1805. }
  1806. out, err := srv.(LeaseServer).LeaseRevoke(ctx, in)
  1807. if err != nil {
  1808. return nil, err
  1809. }
  1810. return out, nil
  1811. }
  1812. func _Lease_LeaseKeepAlive_Handler(srv interface{}, stream grpc.ServerStream) error {
  1813. return srv.(LeaseServer).LeaseKeepAlive(&leaseLeaseKeepAliveServer{stream})
  1814. }
  1815. type Lease_LeaseKeepAliveServer interface {
  1816. Send(*LeaseKeepAliveResponse) error
  1817. Recv() (*LeaseKeepAliveRequest, error)
  1818. grpc.ServerStream
  1819. }
  1820. type leaseLeaseKeepAliveServer struct {
  1821. grpc.ServerStream
  1822. }
  1823. func (x *leaseLeaseKeepAliveServer) Send(m *LeaseKeepAliveResponse) error {
  1824. return x.ServerStream.SendMsg(m)
  1825. }
  1826. func (x *leaseLeaseKeepAliveServer) Recv() (*LeaseKeepAliveRequest, error) {
  1827. m := new(LeaseKeepAliveRequest)
  1828. if err := x.ServerStream.RecvMsg(m); err != nil {
  1829. return nil, err
  1830. }
  1831. return m, nil
  1832. }
  1833. var _Lease_serviceDesc = grpc.ServiceDesc{
  1834. ServiceName: "etcdserverpb.Lease",
  1835. HandlerType: (*LeaseServer)(nil),
  1836. Methods: []grpc.MethodDesc{
  1837. {
  1838. MethodName: "LeaseGrant",
  1839. Handler: _Lease_LeaseGrant_Handler,
  1840. },
  1841. {
  1842. MethodName: "LeaseRevoke",
  1843. Handler: _Lease_LeaseRevoke_Handler,
  1844. },
  1845. },
  1846. Streams: []grpc.StreamDesc{
  1847. {
  1848. StreamName: "LeaseKeepAlive",
  1849. Handler: _Lease_LeaseKeepAlive_Handler,
  1850. ServerStreams: true,
  1851. ClientStreams: true,
  1852. },
  1853. },
  1854. }
  1855. // Client API for Cluster service
  1856. type ClusterClient interface {
  1857. // MemberAdd adds a member into the cluster.
  1858. MemberAdd(ctx context.Context, in *MemberAddRequest, opts ...grpc.CallOption) (*MemberAddResponse, error)
  1859. // MemberRemove removes an existing member from the cluster.
  1860. MemberRemove(ctx context.Context, in *MemberRemoveRequest, opts ...grpc.CallOption) (*MemberRemoveResponse, error)
  1861. // MemberUpdate updates the member configuration.
  1862. MemberUpdate(ctx context.Context, in *MemberUpdateRequest, opts ...grpc.CallOption) (*MemberUpdateResponse, error)
  1863. // MemberList lists all the members in the cluster.
  1864. MemberList(ctx context.Context, in *MemberListRequest, opts ...grpc.CallOption) (*MemberListResponse, error)
  1865. }
  1866. type clusterClient struct {
  1867. cc *grpc.ClientConn
  1868. }
  1869. func NewClusterClient(cc *grpc.ClientConn) ClusterClient {
  1870. return &clusterClient{cc}
  1871. }
  1872. func (c *clusterClient) MemberAdd(ctx context.Context, in *MemberAddRequest, opts ...grpc.CallOption) (*MemberAddResponse, error) {
  1873. out := new(MemberAddResponse)
  1874. err := grpc.Invoke(ctx, "/etcdserverpb.Cluster/MemberAdd", in, out, c.cc, opts...)
  1875. if err != nil {
  1876. return nil, err
  1877. }
  1878. return out, nil
  1879. }
  1880. func (c *clusterClient) MemberRemove(ctx context.Context, in *MemberRemoveRequest, opts ...grpc.CallOption) (*MemberRemoveResponse, error) {
  1881. out := new(MemberRemoveResponse)
  1882. err := grpc.Invoke(ctx, "/etcdserverpb.Cluster/MemberRemove", in, out, c.cc, opts...)
  1883. if err != nil {
  1884. return nil, err
  1885. }
  1886. return out, nil
  1887. }
  1888. func (c *clusterClient) MemberUpdate(ctx context.Context, in *MemberUpdateRequest, opts ...grpc.CallOption) (*MemberUpdateResponse, error) {
  1889. out := new(MemberUpdateResponse)
  1890. err := grpc.Invoke(ctx, "/etcdserverpb.Cluster/MemberUpdate", in, out, c.cc, opts...)
  1891. if err != nil {
  1892. return nil, err
  1893. }
  1894. return out, nil
  1895. }
  1896. func (c *clusterClient) MemberList(ctx context.Context, in *MemberListRequest, opts ...grpc.CallOption) (*MemberListResponse, error) {
  1897. out := new(MemberListResponse)
  1898. err := grpc.Invoke(ctx, "/etcdserverpb.Cluster/MemberList", in, out, c.cc, opts...)
  1899. if err != nil {
  1900. return nil, err
  1901. }
  1902. return out, nil
  1903. }
  1904. // Server API for Cluster service
  1905. type ClusterServer interface {
  1906. // MemberAdd adds a member into the cluster.
  1907. MemberAdd(context.Context, *MemberAddRequest) (*MemberAddResponse, error)
  1908. // MemberRemove removes an existing member from the cluster.
  1909. MemberRemove(context.Context, *MemberRemoveRequest) (*MemberRemoveResponse, error)
  1910. // MemberUpdate updates the member configuration.
  1911. MemberUpdate(context.Context, *MemberUpdateRequest) (*MemberUpdateResponse, error)
  1912. // MemberList lists all the members in the cluster.
  1913. MemberList(context.Context, *MemberListRequest) (*MemberListResponse, error)
  1914. }
  1915. func RegisterClusterServer(s *grpc.Server, srv ClusterServer) {
  1916. s.RegisterService(&_Cluster_serviceDesc, srv)
  1917. }
  1918. func _Cluster_MemberAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1919. in := new(MemberAddRequest)
  1920. if err := dec(in); err != nil {
  1921. return nil, err
  1922. }
  1923. out, err := srv.(ClusterServer).MemberAdd(ctx, in)
  1924. if err != nil {
  1925. return nil, err
  1926. }
  1927. return out, nil
  1928. }
  1929. func _Cluster_MemberRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1930. in := new(MemberRemoveRequest)
  1931. if err := dec(in); err != nil {
  1932. return nil, err
  1933. }
  1934. out, err := srv.(ClusterServer).MemberRemove(ctx, in)
  1935. if err != nil {
  1936. return nil, err
  1937. }
  1938. return out, nil
  1939. }
  1940. func _Cluster_MemberUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1941. in := new(MemberUpdateRequest)
  1942. if err := dec(in); err != nil {
  1943. return nil, err
  1944. }
  1945. out, err := srv.(ClusterServer).MemberUpdate(ctx, in)
  1946. if err != nil {
  1947. return nil, err
  1948. }
  1949. return out, nil
  1950. }
  1951. func _Cluster_MemberList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  1952. in := new(MemberListRequest)
  1953. if err := dec(in); err != nil {
  1954. return nil, err
  1955. }
  1956. out, err := srv.(ClusterServer).MemberList(ctx, in)
  1957. if err != nil {
  1958. return nil, err
  1959. }
  1960. return out, nil
  1961. }
  1962. var _Cluster_serviceDesc = grpc.ServiceDesc{
  1963. ServiceName: "etcdserverpb.Cluster",
  1964. HandlerType: (*ClusterServer)(nil),
  1965. Methods: []grpc.MethodDesc{
  1966. {
  1967. MethodName: "MemberAdd",
  1968. Handler: _Cluster_MemberAdd_Handler,
  1969. },
  1970. {
  1971. MethodName: "MemberRemove",
  1972. Handler: _Cluster_MemberRemove_Handler,
  1973. },
  1974. {
  1975. MethodName: "MemberUpdate",
  1976. Handler: _Cluster_MemberUpdate_Handler,
  1977. },
  1978. {
  1979. MethodName: "MemberList",
  1980. Handler: _Cluster_MemberList_Handler,
  1981. },
  1982. },
  1983. Streams: []grpc.StreamDesc{},
  1984. }
  1985. // Client API for Maintenance service
  1986. type MaintenanceClient interface {
  1987. // Alarm activates, deactivates, and queries alarms regarding cluster health.
  1988. Alarm(ctx context.Context, in *AlarmRequest, opts ...grpc.CallOption) (*AlarmResponse, error)
  1989. // Status gets the status of the member.
  1990. Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
  1991. Defragment(ctx context.Context, in *DefragmentRequest, opts ...grpc.CallOption) (*DefragmentResponse, error)
  1992. // Hash returns the hash of the local KV state for consistency checking purpose.
  1993. // This is designed for testing; do not use this in production when there
  1994. // are ongoing transactions.
  1995. Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error)
  1996. // Snapshot sends a snapshot of the entire backend
  1997. Snapshot(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (Maintenance_SnapshotClient, error)
  1998. }
  1999. type maintenanceClient struct {
  2000. cc *grpc.ClientConn
  2001. }
  2002. func NewMaintenanceClient(cc *grpc.ClientConn) MaintenanceClient {
  2003. return &maintenanceClient{cc}
  2004. }
  2005. func (c *maintenanceClient) Alarm(ctx context.Context, in *AlarmRequest, opts ...grpc.CallOption) (*AlarmResponse, error) {
  2006. out := new(AlarmResponse)
  2007. err := grpc.Invoke(ctx, "/etcdserverpb.Maintenance/Alarm", in, out, c.cc, opts...)
  2008. if err != nil {
  2009. return nil, err
  2010. }
  2011. return out, nil
  2012. }
  2013. func (c *maintenanceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
  2014. out := new(StatusResponse)
  2015. err := grpc.Invoke(ctx, "/etcdserverpb.Maintenance/Status", in, out, c.cc, opts...)
  2016. if err != nil {
  2017. return nil, err
  2018. }
  2019. return out, nil
  2020. }
  2021. func (c *maintenanceClient) Defragment(ctx context.Context, in *DefragmentRequest, opts ...grpc.CallOption) (*DefragmentResponse, error) {
  2022. out := new(DefragmentResponse)
  2023. err := grpc.Invoke(ctx, "/etcdserverpb.Maintenance/Defragment", in, out, c.cc, opts...)
  2024. if err != nil {
  2025. return nil, err
  2026. }
  2027. return out, nil
  2028. }
  2029. func (c *maintenanceClient) Hash(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error) {
  2030. out := new(HashResponse)
  2031. err := grpc.Invoke(ctx, "/etcdserverpb.Maintenance/Hash", in, out, c.cc, opts...)
  2032. if err != nil {
  2033. return nil, err
  2034. }
  2035. return out, nil
  2036. }
  2037. func (c *maintenanceClient) Snapshot(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (Maintenance_SnapshotClient, error) {
  2038. stream, err := grpc.NewClientStream(ctx, &_Maintenance_serviceDesc.Streams[0], c.cc, "/etcdserverpb.Maintenance/Snapshot", opts...)
  2039. if err != nil {
  2040. return nil, err
  2041. }
  2042. x := &maintenanceSnapshotClient{stream}
  2043. if err := x.ClientStream.SendMsg(in); err != nil {
  2044. return nil, err
  2045. }
  2046. if err := x.ClientStream.CloseSend(); err != nil {
  2047. return nil, err
  2048. }
  2049. return x, nil
  2050. }
  2051. type Maintenance_SnapshotClient interface {
  2052. Recv() (*SnapshotResponse, error)
  2053. grpc.ClientStream
  2054. }
  2055. type maintenanceSnapshotClient struct {
  2056. grpc.ClientStream
  2057. }
  2058. func (x *maintenanceSnapshotClient) Recv() (*SnapshotResponse, error) {
  2059. m := new(SnapshotResponse)
  2060. if err := x.ClientStream.RecvMsg(m); err != nil {
  2061. return nil, err
  2062. }
  2063. return m, nil
  2064. }
  2065. // Server API for Maintenance service
  2066. type MaintenanceServer interface {
  2067. // Alarm activates, deactivates, and queries alarms regarding cluster health.
  2068. Alarm(context.Context, *AlarmRequest) (*AlarmResponse, error)
  2069. // Status gets the status of the member.
  2070. Status(context.Context, *StatusRequest) (*StatusResponse, error)
  2071. Defragment(context.Context, *DefragmentRequest) (*DefragmentResponse, error)
  2072. // Hash returns the hash of the local KV state for consistency checking purpose.
  2073. // This is designed for testing; do not use this in production when there
  2074. // are ongoing transactions.
  2075. Hash(context.Context, *HashRequest) (*HashResponse, error)
  2076. // Snapshot sends a snapshot of the entire backend
  2077. Snapshot(*SnapshotRequest, Maintenance_SnapshotServer) error
  2078. }
  2079. func RegisterMaintenanceServer(s *grpc.Server, srv MaintenanceServer) {
  2080. s.RegisterService(&_Maintenance_serviceDesc, srv)
  2081. }
  2082. func _Maintenance_Alarm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2083. in := new(AlarmRequest)
  2084. if err := dec(in); err != nil {
  2085. return nil, err
  2086. }
  2087. out, err := srv.(MaintenanceServer).Alarm(ctx, in)
  2088. if err != nil {
  2089. return nil, err
  2090. }
  2091. return out, nil
  2092. }
  2093. func _Maintenance_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2094. in := new(StatusRequest)
  2095. if err := dec(in); err != nil {
  2096. return nil, err
  2097. }
  2098. out, err := srv.(MaintenanceServer).Status(ctx, in)
  2099. if err != nil {
  2100. return nil, err
  2101. }
  2102. return out, nil
  2103. }
  2104. func _Maintenance_Defragment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2105. in := new(DefragmentRequest)
  2106. if err := dec(in); err != nil {
  2107. return nil, err
  2108. }
  2109. out, err := srv.(MaintenanceServer).Defragment(ctx, in)
  2110. if err != nil {
  2111. return nil, err
  2112. }
  2113. return out, nil
  2114. }
  2115. func _Maintenance_Hash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2116. in := new(HashRequest)
  2117. if err := dec(in); err != nil {
  2118. return nil, err
  2119. }
  2120. out, err := srv.(MaintenanceServer).Hash(ctx, in)
  2121. if err != nil {
  2122. return nil, err
  2123. }
  2124. return out, nil
  2125. }
  2126. func _Maintenance_Snapshot_Handler(srv interface{}, stream grpc.ServerStream) error {
  2127. m := new(SnapshotRequest)
  2128. if err := stream.RecvMsg(m); err != nil {
  2129. return err
  2130. }
  2131. return srv.(MaintenanceServer).Snapshot(m, &maintenanceSnapshotServer{stream})
  2132. }
  2133. type Maintenance_SnapshotServer interface {
  2134. Send(*SnapshotResponse) error
  2135. grpc.ServerStream
  2136. }
  2137. type maintenanceSnapshotServer struct {
  2138. grpc.ServerStream
  2139. }
  2140. func (x *maintenanceSnapshotServer) Send(m *SnapshotResponse) error {
  2141. return x.ServerStream.SendMsg(m)
  2142. }
  2143. var _Maintenance_serviceDesc = grpc.ServiceDesc{
  2144. ServiceName: "etcdserverpb.Maintenance",
  2145. HandlerType: (*MaintenanceServer)(nil),
  2146. Methods: []grpc.MethodDesc{
  2147. {
  2148. MethodName: "Alarm",
  2149. Handler: _Maintenance_Alarm_Handler,
  2150. },
  2151. {
  2152. MethodName: "Status",
  2153. Handler: _Maintenance_Status_Handler,
  2154. },
  2155. {
  2156. MethodName: "Defragment",
  2157. Handler: _Maintenance_Defragment_Handler,
  2158. },
  2159. {
  2160. MethodName: "Hash",
  2161. Handler: _Maintenance_Hash_Handler,
  2162. },
  2163. },
  2164. Streams: []grpc.StreamDesc{
  2165. {
  2166. StreamName: "Snapshot",
  2167. Handler: _Maintenance_Snapshot_Handler,
  2168. ServerStreams: true,
  2169. },
  2170. },
  2171. }
  2172. // Client API for Auth service
  2173. type AuthClient interface {
  2174. // AuthEnable enables authentication.
  2175. AuthEnable(ctx context.Context, in *AuthEnableRequest, opts ...grpc.CallOption) (*AuthEnableResponse, error)
  2176. // AuthDisable disables authentication.
  2177. AuthDisable(ctx context.Context, in *AuthDisableRequest, opts ...grpc.CallOption) (*AuthDisableResponse, error)
  2178. // Authenticate processes authenticate request.
  2179. Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
  2180. // UserAdd adds a new user.
  2181. UserAdd(ctx context.Context, in *AuthUserAddRequest, opts ...grpc.CallOption) (*AuthUserAddResponse, error)
  2182. // UserGet gets a detailed information of a user or lists entire users.
  2183. UserGet(ctx context.Context, in *AuthUserGetRequest, opts ...grpc.CallOption) (*AuthUserGetResponse, error)
  2184. // UserDelete deletes a specified user.
  2185. UserDelete(ctx context.Context, in *AuthUserDeleteRequest, opts ...grpc.CallOption) (*AuthUserDeleteResponse, error)
  2186. // UserChangePassword changes password of a specified user.
  2187. UserChangePassword(ctx context.Context, in *AuthUserChangePasswordRequest, opts ...grpc.CallOption) (*AuthUserChangePasswordResponse, error)
  2188. // UserGrant grants a role to a specified user.
  2189. UserGrant(ctx context.Context, in *AuthUserGrantRequest, opts ...grpc.CallOption) (*AuthUserGrantResponse, error)
  2190. // UserRevoke revokes a role of specified user.
  2191. UserRevoke(ctx context.Context, in *AuthUserRevokeRequest, opts ...grpc.CallOption) (*AuthUserRevokeResponse, error)
  2192. // RoleAdd adds a new role.
  2193. RoleAdd(ctx context.Context, in *AuthRoleAddRequest, opts ...grpc.CallOption) (*AuthRoleAddResponse, error)
  2194. // RoleGet gets a detailed information of a role or lists entire roles.
  2195. RoleGet(ctx context.Context, in *AuthRoleGetRequest, opts ...grpc.CallOption) (*AuthRoleGetResponse, error)
  2196. // RoleDelete deletes a specified role.
  2197. RoleDelete(ctx context.Context, in *AuthRoleDeleteRequest, opts ...grpc.CallOption) (*AuthRoleDeleteResponse, error)
  2198. // RoleGrant grants a permission of a specified key or range to a specified role.
  2199. RoleGrant(ctx context.Context, in *AuthRoleGrantRequest, opts ...grpc.CallOption) (*AuthRoleGrantResponse, error)
  2200. // RoleRevoke revokes a key or range permission of a specified role.
  2201. RoleRevoke(ctx context.Context, in *AuthRoleRevokeRequest, opts ...grpc.CallOption) (*AuthRoleRevokeResponse, error)
  2202. }
  2203. type authClient struct {
  2204. cc *grpc.ClientConn
  2205. }
  2206. func NewAuthClient(cc *grpc.ClientConn) AuthClient {
  2207. return &authClient{cc}
  2208. }
  2209. func (c *authClient) AuthEnable(ctx context.Context, in *AuthEnableRequest, opts ...grpc.CallOption) (*AuthEnableResponse, error) {
  2210. out := new(AuthEnableResponse)
  2211. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/AuthEnable", in, out, c.cc, opts...)
  2212. if err != nil {
  2213. return nil, err
  2214. }
  2215. return out, nil
  2216. }
  2217. func (c *authClient) AuthDisable(ctx context.Context, in *AuthDisableRequest, opts ...grpc.CallOption) (*AuthDisableResponse, error) {
  2218. out := new(AuthDisableResponse)
  2219. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/AuthDisable", in, out, c.cc, opts...)
  2220. if err != nil {
  2221. return nil, err
  2222. }
  2223. return out, nil
  2224. }
  2225. func (c *authClient) Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) {
  2226. out := new(AuthenticateResponse)
  2227. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/Authenticate", in, out, c.cc, opts...)
  2228. if err != nil {
  2229. return nil, err
  2230. }
  2231. return out, nil
  2232. }
  2233. func (c *authClient) UserAdd(ctx context.Context, in *AuthUserAddRequest, opts ...grpc.CallOption) (*AuthUserAddResponse, error) {
  2234. out := new(AuthUserAddResponse)
  2235. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/UserAdd", in, out, c.cc, opts...)
  2236. if err != nil {
  2237. return nil, err
  2238. }
  2239. return out, nil
  2240. }
  2241. func (c *authClient) UserGet(ctx context.Context, in *AuthUserGetRequest, opts ...grpc.CallOption) (*AuthUserGetResponse, error) {
  2242. out := new(AuthUserGetResponse)
  2243. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/UserGet", in, out, c.cc, opts...)
  2244. if err != nil {
  2245. return nil, err
  2246. }
  2247. return out, nil
  2248. }
  2249. func (c *authClient) UserDelete(ctx context.Context, in *AuthUserDeleteRequest, opts ...grpc.CallOption) (*AuthUserDeleteResponse, error) {
  2250. out := new(AuthUserDeleteResponse)
  2251. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/UserDelete", in, out, c.cc, opts...)
  2252. if err != nil {
  2253. return nil, err
  2254. }
  2255. return out, nil
  2256. }
  2257. func (c *authClient) UserChangePassword(ctx context.Context, in *AuthUserChangePasswordRequest, opts ...grpc.CallOption) (*AuthUserChangePasswordResponse, error) {
  2258. out := new(AuthUserChangePasswordResponse)
  2259. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/UserChangePassword", in, out, c.cc, opts...)
  2260. if err != nil {
  2261. return nil, err
  2262. }
  2263. return out, nil
  2264. }
  2265. func (c *authClient) UserGrant(ctx context.Context, in *AuthUserGrantRequest, opts ...grpc.CallOption) (*AuthUserGrantResponse, error) {
  2266. out := new(AuthUserGrantResponse)
  2267. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/UserGrant", in, out, c.cc, opts...)
  2268. if err != nil {
  2269. return nil, err
  2270. }
  2271. return out, nil
  2272. }
  2273. func (c *authClient) UserRevoke(ctx context.Context, in *AuthUserRevokeRequest, opts ...grpc.CallOption) (*AuthUserRevokeResponse, error) {
  2274. out := new(AuthUserRevokeResponse)
  2275. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/UserRevoke", in, out, c.cc, opts...)
  2276. if err != nil {
  2277. return nil, err
  2278. }
  2279. return out, nil
  2280. }
  2281. func (c *authClient) RoleAdd(ctx context.Context, in *AuthRoleAddRequest, opts ...grpc.CallOption) (*AuthRoleAddResponse, error) {
  2282. out := new(AuthRoleAddResponse)
  2283. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/RoleAdd", in, out, c.cc, opts...)
  2284. if err != nil {
  2285. return nil, err
  2286. }
  2287. return out, nil
  2288. }
  2289. func (c *authClient) RoleGet(ctx context.Context, in *AuthRoleGetRequest, opts ...grpc.CallOption) (*AuthRoleGetResponse, error) {
  2290. out := new(AuthRoleGetResponse)
  2291. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/RoleGet", in, out, c.cc, opts...)
  2292. if err != nil {
  2293. return nil, err
  2294. }
  2295. return out, nil
  2296. }
  2297. func (c *authClient) RoleDelete(ctx context.Context, in *AuthRoleDeleteRequest, opts ...grpc.CallOption) (*AuthRoleDeleteResponse, error) {
  2298. out := new(AuthRoleDeleteResponse)
  2299. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/RoleDelete", in, out, c.cc, opts...)
  2300. if err != nil {
  2301. return nil, err
  2302. }
  2303. return out, nil
  2304. }
  2305. func (c *authClient) RoleGrant(ctx context.Context, in *AuthRoleGrantRequest, opts ...grpc.CallOption) (*AuthRoleGrantResponse, error) {
  2306. out := new(AuthRoleGrantResponse)
  2307. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/RoleGrant", in, out, c.cc, opts...)
  2308. if err != nil {
  2309. return nil, err
  2310. }
  2311. return out, nil
  2312. }
  2313. func (c *authClient) RoleRevoke(ctx context.Context, in *AuthRoleRevokeRequest, opts ...grpc.CallOption) (*AuthRoleRevokeResponse, error) {
  2314. out := new(AuthRoleRevokeResponse)
  2315. err := grpc.Invoke(ctx, "/etcdserverpb.Auth/RoleRevoke", in, out, c.cc, opts...)
  2316. if err != nil {
  2317. return nil, err
  2318. }
  2319. return out, nil
  2320. }
  2321. // Server API for Auth service
  2322. type AuthServer interface {
  2323. // AuthEnable enables authentication.
  2324. AuthEnable(context.Context, *AuthEnableRequest) (*AuthEnableResponse, error)
  2325. // AuthDisable disables authentication.
  2326. AuthDisable(context.Context, *AuthDisableRequest) (*AuthDisableResponse, error)
  2327. // Authenticate processes authenticate request.
  2328. Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
  2329. // UserAdd adds a new user.
  2330. UserAdd(context.Context, *AuthUserAddRequest) (*AuthUserAddResponse, error)
  2331. // UserGet gets a detailed information of a user or lists entire users.
  2332. UserGet(context.Context, *AuthUserGetRequest) (*AuthUserGetResponse, error)
  2333. // UserDelete deletes a specified user.
  2334. UserDelete(context.Context, *AuthUserDeleteRequest) (*AuthUserDeleteResponse, error)
  2335. // UserChangePassword changes password of a specified user.
  2336. UserChangePassword(context.Context, *AuthUserChangePasswordRequest) (*AuthUserChangePasswordResponse, error)
  2337. // UserGrant grants a role to a specified user.
  2338. UserGrant(context.Context, *AuthUserGrantRequest) (*AuthUserGrantResponse, error)
  2339. // UserRevoke revokes a role of specified user.
  2340. UserRevoke(context.Context, *AuthUserRevokeRequest) (*AuthUserRevokeResponse, error)
  2341. // RoleAdd adds a new role.
  2342. RoleAdd(context.Context, *AuthRoleAddRequest) (*AuthRoleAddResponse, error)
  2343. // RoleGet gets a detailed information of a role or lists entire roles.
  2344. RoleGet(context.Context, *AuthRoleGetRequest) (*AuthRoleGetResponse, error)
  2345. // RoleDelete deletes a specified role.
  2346. RoleDelete(context.Context, *AuthRoleDeleteRequest) (*AuthRoleDeleteResponse, error)
  2347. // RoleGrant grants a permission of a specified key or range to a specified role.
  2348. RoleGrant(context.Context, *AuthRoleGrantRequest) (*AuthRoleGrantResponse, error)
  2349. // RoleRevoke revokes a key or range permission of a specified role.
  2350. RoleRevoke(context.Context, *AuthRoleRevokeRequest) (*AuthRoleRevokeResponse, error)
  2351. }
  2352. func RegisterAuthServer(s *grpc.Server, srv AuthServer) {
  2353. s.RegisterService(&_Auth_serviceDesc, srv)
  2354. }
  2355. func _Auth_AuthEnable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2356. in := new(AuthEnableRequest)
  2357. if err := dec(in); err != nil {
  2358. return nil, err
  2359. }
  2360. out, err := srv.(AuthServer).AuthEnable(ctx, in)
  2361. if err != nil {
  2362. return nil, err
  2363. }
  2364. return out, nil
  2365. }
  2366. func _Auth_AuthDisable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2367. in := new(AuthDisableRequest)
  2368. if err := dec(in); err != nil {
  2369. return nil, err
  2370. }
  2371. out, err := srv.(AuthServer).AuthDisable(ctx, in)
  2372. if err != nil {
  2373. return nil, err
  2374. }
  2375. return out, nil
  2376. }
  2377. func _Auth_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2378. in := new(AuthenticateRequest)
  2379. if err := dec(in); err != nil {
  2380. return nil, err
  2381. }
  2382. out, err := srv.(AuthServer).Authenticate(ctx, in)
  2383. if err != nil {
  2384. return nil, err
  2385. }
  2386. return out, nil
  2387. }
  2388. func _Auth_UserAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2389. in := new(AuthUserAddRequest)
  2390. if err := dec(in); err != nil {
  2391. return nil, err
  2392. }
  2393. out, err := srv.(AuthServer).UserAdd(ctx, in)
  2394. if err != nil {
  2395. return nil, err
  2396. }
  2397. return out, nil
  2398. }
  2399. func _Auth_UserGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2400. in := new(AuthUserGetRequest)
  2401. if err := dec(in); err != nil {
  2402. return nil, err
  2403. }
  2404. out, err := srv.(AuthServer).UserGet(ctx, in)
  2405. if err != nil {
  2406. return nil, err
  2407. }
  2408. return out, nil
  2409. }
  2410. func _Auth_UserDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2411. in := new(AuthUserDeleteRequest)
  2412. if err := dec(in); err != nil {
  2413. return nil, err
  2414. }
  2415. out, err := srv.(AuthServer).UserDelete(ctx, in)
  2416. if err != nil {
  2417. return nil, err
  2418. }
  2419. return out, nil
  2420. }
  2421. func _Auth_UserChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2422. in := new(AuthUserChangePasswordRequest)
  2423. if err := dec(in); err != nil {
  2424. return nil, err
  2425. }
  2426. out, err := srv.(AuthServer).UserChangePassword(ctx, in)
  2427. if err != nil {
  2428. return nil, err
  2429. }
  2430. return out, nil
  2431. }
  2432. func _Auth_UserGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2433. in := new(AuthUserGrantRequest)
  2434. if err := dec(in); err != nil {
  2435. return nil, err
  2436. }
  2437. out, err := srv.(AuthServer).UserGrant(ctx, in)
  2438. if err != nil {
  2439. return nil, err
  2440. }
  2441. return out, nil
  2442. }
  2443. func _Auth_UserRevoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2444. in := new(AuthUserRevokeRequest)
  2445. if err := dec(in); err != nil {
  2446. return nil, err
  2447. }
  2448. out, err := srv.(AuthServer).UserRevoke(ctx, in)
  2449. if err != nil {
  2450. return nil, err
  2451. }
  2452. return out, nil
  2453. }
  2454. func _Auth_RoleAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2455. in := new(AuthRoleAddRequest)
  2456. if err := dec(in); err != nil {
  2457. return nil, err
  2458. }
  2459. out, err := srv.(AuthServer).RoleAdd(ctx, in)
  2460. if err != nil {
  2461. return nil, err
  2462. }
  2463. return out, nil
  2464. }
  2465. func _Auth_RoleGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2466. in := new(AuthRoleGetRequest)
  2467. if err := dec(in); err != nil {
  2468. return nil, err
  2469. }
  2470. out, err := srv.(AuthServer).RoleGet(ctx, in)
  2471. if err != nil {
  2472. return nil, err
  2473. }
  2474. return out, nil
  2475. }
  2476. func _Auth_RoleDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2477. in := new(AuthRoleDeleteRequest)
  2478. if err := dec(in); err != nil {
  2479. return nil, err
  2480. }
  2481. out, err := srv.(AuthServer).RoleDelete(ctx, in)
  2482. if err != nil {
  2483. return nil, err
  2484. }
  2485. return out, nil
  2486. }
  2487. func _Auth_RoleGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2488. in := new(AuthRoleGrantRequest)
  2489. if err := dec(in); err != nil {
  2490. return nil, err
  2491. }
  2492. out, err := srv.(AuthServer).RoleGrant(ctx, in)
  2493. if err != nil {
  2494. return nil, err
  2495. }
  2496. return out, nil
  2497. }
  2498. func _Auth_RoleRevoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
  2499. in := new(AuthRoleRevokeRequest)
  2500. if err := dec(in); err != nil {
  2501. return nil, err
  2502. }
  2503. out, err := srv.(AuthServer).RoleRevoke(ctx, in)
  2504. if err != nil {
  2505. return nil, err
  2506. }
  2507. return out, nil
  2508. }
  2509. var _Auth_serviceDesc = grpc.ServiceDesc{
  2510. ServiceName: "etcdserverpb.Auth",
  2511. HandlerType: (*AuthServer)(nil),
  2512. Methods: []grpc.MethodDesc{
  2513. {
  2514. MethodName: "AuthEnable",
  2515. Handler: _Auth_AuthEnable_Handler,
  2516. },
  2517. {
  2518. MethodName: "AuthDisable",
  2519. Handler: _Auth_AuthDisable_Handler,
  2520. },
  2521. {
  2522. MethodName: "Authenticate",
  2523. Handler: _Auth_Authenticate_Handler,
  2524. },
  2525. {
  2526. MethodName: "UserAdd",
  2527. Handler: _Auth_UserAdd_Handler,
  2528. },
  2529. {
  2530. MethodName: "UserGet",
  2531. Handler: _Auth_UserGet_Handler,
  2532. },
  2533. {
  2534. MethodName: "UserDelete",
  2535. Handler: _Auth_UserDelete_Handler,
  2536. },
  2537. {
  2538. MethodName: "UserChangePassword",
  2539. Handler: _Auth_UserChangePassword_Handler,
  2540. },
  2541. {
  2542. MethodName: "UserGrant",
  2543. Handler: _Auth_UserGrant_Handler,
  2544. },
  2545. {
  2546. MethodName: "UserRevoke",
  2547. Handler: _Auth_UserRevoke_Handler,
  2548. },
  2549. {
  2550. MethodName: "RoleAdd",
  2551. Handler: _Auth_RoleAdd_Handler,
  2552. },
  2553. {
  2554. MethodName: "RoleGet",
  2555. Handler: _Auth_RoleGet_Handler,
  2556. },
  2557. {
  2558. MethodName: "RoleDelete",
  2559. Handler: _Auth_RoleDelete_Handler,
  2560. },
  2561. {
  2562. MethodName: "RoleGrant",
  2563. Handler: _Auth_RoleGrant_Handler,
  2564. },
  2565. {
  2566. MethodName: "RoleRevoke",
  2567. Handler: _Auth_RoleRevoke_Handler,
  2568. },
  2569. },
  2570. Streams: []grpc.StreamDesc{},
  2571. }
  2572. func (m *ResponseHeader) Marshal() (data []byte, err error) {
  2573. size := m.Size()
  2574. data = make([]byte, size)
  2575. n, err := m.MarshalTo(data)
  2576. if err != nil {
  2577. return nil, err
  2578. }
  2579. return data[:n], nil
  2580. }
  2581. func (m *ResponseHeader) MarshalTo(data []byte) (int, error) {
  2582. var i int
  2583. _ = i
  2584. var l int
  2585. _ = l
  2586. if m.ClusterId != 0 {
  2587. data[i] = 0x8
  2588. i++
  2589. i = encodeVarintRpc(data, i, uint64(m.ClusterId))
  2590. }
  2591. if m.MemberId != 0 {
  2592. data[i] = 0x10
  2593. i++
  2594. i = encodeVarintRpc(data, i, uint64(m.MemberId))
  2595. }
  2596. if m.Revision != 0 {
  2597. data[i] = 0x18
  2598. i++
  2599. i = encodeVarintRpc(data, i, uint64(m.Revision))
  2600. }
  2601. if m.RaftTerm != 0 {
  2602. data[i] = 0x20
  2603. i++
  2604. i = encodeVarintRpc(data, i, uint64(m.RaftTerm))
  2605. }
  2606. return i, nil
  2607. }
  2608. func (m *RangeRequest) Marshal() (data []byte, err error) {
  2609. size := m.Size()
  2610. data = make([]byte, size)
  2611. n, err := m.MarshalTo(data)
  2612. if err != nil {
  2613. return nil, err
  2614. }
  2615. return data[:n], nil
  2616. }
  2617. func (m *RangeRequest) MarshalTo(data []byte) (int, error) {
  2618. var i int
  2619. _ = i
  2620. var l int
  2621. _ = l
  2622. if m.Key != nil {
  2623. if len(m.Key) > 0 {
  2624. data[i] = 0xa
  2625. i++
  2626. i = encodeVarintRpc(data, i, uint64(len(m.Key)))
  2627. i += copy(data[i:], m.Key)
  2628. }
  2629. }
  2630. if m.RangeEnd != nil {
  2631. if len(m.RangeEnd) > 0 {
  2632. data[i] = 0x12
  2633. i++
  2634. i = encodeVarintRpc(data, i, uint64(len(m.RangeEnd)))
  2635. i += copy(data[i:], m.RangeEnd)
  2636. }
  2637. }
  2638. if m.Limit != 0 {
  2639. data[i] = 0x18
  2640. i++
  2641. i = encodeVarintRpc(data, i, uint64(m.Limit))
  2642. }
  2643. if m.Revision != 0 {
  2644. data[i] = 0x20
  2645. i++
  2646. i = encodeVarintRpc(data, i, uint64(m.Revision))
  2647. }
  2648. if m.SortOrder != 0 {
  2649. data[i] = 0x28
  2650. i++
  2651. i = encodeVarintRpc(data, i, uint64(m.SortOrder))
  2652. }
  2653. if m.SortTarget != 0 {
  2654. data[i] = 0x30
  2655. i++
  2656. i = encodeVarintRpc(data, i, uint64(m.SortTarget))
  2657. }
  2658. if m.Serializable {
  2659. data[i] = 0x38
  2660. i++
  2661. if m.Serializable {
  2662. data[i] = 1
  2663. } else {
  2664. data[i] = 0
  2665. }
  2666. i++
  2667. }
  2668. return i, nil
  2669. }
  2670. func (m *RangeResponse) Marshal() (data []byte, err error) {
  2671. size := m.Size()
  2672. data = make([]byte, size)
  2673. n, err := m.MarshalTo(data)
  2674. if err != nil {
  2675. return nil, err
  2676. }
  2677. return data[:n], nil
  2678. }
  2679. func (m *RangeResponse) MarshalTo(data []byte) (int, error) {
  2680. var i int
  2681. _ = i
  2682. var l int
  2683. _ = l
  2684. if m.Header != nil {
  2685. data[i] = 0xa
  2686. i++
  2687. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  2688. n1, err := m.Header.MarshalTo(data[i:])
  2689. if err != nil {
  2690. return 0, err
  2691. }
  2692. i += n1
  2693. }
  2694. if len(m.Kvs) > 0 {
  2695. for _, msg := range m.Kvs {
  2696. data[i] = 0x12
  2697. i++
  2698. i = encodeVarintRpc(data, i, uint64(msg.Size()))
  2699. n, err := msg.MarshalTo(data[i:])
  2700. if err != nil {
  2701. return 0, err
  2702. }
  2703. i += n
  2704. }
  2705. }
  2706. if m.More {
  2707. data[i] = 0x18
  2708. i++
  2709. if m.More {
  2710. data[i] = 1
  2711. } else {
  2712. data[i] = 0
  2713. }
  2714. i++
  2715. }
  2716. return i, nil
  2717. }
  2718. func (m *PutRequest) Marshal() (data []byte, err error) {
  2719. size := m.Size()
  2720. data = make([]byte, size)
  2721. n, err := m.MarshalTo(data)
  2722. if err != nil {
  2723. return nil, err
  2724. }
  2725. return data[:n], nil
  2726. }
  2727. func (m *PutRequest) MarshalTo(data []byte) (int, error) {
  2728. var i int
  2729. _ = i
  2730. var l int
  2731. _ = l
  2732. if m.Key != nil {
  2733. if len(m.Key) > 0 {
  2734. data[i] = 0xa
  2735. i++
  2736. i = encodeVarintRpc(data, i, uint64(len(m.Key)))
  2737. i += copy(data[i:], m.Key)
  2738. }
  2739. }
  2740. if m.Value != nil {
  2741. if len(m.Value) > 0 {
  2742. data[i] = 0x12
  2743. i++
  2744. i = encodeVarintRpc(data, i, uint64(len(m.Value)))
  2745. i += copy(data[i:], m.Value)
  2746. }
  2747. }
  2748. if m.Lease != 0 {
  2749. data[i] = 0x18
  2750. i++
  2751. i = encodeVarintRpc(data, i, uint64(m.Lease))
  2752. }
  2753. return i, nil
  2754. }
  2755. func (m *PutResponse) Marshal() (data []byte, err error) {
  2756. size := m.Size()
  2757. data = make([]byte, size)
  2758. n, err := m.MarshalTo(data)
  2759. if err != nil {
  2760. return nil, err
  2761. }
  2762. return data[:n], nil
  2763. }
  2764. func (m *PutResponse) MarshalTo(data []byte) (int, error) {
  2765. var i int
  2766. _ = i
  2767. var l int
  2768. _ = l
  2769. if m.Header != nil {
  2770. data[i] = 0xa
  2771. i++
  2772. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  2773. n2, err := m.Header.MarshalTo(data[i:])
  2774. if err != nil {
  2775. return 0, err
  2776. }
  2777. i += n2
  2778. }
  2779. return i, nil
  2780. }
  2781. func (m *DeleteRangeRequest) Marshal() (data []byte, err error) {
  2782. size := m.Size()
  2783. data = make([]byte, size)
  2784. n, err := m.MarshalTo(data)
  2785. if err != nil {
  2786. return nil, err
  2787. }
  2788. return data[:n], nil
  2789. }
  2790. func (m *DeleteRangeRequest) MarshalTo(data []byte) (int, error) {
  2791. var i int
  2792. _ = i
  2793. var l int
  2794. _ = l
  2795. if m.Key != nil {
  2796. if len(m.Key) > 0 {
  2797. data[i] = 0xa
  2798. i++
  2799. i = encodeVarintRpc(data, i, uint64(len(m.Key)))
  2800. i += copy(data[i:], m.Key)
  2801. }
  2802. }
  2803. if m.RangeEnd != nil {
  2804. if len(m.RangeEnd) > 0 {
  2805. data[i] = 0x12
  2806. i++
  2807. i = encodeVarintRpc(data, i, uint64(len(m.RangeEnd)))
  2808. i += copy(data[i:], m.RangeEnd)
  2809. }
  2810. }
  2811. return i, nil
  2812. }
  2813. func (m *DeleteRangeResponse) Marshal() (data []byte, err error) {
  2814. size := m.Size()
  2815. data = make([]byte, size)
  2816. n, err := m.MarshalTo(data)
  2817. if err != nil {
  2818. return nil, err
  2819. }
  2820. return data[:n], nil
  2821. }
  2822. func (m *DeleteRangeResponse) MarshalTo(data []byte) (int, error) {
  2823. var i int
  2824. _ = i
  2825. var l int
  2826. _ = l
  2827. if m.Header != nil {
  2828. data[i] = 0xa
  2829. i++
  2830. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  2831. n3, err := m.Header.MarshalTo(data[i:])
  2832. if err != nil {
  2833. return 0, err
  2834. }
  2835. i += n3
  2836. }
  2837. if m.Deleted != 0 {
  2838. data[i] = 0x10
  2839. i++
  2840. i = encodeVarintRpc(data, i, uint64(m.Deleted))
  2841. }
  2842. return i, nil
  2843. }
  2844. func (m *RequestUnion) Marshal() (data []byte, err error) {
  2845. size := m.Size()
  2846. data = make([]byte, size)
  2847. n, err := m.MarshalTo(data)
  2848. if err != nil {
  2849. return nil, err
  2850. }
  2851. return data[:n], nil
  2852. }
  2853. func (m *RequestUnion) MarshalTo(data []byte) (int, error) {
  2854. var i int
  2855. _ = i
  2856. var l int
  2857. _ = l
  2858. if m.Request != nil {
  2859. nn4, err := m.Request.MarshalTo(data[i:])
  2860. if err != nil {
  2861. return 0, err
  2862. }
  2863. i += nn4
  2864. }
  2865. return i, nil
  2866. }
  2867. func (m *RequestUnion_RequestRange) MarshalTo(data []byte) (int, error) {
  2868. i := 0
  2869. if m.RequestRange != nil {
  2870. data[i] = 0xa
  2871. i++
  2872. i = encodeVarintRpc(data, i, uint64(m.RequestRange.Size()))
  2873. n5, err := m.RequestRange.MarshalTo(data[i:])
  2874. if err != nil {
  2875. return 0, err
  2876. }
  2877. i += n5
  2878. }
  2879. return i, nil
  2880. }
  2881. func (m *RequestUnion_RequestPut) MarshalTo(data []byte) (int, error) {
  2882. i := 0
  2883. if m.RequestPut != nil {
  2884. data[i] = 0x12
  2885. i++
  2886. i = encodeVarintRpc(data, i, uint64(m.RequestPut.Size()))
  2887. n6, err := m.RequestPut.MarshalTo(data[i:])
  2888. if err != nil {
  2889. return 0, err
  2890. }
  2891. i += n6
  2892. }
  2893. return i, nil
  2894. }
  2895. func (m *RequestUnion_RequestDeleteRange) MarshalTo(data []byte) (int, error) {
  2896. i := 0
  2897. if m.RequestDeleteRange != nil {
  2898. data[i] = 0x1a
  2899. i++
  2900. i = encodeVarintRpc(data, i, uint64(m.RequestDeleteRange.Size()))
  2901. n7, err := m.RequestDeleteRange.MarshalTo(data[i:])
  2902. if err != nil {
  2903. return 0, err
  2904. }
  2905. i += n7
  2906. }
  2907. return i, nil
  2908. }
  2909. func (m *ResponseUnion) Marshal() (data []byte, err error) {
  2910. size := m.Size()
  2911. data = make([]byte, size)
  2912. n, err := m.MarshalTo(data)
  2913. if err != nil {
  2914. return nil, err
  2915. }
  2916. return data[:n], nil
  2917. }
  2918. func (m *ResponseUnion) MarshalTo(data []byte) (int, error) {
  2919. var i int
  2920. _ = i
  2921. var l int
  2922. _ = l
  2923. if m.Response != nil {
  2924. nn8, err := m.Response.MarshalTo(data[i:])
  2925. if err != nil {
  2926. return 0, err
  2927. }
  2928. i += nn8
  2929. }
  2930. return i, nil
  2931. }
  2932. func (m *ResponseUnion_ResponseRange) MarshalTo(data []byte) (int, error) {
  2933. i := 0
  2934. if m.ResponseRange != nil {
  2935. data[i] = 0xa
  2936. i++
  2937. i = encodeVarintRpc(data, i, uint64(m.ResponseRange.Size()))
  2938. n9, err := m.ResponseRange.MarshalTo(data[i:])
  2939. if err != nil {
  2940. return 0, err
  2941. }
  2942. i += n9
  2943. }
  2944. return i, nil
  2945. }
  2946. func (m *ResponseUnion_ResponsePut) MarshalTo(data []byte) (int, error) {
  2947. i := 0
  2948. if m.ResponsePut != nil {
  2949. data[i] = 0x12
  2950. i++
  2951. i = encodeVarintRpc(data, i, uint64(m.ResponsePut.Size()))
  2952. n10, err := m.ResponsePut.MarshalTo(data[i:])
  2953. if err != nil {
  2954. return 0, err
  2955. }
  2956. i += n10
  2957. }
  2958. return i, nil
  2959. }
  2960. func (m *ResponseUnion_ResponseDeleteRange) MarshalTo(data []byte) (int, error) {
  2961. i := 0
  2962. if m.ResponseDeleteRange != nil {
  2963. data[i] = 0x1a
  2964. i++
  2965. i = encodeVarintRpc(data, i, uint64(m.ResponseDeleteRange.Size()))
  2966. n11, err := m.ResponseDeleteRange.MarshalTo(data[i:])
  2967. if err != nil {
  2968. return 0, err
  2969. }
  2970. i += n11
  2971. }
  2972. return i, nil
  2973. }
  2974. func (m *Compare) Marshal() (data []byte, err error) {
  2975. size := m.Size()
  2976. data = make([]byte, size)
  2977. n, err := m.MarshalTo(data)
  2978. if err != nil {
  2979. return nil, err
  2980. }
  2981. return data[:n], nil
  2982. }
  2983. func (m *Compare) MarshalTo(data []byte) (int, error) {
  2984. var i int
  2985. _ = i
  2986. var l int
  2987. _ = l
  2988. if m.Result != 0 {
  2989. data[i] = 0x8
  2990. i++
  2991. i = encodeVarintRpc(data, i, uint64(m.Result))
  2992. }
  2993. if m.Target != 0 {
  2994. data[i] = 0x10
  2995. i++
  2996. i = encodeVarintRpc(data, i, uint64(m.Target))
  2997. }
  2998. if m.Key != nil {
  2999. if len(m.Key) > 0 {
  3000. data[i] = 0x1a
  3001. i++
  3002. i = encodeVarintRpc(data, i, uint64(len(m.Key)))
  3003. i += copy(data[i:], m.Key)
  3004. }
  3005. }
  3006. if m.TargetUnion != nil {
  3007. nn12, err := m.TargetUnion.MarshalTo(data[i:])
  3008. if err != nil {
  3009. return 0, err
  3010. }
  3011. i += nn12
  3012. }
  3013. return i, nil
  3014. }
  3015. func (m *Compare_Version) MarshalTo(data []byte) (int, error) {
  3016. i := 0
  3017. data[i] = 0x20
  3018. i++
  3019. i = encodeVarintRpc(data, i, uint64(m.Version))
  3020. return i, nil
  3021. }
  3022. func (m *Compare_CreateRevision) MarshalTo(data []byte) (int, error) {
  3023. i := 0
  3024. data[i] = 0x28
  3025. i++
  3026. i = encodeVarintRpc(data, i, uint64(m.CreateRevision))
  3027. return i, nil
  3028. }
  3029. func (m *Compare_ModRevision) MarshalTo(data []byte) (int, error) {
  3030. i := 0
  3031. data[i] = 0x30
  3032. i++
  3033. i = encodeVarintRpc(data, i, uint64(m.ModRevision))
  3034. return i, nil
  3035. }
  3036. func (m *Compare_Value) MarshalTo(data []byte) (int, error) {
  3037. i := 0
  3038. if m.Value != nil {
  3039. data[i] = 0x3a
  3040. i++
  3041. i = encodeVarintRpc(data, i, uint64(len(m.Value)))
  3042. i += copy(data[i:], m.Value)
  3043. }
  3044. return i, nil
  3045. }
  3046. func (m *TxnRequest) Marshal() (data []byte, err error) {
  3047. size := m.Size()
  3048. data = make([]byte, size)
  3049. n, err := m.MarshalTo(data)
  3050. if err != nil {
  3051. return nil, err
  3052. }
  3053. return data[:n], nil
  3054. }
  3055. func (m *TxnRequest) MarshalTo(data []byte) (int, error) {
  3056. var i int
  3057. _ = i
  3058. var l int
  3059. _ = l
  3060. if len(m.Compare) > 0 {
  3061. for _, msg := range m.Compare {
  3062. data[i] = 0xa
  3063. i++
  3064. i = encodeVarintRpc(data, i, uint64(msg.Size()))
  3065. n, err := msg.MarshalTo(data[i:])
  3066. if err != nil {
  3067. return 0, err
  3068. }
  3069. i += n
  3070. }
  3071. }
  3072. if len(m.Success) > 0 {
  3073. for _, msg := range m.Success {
  3074. data[i] = 0x12
  3075. i++
  3076. i = encodeVarintRpc(data, i, uint64(msg.Size()))
  3077. n, err := msg.MarshalTo(data[i:])
  3078. if err != nil {
  3079. return 0, err
  3080. }
  3081. i += n
  3082. }
  3083. }
  3084. if len(m.Failure) > 0 {
  3085. for _, msg := range m.Failure {
  3086. data[i] = 0x1a
  3087. i++
  3088. i = encodeVarintRpc(data, i, uint64(msg.Size()))
  3089. n, err := msg.MarshalTo(data[i:])
  3090. if err != nil {
  3091. return 0, err
  3092. }
  3093. i += n
  3094. }
  3095. }
  3096. return i, nil
  3097. }
  3098. func (m *TxnResponse) Marshal() (data []byte, err error) {
  3099. size := m.Size()
  3100. data = make([]byte, size)
  3101. n, err := m.MarshalTo(data)
  3102. if err != nil {
  3103. return nil, err
  3104. }
  3105. return data[:n], nil
  3106. }
  3107. func (m *TxnResponse) MarshalTo(data []byte) (int, error) {
  3108. var i int
  3109. _ = i
  3110. var l int
  3111. _ = l
  3112. if m.Header != nil {
  3113. data[i] = 0xa
  3114. i++
  3115. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3116. n13, err := m.Header.MarshalTo(data[i:])
  3117. if err != nil {
  3118. return 0, err
  3119. }
  3120. i += n13
  3121. }
  3122. if m.Succeeded {
  3123. data[i] = 0x10
  3124. i++
  3125. if m.Succeeded {
  3126. data[i] = 1
  3127. } else {
  3128. data[i] = 0
  3129. }
  3130. i++
  3131. }
  3132. if len(m.Responses) > 0 {
  3133. for _, msg := range m.Responses {
  3134. data[i] = 0x1a
  3135. i++
  3136. i = encodeVarintRpc(data, i, uint64(msg.Size()))
  3137. n, err := msg.MarshalTo(data[i:])
  3138. if err != nil {
  3139. return 0, err
  3140. }
  3141. i += n
  3142. }
  3143. }
  3144. return i, nil
  3145. }
  3146. func (m *CompactionRequest) Marshal() (data []byte, err error) {
  3147. size := m.Size()
  3148. data = make([]byte, size)
  3149. n, err := m.MarshalTo(data)
  3150. if err != nil {
  3151. return nil, err
  3152. }
  3153. return data[:n], nil
  3154. }
  3155. func (m *CompactionRequest) MarshalTo(data []byte) (int, error) {
  3156. var i int
  3157. _ = i
  3158. var l int
  3159. _ = l
  3160. if m.Revision != 0 {
  3161. data[i] = 0x8
  3162. i++
  3163. i = encodeVarintRpc(data, i, uint64(m.Revision))
  3164. }
  3165. if m.Physical {
  3166. data[i] = 0x10
  3167. i++
  3168. if m.Physical {
  3169. data[i] = 1
  3170. } else {
  3171. data[i] = 0
  3172. }
  3173. i++
  3174. }
  3175. return i, nil
  3176. }
  3177. func (m *CompactionResponse) Marshal() (data []byte, err error) {
  3178. size := m.Size()
  3179. data = make([]byte, size)
  3180. n, err := m.MarshalTo(data)
  3181. if err != nil {
  3182. return nil, err
  3183. }
  3184. return data[:n], nil
  3185. }
  3186. func (m *CompactionResponse) MarshalTo(data []byte) (int, error) {
  3187. var i int
  3188. _ = i
  3189. var l int
  3190. _ = l
  3191. if m.Header != nil {
  3192. data[i] = 0xa
  3193. i++
  3194. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3195. n14, err := m.Header.MarshalTo(data[i:])
  3196. if err != nil {
  3197. return 0, err
  3198. }
  3199. i += n14
  3200. }
  3201. return i, nil
  3202. }
  3203. func (m *HashRequest) Marshal() (data []byte, err error) {
  3204. size := m.Size()
  3205. data = make([]byte, size)
  3206. n, err := m.MarshalTo(data)
  3207. if err != nil {
  3208. return nil, err
  3209. }
  3210. return data[:n], nil
  3211. }
  3212. func (m *HashRequest) MarshalTo(data []byte) (int, error) {
  3213. var i int
  3214. _ = i
  3215. var l int
  3216. _ = l
  3217. return i, nil
  3218. }
  3219. func (m *HashResponse) Marshal() (data []byte, err error) {
  3220. size := m.Size()
  3221. data = make([]byte, size)
  3222. n, err := m.MarshalTo(data)
  3223. if err != nil {
  3224. return nil, err
  3225. }
  3226. return data[:n], nil
  3227. }
  3228. func (m *HashResponse) MarshalTo(data []byte) (int, error) {
  3229. var i int
  3230. _ = i
  3231. var l int
  3232. _ = l
  3233. if m.Header != nil {
  3234. data[i] = 0xa
  3235. i++
  3236. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3237. n15, err := m.Header.MarshalTo(data[i:])
  3238. if err != nil {
  3239. return 0, err
  3240. }
  3241. i += n15
  3242. }
  3243. if m.Hash != 0 {
  3244. data[i] = 0x10
  3245. i++
  3246. i = encodeVarintRpc(data, i, uint64(m.Hash))
  3247. }
  3248. return i, nil
  3249. }
  3250. func (m *SnapshotRequest) Marshal() (data []byte, err error) {
  3251. size := m.Size()
  3252. data = make([]byte, size)
  3253. n, err := m.MarshalTo(data)
  3254. if err != nil {
  3255. return nil, err
  3256. }
  3257. return data[:n], nil
  3258. }
  3259. func (m *SnapshotRequest) MarshalTo(data []byte) (int, error) {
  3260. var i int
  3261. _ = i
  3262. var l int
  3263. _ = l
  3264. return i, nil
  3265. }
  3266. func (m *SnapshotResponse) Marshal() (data []byte, err error) {
  3267. size := m.Size()
  3268. data = make([]byte, size)
  3269. n, err := m.MarshalTo(data)
  3270. if err != nil {
  3271. return nil, err
  3272. }
  3273. return data[:n], nil
  3274. }
  3275. func (m *SnapshotResponse) MarshalTo(data []byte) (int, error) {
  3276. var i int
  3277. _ = i
  3278. var l int
  3279. _ = l
  3280. if m.Header != nil {
  3281. data[i] = 0xa
  3282. i++
  3283. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3284. n16, err := m.Header.MarshalTo(data[i:])
  3285. if err != nil {
  3286. return 0, err
  3287. }
  3288. i += n16
  3289. }
  3290. if m.RemainingBytes != 0 {
  3291. data[i] = 0x10
  3292. i++
  3293. i = encodeVarintRpc(data, i, uint64(m.RemainingBytes))
  3294. }
  3295. if m.Blob != nil {
  3296. if len(m.Blob) > 0 {
  3297. data[i] = 0x1a
  3298. i++
  3299. i = encodeVarintRpc(data, i, uint64(len(m.Blob)))
  3300. i += copy(data[i:], m.Blob)
  3301. }
  3302. }
  3303. return i, nil
  3304. }
  3305. func (m *WatchRequest) Marshal() (data []byte, err error) {
  3306. size := m.Size()
  3307. data = make([]byte, size)
  3308. n, err := m.MarshalTo(data)
  3309. if err != nil {
  3310. return nil, err
  3311. }
  3312. return data[:n], nil
  3313. }
  3314. func (m *WatchRequest) MarshalTo(data []byte) (int, error) {
  3315. var i int
  3316. _ = i
  3317. var l int
  3318. _ = l
  3319. if m.RequestUnion != nil {
  3320. nn17, err := m.RequestUnion.MarshalTo(data[i:])
  3321. if err != nil {
  3322. return 0, err
  3323. }
  3324. i += nn17
  3325. }
  3326. return i, nil
  3327. }
  3328. func (m *WatchRequest_CreateRequest) MarshalTo(data []byte) (int, error) {
  3329. i := 0
  3330. if m.CreateRequest != nil {
  3331. data[i] = 0xa
  3332. i++
  3333. i = encodeVarintRpc(data, i, uint64(m.CreateRequest.Size()))
  3334. n18, err := m.CreateRequest.MarshalTo(data[i:])
  3335. if err != nil {
  3336. return 0, err
  3337. }
  3338. i += n18
  3339. }
  3340. return i, nil
  3341. }
  3342. func (m *WatchRequest_CancelRequest) MarshalTo(data []byte) (int, error) {
  3343. i := 0
  3344. if m.CancelRequest != nil {
  3345. data[i] = 0x12
  3346. i++
  3347. i = encodeVarintRpc(data, i, uint64(m.CancelRequest.Size()))
  3348. n19, err := m.CancelRequest.MarshalTo(data[i:])
  3349. if err != nil {
  3350. return 0, err
  3351. }
  3352. i += n19
  3353. }
  3354. return i, nil
  3355. }
  3356. func (m *WatchCreateRequest) Marshal() (data []byte, err error) {
  3357. size := m.Size()
  3358. data = make([]byte, size)
  3359. n, err := m.MarshalTo(data)
  3360. if err != nil {
  3361. return nil, err
  3362. }
  3363. return data[:n], nil
  3364. }
  3365. func (m *WatchCreateRequest) MarshalTo(data []byte) (int, error) {
  3366. var i int
  3367. _ = i
  3368. var l int
  3369. _ = l
  3370. if m.Key != nil {
  3371. if len(m.Key) > 0 {
  3372. data[i] = 0xa
  3373. i++
  3374. i = encodeVarintRpc(data, i, uint64(len(m.Key)))
  3375. i += copy(data[i:], m.Key)
  3376. }
  3377. }
  3378. if m.RangeEnd != nil {
  3379. if len(m.RangeEnd) > 0 {
  3380. data[i] = 0x12
  3381. i++
  3382. i = encodeVarintRpc(data, i, uint64(len(m.RangeEnd)))
  3383. i += copy(data[i:], m.RangeEnd)
  3384. }
  3385. }
  3386. if m.StartRevision != 0 {
  3387. data[i] = 0x18
  3388. i++
  3389. i = encodeVarintRpc(data, i, uint64(m.StartRevision))
  3390. }
  3391. if m.ProgressNotify {
  3392. data[i] = 0x20
  3393. i++
  3394. if m.ProgressNotify {
  3395. data[i] = 1
  3396. } else {
  3397. data[i] = 0
  3398. }
  3399. i++
  3400. }
  3401. return i, nil
  3402. }
  3403. func (m *WatchCancelRequest) Marshal() (data []byte, err error) {
  3404. size := m.Size()
  3405. data = make([]byte, size)
  3406. n, err := m.MarshalTo(data)
  3407. if err != nil {
  3408. return nil, err
  3409. }
  3410. return data[:n], nil
  3411. }
  3412. func (m *WatchCancelRequest) MarshalTo(data []byte) (int, error) {
  3413. var i int
  3414. _ = i
  3415. var l int
  3416. _ = l
  3417. if m.WatchId != 0 {
  3418. data[i] = 0x8
  3419. i++
  3420. i = encodeVarintRpc(data, i, uint64(m.WatchId))
  3421. }
  3422. return i, nil
  3423. }
  3424. func (m *WatchResponse) Marshal() (data []byte, err error) {
  3425. size := m.Size()
  3426. data = make([]byte, size)
  3427. n, err := m.MarshalTo(data)
  3428. if err != nil {
  3429. return nil, err
  3430. }
  3431. return data[:n], nil
  3432. }
  3433. func (m *WatchResponse) MarshalTo(data []byte) (int, error) {
  3434. var i int
  3435. _ = i
  3436. var l int
  3437. _ = l
  3438. if m.Header != nil {
  3439. data[i] = 0xa
  3440. i++
  3441. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3442. n20, err := m.Header.MarshalTo(data[i:])
  3443. if err != nil {
  3444. return 0, err
  3445. }
  3446. i += n20
  3447. }
  3448. if m.WatchId != 0 {
  3449. data[i] = 0x10
  3450. i++
  3451. i = encodeVarintRpc(data, i, uint64(m.WatchId))
  3452. }
  3453. if m.Created {
  3454. data[i] = 0x18
  3455. i++
  3456. if m.Created {
  3457. data[i] = 1
  3458. } else {
  3459. data[i] = 0
  3460. }
  3461. i++
  3462. }
  3463. if m.Canceled {
  3464. data[i] = 0x20
  3465. i++
  3466. if m.Canceled {
  3467. data[i] = 1
  3468. } else {
  3469. data[i] = 0
  3470. }
  3471. i++
  3472. }
  3473. if m.CompactRevision != 0 {
  3474. data[i] = 0x28
  3475. i++
  3476. i = encodeVarintRpc(data, i, uint64(m.CompactRevision))
  3477. }
  3478. if len(m.Events) > 0 {
  3479. for _, msg := range m.Events {
  3480. data[i] = 0x5a
  3481. i++
  3482. i = encodeVarintRpc(data, i, uint64(msg.Size()))
  3483. n, err := msg.MarshalTo(data[i:])
  3484. if err != nil {
  3485. return 0, err
  3486. }
  3487. i += n
  3488. }
  3489. }
  3490. return i, nil
  3491. }
  3492. func (m *LeaseGrantRequest) Marshal() (data []byte, err error) {
  3493. size := m.Size()
  3494. data = make([]byte, size)
  3495. n, err := m.MarshalTo(data)
  3496. if err != nil {
  3497. return nil, err
  3498. }
  3499. return data[:n], nil
  3500. }
  3501. func (m *LeaseGrantRequest) MarshalTo(data []byte) (int, error) {
  3502. var i int
  3503. _ = i
  3504. var l int
  3505. _ = l
  3506. if m.TTL != 0 {
  3507. data[i] = 0x8
  3508. i++
  3509. i = encodeVarintRpc(data, i, uint64(m.TTL))
  3510. }
  3511. if m.ID != 0 {
  3512. data[i] = 0x10
  3513. i++
  3514. i = encodeVarintRpc(data, i, uint64(m.ID))
  3515. }
  3516. return i, nil
  3517. }
  3518. func (m *LeaseGrantResponse) Marshal() (data []byte, err error) {
  3519. size := m.Size()
  3520. data = make([]byte, size)
  3521. n, err := m.MarshalTo(data)
  3522. if err != nil {
  3523. return nil, err
  3524. }
  3525. return data[:n], nil
  3526. }
  3527. func (m *LeaseGrantResponse) MarshalTo(data []byte) (int, error) {
  3528. var i int
  3529. _ = i
  3530. var l int
  3531. _ = l
  3532. if m.Header != nil {
  3533. data[i] = 0xa
  3534. i++
  3535. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3536. n21, err := m.Header.MarshalTo(data[i:])
  3537. if err != nil {
  3538. return 0, err
  3539. }
  3540. i += n21
  3541. }
  3542. if m.ID != 0 {
  3543. data[i] = 0x10
  3544. i++
  3545. i = encodeVarintRpc(data, i, uint64(m.ID))
  3546. }
  3547. if m.TTL != 0 {
  3548. data[i] = 0x18
  3549. i++
  3550. i = encodeVarintRpc(data, i, uint64(m.TTL))
  3551. }
  3552. if len(m.Error) > 0 {
  3553. data[i] = 0x22
  3554. i++
  3555. i = encodeVarintRpc(data, i, uint64(len(m.Error)))
  3556. i += copy(data[i:], m.Error)
  3557. }
  3558. return i, nil
  3559. }
  3560. func (m *LeaseRevokeRequest) Marshal() (data []byte, err error) {
  3561. size := m.Size()
  3562. data = make([]byte, size)
  3563. n, err := m.MarshalTo(data)
  3564. if err != nil {
  3565. return nil, err
  3566. }
  3567. return data[:n], nil
  3568. }
  3569. func (m *LeaseRevokeRequest) MarshalTo(data []byte) (int, error) {
  3570. var i int
  3571. _ = i
  3572. var l int
  3573. _ = l
  3574. if m.ID != 0 {
  3575. data[i] = 0x8
  3576. i++
  3577. i = encodeVarintRpc(data, i, uint64(m.ID))
  3578. }
  3579. return i, nil
  3580. }
  3581. func (m *LeaseRevokeResponse) Marshal() (data []byte, err error) {
  3582. size := m.Size()
  3583. data = make([]byte, size)
  3584. n, err := m.MarshalTo(data)
  3585. if err != nil {
  3586. return nil, err
  3587. }
  3588. return data[:n], nil
  3589. }
  3590. func (m *LeaseRevokeResponse) MarshalTo(data []byte) (int, error) {
  3591. var i int
  3592. _ = i
  3593. var l int
  3594. _ = l
  3595. if m.Header != nil {
  3596. data[i] = 0xa
  3597. i++
  3598. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3599. n22, err := m.Header.MarshalTo(data[i:])
  3600. if err != nil {
  3601. return 0, err
  3602. }
  3603. i += n22
  3604. }
  3605. return i, nil
  3606. }
  3607. func (m *LeaseKeepAliveRequest) Marshal() (data []byte, err error) {
  3608. size := m.Size()
  3609. data = make([]byte, size)
  3610. n, err := m.MarshalTo(data)
  3611. if err != nil {
  3612. return nil, err
  3613. }
  3614. return data[:n], nil
  3615. }
  3616. func (m *LeaseKeepAliveRequest) MarshalTo(data []byte) (int, error) {
  3617. var i int
  3618. _ = i
  3619. var l int
  3620. _ = l
  3621. if m.ID != 0 {
  3622. data[i] = 0x8
  3623. i++
  3624. i = encodeVarintRpc(data, i, uint64(m.ID))
  3625. }
  3626. return i, nil
  3627. }
  3628. func (m *LeaseKeepAliveResponse) Marshal() (data []byte, err error) {
  3629. size := m.Size()
  3630. data = make([]byte, size)
  3631. n, err := m.MarshalTo(data)
  3632. if err != nil {
  3633. return nil, err
  3634. }
  3635. return data[:n], nil
  3636. }
  3637. func (m *LeaseKeepAliveResponse) MarshalTo(data []byte) (int, error) {
  3638. var i int
  3639. _ = i
  3640. var l int
  3641. _ = l
  3642. if m.Header != nil {
  3643. data[i] = 0xa
  3644. i++
  3645. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3646. n23, err := m.Header.MarshalTo(data[i:])
  3647. if err != nil {
  3648. return 0, err
  3649. }
  3650. i += n23
  3651. }
  3652. if m.ID != 0 {
  3653. data[i] = 0x10
  3654. i++
  3655. i = encodeVarintRpc(data, i, uint64(m.ID))
  3656. }
  3657. if m.TTL != 0 {
  3658. data[i] = 0x18
  3659. i++
  3660. i = encodeVarintRpc(data, i, uint64(m.TTL))
  3661. }
  3662. return i, nil
  3663. }
  3664. func (m *Member) Marshal() (data []byte, err error) {
  3665. size := m.Size()
  3666. data = make([]byte, size)
  3667. n, err := m.MarshalTo(data)
  3668. if err != nil {
  3669. return nil, err
  3670. }
  3671. return data[:n], nil
  3672. }
  3673. func (m *Member) MarshalTo(data []byte) (int, error) {
  3674. var i int
  3675. _ = i
  3676. var l int
  3677. _ = l
  3678. if m.ID != 0 {
  3679. data[i] = 0x8
  3680. i++
  3681. i = encodeVarintRpc(data, i, uint64(m.ID))
  3682. }
  3683. if len(m.Name) > 0 {
  3684. data[i] = 0x12
  3685. i++
  3686. i = encodeVarintRpc(data, i, uint64(len(m.Name)))
  3687. i += copy(data[i:], m.Name)
  3688. }
  3689. if m.IsLeader {
  3690. data[i] = 0x18
  3691. i++
  3692. if m.IsLeader {
  3693. data[i] = 1
  3694. } else {
  3695. data[i] = 0
  3696. }
  3697. i++
  3698. }
  3699. if len(m.PeerURLs) > 0 {
  3700. for _, s := range m.PeerURLs {
  3701. data[i] = 0x22
  3702. i++
  3703. l = len(s)
  3704. for l >= 1<<7 {
  3705. data[i] = uint8(uint64(l)&0x7f | 0x80)
  3706. l >>= 7
  3707. i++
  3708. }
  3709. data[i] = uint8(l)
  3710. i++
  3711. i += copy(data[i:], s)
  3712. }
  3713. }
  3714. if len(m.ClientURLs) > 0 {
  3715. for _, s := range m.ClientURLs {
  3716. data[i] = 0x2a
  3717. i++
  3718. l = len(s)
  3719. for l >= 1<<7 {
  3720. data[i] = uint8(uint64(l)&0x7f | 0x80)
  3721. l >>= 7
  3722. i++
  3723. }
  3724. data[i] = uint8(l)
  3725. i++
  3726. i += copy(data[i:], s)
  3727. }
  3728. }
  3729. return i, nil
  3730. }
  3731. func (m *MemberAddRequest) Marshal() (data []byte, err error) {
  3732. size := m.Size()
  3733. data = make([]byte, size)
  3734. n, err := m.MarshalTo(data)
  3735. if err != nil {
  3736. return nil, err
  3737. }
  3738. return data[:n], nil
  3739. }
  3740. func (m *MemberAddRequest) MarshalTo(data []byte) (int, error) {
  3741. var i int
  3742. _ = i
  3743. var l int
  3744. _ = l
  3745. if len(m.PeerURLs) > 0 {
  3746. for _, s := range m.PeerURLs {
  3747. data[i] = 0xa
  3748. i++
  3749. l = len(s)
  3750. for l >= 1<<7 {
  3751. data[i] = uint8(uint64(l)&0x7f | 0x80)
  3752. l >>= 7
  3753. i++
  3754. }
  3755. data[i] = uint8(l)
  3756. i++
  3757. i += copy(data[i:], s)
  3758. }
  3759. }
  3760. return i, nil
  3761. }
  3762. func (m *MemberAddResponse) Marshal() (data []byte, err error) {
  3763. size := m.Size()
  3764. data = make([]byte, size)
  3765. n, err := m.MarshalTo(data)
  3766. if err != nil {
  3767. return nil, err
  3768. }
  3769. return data[:n], nil
  3770. }
  3771. func (m *MemberAddResponse) MarshalTo(data []byte) (int, error) {
  3772. var i int
  3773. _ = i
  3774. var l int
  3775. _ = l
  3776. if m.Header != nil {
  3777. data[i] = 0xa
  3778. i++
  3779. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3780. n24, err := m.Header.MarshalTo(data[i:])
  3781. if err != nil {
  3782. return 0, err
  3783. }
  3784. i += n24
  3785. }
  3786. if m.Member != nil {
  3787. data[i] = 0x12
  3788. i++
  3789. i = encodeVarintRpc(data, i, uint64(m.Member.Size()))
  3790. n25, err := m.Member.MarshalTo(data[i:])
  3791. if err != nil {
  3792. return 0, err
  3793. }
  3794. i += n25
  3795. }
  3796. return i, nil
  3797. }
  3798. func (m *MemberRemoveRequest) Marshal() (data []byte, err error) {
  3799. size := m.Size()
  3800. data = make([]byte, size)
  3801. n, err := m.MarshalTo(data)
  3802. if err != nil {
  3803. return nil, err
  3804. }
  3805. return data[:n], nil
  3806. }
  3807. func (m *MemberRemoveRequest) MarshalTo(data []byte) (int, error) {
  3808. var i int
  3809. _ = i
  3810. var l int
  3811. _ = l
  3812. if m.ID != 0 {
  3813. data[i] = 0x8
  3814. i++
  3815. i = encodeVarintRpc(data, i, uint64(m.ID))
  3816. }
  3817. return i, nil
  3818. }
  3819. func (m *MemberRemoveResponse) Marshal() (data []byte, err error) {
  3820. size := m.Size()
  3821. data = make([]byte, size)
  3822. n, err := m.MarshalTo(data)
  3823. if err != nil {
  3824. return nil, err
  3825. }
  3826. return data[:n], nil
  3827. }
  3828. func (m *MemberRemoveResponse) MarshalTo(data []byte) (int, error) {
  3829. var i int
  3830. _ = i
  3831. var l int
  3832. _ = l
  3833. if m.Header != nil {
  3834. data[i] = 0xa
  3835. i++
  3836. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3837. n26, err := m.Header.MarshalTo(data[i:])
  3838. if err != nil {
  3839. return 0, err
  3840. }
  3841. i += n26
  3842. }
  3843. return i, nil
  3844. }
  3845. func (m *MemberUpdateRequest) Marshal() (data []byte, err error) {
  3846. size := m.Size()
  3847. data = make([]byte, size)
  3848. n, err := m.MarshalTo(data)
  3849. if err != nil {
  3850. return nil, err
  3851. }
  3852. return data[:n], nil
  3853. }
  3854. func (m *MemberUpdateRequest) MarshalTo(data []byte) (int, error) {
  3855. var i int
  3856. _ = i
  3857. var l int
  3858. _ = l
  3859. if m.ID != 0 {
  3860. data[i] = 0x8
  3861. i++
  3862. i = encodeVarintRpc(data, i, uint64(m.ID))
  3863. }
  3864. if len(m.PeerURLs) > 0 {
  3865. for _, s := range m.PeerURLs {
  3866. data[i] = 0x12
  3867. i++
  3868. l = len(s)
  3869. for l >= 1<<7 {
  3870. data[i] = uint8(uint64(l)&0x7f | 0x80)
  3871. l >>= 7
  3872. i++
  3873. }
  3874. data[i] = uint8(l)
  3875. i++
  3876. i += copy(data[i:], s)
  3877. }
  3878. }
  3879. return i, nil
  3880. }
  3881. func (m *MemberUpdateResponse) Marshal() (data []byte, err error) {
  3882. size := m.Size()
  3883. data = make([]byte, size)
  3884. n, err := m.MarshalTo(data)
  3885. if err != nil {
  3886. return nil, err
  3887. }
  3888. return data[:n], nil
  3889. }
  3890. func (m *MemberUpdateResponse) MarshalTo(data []byte) (int, error) {
  3891. var i int
  3892. _ = i
  3893. var l int
  3894. _ = l
  3895. if m.Header != nil {
  3896. data[i] = 0xa
  3897. i++
  3898. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3899. n27, err := m.Header.MarshalTo(data[i:])
  3900. if err != nil {
  3901. return 0, err
  3902. }
  3903. i += n27
  3904. }
  3905. return i, nil
  3906. }
  3907. func (m *MemberListRequest) Marshal() (data []byte, err error) {
  3908. size := m.Size()
  3909. data = make([]byte, size)
  3910. n, err := m.MarshalTo(data)
  3911. if err != nil {
  3912. return nil, err
  3913. }
  3914. return data[:n], nil
  3915. }
  3916. func (m *MemberListRequest) MarshalTo(data []byte) (int, error) {
  3917. var i int
  3918. _ = i
  3919. var l int
  3920. _ = l
  3921. return i, nil
  3922. }
  3923. func (m *MemberListResponse) Marshal() (data []byte, err error) {
  3924. size := m.Size()
  3925. data = make([]byte, size)
  3926. n, err := m.MarshalTo(data)
  3927. if err != nil {
  3928. return nil, err
  3929. }
  3930. return data[:n], nil
  3931. }
  3932. func (m *MemberListResponse) MarshalTo(data []byte) (int, error) {
  3933. var i int
  3934. _ = i
  3935. var l int
  3936. _ = l
  3937. if m.Header != nil {
  3938. data[i] = 0xa
  3939. i++
  3940. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3941. n28, err := m.Header.MarshalTo(data[i:])
  3942. if err != nil {
  3943. return 0, err
  3944. }
  3945. i += n28
  3946. }
  3947. if len(m.Members) > 0 {
  3948. for _, msg := range m.Members {
  3949. data[i] = 0x12
  3950. i++
  3951. i = encodeVarintRpc(data, i, uint64(msg.Size()))
  3952. n, err := msg.MarshalTo(data[i:])
  3953. if err != nil {
  3954. return 0, err
  3955. }
  3956. i += n
  3957. }
  3958. }
  3959. return i, nil
  3960. }
  3961. func (m *DefragmentRequest) Marshal() (data []byte, err error) {
  3962. size := m.Size()
  3963. data = make([]byte, size)
  3964. n, err := m.MarshalTo(data)
  3965. if err != nil {
  3966. return nil, err
  3967. }
  3968. return data[:n], nil
  3969. }
  3970. func (m *DefragmentRequest) MarshalTo(data []byte) (int, error) {
  3971. var i int
  3972. _ = i
  3973. var l int
  3974. _ = l
  3975. return i, nil
  3976. }
  3977. func (m *DefragmentResponse) Marshal() (data []byte, err error) {
  3978. size := m.Size()
  3979. data = make([]byte, size)
  3980. n, err := m.MarshalTo(data)
  3981. if err != nil {
  3982. return nil, err
  3983. }
  3984. return data[:n], nil
  3985. }
  3986. func (m *DefragmentResponse) MarshalTo(data []byte) (int, error) {
  3987. var i int
  3988. _ = i
  3989. var l int
  3990. _ = l
  3991. if m.Header != nil {
  3992. data[i] = 0xa
  3993. i++
  3994. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  3995. n29, err := m.Header.MarshalTo(data[i:])
  3996. if err != nil {
  3997. return 0, err
  3998. }
  3999. i += n29
  4000. }
  4001. return i, nil
  4002. }
  4003. func (m *AlarmRequest) Marshal() (data []byte, err error) {
  4004. size := m.Size()
  4005. data = make([]byte, size)
  4006. n, err := m.MarshalTo(data)
  4007. if err != nil {
  4008. return nil, err
  4009. }
  4010. return data[:n], nil
  4011. }
  4012. func (m *AlarmRequest) MarshalTo(data []byte) (int, error) {
  4013. var i int
  4014. _ = i
  4015. var l int
  4016. _ = l
  4017. if m.Action != 0 {
  4018. data[i] = 0x8
  4019. i++
  4020. i = encodeVarintRpc(data, i, uint64(m.Action))
  4021. }
  4022. if m.MemberID != 0 {
  4023. data[i] = 0x10
  4024. i++
  4025. i = encodeVarintRpc(data, i, uint64(m.MemberID))
  4026. }
  4027. if m.Alarm != 0 {
  4028. data[i] = 0x18
  4029. i++
  4030. i = encodeVarintRpc(data, i, uint64(m.Alarm))
  4031. }
  4032. return i, nil
  4033. }
  4034. func (m *AlarmMember) Marshal() (data []byte, err error) {
  4035. size := m.Size()
  4036. data = make([]byte, size)
  4037. n, err := m.MarshalTo(data)
  4038. if err != nil {
  4039. return nil, err
  4040. }
  4041. return data[:n], nil
  4042. }
  4043. func (m *AlarmMember) MarshalTo(data []byte) (int, error) {
  4044. var i int
  4045. _ = i
  4046. var l int
  4047. _ = l
  4048. if m.MemberID != 0 {
  4049. data[i] = 0x8
  4050. i++
  4051. i = encodeVarintRpc(data, i, uint64(m.MemberID))
  4052. }
  4053. if m.Alarm != 0 {
  4054. data[i] = 0x10
  4055. i++
  4056. i = encodeVarintRpc(data, i, uint64(m.Alarm))
  4057. }
  4058. return i, nil
  4059. }
  4060. func (m *AlarmResponse) Marshal() (data []byte, err error) {
  4061. size := m.Size()
  4062. data = make([]byte, size)
  4063. n, err := m.MarshalTo(data)
  4064. if err != nil {
  4065. return nil, err
  4066. }
  4067. return data[:n], nil
  4068. }
  4069. func (m *AlarmResponse) MarshalTo(data []byte) (int, error) {
  4070. var i int
  4071. _ = i
  4072. var l int
  4073. _ = l
  4074. if m.Header != nil {
  4075. data[i] = 0xa
  4076. i++
  4077. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4078. n30, err := m.Header.MarshalTo(data[i:])
  4079. if err != nil {
  4080. return 0, err
  4081. }
  4082. i += n30
  4083. }
  4084. if len(m.Alarms) > 0 {
  4085. for _, msg := range m.Alarms {
  4086. data[i] = 0x12
  4087. i++
  4088. i = encodeVarintRpc(data, i, uint64(msg.Size()))
  4089. n, err := msg.MarshalTo(data[i:])
  4090. if err != nil {
  4091. return 0, err
  4092. }
  4093. i += n
  4094. }
  4095. }
  4096. return i, nil
  4097. }
  4098. func (m *StatusRequest) Marshal() (data []byte, err error) {
  4099. size := m.Size()
  4100. data = make([]byte, size)
  4101. n, err := m.MarshalTo(data)
  4102. if err != nil {
  4103. return nil, err
  4104. }
  4105. return data[:n], nil
  4106. }
  4107. func (m *StatusRequest) MarshalTo(data []byte) (int, error) {
  4108. var i int
  4109. _ = i
  4110. var l int
  4111. _ = l
  4112. return i, nil
  4113. }
  4114. func (m *StatusResponse) Marshal() (data []byte, err error) {
  4115. size := m.Size()
  4116. data = make([]byte, size)
  4117. n, err := m.MarshalTo(data)
  4118. if err != nil {
  4119. return nil, err
  4120. }
  4121. return data[:n], nil
  4122. }
  4123. func (m *StatusResponse) MarshalTo(data []byte) (int, error) {
  4124. var i int
  4125. _ = i
  4126. var l int
  4127. _ = l
  4128. if m.Header != nil {
  4129. data[i] = 0xa
  4130. i++
  4131. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4132. n31, err := m.Header.MarshalTo(data[i:])
  4133. if err != nil {
  4134. return 0, err
  4135. }
  4136. i += n31
  4137. }
  4138. if len(m.Version) > 0 {
  4139. data[i] = 0x12
  4140. i++
  4141. i = encodeVarintRpc(data, i, uint64(len(m.Version)))
  4142. i += copy(data[i:], m.Version)
  4143. }
  4144. if m.DbSize != 0 {
  4145. data[i] = 0x18
  4146. i++
  4147. i = encodeVarintRpc(data, i, uint64(m.DbSize))
  4148. }
  4149. if m.Leader != 0 {
  4150. data[i] = 0x20
  4151. i++
  4152. i = encodeVarintRpc(data, i, uint64(m.Leader))
  4153. }
  4154. if m.RaftIndex != 0 {
  4155. data[i] = 0x28
  4156. i++
  4157. i = encodeVarintRpc(data, i, uint64(m.RaftIndex))
  4158. }
  4159. if m.RaftTerm != 0 {
  4160. data[i] = 0x30
  4161. i++
  4162. i = encodeVarintRpc(data, i, uint64(m.RaftTerm))
  4163. }
  4164. return i, nil
  4165. }
  4166. func (m *AuthEnableRequest) Marshal() (data []byte, err error) {
  4167. size := m.Size()
  4168. data = make([]byte, size)
  4169. n, err := m.MarshalTo(data)
  4170. if err != nil {
  4171. return nil, err
  4172. }
  4173. return data[:n], nil
  4174. }
  4175. func (m *AuthEnableRequest) MarshalTo(data []byte) (int, error) {
  4176. var i int
  4177. _ = i
  4178. var l int
  4179. _ = l
  4180. return i, nil
  4181. }
  4182. func (m *AuthDisableRequest) Marshal() (data []byte, err error) {
  4183. size := m.Size()
  4184. data = make([]byte, size)
  4185. n, err := m.MarshalTo(data)
  4186. if err != nil {
  4187. return nil, err
  4188. }
  4189. return data[:n], nil
  4190. }
  4191. func (m *AuthDisableRequest) MarshalTo(data []byte) (int, error) {
  4192. var i int
  4193. _ = i
  4194. var l int
  4195. _ = l
  4196. return i, nil
  4197. }
  4198. func (m *AuthenticateRequest) Marshal() (data []byte, err error) {
  4199. size := m.Size()
  4200. data = make([]byte, size)
  4201. n, err := m.MarshalTo(data)
  4202. if err != nil {
  4203. return nil, err
  4204. }
  4205. return data[:n], nil
  4206. }
  4207. func (m *AuthenticateRequest) MarshalTo(data []byte) (int, error) {
  4208. var i int
  4209. _ = i
  4210. var l int
  4211. _ = l
  4212. return i, nil
  4213. }
  4214. func (m *AuthUserAddRequest) Marshal() (data []byte, err error) {
  4215. size := m.Size()
  4216. data = make([]byte, size)
  4217. n, err := m.MarshalTo(data)
  4218. if err != nil {
  4219. return nil, err
  4220. }
  4221. return data[:n], nil
  4222. }
  4223. func (m *AuthUserAddRequest) MarshalTo(data []byte) (int, error) {
  4224. var i int
  4225. _ = i
  4226. var l int
  4227. _ = l
  4228. if len(m.Name) > 0 {
  4229. data[i] = 0xa
  4230. i++
  4231. i = encodeVarintRpc(data, i, uint64(len(m.Name)))
  4232. i += copy(data[i:], m.Name)
  4233. }
  4234. if len(m.Password) > 0 {
  4235. data[i] = 0x12
  4236. i++
  4237. i = encodeVarintRpc(data, i, uint64(len(m.Password)))
  4238. i += copy(data[i:], m.Password)
  4239. }
  4240. return i, nil
  4241. }
  4242. func (m *AuthUserGetRequest) Marshal() (data []byte, err error) {
  4243. size := m.Size()
  4244. data = make([]byte, size)
  4245. n, err := m.MarshalTo(data)
  4246. if err != nil {
  4247. return nil, err
  4248. }
  4249. return data[:n], nil
  4250. }
  4251. func (m *AuthUserGetRequest) MarshalTo(data []byte) (int, error) {
  4252. var i int
  4253. _ = i
  4254. var l int
  4255. _ = l
  4256. return i, nil
  4257. }
  4258. func (m *AuthUserDeleteRequest) Marshal() (data []byte, err error) {
  4259. size := m.Size()
  4260. data = make([]byte, size)
  4261. n, err := m.MarshalTo(data)
  4262. if err != nil {
  4263. return nil, err
  4264. }
  4265. return data[:n], nil
  4266. }
  4267. func (m *AuthUserDeleteRequest) MarshalTo(data []byte) (int, error) {
  4268. var i int
  4269. _ = i
  4270. var l int
  4271. _ = l
  4272. if len(m.Name) > 0 {
  4273. data[i] = 0xa
  4274. i++
  4275. i = encodeVarintRpc(data, i, uint64(len(m.Name)))
  4276. i += copy(data[i:], m.Name)
  4277. }
  4278. return i, nil
  4279. }
  4280. func (m *AuthUserChangePasswordRequest) Marshal() (data []byte, err error) {
  4281. size := m.Size()
  4282. data = make([]byte, size)
  4283. n, err := m.MarshalTo(data)
  4284. if err != nil {
  4285. return nil, err
  4286. }
  4287. return data[:n], nil
  4288. }
  4289. func (m *AuthUserChangePasswordRequest) MarshalTo(data []byte) (int, error) {
  4290. var i int
  4291. _ = i
  4292. var l int
  4293. _ = l
  4294. if len(m.Name) > 0 {
  4295. data[i] = 0xa
  4296. i++
  4297. i = encodeVarintRpc(data, i, uint64(len(m.Name)))
  4298. i += copy(data[i:], m.Name)
  4299. }
  4300. if len(m.Password) > 0 {
  4301. data[i] = 0x12
  4302. i++
  4303. i = encodeVarintRpc(data, i, uint64(len(m.Password)))
  4304. i += copy(data[i:], m.Password)
  4305. }
  4306. return i, nil
  4307. }
  4308. func (m *AuthUserGrantRequest) Marshal() (data []byte, err error) {
  4309. size := m.Size()
  4310. data = make([]byte, size)
  4311. n, err := m.MarshalTo(data)
  4312. if err != nil {
  4313. return nil, err
  4314. }
  4315. return data[:n], nil
  4316. }
  4317. func (m *AuthUserGrantRequest) MarshalTo(data []byte) (int, error) {
  4318. var i int
  4319. _ = i
  4320. var l int
  4321. _ = l
  4322. if len(m.User) > 0 {
  4323. data[i] = 0xa
  4324. i++
  4325. i = encodeVarintRpc(data, i, uint64(len(m.User)))
  4326. i += copy(data[i:], m.User)
  4327. }
  4328. if len(m.Role) > 0 {
  4329. data[i] = 0x12
  4330. i++
  4331. i = encodeVarintRpc(data, i, uint64(len(m.Role)))
  4332. i += copy(data[i:], m.Role)
  4333. }
  4334. return i, nil
  4335. }
  4336. func (m *AuthUserRevokeRequest) Marshal() (data []byte, err error) {
  4337. size := m.Size()
  4338. data = make([]byte, size)
  4339. n, err := m.MarshalTo(data)
  4340. if err != nil {
  4341. return nil, err
  4342. }
  4343. return data[:n], nil
  4344. }
  4345. func (m *AuthUserRevokeRequest) MarshalTo(data []byte) (int, error) {
  4346. var i int
  4347. _ = i
  4348. var l int
  4349. _ = l
  4350. return i, nil
  4351. }
  4352. func (m *AuthRoleAddRequest) Marshal() (data []byte, err error) {
  4353. size := m.Size()
  4354. data = make([]byte, size)
  4355. n, err := m.MarshalTo(data)
  4356. if err != nil {
  4357. return nil, err
  4358. }
  4359. return data[:n], nil
  4360. }
  4361. func (m *AuthRoleAddRequest) MarshalTo(data []byte) (int, error) {
  4362. var i int
  4363. _ = i
  4364. var l int
  4365. _ = l
  4366. if len(m.Name) > 0 {
  4367. data[i] = 0xa
  4368. i++
  4369. i = encodeVarintRpc(data, i, uint64(len(m.Name)))
  4370. i += copy(data[i:], m.Name)
  4371. }
  4372. return i, nil
  4373. }
  4374. func (m *AuthRoleGetRequest) Marshal() (data []byte, err error) {
  4375. size := m.Size()
  4376. data = make([]byte, size)
  4377. n, err := m.MarshalTo(data)
  4378. if err != nil {
  4379. return nil, err
  4380. }
  4381. return data[:n], nil
  4382. }
  4383. func (m *AuthRoleGetRequest) MarshalTo(data []byte) (int, error) {
  4384. var i int
  4385. _ = i
  4386. var l int
  4387. _ = l
  4388. return i, nil
  4389. }
  4390. func (m *AuthRoleDeleteRequest) Marshal() (data []byte, err error) {
  4391. size := m.Size()
  4392. data = make([]byte, size)
  4393. n, err := m.MarshalTo(data)
  4394. if err != nil {
  4395. return nil, err
  4396. }
  4397. return data[:n], nil
  4398. }
  4399. func (m *AuthRoleDeleteRequest) MarshalTo(data []byte) (int, error) {
  4400. var i int
  4401. _ = i
  4402. var l int
  4403. _ = l
  4404. return i, nil
  4405. }
  4406. func (m *AuthRoleGrantRequest) Marshal() (data []byte, err error) {
  4407. size := m.Size()
  4408. data = make([]byte, size)
  4409. n, err := m.MarshalTo(data)
  4410. if err != nil {
  4411. return nil, err
  4412. }
  4413. return data[:n], nil
  4414. }
  4415. func (m *AuthRoleGrantRequest) MarshalTo(data []byte) (int, error) {
  4416. var i int
  4417. _ = i
  4418. var l int
  4419. _ = l
  4420. if len(m.Name) > 0 {
  4421. data[i] = 0xa
  4422. i++
  4423. i = encodeVarintRpc(data, i, uint64(len(m.Name)))
  4424. i += copy(data[i:], m.Name)
  4425. }
  4426. if m.Perm != nil {
  4427. data[i] = 0x12
  4428. i++
  4429. i = encodeVarintRpc(data, i, uint64(m.Perm.Size()))
  4430. n32, err := m.Perm.MarshalTo(data[i:])
  4431. if err != nil {
  4432. return 0, err
  4433. }
  4434. i += n32
  4435. }
  4436. return i, nil
  4437. }
  4438. func (m *AuthRoleRevokeRequest) Marshal() (data []byte, err error) {
  4439. size := m.Size()
  4440. data = make([]byte, size)
  4441. n, err := m.MarshalTo(data)
  4442. if err != nil {
  4443. return nil, err
  4444. }
  4445. return data[:n], nil
  4446. }
  4447. func (m *AuthRoleRevokeRequest) MarshalTo(data []byte) (int, error) {
  4448. var i int
  4449. _ = i
  4450. var l int
  4451. _ = l
  4452. return i, nil
  4453. }
  4454. func (m *AuthEnableResponse) Marshal() (data []byte, err error) {
  4455. size := m.Size()
  4456. data = make([]byte, size)
  4457. n, err := m.MarshalTo(data)
  4458. if err != nil {
  4459. return nil, err
  4460. }
  4461. return data[:n], nil
  4462. }
  4463. func (m *AuthEnableResponse) MarshalTo(data []byte) (int, error) {
  4464. var i int
  4465. _ = i
  4466. var l int
  4467. _ = l
  4468. if m.Header != nil {
  4469. data[i] = 0xa
  4470. i++
  4471. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4472. n33, err := m.Header.MarshalTo(data[i:])
  4473. if err != nil {
  4474. return 0, err
  4475. }
  4476. i += n33
  4477. }
  4478. return i, nil
  4479. }
  4480. func (m *AuthDisableResponse) Marshal() (data []byte, err error) {
  4481. size := m.Size()
  4482. data = make([]byte, size)
  4483. n, err := m.MarshalTo(data)
  4484. if err != nil {
  4485. return nil, err
  4486. }
  4487. return data[:n], nil
  4488. }
  4489. func (m *AuthDisableResponse) MarshalTo(data []byte) (int, error) {
  4490. var i int
  4491. _ = i
  4492. var l int
  4493. _ = l
  4494. if m.Header != nil {
  4495. data[i] = 0xa
  4496. i++
  4497. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4498. n34, err := m.Header.MarshalTo(data[i:])
  4499. if err != nil {
  4500. return 0, err
  4501. }
  4502. i += n34
  4503. }
  4504. return i, nil
  4505. }
  4506. func (m *AuthenticateResponse) Marshal() (data []byte, err error) {
  4507. size := m.Size()
  4508. data = make([]byte, size)
  4509. n, err := m.MarshalTo(data)
  4510. if err != nil {
  4511. return nil, err
  4512. }
  4513. return data[:n], nil
  4514. }
  4515. func (m *AuthenticateResponse) MarshalTo(data []byte) (int, error) {
  4516. var i int
  4517. _ = i
  4518. var l int
  4519. _ = l
  4520. if m.Header != nil {
  4521. data[i] = 0xa
  4522. i++
  4523. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4524. n35, err := m.Header.MarshalTo(data[i:])
  4525. if err != nil {
  4526. return 0, err
  4527. }
  4528. i += n35
  4529. }
  4530. return i, nil
  4531. }
  4532. func (m *AuthUserAddResponse) Marshal() (data []byte, err error) {
  4533. size := m.Size()
  4534. data = make([]byte, size)
  4535. n, err := m.MarshalTo(data)
  4536. if err != nil {
  4537. return nil, err
  4538. }
  4539. return data[:n], nil
  4540. }
  4541. func (m *AuthUserAddResponse) MarshalTo(data []byte) (int, error) {
  4542. var i int
  4543. _ = i
  4544. var l int
  4545. _ = l
  4546. if m.Header != nil {
  4547. data[i] = 0xa
  4548. i++
  4549. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4550. n36, err := m.Header.MarshalTo(data[i:])
  4551. if err != nil {
  4552. return 0, err
  4553. }
  4554. i += n36
  4555. }
  4556. return i, nil
  4557. }
  4558. func (m *AuthUserGetResponse) Marshal() (data []byte, err error) {
  4559. size := m.Size()
  4560. data = make([]byte, size)
  4561. n, err := m.MarshalTo(data)
  4562. if err != nil {
  4563. return nil, err
  4564. }
  4565. return data[:n], nil
  4566. }
  4567. func (m *AuthUserGetResponse) MarshalTo(data []byte) (int, error) {
  4568. var i int
  4569. _ = i
  4570. var l int
  4571. _ = l
  4572. if m.Header != nil {
  4573. data[i] = 0xa
  4574. i++
  4575. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4576. n37, err := m.Header.MarshalTo(data[i:])
  4577. if err != nil {
  4578. return 0, err
  4579. }
  4580. i += n37
  4581. }
  4582. return i, nil
  4583. }
  4584. func (m *AuthUserDeleteResponse) Marshal() (data []byte, err error) {
  4585. size := m.Size()
  4586. data = make([]byte, size)
  4587. n, err := m.MarshalTo(data)
  4588. if err != nil {
  4589. return nil, err
  4590. }
  4591. return data[:n], nil
  4592. }
  4593. func (m *AuthUserDeleteResponse) MarshalTo(data []byte) (int, error) {
  4594. var i int
  4595. _ = i
  4596. var l int
  4597. _ = l
  4598. if m.Header != nil {
  4599. data[i] = 0xa
  4600. i++
  4601. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4602. n38, err := m.Header.MarshalTo(data[i:])
  4603. if err != nil {
  4604. return 0, err
  4605. }
  4606. i += n38
  4607. }
  4608. return i, nil
  4609. }
  4610. func (m *AuthUserChangePasswordResponse) Marshal() (data []byte, err error) {
  4611. size := m.Size()
  4612. data = make([]byte, size)
  4613. n, err := m.MarshalTo(data)
  4614. if err != nil {
  4615. return nil, err
  4616. }
  4617. return data[:n], nil
  4618. }
  4619. func (m *AuthUserChangePasswordResponse) MarshalTo(data []byte) (int, error) {
  4620. var i int
  4621. _ = i
  4622. var l int
  4623. _ = l
  4624. if m.Header != nil {
  4625. data[i] = 0xa
  4626. i++
  4627. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4628. n39, err := m.Header.MarshalTo(data[i:])
  4629. if err != nil {
  4630. return 0, err
  4631. }
  4632. i += n39
  4633. }
  4634. return i, nil
  4635. }
  4636. func (m *AuthUserGrantResponse) Marshal() (data []byte, err error) {
  4637. size := m.Size()
  4638. data = make([]byte, size)
  4639. n, err := m.MarshalTo(data)
  4640. if err != nil {
  4641. return nil, err
  4642. }
  4643. return data[:n], nil
  4644. }
  4645. func (m *AuthUserGrantResponse) MarshalTo(data []byte) (int, error) {
  4646. var i int
  4647. _ = i
  4648. var l int
  4649. _ = l
  4650. if m.Header != nil {
  4651. data[i] = 0xa
  4652. i++
  4653. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4654. n40, err := m.Header.MarshalTo(data[i:])
  4655. if err != nil {
  4656. return 0, err
  4657. }
  4658. i += n40
  4659. }
  4660. return i, nil
  4661. }
  4662. func (m *AuthUserRevokeResponse) Marshal() (data []byte, err error) {
  4663. size := m.Size()
  4664. data = make([]byte, size)
  4665. n, err := m.MarshalTo(data)
  4666. if err != nil {
  4667. return nil, err
  4668. }
  4669. return data[:n], nil
  4670. }
  4671. func (m *AuthUserRevokeResponse) MarshalTo(data []byte) (int, error) {
  4672. var i int
  4673. _ = i
  4674. var l int
  4675. _ = l
  4676. if m.Header != nil {
  4677. data[i] = 0xa
  4678. i++
  4679. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4680. n41, err := m.Header.MarshalTo(data[i:])
  4681. if err != nil {
  4682. return 0, err
  4683. }
  4684. i += n41
  4685. }
  4686. return i, nil
  4687. }
  4688. func (m *AuthRoleAddResponse) Marshal() (data []byte, err error) {
  4689. size := m.Size()
  4690. data = make([]byte, size)
  4691. n, err := m.MarshalTo(data)
  4692. if err != nil {
  4693. return nil, err
  4694. }
  4695. return data[:n], nil
  4696. }
  4697. func (m *AuthRoleAddResponse) MarshalTo(data []byte) (int, error) {
  4698. var i int
  4699. _ = i
  4700. var l int
  4701. _ = l
  4702. if m.Header != nil {
  4703. data[i] = 0xa
  4704. i++
  4705. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4706. n42, err := m.Header.MarshalTo(data[i:])
  4707. if err != nil {
  4708. return 0, err
  4709. }
  4710. i += n42
  4711. }
  4712. return i, nil
  4713. }
  4714. func (m *AuthRoleGetResponse) Marshal() (data []byte, err error) {
  4715. size := m.Size()
  4716. data = make([]byte, size)
  4717. n, err := m.MarshalTo(data)
  4718. if err != nil {
  4719. return nil, err
  4720. }
  4721. return data[:n], nil
  4722. }
  4723. func (m *AuthRoleGetResponse) MarshalTo(data []byte) (int, error) {
  4724. var i int
  4725. _ = i
  4726. var l int
  4727. _ = l
  4728. if m.Header != nil {
  4729. data[i] = 0xa
  4730. i++
  4731. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4732. n43, err := m.Header.MarshalTo(data[i:])
  4733. if err != nil {
  4734. return 0, err
  4735. }
  4736. i += n43
  4737. }
  4738. return i, nil
  4739. }
  4740. func (m *AuthRoleDeleteResponse) Marshal() (data []byte, err error) {
  4741. size := m.Size()
  4742. data = make([]byte, size)
  4743. n, err := m.MarshalTo(data)
  4744. if err != nil {
  4745. return nil, err
  4746. }
  4747. return data[:n], nil
  4748. }
  4749. func (m *AuthRoleDeleteResponse) MarshalTo(data []byte) (int, error) {
  4750. var i int
  4751. _ = i
  4752. var l int
  4753. _ = l
  4754. if m.Header != nil {
  4755. data[i] = 0xa
  4756. i++
  4757. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4758. n44, err := m.Header.MarshalTo(data[i:])
  4759. if err != nil {
  4760. return 0, err
  4761. }
  4762. i += n44
  4763. }
  4764. return i, nil
  4765. }
  4766. func (m *AuthRoleGrantResponse) Marshal() (data []byte, err error) {
  4767. size := m.Size()
  4768. data = make([]byte, size)
  4769. n, err := m.MarshalTo(data)
  4770. if err != nil {
  4771. return nil, err
  4772. }
  4773. return data[:n], nil
  4774. }
  4775. func (m *AuthRoleGrantResponse) MarshalTo(data []byte) (int, error) {
  4776. var i int
  4777. _ = i
  4778. var l int
  4779. _ = l
  4780. if m.Header != nil {
  4781. data[i] = 0xa
  4782. i++
  4783. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4784. n45, err := m.Header.MarshalTo(data[i:])
  4785. if err != nil {
  4786. return 0, err
  4787. }
  4788. i += n45
  4789. }
  4790. return i, nil
  4791. }
  4792. func (m *AuthRoleRevokeResponse) Marshal() (data []byte, err error) {
  4793. size := m.Size()
  4794. data = make([]byte, size)
  4795. n, err := m.MarshalTo(data)
  4796. if err != nil {
  4797. return nil, err
  4798. }
  4799. return data[:n], nil
  4800. }
  4801. func (m *AuthRoleRevokeResponse) MarshalTo(data []byte) (int, error) {
  4802. var i int
  4803. _ = i
  4804. var l int
  4805. _ = l
  4806. if m.Header != nil {
  4807. data[i] = 0xa
  4808. i++
  4809. i = encodeVarintRpc(data, i, uint64(m.Header.Size()))
  4810. n46, err := m.Header.MarshalTo(data[i:])
  4811. if err != nil {
  4812. return 0, err
  4813. }
  4814. i += n46
  4815. }
  4816. return i, nil
  4817. }
  4818. func encodeFixed64Rpc(data []byte, offset int, v uint64) int {
  4819. data[offset] = uint8(v)
  4820. data[offset+1] = uint8(v >> 8)
  4821. data[offset+2] = uint8(v >> 16)
  4822. data[offset+3] = uint8(v >> 24)
  4823. data[offset+4] = uint8(v >> 32)
  4824. data[offset+5] = uint8(v >> 40)
  4825. data[offset+6] = uint8(v >> 48)
  4826. data[offset+7] = uint8(v >> 56)
  4827. return offset + 8
  4828. }
  4829. func encodeFixed32Rpc(data []byte, offset int, v uint32) int {
  4830. data[offset] = uint8(v)
  4831. data[offset+1] = uint8(v >> 8)
  4832. data[offset+2] = uint8(v >> 16)
  4833. data[offset+3] = uint8(v >> 24)
  4834. return offset + 4
  4835. }
  4836. func encodeVarintRpc(data []byte, offset int, v uint64) int {
  4837. for v >= 1<<7 {
  4838. data[offset] = uint8(v&0x7f | 0x80)
  4839. v >>= 7
  4840. offset++
  4841. }
  4842. data[offset] = uint8(v)
  4843. return offset + 1
  4844. }
  4845. func (m *ResponseHeader) Size() (n int) {
  4846. var l int
  4847. _ = l
  4848. if m.ClusterId != 0 {
  4849. n += 1 + sovRpc(uint64(m.ClusterId))
  4850. }
  4851. if m.MemberId != 0 {
  4852. n += 1 + sovRpc(uint64(m.MemberId))
  4853. }
  4854. if m.Revision != 0 {
  4855. n += 1 + sovRpc(uint64(m.Revision))
  4856. }
  4857. if m.RaftTerm != 0 {
  4858. n += 1 + sovRpc(uint64(m.RaftTerm))
  4859. }
  4860. return n
  4861. }
  4862. func (m *RangeRequest) Size() (n int) {
  4863. var l int
  4864. _ = l
  4865. if m.Key != nil {
  4866. l = len(m.Key)
  4867. if l > 0 {
  4868. n += 1 + l + sovRpc(uint64(l))
  4869. }
  4870. }
  4871. if m.RangeEnd != nil {
  4872. l = len(m.RangeEnd)
  4873. if l > 0 {
  4874. n += 1 + l + sovRpc(uint64(l))
  4875. }
  4876. }
  4877. if m.Limit != 0 {
  4878. n += 1 + sovRpc(uint64(m.Limit))
  4879. }
  4880. if m.Revision != 0 {
  4881. n += 1 + sovRpc(uint64(m.Revision))
  4882. }
  4883. if m.SortOrder != 0 {
  4884. n += 1 + sovRpc(uint64(m.SortOrder))
  4885. }
  4886. if m.SortTarget != 0 {
  4887. n += 1 + sovRpc(uint64(m.SortTarget))
  4888. }
  4889. if m.Serializable {
  4890. n += 2
  4891. }
  4892. return n
  4893. }
  4894. func (m *RangeResponse) Size() (n int) {
  4895. var l int
  4896. _ = l
  4897. if m.Header != nil {
  4898. l = m.Header.Size()
  4899. n += 1 + l + sovRpc(uint64(l))
  4900. }
  4901. if len(m.Kvs) > 0 {
  4902. for _, e := range m.Kvs {
  4903. l = e.Size()
  4904. n += 1 + l + sovRpc(uint64(l))
  4905. }
  4906. }
  4907. if m.More {
  4908. n += 2
  4909. }
  4910. return n
  4911. }
  4912. func (m *PutRequest) Size() (n int) {
  4913. var l int
  4914. _ = l
  4915. if m.Key != nil {
  4916. l = len(m.Key)
  4917. if l > 0 {
  4918. n += 1 + l + sovRpc(uint64(l))
  4919. }
  4920. }
  4921. if m.Value != nil {
  4922. l = len(m.Value)
  4923. if l > 0 {
  4924. n += 1 + l + sovRpc(uint64(l))
  4925. }
  4926. }
  4927. if m.Lease != 0 {
  4928. n += 1 + sovRpc(uint64(m.Lease))
  4929. }
  4930. return n
  4931. }
  4932. func (m *PutResponse) Size() (n int) {
  4933. var l int
  4934. _ = l
  4935. if m.Header != nil {
  4936. l = m.Header.Size()
  4937. n += 1 + l + sovRpc(uint64(l))
  4938. }
  4939. return n
  4940. }
  4941. func (m *DeleteRangeRequest) Size() (n int) {
  4942. var l int
  4943. _ = l
  4944. if m.Key != nil {
  4945. l = len(m.Key)
  4946. if l > 0 {
  4947. n += 1 + l + sovRpc(uint64(l))
  4948. }
  4949. }
  4950. if m.RangeEnd != nil {
  4951. l = len(m.RangeEnd)
  4952. if l > 0 {
  4953. n += 1 + l + sovRpc(uint64(l))
  4954. }
  4955. }
  4956. return n
  4957. }
  4958. func (m *DeleteRangeResponse) Size() (n int) {
  4959. var l int
  4960. _ = l
  4961. if m.Header != nil {
  4962. l = m.Header.Size()
  4963. n += 1 + l + sovRpc(uint64(l))
  4964. }
  4965. if m.Deleted != 0 {
  4966. n += 1 + sovRpc(uint64(m.Deleted))
  4967. }
  4968. return n
  4969. }
  4970. func (m *RequestUnion) Size() (n int) {
  4971. var l int
  4972. _ = l
  4973. if m.Request != nil {
  4974. n += m.Request.Size()
  4975. }
  4976. return n
  4977. }
  4978. func (m *RequestUnion_RequestRange) Size() (n int) {
  4979. var l int
  4980. _ = l
  4981. if m.RequestRange != nil {
  4982. l = m.RequestRange.Size()
  4983. n += 1 + l + sovRpc(uint64(l))
  4984. }
  4985. return n
  4986. }
  4987. func (m *RequestUnion_RequestPut) Size() (n int) {
  4988. var l int
  4989. _ = l
  4990. if m.RequestPut != nil {
  4991. l = m.RequestPut.Size()
  4992. n += 1 + l + sovRpc(uint64(l))
  4993. }
  4994. return n
  4995. }
  4996. func (m *RequestUnion_RequestDeleteRange) Size() (n int) {
  4997. var l int
  4998. _ = l
  4999. if m.RequestDeleteRange != nil {
  5000. l = m.RequestDeleteRange.Size()
  5001. n += 1 + l + sovRpc(uint64(l))
  5002. }
  5003. return n
  5004. }
  5005. func (m *ResponseUnion) Size() (n int) {
  5006. var l int
  5007. _ = l
  5008. if m.Response != nil {
  5009. n += m.Response.Size()
  5010. }
  5011. return n
  5012. }
  5013. func (m *ResponseUnion_ResponseRange) Size() (n int) {
  5014. var l int
  5015. _ = l
  5016. if m.ResponseRange != nil {
  5017. l = m.ResponseRange.Size()
  5018. n += 1 + l + sovRpc(uint64(l))
  5019. }
  5020. return n
  5021. }
  5022. func (m *ResponseUnion_ResponsePut) Size() (n int) {
  5023. var l int
  5024. _ = l
  5025. if m.ResponsePut != nil {
  5026. l = m.ResponsePut.Size()
  5027. n += 1 + l + sovRpc(uint64(l))
  5028. }
  5029. return n
  5030. }
  5031. func (m *ResponseUnion_ResponseDeleteRange) Size() (n int) {
  5032. var l int
  5033. _ = l
  5034. if m.ResponseDeleteRange != nil {
  5035. l = m.ResponseDeleteRange.Size()
  5036. n += 1 + l + sovRpc(uint64(l))
  5037. }
  5038. return n
  5039. }
  5040. func (m *Compare) Size() (n int) {
  5041. var l int
  5042. _ = l
  5043. if m.Result != 0 {
  5044. n += 1 + sovRpc(uint64(m.Result))
  5045. }
  5046. if m.Target != 0 {
  5047. n += 1 + sovRpc(uint64(m.Target))
  5048. }
  5049. if m.Key != nil {
  5050. l = len(m.Key)
  5051. if l > 0 {
  5052. n += 1 + l + sovRpc(uint64(l))
  5053. }
  5054. }
  5055. if m.TargetUnion != nil {
  5056. n += m.TargetUnion.Size()
  5057. }
  5058. return n
  5059. }
  5060. func (m *Compare_Version) Size() (n int) {
  5061. var l int
  5062. _ = l
  5063. n += 1 + sovRpc(uint64(m.Version))
  5064. return n
  5065. }
  5066. func (m *Compare_CreateRevision) Size() (n int) {
  5067. var l int
  5068. _ = l
  5069. n += 1 + sovRpc(uint64(m.CreateRevision))
  5070. return n
  5071. }
  5072. func (m *Compare_ModRevision) Size() (n int) {
  5073. var l int
  5074. _ = l
  5075. n += 1 + sovRpc(uint64(m.ModRevision))
  5076. return n
  5077. }
  5078. func (m *Compare_Value) Size() (n int) {
  5079. var l int
  5080. _ = l
  5081. if m.Value != nil {
  5082. l = len(m.Value)
  5083. n += 1 + l + sovRpc(uint64(l))
  5084. }
  5085. return n
  5086. }
  5087. func (m *TxnRequest) Size() (n int) {
  5088. var l int
  5089. _ = l
  5090. if len(m.Compare) > 0 {
  5091. for _, e := range m.Compare {
  5092. l = e.Size()
  5093. n += 1 + l + sovRpc(uint64(l))
  5094. }
  5095. }
  5096. if len(m.Success) > 0 {
  5097. for _, e := range m.Success {
  5098. l = e.Size()
  5099. n += 1 + l + sovRpc(uint64(l))
  5100. }
  5101. }
  5102. if len(m.Failure) > 0 {
  5103. for _, e := range m.Failure {
  5104. l = e.Size()
  5105. n += 1 + l + sovRpc(uint64(l))
  5106. }
  5107. }
  5108. return n
  5109. }
  5110. func (m *TxnResponse) Size() (n int) {
  5111. var l int
  5112. _ = l
  5113. if m.Header != nil {
  5114. l = m.Header.Size()
  5115. n += 1 + l + sovRpc(uint64(l))
  5116. }
  5117. if m.Succeeded {
  5118. n += 2
  5119. }
  5120. if len(m.Responses) > 0 {
  5121. for _, e := range m.Responses {
  5122. l = e.Size()
  5123. n += 1 + l + sovRpc(uint64(l))
  5124. }
  5125. }
  5126. return n
  5127. }
  5128. func (m *CompactionRequest) Size() (n int) {
  5129. var l int
  5130. _ = l
  5131. if m.Revision != 0 {
  5132. n += 1 + sovRpc(uint64(m.Revision))
  5133. }
  5134. if m.Physical {
  5135. n += 2
  5136. }
  5137. return n
  5138. }
  5139. func (m *CompactionResponse) Size() (n int) {
  5140. var l int
  5141. _ = l
  5142. if m.Header != nil {
  5143. l = m.Header.Size()
  5144. n += 1 + l + sovRpc(uint64(l))
  5145. }
  5146. return n
  5147. }
  5148. func (m *HashRequest) Size() (n int) {
  5149. var l int
  5150. _ = l
  5151. return n
  5152. }
  5153. func (m *HashResponse) Size() (n int) {
  5154. var l int
  5155. _ = l
  5156. if m.Header != nil {
  5157. l = m.Header.Size()
  5158. n += 1 + l + sovRpc(uint64(l))
  5159. }
  5160. if m.Hash != 0 {
  5161. n += 1 + sovRpc(uint64(m.Hash))
  5162. }
  5163. return n
  5164. }
  5165. func (m *SnapshotRequest) Size() (n int) {
  5166. var l int
  5167. _ = l
  5168. return n
  5169. }
  5170. func (m *SnapshotResponse) Size() (n int) {
  5171. var l int
  5172. _ = l
  5173. if m.Header != nil {
  5174. l = m.Header.Size()
  5175. n += 1 + l + sovRpc(uint64(l))
  5176. }
  5177. if m.RemainingBytes != 0 {
  5178. n += 1 + sovRpc(uint64(m.RemainingBytes))
  5179. }
  5180. if m.Blob != nil {
  5181. l = len(m.Blob)
  5182. if l > 0 {
  5183. n += 1 + l + sovRpc(uint64(l))
  5184. }
  5185. }
  5186. return n
  5187. }
  5188. func (m *WatchRequest) Size() (n int) {
  5189. var l int
  5190. _ = l
  5191. if m.RequestUnion != nil {
  5192. n += m.RequestUnion.Size()
  5193. }
  5194. return n
  5195. }
  5196. func (m *WatchRequest_CreateRequest) Size() (n int) {
  5197. var l int
  5198. _ = l
  5199. if m.CreateRequest != nil {
  5200. l = m.CreateRequest.Size()
  5201. n += 1 + l + sovRpc(uint64(l))
  5202. }
  5203. return n
  5204. }
  5205. func (m *WatchRequest_CancelRequest) Size() (n int) {
  5206. var l int
  5207. _ = l
  5208. if m.CancelRequest != nil {
  5209. l = m.CancelRequest.Size()
  5210. n += 1 + l + sovRpc(uint64(l))
  5211. }
  5212. return n
  5213. }
  5214. func (m *WatchCreateRequest) Size() (n int) {
  5215. var l int
  5216. _ = l
  5217. if m.Key != nil {
  5218. l = len(m.Key)
  5219. if l > 0 {
  5220. n += 1 + l + sovRpc(uint64(l))
  5221. }
  5222. }
  5223. if m.RangeEnd != nil {
  5224. l = len(m.RangeEnd)
  5225. if l > 0 {
  5226. n += 1 + l + sovRpc(uint64(l))
  5227. }
  5228. }
  5229. if m.StartRevision != 0 {
  5230. n += 1 + sovRpc(uint64(m.StartRevision))
  5231. }
  5232. if m.ProgressNotify {
  5233. n += 2
  5234. }
  5235. return n
  5236. }
  5237. func (m *WatchCancelRequest) Size() (n int) {
  5238. var l int
  5239. _ = l
  5240. if m.WatchId != 0 {
  5241. n += 1 + sovRpc(uint64(m.WatchId))
  5242. }
  5243. return n
  5244. }
  5245. func (m *WatchResponse) Size() (n int) {
  5246. var l int
  5247. _ = l
  5248. if m.Header != nil {
  5249. l = m.Header.Size()
  5250. n += 1 + l + sovRpc(uint64(l))
  5251. }
  5252. if m.WatchId != 0 {
  5253. n += 1 + sovRpc(uint64(m.WatchId))
  5254. }
  5255. if m.Created {
  5256. n += 2
  5257. }
  5258. if m.Canceled {
  5259. n += 2
  5260. }
  5261. if m.CompactRevision != 0 {
  5262. n += 1 + sovRpc(uint64(m.CompactRevision))
  5263. }
  5264. if len(m.Events) > 0 {
  5265. for _, e := range m.Events {
  5266. l = e.Size()
  5267. n += 1 + l + sovRpc(uint64(l))
  5268. }
  5269. }
  5270. return n
  5271. }
  5272. func (m *LeaseGrantRequest) Size() (n int) {
  5273. var l int
  5274. _ = l
  5275. if m.TTL != 0 {
  5276. n += 1 + sovRpc(uint64(m.TTL))
  5277. }
  5278. if m.ID != 0 {
  5279. n += 1 + sovRpc(uint64(m.ID))
  5280. }
  5281. return n
  5282. }
  5283. func (m *LeaseGrantResponse) Size() (n int) {
  5284. var l int
  5285. _ = l
  5286. if m.Header != nil {
  5287. l = m.Header.Size()
  5288. n += 1 + l + sovRpc(uint64(l))
  5289. }
  5290. if m.ID != 0 {
  5291. n += 1 + sovRpc(uint64(m.ID))
  5292. }
  5293. if m.TTL != 0 {
  5294. n += 1 + sovRpc(uint64(m.TTL))
  5295. }
  5296. l = len(m.Error)
  5297. if l > 0 {
  5298. n += 1 + l + sovRpc(uint64(l))
  5299. }
  5300. return n
  5301. }
  5302. func (m *LeaseRevokeRequest) Size() (n int) {
  5303. var l int
  5304. _ = l
  5305. if m.ID != 0 {
  5306. n += 1 + sovRpc(uint64(m.ID))
  5307. }
  5308. return n
  5309. }
  5310. func (m *LeaseRevokeResponse) Size() (n int) {
  5311. var l int
  5312. _ = l
  5313. if m.Header != nil {
  5314. l = m.Header.Size()
  5315. n += 1 + l + sovRpc(uint64(l))
  5316. }
  5317. return n
  5318. }
  5319. func (m *LeaseKeepAliveRequest) Size() (n int) {
  5320. var l int
  5321. _ = l
  5322. if m.ID != 0 {
  5323. n += 1 + sovRpc(uint64(m.ID))
  5324. }
  5325. return n
  5326. }
  5327. func (m *LeaseKeepAliveResponse) Size() (n int) {
  5328. var l int
  5329. _ = l
  5330. if m.Header != nil {
  5331. l = m.Header.Size()
  5332. n += 1 + l + sovRpc(uint64(l))
  5333. }
  5334. if m.ID != 0 {
  5335. n += 1 + sovRpc(uint64(m.ID))
  5336. }
  5337. if m.TTL != 0 {
  5338. n += 1 + sovRpc(uint64(m.TTL))
  5339. }
  5340. return n
  5341. }
  5342. func (m *Member) Size() (n int) {
  5343. var l int
  5344. _ = l
  5345. if m.ID != 0 {
  5346. n += 1 + sovRpc(uint64(m.ID))
  5347. }
  5348. l = len(m.Name)
  5349. if l > 0 {
  5350. n += 1 + l + sovRpc(uint64(l))
  5351. }
  5352. if m.IsLeader {
  5353. n += 2
  5354. }
  5355. if len(m.PeerURLs) > 0 {
  5356. for _, s := range m.PeerURLs {
  5357. l = len(s)
  5358. n += 1 + l + sovRpc(uint64(l))
  5359. }
  5360. }
  5361. if len(m.ClientURLs) > 0 {
  5362. for _, s := range m.ClientURLs {
  5363. l = len(s)
  5364. n += 1 + l + sovRpc(uint64(l))
  5365. }
  5366. }
  5367. return n
  5368. }
  5369. func (m *MemberAddRequest) Size() (n int) {
  5370. var l int
  5371. _ = l
  5372. if len(m.PeerURLs) > 0 {
  5373. for _, s := range m.PeerURLs {
  5374. l = len(s)
  5375. n += 1 + l + sovRpc(uint64(l))
  5376. }
  5377. }
  5378. return n
  5379. }
  5380. func (m *MemberAddResponse) Size() (n int) {
  5381. var l int
  5382. _ = l
  5383. if m.Header != nil {
  5384. l = m.Header.Size()
  5385. n += 1 + l + sovRpc(uint64(l))
  5386. }
  5387. if m.Member != nil {
  5388. l = m.Member.Size()
  5389. n += 1 + l + sovRpc(uint64(l))
  5390. }
  5391. return n
  5392. }
  5393. func (m *MemberRemoveRequest) Size() (n int) {
  5394. var l int
  5395. _ = l
  5396. if m.ID != 0 {
  5397. n += 1 + sovRpc(uint64(m.ID))
  5398. }
  5399. return n
  5400. }
  5401. func (m *MemberRemoveResponse) Size() (n int) {
  5402. var l int
  5403. _ = l
  5404. if m.Header != nil {
  5405. l = m.Header.Size()
  5406. n += 1 + l + sovRpc(uint64(l))
  5407. }
  5408. return n
  5409. }
  5410. func (m *MemberUpdateRequest) Size() (n int) {
  5411. var l int
  5412. _ = l
  5413. if m.ID != 0 {
  5414. n += 1 + sovRpc(uint64(m.ID))
  5415. }
  5416. if len(m.PeerURLs) > 0 {
  5417. for _, s := range m.PeerURLs {
  5418. l = len(s)
  5419. n += 1 + l + sovRpc(uint64(l))
  5420. }
  5421. }
  5422. return n
  5423. }
  5424. func (m *MemberUpdateResponse) Size() (n int) {
  5425. var l int
  5426. _ = l
  5427. if m.Header != nil {
  5428. l = m.Header.Size()
  5429. n += 1 + l + sovRpc(uint64(l))
  5430. }
  5431. return n
  5432. }
  5433. func (m *MemberListRequest) Size() (n int) {
  5434. var l int
  5435. _ = l
  5436. return n
  5437. }
  5438. func (m *MemberListResponse) Size() (n int) {
  5439. var l int
  5440. _ = l
  5441. if m.Header != nil {
  5442. l = m.Header.Size()
  5443. n += 1 + l + sovRpc(uint64(l))
  5444. }
  5445. if len(m.Members) > 0 {
  5446. for _, e := range m.Members {
  5447. l = e.Size()
  5448. n += 1 + l + sovRpc(uint64(l))
  5449. }
  5450. }
  5451. return n
  5452. }
  5453. func (m *DefragmentRequest) Size() (n int) {
  5454. var l int
  5455. _ = l
  5456. return n
  5457. }
  5458. func (m *DefragmentResponse) Size() (n int) {
  5459. var l int
  5460. _ = l
  5461. if m.Header != nil {
  5462. l = m.Header.Size()
  5463. n += 1 + l + sovRpc(uint64(l))
  5464. }
  5465. return n
  5466. }
  5467. func (m *AlarmRequest) Size() (n int) {
  5468. var l int
  5469. _ = l
  5470. if m.Action != 0 {
  5471. n += 1 + sovRpc(uint64(m.Action))
  5472. }
  5473. if m.MemberID != 0 {
  5474. n += 1 + sovRpc(uint64(m.MemberID))
  5475. }
  5476. if m.Alarm != 0 {
  5477. n += 1 + sovRpc(uint64(m.Alarm))
  5478. }
  5479. return n
  5480. }
  5481. func (m *AlarmMember) Size() (n int) {
  5482. var l int
  5483. _ = l
  5484. if m.MemberID != 0 {
  5485. n += 1 + sovRpc(uint64(m.MemberID))
  5486. }
  5487. if m.Alarm != 0 {
  5488. n += 1 + sovRpc(uint64(m.Alarm))
  5489. }
  5490. return n
  5491. }
  5492. func (m *AlarmResponse) Size() (n int) {
  5493. var l int
  5494. _ = l
  5495. if m.Header != nil {
  5496. l = m.Header.Size()
  5497. n += 1 + l + sovRpc(uint64(l))
  5498. }
  5499. if len(m.Alarms) > 0 {
  5500. for _, e := range m.Alarms {
  5501. l = e.Size()
  5502. n += 1 + l + sovRpc(uint64(l))
  5503. }
  5504. }
  5505. return n
  5506. }
  5507. func (m *StatusRequest) Size() (n int) {
  5508. var l int
  5509. _ = l
  5510. return n
  5511. }
  5512. func (m *StatusResponse) Size() (n int) {
  5513. var l int
  5514. _ = l
  5515. if m.Header != nil {
  5516. l = m.Header.Size()
  5517. n += 1 + l + sovRpc(uint64(l))
  5518. }
  5519. l = len(m.Version)
  5520. if l > 0 {
  5521. n += 1 + l + sovRpc(uint64(l))
  5522. }
  5523. if m.DbSize != 0 {
  5524. n += 1 + sovRpc(uint64(m.DbSize))
  5525. }
  5526. if m.Leader != 0 {
  5527. n += 1 + sovRpc(uint64(m.Leader))
  5528. }
  5529. if m.RaftIndex != 0 {
  5530. n += 1 + sovRpc(uint64(m.RaftIndex))
  5531. }
  5532. if m.RaftTerm != 0 {
  5533. n += 1 + sovRpc(uint64(m.RaftTerm))
  5534. }
  5535. return n
  5536. }
  5537. func (m *AuthEnableRequest) Size() (n int) {
  5538. var l int
  5539. _ = l
  5540. return n
  5541. }
  5542. func (m *AuthDisableRequest) Size() (n int) {
  5543. var l int
  5544. _ = l
  5545. return n
  5546. }
  5547. func (m *AuthenticateRequest) Size() (n int) {
  5548. var l int
  5549. _ = l
  5550. return n
  5551. }
  5552. func (m *AuthUserAddRequest) Size() (n int) {
  5553. var l int
  5554. _ = l
  5555. l = len(m.Name)
  5556. if l > 0 {
  5557. n += 1 + l + sovRpc(uint64(l))
  5558. }
  5559. l = len(m.Password)
  5560. if l > 0 {
  5561. n += 1 + l + sovRpc(uint64(l))
  5562. }
  5563. return n
  5564. }
  5565. func (m *AuthUserGetRequest) Size() (n int) {
  5566. var l int
  5567. _ = l
  5568. return n
  5569. }
  5570. func (m *AuthUserDeleteRequest) Size() (n int) {
  5571. var l int
  5572. _ = l
  5573. l = len(m.Name)
  5574. if l > 0 {
  5575. n += 1 + l + sovRpc(uint64(l))
  5576. }
  5577. return n
  5578. }
  5579. func (m *AuthUserChangePasswordRequest) Size() (n int) {
  5580. var l int
  5581. _ = l
  5582. l = len(m.Name)
  5583. if l > 0 {
  5584. n += 1 + l + sovRpc(uint64(l))
  5585. }
  5586. l = len(m.Password)
  5587. if l > 0 {
  5588. n += 1 + l + sovRpc(uint64(l))
  5589. }
  5590. return n
  5591. }
  5592. func (m *AuthUserGrantRequest) Size() (n int) {
  5593. var l int
  5594. _ = l
  5595. l = len(m.User)
  5596. if l > 0 {
  5597. n += 1 + l + sovRpc(uint64(l))
  5598. }
  5599. l = len(m.Role)
  5600. if l > 0 {
  5601. n += 1 + l + sovRpc(uint64(l))
  5602. }
  5603. return n
  5604. }
  5605. func (m *AuthUserRevokeRequest) Size() (n int) {
  5606. var l int
  5607. _ = l
  5608. return n
  5609. }
  5610. func (m *AuthRoleAddRequest) Size() (n int) {
  5611. var l int
  5612. _ = l
  5613. l = len(m.Name)
  5614. if l > 0 {
  5615. n += 1 + l + sovRpc(uint64(l))
  5616. }
  5617. return n
  5618. }
  5619. func (m *AuthRoleGetRequest) Size() (n int) {
  5620. var l int
  5621. _ = l
  5622. return n
  5623. }
  5624. func (m *AuthRoleDeleteRequest) Size() (n int) {
  5625. var l int
  5626. _ = l
  5627. return n
  5628. }
  5629. func (m *AuthRoleGrantRequest) Size() (n int) {
  5630. var l int
  5631. _ = l
  5632. l = len(m.Name)
  5633. if l > 0 {
  5634. n += 1 + l + sovRpc(uint64(l))
  5635. }
  5636. if m.Perm != nil {
  5637. l = m.Perm.Size()
  5638. n += 1 + l + sovRpc(uint64(l))
  5639. }
  5640. return n
  5641. }
  5642. func (m *AuthRoleRevokeRequest) Size() (n int) {
  5643. var l int
  5644. _ = l
  5645. return n
  5646. }
  5647. func (m *AuthEnableResponse) Size() (n int) {
  5648. var l int
  5649. _ = l
  5650. if m.Header != nil {
  5651. l = m.Header.Size()
  5652. n += 1 + l + sovRpc(uint64(l))
  5653. }
  5654. return n
  5655. }
  5656. func (m *AuthDisableResponse) Size() (n int) {
  5657. var l int
  5658. _ = l
  5659. if m.Header != nil {
  5660. l = m.Header.Size()
  5661. n += 1 + l + sovRpc(uint64(l))
  5662. }
  5663. return n
  5664. }
  5665. func (m *AuthenticateResponse) Size() (n int) {
  5666. var l int
  5667. _ = l
  5668. if m.Header != nil {
  5669. l = m.Header.Size()
  5670. n += 1 + l + sovRpc(uint64(l))
  5671. }
  5672. return n
  5673. }
  5674. func (m *AuthUserAddResponse) Size() (n int) {
  5675. var l int
  5676. _ = l
  5677. if m.Header != nil {
  5678. l = m.Header.Size()
  5679. n += 1 + l + sovRpc(uint64(l))
  5680. }
  5681. return n
  5682. }
  5683. func (m *AuthUserGetResponse) Size() (n int) {
  5684. var l int
  5685. _ = l
  5686. if m.Header != nil {
  5687. l = m.Header.Size()
  5688. n += 1 + l + sovRpc(uint64(l))
  5689. }
  5690. return n
  5691. }
  5692. func (m *AuthUserDeleteResponse) Size() (n int) {
  5693. var l int
  5694. _ = l
  5695. if m.Header != nil {
  5696. l = m.Header.Size()
  5697. n += 1 + l + sovRpc(uint64(l))
  5698. }
  5699. return n
  5700. }
  5701. func (m *AuthUserChangePasswordResponse) Size() (n int) {
  5702. var l int
  5703. _ = l
  5704. if m.Header != nil {
  5705. l = m.Header.Size()
  5706. n += 1 + l + sovRpc(uint64(l))
  5707. }
  5708. return n
  5709. }
  5710. func (m *AuthUserGrantResponse) Size() (n int) {
  5711. var l int
  5712. _ = l
  5713. if m.Header != nil {
  5714. l = m.Header.Size()
  5715. n += 1 + l + sovRpc(uint64(l))
  5716. }
  5717. return n
  5718. }
  5719. func (m *AuthUserRevokeResponse) Size() (n int) {
  5720. var l int
  5721. _ = l
  5722. if m.Header != nil {
  5723. l = m.Header.Size()
  5724. n += 1 + l + sovRpc(uint64(l))
  5725. }
  5726. return n
  5727. }
  5728. func (m *AuthRoleAddResponse) Size() (n int) {
  5729. var l int
  5730. _ = l
  5731. if m.Header != nil {
  5732. l = m.Header.Size()
  5733. n += 1 + l + sovRpc(uint64(l))
  5734. }
  5735. return n
  5736. }
  5737. func (m *AuthRoleGetResponse) Size() (n int) {
  5738. var l int
  5739. _ = l
  5740. if m.Header != nil {
  5741. l = m.Header.Size()
  5742. n += 1 + l + sovRpc(uint64(l))
  5743. }
  5744. return n
  5745. }
  5746. func (m *AuthRoleDeleteResponse) Size() (n int) {
  5747. var l int
  5748. _ = l
  5749. if m.Header != nil {
  5750. l = m.Header.Size()
  5751. n += 1 + l + sovRpc(uint64(l))
  5752. }
  5753. return n
  5754. }
  5755. func (m *AuthRoleGrantResponse) Size() (n int) {
  5756. var l int
  5757. _ = l
  5758. if m.Header != nil {
  5759. l = m.Header.Size()
  5760. n += 1 + l + sovRpc(uint64(l))
  5761. }
  5762. return n
  5763. }
  5764. func (m *AuthRoleRevokeResponse) Size() (n int) {
  5765. var l int
  5766. _ = l
  5767. if m.Header != nil {
  5768. l = m.Header.Size()
  5769. n += 1 + l + sovRpc(uint64(l))
  5770. }
  5771. return n
  5772. }
  5773. func sovRpc(x uint64) (n int) {
  5774. for {
  5775. n++
  5776. x >>= 7
  5777. if x == 0 {
  5778. break
  5779. }
  5780. }
  5781. return n
  5782. }
  5783. func sozRpc(x uint64) (n int) {
  5784. return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  5785. }
  5786. func (m *ResponseHeader) Unmarshal(data []byte) error {
  5787. l := len(data)
  5788. iNdEx := 0
  5789. for iNdEx < l {
  5790. preIndex := iNdEx
  5791. var wire uint64
  5792. for shift := uint(0); ; shift += 7 {
  5793. if shift >= 64 {
  5794. return ErrIntOverflowRpc
  5795. }
  5796. if iNdEx >= l {
  5797. return io.ErrUnexpectedEOF
  5798. }
  5799. b := data[iNdEx]
  5800. iNdEx++
  5801. wire |= (uint64(b) & 0x7F) << shift
  5802. if b < 0x80 {
  5803. break
  5804. }
  5805. }
  5806. fieldNum := int32(wire >> 3)
  5807. wireType := int(wire & 0x7)
  5808. if wireType == 4 {
  5809. return fmt.Errorf("proto: ResponseHeader: wiretype end group for non-group")
  5810. }
  5811. if fieldNum <= 0 {
  5812. return fmt.Errorf("proto: ResponseHeader: illegal tag %d (wire type %d)", fieldNum, wire)
  5813. }
  5814. switch fieldNum {
  5815. case 1:
  5816. if wireType != 0 {
  5817. return fmt.Errorf("proto: wrong wireType = %d for field ClusterId", wireType)
  5818. }
  5819. m.ClusterId = 0
  5820. for shift := uint(0); ; shift += 7 {
  5821. if shift >= 64 {
  5822. return ErrIntOverflowRpc
  5823. }
  5824. if iNdEx >= l {
  5825. return io.ErrUnexpectedEOF
  5826. }
  5827. b := data[iNdEx]
  5828. iNdEx++
  5829. m.ClusterId |= (uint64(b) & 0x7F) << shift
  5830. if b < 0x80 {
  5831. break
  5832. }
  5833. }
  5834. case 2:
  5835. if wireType != 0 {
  5836. return fmt.Errorf("proto: wrong wireType = %d for field MemberId", wireType)
  5837. }
  5838. m.MemberId = 0
  5839. for shift := uint(0); ; shift += 7 {
  5840. if shift >= 64 {
  5841. return ErrIntOverflowRpc
  5842. }
  5843. if iNdEx >= l {
  5844. return io.ErrUnexpectedEOF
  5845. }
  5846. b := data[iNdEx]
  5847. iNdEx++
  5848. m.MemberId |= (uint64(b) & 0x7F) << shift
  5849. if b < 0x80 {
  5850. break
  5851. }
  5852. }
  5853. case 3:
  5854. if wireType != 0 {
  5855. return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
  5856. }
  5857. m.Revision = 0
  5858. for shift := uint(0); ; shift += 7 {
  5859. if shift >= 64 {
  5860. return ErrIntOverflowRpc
  5861. }
  5862. if iNdEx >= l {
  5863. return io.ErrUnexpectedEOF
  5864. }
  5865. b := data[iNdEx]
  5866. iNdEx++
  5867. m.Revision |= (int64(b) & 0x7F) << shift
  5868. if b < 0x80 {
  5869. break
  5870. }
  5871. }
  5872. case 4:
  5873. if wireType != 0 {
  5874. return fmt.Errorf("proto: wrong wireType = %d for field RaftTerm", wireType)
  5875. }
  5876. m.RaftTerm = 0
  5877. for shift := uint(0); ; shift += 7 {
  5878. if shift >= 64 {
  5879. return ErrIntOverflowRpc
  5880. }
  5881. if iNdEx >= l {
  5882. return io.ErrUnexpectedEOF
  5883. }
  5884. b := data[iNdEx]
  5885. iNdEx++
  5886. m.RaftTerm |= (uint64(b) & 0x7F) << shift
  5887. if b < 0x80 {
  5888. break
  5889. }
  5890. }
  5891. default:
  5892. iNdEx = preIndex
  5893. skippy, err := skipRpc(data[iNdEx:])
  5894. if err != nil {
  5895. return err
  5896. }
  5897. if skippy < 0 {
  5898. return ErrInvalidLengthRpc
  5899. }
  5900. if (iNdEx + skippy) > l {
  5901. return io.ErrUnexpectedEOF
  5902. }
  5903. iNdEx += skippy
  5904. }
  5905. }
  5906. if iNdEx > l {
  5907. return io.ErrUnexpectedEOF
  5908. }
  5909. return nil
  5910. }
  5911. func (m *RangeRequest) Unmarshal(data []byte) error {
  5912. l := len(data)
  5913. iNdEx := 0
  5914. for iNdEx < l {
  5915. preIndex := iNdEx
  5916. var wire uint64
  5917. for shift := uint(0); ; shift += 7 {
  5918. if shift >= 64 {
  5919. return ErrIntOverflowRpc
  5920. }
  5921. if iNdEx >= l {
  5922. return io.ErrUnexpectedEOF
  5923. }
  5924. b := data[iNdEx]
  5925. iNdEx++
  5926. wire |= (uint64(b) & 0x7F) << shift
  5927. if b < 0x80 {
  5928. break
  5929. }
  5930. }
  5931. fieldNum := int32(wire >> 3)
  5932. wireType := int(wire & 0x7)
  5933. if wireType == 4 {
  5934. return fmt.Errorf("proto: RangeRequest: wiretype end group for non-group")
  5935. }
  5936. if fieldNum <= 0 {
  5937. return fmt.Errorf("proto: RangeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  5938. }
  5939. switch fieldNum {
  5940. case 1:
  5941. if wireType != 2 {
  5942. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  5943. }
  5944. var byteLen int
  5945. for shift := uint(0); ; shift += 7 {
  5946. if shift >= 64 {
  5947. return ErrIntOverflowRpc
  5948. }
  5949. if iNdEx >= l {
  5950. return io.ErrUnexpectedEOF
  5951. }
  5952. b := data[iNdEx]
  5953. iNdEx++
  5954. byteLen |= (int(b) & 0x7F) << shift
  5955. if b < 0x80 {
  5956. break
  5957. }
  5958. }
  5959. if byteLen < 0 {
  5960. return ErrInvalidLengthRpc
  5961. }
  5962. postIndex := iNdEx + byteLen
  5963. if postIndex > l {
  5964. return io.ErrUnexpectedEOF
  5965. }
  5966. m.Key = append(m.Key[:0], data[iNdEx:postIndex]...)
  5967. if m.Key == nil {
  5968. m.Key = []byte{}
  5969. }
  5970. iNdEx = postIndex
  5971. case 2:
  5972. if wireType != 2 {
  5973. return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType)
  5974. }
  5975. var byteLen int
  5976. for shift := uint(0); ; shift += 7 {
  5977. if shift >= 64 {
  5978. return ErrIntOverflowRpc
  5979. }
  5980. if iNdEx >= l {
  5981. return io.ErrUnexpectedEOF
  5982. }
  5983. b := data[iNdEx]
  5984. iNdEx++
  5985. byteLen |= (int(b) & 0x7F) << shift
  5986. if b < 0x80 {
  5987. break
  5988. }
  5989. }
  5990. if byteLen < 0 {
  5991. return ErrInvalidLengthRpc
  5992. }
  5993. postIndex := iNdEx + byteLen
  5994. if postIndex > l {
  5995. return io.ErrUnexpectedEOF
  5996. }
  5997. m.RangeEnd = append(m.RangeEnd[:0], data[iNdEx:postIndex]...)
  5998. if m.RangeEnd == nil {
  5999. m.RangeEnd = []byte{}
  6000. }
  6001. iNdEx = postIndex
  6002. case 3:
  6003. if wireType != 0 {
  6004. return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType)
  6005. }
  6006. m.Limit = 0
  6007. for shift := uint(0); ; shift += 7 {
  6008. if shift >= 64 {
  6009. return ErrIntOverflowRpc
  6010. }
  6011. if iNdEx >= l {
  6012. return io.ErrUnexpectedEOF
  6013. }
  6014. b := data[iNdEx]
  6015. iNdEx++
  6016. m.Limit |= (int64(b) & 0x7F) << shift
  6017. if b < 0x80 {
  6018. break
  6019. }
  6020. }
  6021. case 4:
  6022. if wireType != 0 {
  6023. return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
  6024. }
  6025. m.Revision = 0
  6026. for shift := uint(0); ; shift += 7 {
  6027. if shift >= 64 {
  6028. return ErrIntOverflowRpc
  6029. }
  6030. if iNdEx >= l {
  6031. return io.ErrUnexpectedEOF
  6032. }
  6033. b := data[iNdEx]
  6034. iNdEx++
  6035. m.Revision |= (int64(b) & 0x7F) << shift
  6036. if b < 0x80 {
  6037. break
  6038. }
  6039. }
  6040. case 5:
  6041. if wireType != 0 {
  6042. return fmt.Errorf("proto: wrong wireType = %d for field SortOrder", wireType)
  6043. }
  6044. m.SortOrder = 0
  6045. for shift := uint(0); ; shift += 7 {
  6046. if shift >= 64 {
  6047. return ErrIntOverflowRpc
  6048. }
  6049. if iNdEx >= l {
  6050. return io.ErrUnexpectedEOF
  6051. }
  6052. b := data[iNdEx]
  6053. iNdEx++
  6054. m.SortOrder |= (RangeRequest_SortOrder(b) & 0x7F) << shift
  6055. if b < 0x80 {
  6056. break
  6057. }
  6058. }
  6059. case 6:
  6060. if wireType != 0 {
  6061. return fmt.Errorf("proto: wrong wireType = %d for field SortTarget", wireType)
  6062. }
  6063. m.SortTarget = 0
  6064. for shift := uint(0); ; shift += 7 {
  6065. if shift >= 64 {
  6066. return ErrIntOverflowRpc
  6067. }
  6068. if iNdEx >= l {
  6069. return io.ErrUnexpectedEOF
  6070. }
  6071. b := data[iNdEx]
  6072. iNdEx++
  6073. m.SortTarget |= (RangeRequest_SortTarget(b) & 0x7F) << shift
  6074. if b < 0x80 {
  6075. break
  6076. }
  6077. }
  6078. case 7:
  6079. if wireType != 0 {
  6080. return fmt.Errorf("proto: wrong wireType = %d for field Serializable", wireType)
  6081. }
  6082. var v int
  6083. for shift := uint(0); ; shift += 7 {
  6084. if shift >= 64 {
  6085. return ErrIntOverflowRpc
  6086. }
  6087. if iNdEx >= l {
  6088. return io.ErrUnexpectedEOF
  6089. }
  6090. b := data[iNdEx]
  6091. iNdEx++
  6092. v |= (int(b) & 0x7F) << shift
  6093. if b < 0x80 {
  6094. break
  6095. }
  6096. }
  6097. m.Serializable = bool(v != 0)
  6098. default:
  6099. iNdEx = preIndex
  6100. skippy, err := skipRpc(data[iNdEx:])
  6101. if err != nil {
  6102. return err
  6103. }
  6104. if skippy < 0 {
  6105. return ErrInvalidLengthRpc
  6106. }
  6107. if (iNdEx + skippy) > l {
  6108. return io.ErrUnexpectedEOF
  6109. }
  6110. iNdEx += skippy
  6111. }
  6112. }
  6113. if iNdEx > l {
  6114. return io.ErrUnexpectedEOF
  6115. }
  6116. return nil
  6117. }
  6118. func (m *RangeResponse) Unmarshal(data []byte) error {
  6119. l := len(data)
  6120. iNdEx := 0
  6121. for iNdEx < l {
  6122. preIndex := iNdEx
  6123. var wire uint64
  6124. for shift := uint(0); ; shift += 7 {
  6125. if shift >= 64 {
  6126. return ErrIntOverflowRpc
  6127. }
  6128. if iNdEx >= l {
  6129. return io.ErrUnexpectedEOF
  6130. }
  6131. b := data[iNdEx]
  6132. iNdEx++
  6133. wire |= (uint64(b) & 0x7F) << shift
  6134. if b < 0x80 {
  6135. break
  6136. }
  6137. }
  6138. fieldNum := int32(wire >> 3)
  6139. wireType := int(wire & 0x7)
  6140. if wireType == 4 {
  6141. return fmt.Errorf("proto: RangeResponse: wiretype end group for non-group")
  6142. }
  6143. if fieldNum <= 0 {
  6144. return fmt.Errorf("proto: RangeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  6145. }
  6146. switch fieldNum {
  6147. case 1:
  6148. if wireType != 2 {
  6149. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  6150. }
  6151. var msglen int
  6152. for shift := uint(0); ; shift += 7 {
  6153. if shift >= 64 {
  6154. return ErrIntOverflowRpc
  6155. }
  6156. if iNdEx >= l {
  6157. return io.ErrUnexpectedEOF
  6158. }
  6159. b := data[iNdEx]
  6160. iNdEx++
  6161. msglen |= (int(b) & 0x7F) << shift
  6162. if b < 0x80 {
  6163. break
  6164. }
  6165. }
  6166. if msglen < 0 {
  6167. return ErrInvalidLengthRpc
  6168. }
  6169. postIndex := iNdEx + msglen
  6170. if postIndex > l {
  6171. return io.ErrUnexpectedEOF
  6172. }
  6173. if m.Header == nil {
  6174. m.Header = &ResponseHeader{}
  6175. }
  6176. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  6177. return err
  6178. }
  6179. iNdEx = postIndex
  6180. case 2:
  6181. if wireType != 2 {
  6182. return fmt.Errorf("proto: wrong wireType = %d for field Kvs", wireType)
  6183. }
  6184. var msglen int
  6185. for shift := uint(0); ; shift += 7 {
  6186. if shift >= 64 {
  6187. return ErrIntOverflowRpc
  6188. }
  6189. if iNdEx >= l {
  6190. return io.ErrUnexpectedEOF
  6191. }
  6192. b := data[iNdEx]
  6193. iNdEx++
  6194. msglen |= (int(b) & 0x7F) << shift
  6195. if b < 0x80 {
  6196. break
  6197. }
  6198. }
  6199. if msglen < 0 {
  6200. return ErrInvalidLengthRpc
  6201. }
  6202. postIndex := iNdEx + msglen
  6203. if postIndex > l {
  6204. return io.ErrUnexpectedEOF
  6205. }
  6206. m.Kvs = append(m.Kvs, &storagepb.KeyValue{})
  6207. if err := m.Kvs[len(m.Kvs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  6208. return err
  6209. }
  6210. iNdEx = postIndex
  6211. case 3:
  6212. if wireType != 0 {
  6213. return fmt.Errorf("proto: wrong wireType = %d for field More", wireType)
  6214. }
  6215. var v int
  6216. for shift := uint(0); ; shift += 7 {
  6217. if shift >= 64 {
  6218. return ErrIntOverflowRpc
  6219. }
  6220. if iNdEx >= l {
  6221. return io.ErrUnexpectedEOF
  6222. }
  6223. b := data[iNdEx]
  6224. iNdEx++
  6225. v |= (int(b) & 0x7F) << shift
  6226. if b < 0x80 {
  6227. break
  6228. }
  6229. }
  6230. m.More = bool(v != 0)
  6231. default:
  6232. iNdEx = preIndex
  6233. skippy, err := skipRpc(data[iNdEx:])
  6234. if err != nil {
  6235. return err
  6236. }
  6237. if skippy < 0 {
  6238. return ErrInvalidLengthRpc
  6239. }
  6240. if (iNdEx + skippy) > l {
  6241. return io.ErrUnexpectedEOF
  6242. }
  6243. iNdEx += skippy
  6244. }
  6245. }
  6246. if iNdEx > l {
  6247. return io.ErrUnexpectedEOF
  6248. }
  6249. return nil
  6250. }
  6251. func (m *PutRequest) Unmarshal(data []byte) error {
  6252. l := len(data)
  6253. iNdEx := 0
  6254. for iNdEx < l {
  6255. preIndex := iNdEx
  6256. var wire uint64
  6257. for shift := uint(0); ; shift += 7 {
  6258. if shift >= 64 {
  6259. return ErrIntOverflowRpc
  6260. }
  6261. if iNdEx >= l {
  6262. return io.ErrUnexpectedEOF
  6263. }
  6264. b := data[iNdEx]
  6265. iNdEx++
  6266. wire |= (uint64(b) & 0x7F) << shift
  6267. if b < 0x80 {
  6268. break
  6269. }
  6270. }
  6271. fieldNum := int32(wire >> 3)
  6272. wireType := int(wire & 0x7)
  6273. if wireType == 4 {
  6274. return fmt.Errorf("proto: PutRequest: wiretype end group for non-group")
  6275. }
  6276. if fieldNum <= 0 {
  6277. return fmt.Errorf("proto: PutRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  6278. }
  6279. switch fieldNum {
  6280. case 1:
  6281. if wireType != 2 {
  6282. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  6283. }
  6284. var byteLen int
  6285. for shift := uint(0); ; shift += 7 {
  6286. if shift >= 64 {
  6287. return ErrIntOverflowRpc
  6288. }
  6289. if iNdEx >= l {
  6290. return io.ErrUnexpectedEOF
  6291. }
  6292. b := data[iNdEx]
  6293. iNdEx++
  6294. byteLen |= (int(b) & 0x7F) << shift
  6295. if b < 0x80 {
  6296. break
  6297. }
  6298. }
  6299. if byteLen < 0 {
  6300. return ErrInvalidLengthRpc
  6301. }
  6302. postIndex := iNdEx + byteLen
  6303. if postIndex > l {
  6304. return io.ErrUnexpectedEOF
  6305. }
  6306. m.Key = append(m.Key[:0], data[iNdEx:postIndex]...)
  6307. if m.Key == nil {
  6308. m.Key = []byte{}
  6309. }
  6310. iNdEx = postIndex
  6311. case 2:
  6312. if wireType != 2 {
  6313. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  6314. }
  6315. var byteLen int
  6316. for shift := uint(0); ; shift += 7 {
  6317. if shift >= 64 {
  6318. return ErrIntOverflowRpc
  6319. }
  6320. if iNdEx >= l {
  6321. return io.ErrUnexpectedEOF
  6322. }
  6323. b := data[iNdEx]
  6324. iNdEx++
  6325. byteLen |= (int(b) & 0x7F) << shift
  6326. if b < 0x80 {
  6327. break
  6328. }
  6329. }
  6330. if byteLen < 0 {
  6331. return ErrInvalidLengthRpc
  6332. }
  6333. postIndex := iNdEx + byteLen
  6334. if postIndex > l {
  6335. return io.ErrUnexpectedEOF
  6336. }
  6337. m.Value = append(m.Value[:0], data[iNdEx:postIndex]...)
  6338. if m.Value == nil {
  6339. m.Value = []byte{}
  6340. }
  6341. iNdEx = postIndex
  6342. case 3:
  6343. if wireType != 0 {
  6344. return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType)
  6345. }
  6346. m.Lease = 0
  6347. for shift := uint(0); ; shift += 7 {
  6348. if shift >= 64 {
  6349. return ErrIntOverflowRpc
  6350. }
  6351. if iNdEx >= l {
  6352. return io.ErrUnexpectedEOF
  6353. }
  6354. b := data[iNdEx]
  6355. iNdEx++
  6356. m.Lease |= (int64(b) & 0x7F) << shift
  6357. if b < 0x80 {
  6358. break
  6359. }
  6360. }
  6361. default:
  6362. iNdEx = preIndex
  6363. skippy, err := skipRpc(data[iNdEx:])
  6364. if err != nil {
  6365. return err
  6366. }
  6367. if skippy < 0 {
  6368. return ErrInvalidLengthRpc
  6369. }
  6370. if (iNdEx + skippy) > l {
  6371. return io.ErrUnexpectedEOF
  6372. }
  6373. iNdEx += skippy
  6374. }
  6375. }
  6376. if iNdEx > l {
  6377. return io.ErrUnexpectedEOF
  6378. }
  6379. return nil
  6380. }
  6381. func (m *PutResponse) Unmarshal(data []byte) error {
  6382. l := len(data)
  6383. iNdEx := 0
  6384. for iNdEx < l {
  6385. preIndex := iNdEx
  6386. var wire uint64
  6387. for shift := uint(0); ; shift += 7 {
  6388. if shift >= 64 {
  6389. return ErrIntOverflowRpc
  6390. }
  6391. if iNdEx >= l {
  6392. return io.ErrUnexpectedEOF
  6393. }
  6394. b := data[iNdEx]
  6395. iNdEx++
  6396. wire |= (uint64(b) & 0x7F) << shift
  6397. if b < 0x80 {
  6398. break
  6399. }
  6400. }
  6401. fieldNum := int32(wire >> 3)
  6402. wireType := int(wire & 0x7)
  6403. if wireType == 4 {
  6404. return fmt.Errorf("proto: PutResponse: wiretype end group for non-group")
  6405. }
  6406. if fieldNum <= 0 {
  6407. return fmt.Errorf("proto: PutResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  6408. }
  6409. switch fieldNum {
  6410. case 1:
  6411. if wireType != 2 {
  6412. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  6413. }
  6414. var msglen int
  6415. for shift := uint(0); ; shift += 7 {
  6416. if shift >= 64 {
  6417. return ErrIntOverflowRpc
  6418. }
  6419. if iNdEx >= l {
  6420. return io.ErrUnexpectedEOF
  6421. }
  6422. b := data[iNdEx]
  6423. iNdEx++
  6424. msglen |= (int(b) & 0x7F) << shift
  6425. if b < 0x80 {
  6426. break
  6427. }
  6428. }
  6429. if msglen < 0 {
  6430. return ErrInvalidLengthRpc
  6431. }
  6432. postIndex := iNdEx + msglen
  6433. if postIndex > l {
  6434. return io.ErrUnexpectedEOF
  6435. }
  6436. if m.Header == nil {
  6437. m.Header = &ResponseHeader{}
  6438. }
  6439. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  6440. return err
  6441. }
  6442. iNdEx = postIndex
  6443. default:
  6444. iNdEx = preIndex
  6445. skippy, err := skipRpc(data[iNdEx:])
  6446. if err != nil {
  6447. return err
  6448. }
  6449. if skippy < 0 {
  6450. return ErrInvalidLengthRpc
  6451. }
  6452. if (iNdEx + skippy) > l {
  6453. return io.ErrUnexpectedEOF
  6454. }
  6455. iNdEx += skippy
  6456. }
  6457. }
  6458. if iNdEx > l {
  6459. return io.ErrUnexpectedEOF
  6460. }
  6461. return nil
  6462. }
  6463. func (m *DeleteRangeRequest) Unmarshal(data []byte) error {
  6464. l := len(data)
  6465. iNdEx := 0
  6466. for iNdEx < l {
  6467. preIndex := iNdEx
  6468. var wire uint64
  6469. for shift := uint(0); ; shift += 7 {
  6470. if shift >= 64 {
  6471. return ErrIntOverflowRpc
  6472. }
  6473. if iNdEx >= l {
  6474. return io.ErrUnexpectedEOF
  6475. }
  6476. b := data[iNdEx]
  6477. iNdEx++
  6478. wire |= (uint64(b) & 0x7F) << shift
  6479. if b < 0x80 {
  6480. break
  6481. }
  6482. }
  6483. fieldNum := int32(wire >> 3)
  6484. wireType := int(wire & 0x7)
  6485. if wireType == 4 {
  6486. return fmt.Errorf("proto: DeleteRangeRequest: wiretype end group for non-group")
  6487. }
  6488. if fieldNum <= 0 {
  6489. return fmt.Errorf("proto: DeleteRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  6490. }
  6491. switch fieldNum {
  6492. case 1:
  6493. if wireType != 2 {
  6494. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  6495. }
  6496. var byteLen int
  6497. for shift := uint(0); ; shift += 7 {
  6498. if shift >= 64 {
  6499. return ErrIntOverflowRpc
  6500. }
  6501. if iNdEx >= l {
  6502. return io.ErrUnexpectedEOF
  6503. }
  6504. b := data[iNdEx]
  6505. iNdEx++
  6506. byteLen |= (int(b) & 0x7F) << shift
  6507. if b < 0x80 {
  6508. break
  6509. }
  6510. }
  6511. if byteLen < 0 {
  6512. return ErrInvalidLengthRpc
  6513. }
  6514. postIndex := iNdEx + byteLen
  6515. if postIndex > l {
  6516. return io.ErrUnexpectedEOF
  6517. }
  6518. m.Key = append(m.Key[:0], data[iNdEx:postIndex]...)
  6519. if m.Key == nil {
  6520. m.Key = []byte{}
  6521. }
  6522. iNdEx = postIndex
  6523. case 2:
  6524. if wireType != 2 {
  6525. return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType)
  6526. }
  6527. var byteLen int
  6528. for shift := uint(0); ; shift += 7 {
  6529. if shift >= 64 {
  6530. return ErrIntOverflowRpc
  6531. }
  6532. if iNdEx >= l {
  6533. return io.ErrUnexpectedEOF
  6534. }
  6535. b := data[iNdEx]
  6536. iNdEx++
  6537. byteLen |= (int(b) & 0x7F) << shift
  6538. if b < 0x80 {
  6539. break
  6540. }
  6541. }
  6542. if byteLen < 0 {
  6543. return ErrInvalidLengthRpc
  6544. }
  6545. postIndex := iNdEx + byteLen
  6546. if postIndex > l {
  6547. return io.ErrUnexpectedEOF
  6548. }
  6549. m.RangeEnd = append(m.RangeEnd[:0], data[iNdEx:postIndex]...)
  6550. if m.RangeEnd == nil {
  6551. m.RangeEnd = []byte{}
  6552. }
  6553. iNdEx = postIndex
  6554. default:
  6555. iNdEx = preIndex
  6556. skippy, err := skipRpc(data[iNdEx:])
  6557. if err != nil {
  6558. return err
  6559. }
  6560. if skippy < 0 {
  6561. return ErrInvalidLengthRpc
  6562. }
  6563. if (iNdEx + skippy) > l {
  6564. return io.ErrUnexpectedEOF
  6565. }
  6566. iNdEx += skippy
  6567. }
  6568. }
  6569. if iNdEx > l {
  6570. return io.ErrUnexpectedEOF
  6571. }
  6572. return nil
  6573. }
  6574. func (m *DeleteRangeResponse) Unmarshal(data []byte) error {
  6575. l := len(data)
  6576. iNdEx := 0
  6577. for iNdEx < l {
  6578. preIndex := iNdEx
  6579. var wire uint64
  6580. for shift := uint(0); ; shift += 7 {
  6581. if shift >= 64 {
  6582. return ErrIntOverflowRpc
  6583. }
  6584. if iNdEx >= l {
  6585. return io.ErrUnexpectedEOF
  6586. }
  6587. b := data[iNdEx]
  6588. iNdEx++
  6589. wire |= (uint64(b) & 0x7F) << shift
  6590. if b < 0x80 {
  6591. break
  6592. }
  6593. }
  6594. fieldNum := int32(wire >> 3)
  6595. wireType := int(wire & 0x7)
  6596. if wireType == 4 {
  6597. return fmt.Errorf("proto: DeleteRangeResponse: wiretype end group for non-group")
  6598. }
  6599. if fieldNum <= 0 {
  6600. return fmt.Errorf("proto: DeleteRangeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  6601. }
  6602. switch fieldNum {
  6603. case 1:
  6604. if wireType != 2 {
  6605. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  6606. }
  6607. var msglen int
  6608. for shift := uint(0); ; shift += 7 {
  6609. if shift >= 64 {
  6610. return ErrIntOverflowRpc
  6611. }
  6612. if iNdEx >= l {
  6613. return io.ErrUnexpectedEOF
  6614. }
  6615. b := data[iNdEx]
  6616. iNdEx++
  6617. msglen |= (int(b) & 0x7F) << shift
  6618. if b < 0x80 {
  6619. break
  6620. }
  6621. }
  6622. if msglen < 0 {
  6623. return ErrInvalidLengthRpc
  6624. }
  6625. postIndex := iNdEx + msglen
  6626. if postIndex > l {
  6627. return io.ErrUnexpectedEOF
  6628. }
  6629. if m.Header == nil {
  6630. m.Header = &ResponseHeader{}
  6631. }
  6632. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  6633. return err
  6634. }
  6635. iNdEx = postIndex
  6636. case 2:
  6637. if wireType != 0 {
  6638. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  6639. }
  6640. m.Deleted = 0
  6641. for shift := uint(0); ; shift += 7 {
  6642. if shift >= 64 {
  6643. return ErrIntOverflowRpc
  6644. }
  6645. if iNdEx >= l {
  6646. return io.ErrUnexpectedEOF
  6647. }
  6648. b := data[iNdEx]
  6649. iNdEx++
  6650. m.Deleted |= (int64(b) & 0x7F) << shift
  6651. if b < 0x80 {
  6652. break
  6653. }
  6654. }
  6655. default:
  6656. iNdEx = preIndex
  6657. skippy, err := skipRpc(data[iNdEx:])
  6658. if err != nil {
  6659. return err
  6660. }
  6661. if skippy < 0 {
  6662. return ErrInvalidLengthRpc
  6663. }
  6664. if (iNdEx + skippy) > l {
  6665. return io.ErrUnexpectedEOF
  6666. }
  6667. iNdEx += skippy
  6668. }
  6669. }
  6670. if iNdEx > l {
  6671. return io.ErrUnexpectedEOF
  6672. }
  6673. return nil
  6674. }
  6675. func (m *RequestUnion) Unmarshal(data []byte) error {
  6676. l := len(data)
  6677. iNdEx := 0
  6678. for iNdEx < l {
  6679. preIndex := iNdEx
  6680. var wire uint64
  6681. for shift := uint(0); ; shift += 7 {
  6682. if shift >= 64 {
  6683. return ErrIntOverflowRpc
  6684. }
  6685. if iNdEx >= l {
  6686. return io.ErrUnexpectedEOF
  6687. }
  6688. b := data[iNdEx]
  6689. iNdEx++
  6690. wire |= (uint64(b) & 0x7F) << shift
  6691. if b < 0x80 {
  6692. break
  6693. }
  6694. }
  6695. fieldNum := int32(wire >> 3)
  6696. wireType := int(wire & 0x7)
  6697. if wireType == 4 {
  6698. return fmt.Errorf("proto: RequestUnion: wiretype end group for non-group")
  6699. }
  6700. if fieldNum <= 0 {
  6701. return fmt.Errorf("proto: RequestUnion: illegal tag %d (wire type %d)", fieldNum, wire)
  6702. }
  6703. switch fieldNum {
  6704. case 1:
  6705. if wireType != 2 {
  6706. return fmt.Errorf("proto: wrong wireType = %d for field RequestRange", wireType)
  6707. }
  6708. var msglen int
  6709. for shift := uint(0); ; shift += 7 {
  6710. if shift >= 64 {
  6711. return ErrIntOverflowRpc
  6712. }
  6713. if iNdEx >= l {
  6714. return io.ErrUnexpectedEOF
  6715. }
  6716. b := data[iNdEx]
  6717. iNdEx++
  6718. msglen |= (int(b) & 0x7F) << shift
  6719. if b < 0x80 {
  6720. break
  6721. }
  6722. }
  6723. if msglen < 0 {
  6724. return ErrInvalidLengthRpc
  6725. }
  6726. postIndex := iNdEx + msglen
  6727. if postIndex > l {
  6728. return io.ErrUnexpectedEOF
  6729. }
  6730. v := &RangeRequest{}
  6731. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  6732. return err
  6733. }
  6734. m.Request = &RequestUnion_RequestRange{v}
  6735. iNdEx = postIndex
  6736. case 2:
  6737. if wireType != 2 {
  6738. return fmt.Errorf("proto: wrong wireType = %d for field RequestPut", wireType)
  6739. }
  6740. var msglen int
  6741. for shift := uint(0); ; shift += 7 {
  6742. if shift >= 64 {
  6743. return ErrIntOverflowRpc
  6744. }
  6745. if iNdEx >= l {
  6746. return io.ErrUnexpectedEOF
  6747. }
  6748. b := data[iNdEx]
  6749. iNdEx++
  6750. msglen |= (int(b) & 0x7F) << shift
  6751. if b < 0x80 {
  6752. break
  6753. }
  6754. }
  6755. if msglen < 0 {
  6756. return ErrInvalidLengthRpc
  6757. }
  6758. postIndex := iNdEx + msglen
  6759. if postIndex > l {
  6760. return io.ErrUnexpectedEOF
  6761. }
  6762. v := &PutRequest{}
  6763. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  6764. return err
  6765. }
  6766. m.Request = &RequestUnion_RequestPut{v}
  6767. iNdEx = postIndex
  6768. case 3:
  6769. if wireType != 2 {
  6770. return fmt.Errorf("proto: wrong wireType = %d for field RequestDeleteRange", wireType)
  6771. }
  6772. var msglen int
  6773. for shift := uint(0); ; shift += 7 {
  6774. if shift >= 64 {
  6775. return ErrIntOverflowRpc
  6776. }
  6777. if iNdEx >= l {
  6778. return io.ErrUnexpectedEOF
  6779. }
  6780. b := data[iNdEx]
  6781. iNdEx++
  6782. msglen |= (int(b) & 0x7F) << shift
  6783. if b < 0x80 {
  6784. break
  6785. }
  6786. }
  6787. if msglen < 0 {
  6788. return ErrInvalidLengthRpc
  6789. }
  6790. postIndex := iNdEx + msglen
  6791. if postIndex > l {
  6792. return io.ErrUnexpectedEOF
  6793. }
  6794. v := &DeleteRangeRequest{}
  6795. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  6796. return err
  6797. }
  6798. m.Request = &RequestUnion_RequestDeleteRange{v}
  6799. iNdEx = postIndex
  6800. default:
  6801. iNdEx = preIndex
  6802. skippy, err := skipRpc(data[iNdEx:])
  6803. if err != nil {
  6804. return err
  6805. }
  6806. if skippy < 0 {
  6807. return ErrInvalidLengthRpc
  6808. }
  6809. if (iNdEx + skippy) > l {
  6810. return io.ErrUnexpectedEOF
  6811. }
  6812. iNdEx += skippy
  6813. }
  6814. }
  6815. if iNdEx > l {
  6816. return io.ErrUnexpectedEOF
  6817. }
  6818. return nil
  6819. }
  6820. func (m *ResponseUnion) Unmarshal(data []byte) error {
  6821. l := len(data)
  6822. iNdEx := 0
  6823. for iNdEx < l {
  6824. preIndex := iNdEx
  6825. var wire uint64
  6826. for shift := uint(0); ; shift += 7 {
  6827. if shift >= 64 {
  6828. return ErrIntOverflowRpc
  6829. }
  6830. if iNdEx >= l {
  6831. return io.ErrUnexpectedEOF
  6832. }
  6833. b := data[iNdEx]
  6834. iNdEx++
  6835. wire |= (uint64(b) & 0x7F) << shift
  6836. if b < 0x80 {
  6837. break
  6838. }
  6839. }
  6840. fieldNum := int32(wire >> 3)
  6841. wireType := int(wire & 0x7)
  6842. if wireType == 4 {
  6843. return fmt.Errorf("proto: ResponseUnion: wiretype end group for non-group")
  6844. }
  6845. if fieldNum <= 0 {
  6846. return fmt.Errorf("proto: ResponseUnion: illegal tag %d (wire type %d)", fieldNum, wire)
  6847. }
  6848. switch fieldNum {
  6849. case 1:
  6850. if wireType != 2 {
  6851. return fmt.Errorf("proto: wrong wireType = %d for field ResponseRange", wireType)
  6852. }
  6853. var msglen int
  6854. for shift := uint(0); ; shift += 7 {
  6855. if shift >= 64 {
  6856. return ErrIntOverflowRpc
  6857. }
  6858. if iNdEx >= l {
  6859. return io.ErrUnexpectedEOF
  6860. }
  6861. b := data[iNdEx]
  6862. iNdEx++
  6863. msglen |= (int(b) & 0x7F) << shift
  6864. if b < 0x80 {
  6865. break
  6866. }
  6867. }
  6868. if msglen < 0 {
  6869. return ErrInvalidLengthRpc
  6870. }
  6871. postIndex := iNdEx + msglen
  6872. if postIndex > l {
  6873. return io.ErrUnexpectedEOF
  6874. }
  6875. v := &RangeResponse{}
  6876. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  6877. return err
  6878. }
  6879. m.Response = &ResponseUnion_ResponseRange{v}
  6880. iNdEx = postIndex
  6881. case 2:
  6882. if wireType != 2 {
  6883. return fmt.Errorf("proto: wrong wireType = %d for field ResponsePut", wireType)
  6884. }
  6885. var msglen int
  6886. for shift := uint(0); ; shift += 7 {
  6887. if shift >= 64 {
  6888. return ErrIntOverflowRpc
  6889. }
  6890. if iNdEx >= l {
  6891. return io.ErrUnexpectedEOF
  6892. }
  6893. b := data[iNdEx]
  6894. iNdEx++
  6895. msglen |= (int(b) & 0x7F) << shift
  6896. if b < 0x80 {
  6897. break
  6898. }
  6899. }
  6900. if msglen < 0 {
  6901. return ErrInvalidLengthRpc
  6902. }
  6903. postIndex := iNdEx + msglen
  6904. if postIndex > l {
  6905. return io.ErrUnexpectedEOF
  6906. }
  6907. v := &PutResponse{}
  6908. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  6909. return err
  6910. }
  6911. m.Response = &ResponseUnion_ResponsePut{v}
  6912. iNdEx = postIndex
  6913. case 3:
  6914. if wireType != 2 {
  6915. return fmt.Errorf("proto: wrong wireType = %d for field ResponseDeleteRange", wireType)
  6916. }
  6917. var msglen int
  6918. for shift := uint(0); ; shift += 7 {
  6919. if shift >= 64 {
  6920. return ErrIntOverflowRpc
  6921. }
  6922. if iNdEx >= l {
  6923. return io.ErrUnexpectedEOF
  6924. }
  6925. b := data[iNdEx]
  6926. iNdEx++
  6927. msglen |= (int(b) & 0x7F) << shift
  6928. if b < 0x80 {
  6929. break
  6930. }
  6931. }
  6932. if msglen < 0 {
  6933. return ErrInvalidLengthRpc
  6934. }
  6935. postIndex := iNdEx + msglen
  6936. if postIndex > l {
  6937. return io.ErrUnexpectedEOF
  6938. }
  6939. v := &DeleteRangeResponse{}
  6940. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  6941. return err
  6942. }
  6943. m.Response = &ResponseUnion_ResponseDeleteRange{v}
  6944. iNdEx = postIndex
  6945. default:
  6946. iNdEx = preIndex
  6947. skippy, err := skipRpc(data[iNdEx:])
  6948. if err != nil {
  6949. return err
  6950. }
  6951. if skippy < 0 {
  6952. return ErrInvalidLengthRpc
  6953. }
  6954. if (iNdEx + skippy) > l {
  6955. return io.ErrUnexpectedEOF
  6956. }
  6957. iNdEx += skippy
  6958. }
  6959. }
  6960. if iNdEx > l {
  6961. return io.ErrUnexpectedEOF
  6962. }
  6963. return nil
  6964. }
  6965. func (m *Compare) Unmarshal(data []byte) error {
  6966. l := len(data)
  6967. iNdEx := 0
  6968. for iNdEx < l {
  6969. preIndex := iNdEx
  6970. var wire uint64
  6971. for shift := uint(0); ; shift += 7 {
  6972. if shift >= 64 {
  6973. return ErrIntOverflowRpc
  6974. }
  6975. if iNdEx >= l {
  6976. return io.ErrUnexpectedEOF
  6977. }
  6978. b := data[iNdEx]
  6979. iNdEx++
  6980. wire |= (uint64(b) & 0x7F) << shift
  6981. if b < 0x80 {
  6982. break
  6983. }
  6984. }
  6985. fieldNum := int32(wire >> 3)
  6986. wireType := int(wire & 0x7)
  6987. if wireType == 4 {
  6988. return fmt.Errorf("proto: Compare: wiretype end group for non-group")
  6989. }
  6990. if fieldNum <= 0 {
  6991. return fmt.Errorf("proto: Compare: illegal tag %d (wire type %d)", fieldNum, wire)
  6992. }
  6993. switch fieldNum {
  6994. case 1:
  6995. if wireType != 0 {
  6996. return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
  6997. }
  6998. m.Result = 0
  6999. for shift := uint(0); ; shift += 7 {
  7000. if shift >= 64 {
  7001. return ErrIntOverflowRpc
  7002. }
  7003. if iNdEx >= l {
  7004. return io.ErrUnexpectedEOF
  7005. }
  7006. b := data[iNdEx]
  7007. iNdEx++
  7008. m.Result |= (Compare_CompareResult(b) & 0x7F) << shift
  7009. if b < 0x80 {
  7010. break
  7011. }
  7012. }
  7013. case 2:
  7014. if wireType != 0 {
  7015. return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
  7016. }
  7017. m.Target = 0
  7018. for shift := uint(0); ; shift += 7 {
  7019. if shift >= 64 {
  7020. return ErrIntOverflowRpc
  7021. }
  7022. if iNdEx >= l {
  7023. return io.ErrUnexpectedEOF
  7024. }
  7025. b := data[iNdEx]
  7026. iNdEx++
  7027. m.Target |= (Compare_CompareTarget(b) & 0x7F) << shift
  7028. if b < 0x80 {
  7029. break
  7030. }
  7031. }
  7032. case 3:
  7033. if wireType != 2 {
  7034. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  7035. }
  7036. var byteLen int
  7037. for shift := uint(0); ; shift += 7 {
  7038. if shift >= 64 {
  7039. return ErrIntOverflowRpc
  7040. }
  7041. if iNdEx >= l {
  7042. return io.ErrUnexpectedEOF
  7043. }
  7044. b := data[iNdEx]
  7045. iNdEx++
  7046. byteLen |= (int(b) & 0x7F) << shift
  7047. if b < 0x80 {
  7048. break
  7049. }
  7050. }
  7051. if byteLen < 0 {
  7052. return ErrInvalidLengthRpc
  7053. }
  7054. postIndex := iNdEx + byteLen
  7055. if postIndex > l {
  7056. return io.ErrUnexpectedEOF
  7057. }
  7058. m.Key = append(m.Key[:0], data[iNdEx:postIndex]...)
  7059. if m.Key == nil {
  7060. m.Key = []byte{}
  7061. }
  7062. iNdEx = postIndex
  7063. case 4:
  7064. if wireType != 0 {
  7065. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  7066. }
  7067. var v int64
  7068. for shift := uint(0); ; shift += 7 {
  7069. if shift >= 64 {
  7070. return ErrIntOverflowRpc
  7071. }
  7072. if iNdEx >= l {
  7073. return io.ErrUnexpectedEOF
  7074. }
  7075. b := data[iNdEx]
  7076. iNdEx++
  7077. v |= (int64(b) & 0x7F) << shift
  7078. if b < 0x80 {
  7079. break
  7080. }
  7081. }
  7082. m.TargetUnion = &Compare_Version{v}
  7083. case 5:
  7084. if wireType != 0 {
  7085. return fmt.Errorf("proto: wrong wireType = %d for field CreateRevision", wireType)
  7086. }
  7087. var v int64
  7088. for shift := uint(0); ; shift += 7 {
  7089. if shift >= 64 {
  7090. return ErrIntOverflowRpc
  7091. }
  7092. if iNdEx >= l {
  7093. return io.ErrUnexpectedEOF
  7094. }
  7095. b := data[iNdEx]
  7096. iNdEx++
  7097. v |= (int64(b) & 0x7F) << shift
  7098. if b < 0x80 {
  7099. break
  7100. }
  7101. }
  7102. m.TargetUnion = &Compare_CreateRevision{v}
  7103. case 6:
  7104. if wireType != 0 {
  7105. return fmt.Errorf("proto: wrong wireType = %d for field ModRevision", wireType)
  7106. }
  7107. var v int64
  7108. for shift := uint(0); ; shift += 7 {
  7109. if shift >= 64 {
  7110. return ErrIntOverflowRpc
  7111. }
  7112. if iNdEx >= l {
  7113. return io.ErrUnexpectedEOF
  7114. }
  7115. b := data[iNdEx]
  7116. iNdEx++
  7117. v |= (int64(b) & 0x7F) << shift
  7118. if b < 0x80 {
  7119. break
  7120. }
  7121. }
  7122. m.TargetUnion = &Compare_ModRevision{v}
  7123. case 7:
  7124. if wireType != 2 {
  7125. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  7126. }
  7127. var byteLen int
  7128. for shift := uint(0); ; shift += 7 {
  7129. if shift >= 64 {
  7130. return ErrIntOverflowRpc
  7131. }
  7132. if iNdEx >= l {
  7133. return io.ErrUnexpectedEOF
  7134. }
  7135. b := data[iNdEx]
  7136. iNdEx++
  7137. byteLen |= (int(b) & 0x7F) << shift
  7138. if b < 0x80 {
  7139. break
  7140. }
  7141. }
  7142. if byteLen < 0 {
  7143. return ErrInvalidLengthRpc
  7144. }
  7145. postIndex := iNdEx + byteLen
  7146. if postIndex > l {
  7147. return io.ErrUnexpectedEOF
  7148. }
  7149. v := make([]byte, postIndex-iNdEx)
  7150. copy(v, data[iNdEx:postIndex])
  7151. m.TargetUnion = &Compare_Value{v}
  7152. iNdEx = postIndex
  7153. default:
  7154. iNdEx = preIndex
  7155. skippy, err := skipRpc(data[iNdEx:])
  7156. if err != nil {
  7157. return err
  7158. }
  7159. if skippy < 0 {
  7160. return ErrInvalidLengthRpc
  7161. }
  7162. if (iNdEx + skippy) > l {
  7163. return io.ErrUnexpectedEOF
  7164. }
  7165. iNdEx += skippy
  7166. }
  7167. }
  7168. if iNdEx > l {
  7169. return io.ErrUnexpectedEOF
  7170. }
  7171. return nil
  7172. }
  7173. func (m *TxnRequest) Unmarshal(data []byte) error {
  7174. l := len(data)
  7175. iNdEx := 0
  7176. for iNdEx < l {
  7177. preIndex := iNdEx
  7178. var wire uint64
  7179. for shift := uint(0); ; shift += 7 {
  7180. if shift >= 64 {
  7181. return ErrIntOverflowRpc
  7182. }
  7183. if iNdEx >= l {
  7184. return io.ErrUnexpectedEOF
  7185. }
  7186. b := data[iNdEx]
  7187. iNdEx++
  7188. wire |= (uint64(b) & 0x7F) << shift
  7189. if b < 0x80 {
  7190. break
  7191. }
  7192. }
  7193. fieldNum := int32(wire >> 3)
  7194. wireType := int(wire & 0x7)
  7195. if wireType == 4 {
  7196. return fmt.Errorf("proto: TxnRequest: wiretype end group for non-group")
  7197. }
  7198. if fieldNum <= 0 {
  7199. return fmt.Errorf("proto: TxnRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  7200. }
  7201. switch fieldNum {
  7202. case 1:
  7203. if wireType != 2 {
  7204. return fmt.Errorf("proto: wrong wireType = %d for field Compare", wireType)
  7205. }
  7206. var msglen int
  7207. for shift := uint(0); ; shift += 7 {
  7208. if shift >= 64 {
  7209. return ErrIntOverflowRpc
  7210. }
  7211. if iNdEx >= l {
  7212. return io.ErrUnexpectedEOF
  7213. }
  7214. b := data[iNdEx]
  7215. iNdEx++
  7216. msglen |= (int(b) & 0x7F) << shift
  7217. if b < 0x80 {
  7218. break
  7219. }
  7220. }
  7221. if msglen < 0 {
  7222. return ErrInvalidLengthRpc
  7223. }
  7224. postIndex := iNdEx + msglen
  7225. if postIndex > l {
  7226. return io.ErrUnexpectedEOF
  7227. }
  7228. m.Compare = append(m.Compare, &Compare{})
  7229. if err := m.Compare[len(m.Compare)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  7230. return err
  7231. }
  7232. iNdEx = postIndex
  7233. case 2:
  7234. if wireType != 2 {
  7235. return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType)
  7236. }
  7237. var msglen int
  7238. for shift := uint(0); ; shift += 7 {
  7239. if shift >= 64 {
  7240. return ErrIntOverflowRpc
  7241. }
  7242. if iNdEx >= l {
  7243. return io.ErrUnexpectedEOF
  7244. }
  7245. b := data[iNdEx]
  7246. iNdEx++
  7247. msglen |= (int(b) & 0x7F) << shift
  7248. if b < 0x80 {
  7249. break
  7250. }
  7251. }
  7252. if msglen < 0 {
  7253. return ErrInvalidLengthRpc
  7254. }
  7255. postIndex := iNdEx + msglen
  7256. if postIndex > l {
  7257. return io.ErrUnexpectedEOF
  7258. }
  7259. m.Success = append(m.Success, &RequestUnion{})
  7260. if err := m.Success[len(m.Success)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  7261. return err
  7262. }
  7263. iNdEx = postIndex
  7264. case 3:
  7265. if wireType != 2 {
  7266. return fmt.Errorf("proto: wrong wireType = %d for field Failure", wireType)
  7267. }
  7268. var msglen int
  7269. for shift := uint(0); ; shift += 7 {
  7270. if shift >= 64 {
  7271. return ErrIntOverflowRpc
  7272. }
  7273. if iNdEx >= l {
  7274. return io.ErrUnexpectedEOF
  7275. }
  7276. b := data[iNdEx]
  7277. iNdEx++
  7278. msglen |= (int(b) & 0x7F) << shift
  7279. if b < 0x80 {
  7280. break
  7281. }
  7282. }
  7283. if msglen < 0 {
  7284. return ErrInvalidLengthRpc
  7285. }
  7286. postIndex := iNdEx + msglen
  7287. if postIndex > l {
  7288. return io.ErrUnexpectedEOF
  7289. }
  7290. m.Failure = append(m.Failure, &RequestUnion{})
  7291. if err := m.Failure[len(m.Failure)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  7292. return err
  7293. }
  7294. iNdEx = postIndex
  7295. default:
  7296. iNdEx = preIndex
  7297. skippy, err := skipRpc(data[iNdEx:])
  7298. if err != nil {
  7299. return err
  7300. }
  7301. if skippy < 0 {
  7302. return ErrInvalidLengthRpc
  7303. }
  7304. if (iNdEx + skippy) > l {
  7305. return io.ErrUnexpectedEOF
  7306. }
  7307. iNdEx += skippy
  7308. }
  7309. }
  7310. if iNdEx > l {
  7311. return io.ErrUnexpectedEOF
  7312. }
  7313. return nil
  7314. }
  7315. func (m *TxnResponse) Unmarshal(data []byte) error {
  7316. l := len(data)
  7317. iNdEx := 0
  7318. for iNdEx < l {
  7319. preIndex := iNdEx
  7320. var wire uint64
  7321. for shift := uint(0); ; shift += 7 {
  7322. if shift >= 64 {
  7323. return ErrIntOverflowRpc
  7324. }
  7325. if iNdEx >= l {
  7326. return io.ErrUnexpectedEOF
  7327. }
  7328. b := data[iNdEx]
  7329. iNdEx++
  7330. wire |= (uint64(b) & 0x7F) << shift
  7331. if b < 0x80 {
  7332. break
  7333. }
  7334. }
  7335. fieldNum := int32(wire >> 3)
  7336. wireType := int(wire & 0x7)
  7337. if wireType == 4 {
  7338. return fmt.Errorf("proto: TxnResponse: wiretype end group for non-group")
  7339. }
  7340. if fieldNum <= 0 {
  7341. return fmt.Errorf("proto: TxnResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  7342. }
  7343. switch fieldNum {
  7344. case 1:
  7345. if wireType != 2 {
  7346. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  7347. }
  7348. var msglen int
  7349. for shift := uint(0); ; shift += 7 {
  7350. if shift >= 64 {
  7351. return ErrIntOverflowRpc
  7352. }
  7353. if iNdEx >= l {
  7354. return io.ErrUnexpectedEOF
  7355. }
  7356. b := data[iNdEx]
  7357. iNdEx++
  7358. msglen |= (int(b) & 0x7F) << shift
  7359. if b < 0x80 {
  7360. break
  7361. }
  7362. }
  7363. if msglen < 0 {
  7364. return ErrInvalidLengthRpc
  7365. }
  7366. postIndex := iNdEx + msglen
  7367. if postIndex > l {
  7368. return io.ErrUnexpectedEOF
  7369. }
  7370. if m.Header == nil {
  7371. m.Header = &ResponseHeader{}
  7372. }
  7373. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  7374. return err
  7375. }
  7376. iNdEx = postIndex
  7377. case 2:
  7378. if wireType != 0 {
  7379. return fmt.Errorf("proto: wrong wireType = %d for field Succeeded", wireType)
  7380. }
  7381. var v int
  7382. for shift := uint(0); ; shift += 7 {
  7383. if shift >= 64 {
  7384. return ErrIntOverflowRpc
  7385. }
  7386. if iNdEx >= l {
  7387. return io.ErrUnexpectedEOF
  7388. }
  7389. b := data[iNdEx]
  7390. iNdEx++
  7391. v |= (int(b) & 0x7F) << shift
  7392. if b < 0x80 {
  7393. break
  7394. }
  7395. }
  7396. m.Succeeded = bool(v != 0)
  7397. case 3:
  7398. if wireType != 2 {
  7399. return fmt.Errorf("proto: wrong wireType = %d for field Responses", wireType)
  7400. }
  7401. var msglen int
  7402. for shift := uint(0); ; shift += 7 {
  7403. if shift >= 64 {
  7404. return ErrIntOverflowRpc
  7405. }
  7406. if iNdEx >= l {
  7407. return io.ErrUnexpectedEOF
  7408. }
  7409. b := data[iNdEx]
  7410. iNdEx++
  7411. msglen |= (int(b) & 0x7F) << shift
  7412. if b < 0x80 {
  7413. break
  7414. }
  7415. }
  7416. if msglen < 0 {
  7417. return ErrInvalidLengthRpc
  7418. }
  7419. postIndex := iNdEx + msglen
  7420. if postIndex > l {
  7421. return io.ErrUnexpectedEOF
  7422. }
  7423. m.Responses = append(m.Responses, &ResponseUnion{})
  7424. if err := m.Responses[len(m.Responses)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  7425. return err
  7426. }
  7427. iNdEx = postIndex
  7428. default:
  7429. iNdEx = preIndex
  7430. skippy, err := skipRpc(data[iNdEx:])
  7431. if err != nil {
  7432. return err
  7433. }
  7434. if skippy < 0 {
  7435. return ErrInvalidLengthRpc
  7436. }
  7437. if (iNdEx + skippy) > l {
  7438. return io.ErrUnexpectedEOF
  7439. }
  7440. iNdEx += skippy
  7441. }
  7442. }
  7443. if iNdEx > l {
  7444. return io.ErrUnexpectedEOF
  7445. }
  7446. return nil
  7447. }
  7448. func (m *CompactionRequest) Unmarshal(data []byte) error {
  7449. l := len(data)
  7450. iNdEx := 0
  7451. for iNdEx < l {
  7452. preIndex := iNdEx
  7453. var wire uint64
  7454. for shift := uint(0); ; shift += 7 {
  7455. if shift >= 64 {
  7456. return ErrIntOverflowRpc
  7457. }
  7458. if iNdEx >= l {
  7459. return io.ErrUnexpectedEOF
  7460. }
  7461. b := data[iNdEx]
  7462. iNdEx++
  7463. wire |= (uint64(b) & 0x7F) << shift
  7464. if b < 0x80 {
  7465. break
  7466. }
  7467. }
  7468. fieldNum := int32(wire >> 3)
  7469. wireType := int(wire & 0x7)
  7470. if wireType == 4 {
  7471. return fmt.Errorf("proto: CompactionRequest: wiretype end group for non-group")
  7472. }
  7473. if fieldNum <= 0 {
  7474. return fmt.Errorf("proto: CompactionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  7475. }
  7476. switch fieldNum {
  7477. case 1:
  7478. if wireType != 0 {
  7479. return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
  7480. }
  7481. m.Revision = 0
  7482. for shift := uint(0); ; shift += 7 {
  7483. if shift >= 64 {
  7484. return ErrIntOverflowRpc
  7485. }
  7486. if iNdEx >= l {
  7487. return io.ErrUnexpectedEOF
  7488. }
  7489. b := data[iNdEx]
  7490. iNdEx++
  7491. m.Revision |= (int64(b) & 0x7F) << shift
  7492. if b < 0x80 {
  7493. break
  7494. }
  7495. }
  7496. case 2:
  7497. if wireType != 0 {
  7498. return fmt.Errorf("proto: wrong wireType = %d for field Physical", wireType)
  7499. }
  7500. var v int
  7501. for shift := uint(0); ; shift += 7 {
  7502. if shift >= 64 {
  7503. return ErrIntOverflowRpc
  7504. }
  7505. if iNdEx >= l {
  7506. return io.ErrUnexpectedEOF
  7507. }
  7508. b := data[iNdEx]
  7509. iNdEx++
  7510. v |= (int(b) & 0x7F) << shift
  7511. if b < 0x80 {
  7512. break
  7513. }
  7514. }
  7515. m.Physical = bool(v != 0)
  7516. default:
  7517. iNdEx = preIndex
  7518. skippy, err := skipRpc(data[iNdEx:])
  7519. if err != nil {
  7520. return err
  7521. }
  7522. if skippy < 0 {
  7523. return ErrInvalidLengthRpc
  7524. }
  7525. if (iNdEx + skippy) > l {
  7526. return io.ErrUnexpectedEOF
  7527. }
  7528. iNdEx += skippy
  7529. }
  7530. }
  7531. if iNdEx > l {
  7532. return io.ErrUnexpectedEOF
  7533. }
  7534. return nil
  7535. }
  7536. func (m *CompactionResponse) Unmarshal(data []byte) error {
  7537. l := len(data)
  7538. iNdEx := 0
  7539. for iNdEx < l {
  7540. preIndex := iNdEx
  7541. var wire uint64
  7542. for shift := uint(0); ; shift += 7 {
  7543. if shift >= 64 {
  7544. return ErrIntOverflowRpc
  7545. }
  7546. if iNdEx >= l {
  7547. return io.ErrUnexpectedEOF
  7548. }
  7549. b := data[iNdEx]
  7550. iNdEx++
  7551. wire |= (uint64(b) & 0x7F) << shift
  7552. if b < 0x80 {
  7553. break
  7554. }
  7555. }
  7556. fieldNum := int32(wire >> 3)
  7557. wireType := int(wire & 0x7)
  7558. if wireType == 4 {
  7559. return fmt.Errorf("proto: CompactionResponse: wiretype end group for non-group")
  7560. }
  7561. if fieldNum <= 0 {
  7562. return fmt.Errorf("proto: CompactionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  7563. }
  7564. switch fieldNum {
  7565. case 1:
  7566. if wireType != 2 {
  7567. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  7568. }
  7569. var msglen int
  7570. for shift := uint(0); ; shift += 7 {
  7571. if shift >= 64 {
  7572. return ErrIntOverflowRpc
  7573. }
  7574. if iNdEx >= l {
  7575. return io.ErrUnexpectedEOF
  7576. }
  7577. b := data[iNdEx]
  7578. iNdEx++
  7579. msglen |= (int(b) & 0x7F) << shift
  7580. if b < 0x80 {
  7581. break
  7582. }
  7583. }
  7584. if msglen < 0 {
  7585. return ErrInvalidLengthRpc
  7586. }
  7587. postIndex := iNdEx + msglen
  7588. if postIndex > l {
  7589. return io.ErrUnexpectedEOF
  7590. }
  7591. if m.Header == nil {
  7592. m.Header = &ResponseHeader{}
  7593. }
  7594. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  7595. return err
  7596. }
  7597. iNdEx = postIndex
  7598. default:
  7599. iNdEx = preIndex
  7600. skippy, err := skipRpc(data[iNdEx:])
  7601. if err != nil {
  7602. return err
  7603. }
  7604. if skippy < 0 {
  7605. return ErrInvalidLengthRpc
  7606. }
  7607. if (iNdEx + skippy) > l {
  7608. return io.ErrUnexpectedEOF
  7609. }
  7610. iNdEx += skippy
  7611. }
  7612. }
  7613. if iNdEx > l {
  7614. return io.ErrUnexpectedEOF
  7615. }
  7616. return nil
  7617. }
  7618. func (m *HashRequest) Unmarshal(data []byte) error {
  7619. l := len(data)
  7620. iNdEx := 0
  7621. for iNdEx < l {
  7622. preIndex := iNdEx
  7623. var wire uint64
  7624. for shift := uint(0); ; shift += 7 {
  7625. if shift >= 64 {
  7626. return ErrIntOverflowRpc
  7627. }
  7628. if iNdEx >= l {
  7629. return io.ErrUnexpectedEOF
  7630. }
  7631. b := data[iNdEx]
  7632. iNdEx++
  7633. wire |= (uint64(b) & 0x7F) << shift
  7634. if b < 0x80 {
  7635. break
  7636. }
  7637. }
  7638. fieldNum := int32(wire >> 3)
  7639. wireType := int(wire & 0x7)
  7640. if wireType == 4 {
  7641. return fmt.Errorf("proto: HashRequest: wiretype end group for non-group")
  7642. }
  7643. if fieldNum <= 0 {
  7644. return fmt.Errorf("proto: HashRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  7645. }
  7646. switch fieldNum {
  7647. default:
  7648. iNdEx = preIndex
  7649. skippy, err := skipRpc(data[iNdEx:])
  7650. if err != nil {
  7651. return err
  7652. }
  7653. if skippy < 0 {
  7654. return ErrInvalidLengthRpc
  7655. }
  7656. if (iNdEx + skippy) > l {
  7657. return io.ErrUnexpectedEOF
  7658. }
  7659. iNdEx += skippy
  7660. }
  7661. }
  7662. if iNdEx > l {
  7663. return io.ErrUnexpectedEOF
  7664. }
  7665. return nil
  7666. }
  7667. func (m *HashResponse) Unmarshal(data []byte) error {
  7668. l := len(data)
  7669. iNdEx := 0
  7670. for iNdEx < l {
  7671. preIndex := iNdEx
  7672. var wire uint64
  7673. for shift := uint(0); ; shift += 7 {
  7674. if shift >= 64 {
  7675. return ErrIntOverflowRpc
  7676. }
  7677. if iNdEx >= l {
  7678. return io.ErrUnexpectedEOF
  7679. }
  7680. b := data[iNdEx]
  7681. iNdEx++
  7682. wire |= (uint64(b) & 0x7F) << shift
  7683. if b < 0x80 {
  7684. break
  7685. }
  7686. }
  7687. fieldNum := int32(wire >> 3)
  7688. wireType := int(wire & 0x7)
  7689. if wireType == 4 {
  7690. return fmt.Errorf("proto: HashResponse: wiretype end group for non-group")
  7691. }
  7692. if fieldNum <= 0 {
  7693. return fmt.Errorf("proto: HashResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  7694. }
  7695. switch fieldNum {
  7696. case 1:
  7697. if wireType != 2 {
  7698. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  7699. }
  7700. var msglen int
  7701. for shift := uint(0); ; shift += 7 {
  7702. if shift >= 64 {
  7703. return ErrIntOverflowRpc
  7704. }
  7705. if iNdEx >= l {
  7706. return io.ErrUnexpectedEOF
  7707. }
  7708. b := data[iNdEx]
  7709. iNdEx++
  7710. msglen |= (int(b) & 0x7F) << shift
  7711. if b < 0x80 {
  7712. break
  7713. }
  7714. }
  7715. if msglen < 0 {
  7716. return ErrInvalidLengthRpc
  7717. }
  7718. postIndex := iNdEx + msglen
  7719. if postIndex > l {
  7720. return io.ErrUnexpectedEOF
  7721. }
  7722. if m.Header == nil {
  7723. m.Header = &ResponseHeader{}
  7724. }
  7725. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  7726. return err
  7727. }
  7728. iNdEx = postIndex
  7729. case 2:
  7730. if wireType != 0 {
  7731. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  7732. }
  7733. m.Hash = 0
  7734. for shift := uint(0); ; shift += 7 {
  7735. if shift >= 64 {
  7736. return ErrIntOverflowRpc
  7737. }
  7738. if iNdEx >= l {
  7739. return io.ErrUnexpectedEOF
  7740. }
  7741. b := data[iNdEx]
  7742. iNdEx++
  7743. m.Hash |= (uint32(b) & 0x7F) << shift
  7744. if b < 0x80 {
  7745. break
  7746. }
  7747. }
  7748. default:
  7749. iNdEx = preIndex
  7750. skippy, err := skipRpc(data[iNdEx:])
  7751. if err != nil {
  7752. return err
  7753. }
  7754. if skippy < 0 {
  7755. return ErrInvalidLengthRpc
  7756. }
  7757. if (iNdEx + skippy) > l {
  7758. return io.ErrUnexpectedEOF
  7759. }
  7760. iNdEx += skippy
  7761. }
  7762. }
  7763. if iNdEx > l {
  7764. return io.ErrUnexpectedEOF
  7765. }
  7766. return nil
  7767. }
  7768. func (m *SnapshotRequest) Unmarshal(data []byte) error {
  7769. l := len(data)
  7770. iNdEx := 0
  7771. for iNdEx < l {
  7772. preIndex := iNdEx
  7773. var wire uint64
  7774. for shift := uint(0); ; shift += 7 {
  7775. if shift >= 64 {
  7776. return ErrIntOverflowRpc
  7777. }
  7778. if iNdEx >= l {
  7779. return io.ErrUnexpectedEOF
  7780. }
  7781. b := data[iNdEx]
  7782. iNdEx++
  7783. wire |= (uint64(b) & 0x7F) << shift
  7784. if b < 0x80 {
  7785. break
  7786. }
  7787. }
  7788. fieldNum := int32(wire >> 3)
  7789. wireType := int(wire & 0x7)
  7790. if wireType == 4 {
  7791. return fmt.Errorf("proto: SnapshotRequest: wiretype end group for non-group")
  7792. }
  7793. if fieldNum <= 0 {
  7794. return fmt.Errorf("proto: SnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  7795. }
  7796. switch fieldNum {
  7797. default:
  7798. iNdEx = preIndex
  7799. skippy, err := skipRpc(data[iNdEx:])
  7800. if err != nil {
  7801. return err
  7802. }
  7803. if skippy < 0 {
  7804. return ErrInvalidLengthRpc
  7805. }
  7806. if (iNdEx + skippy) > l {
  7807. return io.ErrUnexpectedEOF
  7808. }
  7809. iNdEx += skippy
  7810. }
  7811. }
  7812. if iNdEx > l {
  7813. return io.ErrUnexpectedEOF
  7814. }
  7815. return nil
  7816. }
  7817. func (m *SnapshotResponse) Unmarshal(data []byte) error {
  7818. l := len(data)
  7819. iNdEx := 0
  7820. for iNdEx < l {
  7821. preIndex := iNdEx
  7822. var wire uint64
  7823. for shift := uint(0); ; shift += 7 {
  7824. if shift >= 64 {
  7825. return ErrIntOverflowRpc
  7826. }
  7827. if iNdEx >= l {
  7828. return io.ErrUnexpectedEOF
  7829. }
  7830. b := data[iNdEx]
  7831. iNdEx++
  7832. wire |= (uint64(b) & 0x7F) << shift
  7833. if b < 0x80 {
  7834. break
  7835. }
  7836. }
  7837. fieldNum := int32(wire >> 3)
  7838. wireType := int(wire & 0x7)
  7839. if wireType == 4 {
  7840. return fmt.Errorf("proto: SnapshotResponse: wiretype end group for non-group")
  7841. }
  7842. if fieldNum <= 0 {
  7843. return fmt.Errorf("proto: SnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  7844. }
  7845. switch fieldNum {
  7846. case 1:
  7847. if wireType != 2 {
  7848. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  7849. }
  7850. var msglen int
  7851. for shift := uint(0); ; shift += 7 {
  7852. if shift >= 64 {
  7853. return ErrIntOverflowRpc
  7854. }
  7855. if iNdEx >= l {
  7856. return io.ErrUnexpectedEOF
  7857. }
  7858. b := data[iNdEx]
  7859. iNdEx++
  7860. msglen |= (int(b) & 0x7F) << shift
  7861. if b < 0x80 {
  7862. break
  7863. }
  7864. }
  7865. if msglen < 0 {
  7866. return ErrInvalidLengthRpc
  7867. }
  7868. postIndex := iNdEx + msglen
  7869. if postIndex > l {
  7870. return io.ErrUnexpectedEOF
  7871. }
  7872. if m.Header == nil {
  7873. m.Header = &ResponseHeader{}
  7874. }
  7875. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  7876. return err
  7877. }
  7878. iNdEx = postIndex
  7879. case 2:
  7880. if wireType != 0 {
  7881. return fmt.Errorf("proto: wrong wireType = %d for field RemainingBytes", wireType)
  7882. }
  7883. m.RemainingBytes = 0
  7884. for shift := uint(0); ; shift += 7 {
  7885. if shift >= 64 {
  7886. return ErrIntOverflowRpc
  7887. }
  7888. if iNdEx >= l {
  7889. return io.ErrUnexpectedEOF
  7890. }
  7891. b := data[iNdEx]
  7892. iNdEx++
  7893. m.RemainingBytes |= (uint64(b) & 0x7F) << shift
  7894. if b < 0x80 {
  7895. break
  7896. }
  7897. }
  7898. case 3:
  7899. if wireType != 2 {
  7900. return fmt.Errorf("proto: wrong wireType = %d for field Blob", wireType)
  7901. }
  7902. var byteLen int
  7903. for shift := uint(0); ; shift += 7 {
  7904. if shift >= 64 {
  7905. return ErrIntOverflowRpc
  7906. }
  7907. if iNdEx >= l {
  7908. return io.ErrUnexpectedEOF
  7909. }
  7910. b := data[iNdEx]
  7911. iNdEx++
  7912. byteLen |= (int(b) & 0x7F) << shift
  7913. if b < 0x80 {
  7914. break
  7915. }
  7916. }
  7917. if byteLen < 0 {
  7918. return ErrInvalidLengthRpc
  7919. }
  7920. postIndex := iNdEx + byteLen
  7921. if postIndex > l {
  7922. return io.ErrUnexpectedEOF
  7923. }
  7924. m.Blob = append(m.Blob[:0], data[iNdEx:postIndex]...)
  7925. if m.Blob == nil {
  7926. m.Blob = []byte{}
  7927. }
  7928. iNdEx = postIndex
  7929. default:
  7930. iNdEx = preIndex
  7931. skippy, err := skipRpc(data[iNdEx:])
  7932. if err != nil {
  7933. return err
  7934. }
  7935. if skippy < 0 {
  7936. return ErrInvalidLengthRpc
  7937. }
  7938. if (iNdEx + skippy) > l {
  7939. return io.ErrUnexpectedEOF
  7940. }
  7941. iNdEx += skippy
  7942. }
  7943. }
  7944. if iNdEx > l {
  7945. return io.ErrUnexpectedEOF
  7946. }
  7947. return nil
  7948. }
  7949. func (m *WatchRequest) Unmarshal(data []byte) error {
  7950. l := len(data)
  7951. iNdEx := 0
  7952. for iNdEx < l {
  7953. preIndex := iNdEx
  7954. var wire uint64
  7955. for shift := uint(0); ; shift += 7 {
  7956. if shift >= 64 {
  7957. return ErrIntOverflowRpc
  7958. }
  7959. if iNdEx >= l {
  7960. return io.ErrUnexpectedEOF
  7961. }
  7962. b := data[iNdEx]
  7963. iNdEx++
  7964. wire |= (uint64(b) & 0x7F) << shift
  7965. if b < 0x80 {
  7966. break
  7967. }
  7968. }
  7969. fieldNum := int32(wire >> 3)
  7970. wireType := int(wire & 0x7)
  7971. if wireType == 4 {
  7972. return fmt.Errorf("proto: WatchRequest: wiretype end group for non-group")
  7973. }
  7974. if fieldNum <= 0 {
  7975. return fmt.Errorf("proto: WatchRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  7976. }
  7977. switch fieldNum {
  7978. case 1:
  7979. if wireType != 2 {
  7980. return fmt.Errorf("proto: wrong wireType = %d for field CreateRequest", wireType)
  7981. }
  7982. var msglen int
  7983. for shift := uint(0); ; shift += 7 {
  7984. if shift >= 64 {
  7985. return ErrIntOverflowRpc
  7986. }
  7987. if iNdEx >= l {
  7988. return io.ErrUnexpectedEOF
  7989. }
  7990. b := data[iNdEx]
  7991. iNdEx++
  7992. msglen |= (int(b) & 0x7F) << shift
  7993. if b < 0x80 {
  7994. break
  7995. }
  7996. }
  7997. if msglen < 0 {
  7998. return ErrInvalidLengthRpc
  7999. }
  8000. postIndex := iNdEx + msglen
  8001. if postIndex > l {
  8002. return io.ErrUnexpectedEOF
  8003. }
  8004. v := &WatchCreateRequest{}
  8005. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  8006. return err
  8007. }
  8008. m.RequestUnion = &WatchRequest_CreateRequest{v}
  8009. iNdEx = postIndex
  8010. case 2:
  8011. if wireType != 2 {
  8012. return fmt.Errorf("proto: wrong wireType = %d for field CancelRequest", wireType)
  8013. }
  8014. var msglen int
  8015. for shift := uint(0); ; shift += 7 {
  8016. if shift >= 64 {
  8017. return ErrIntOverflowRpc
  8018. }
  8019. if iNdEx >= l {
  8020. return io.ErrUnexpectedEOF
  8021. }
  8022. b := data[iNdEx]
  8023. iNdEx++
  8024. msglen |= (int(b) & 0x7F) << shift
  8025. if b < 0x80 {
  8026. break
  8027. }
  8028. }
  8029. if msglen < 0 {
  8030. return ErrInvalidLengthRpc
  8031. }
  8032. postIndex := iNdEx + msglen
  8033. if postIndex > l {
  8034. return io.ErrUnexpectedEOF
  8035. }
  8036. v := &WatchCancelRequest{}
  8037. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  8038. return err
  8039. }
  8040. m.RequestUnion = &WatchRequest_CancelRequest{v}
  8041. iNdEx = postIndex
  8042. default:
  8043. iNdEx = preIndex
  8044. skippy, err := skipRpc(data[iNdEx:])
  8045. if err != nil {
  8046. return err
  8047. }
  8048. if skippy < 0 {
  8049. return ErrInvalidLengthRpc
  8050. }
  8051. if (iNdEx + skippy) > l {
  8052. return io.ErrUnexpectedEOF
  8053. }
  8054. iNdEx += skippy
  8055. }
  8056. }
  8057. if iNdEx > l {
  8058. return io.ErrUnexpectedEOF
  8059. }
  8060. return nil
  8061. }
  8062. func (m *WatchCreateRequest) Unmarshal(data []byte) error {
  8063. l := len(data)
  8064. iNdEx := 0
  8065. for iNdEx < l {
  8066. preIndex := iNdEx
  8067. var wire uint64
  8068. for shift := uint(0); ; shift += 7 {
  8069. if shift >= 64 {
  8070. return ErrIntOverflowRpc
  8071. }
  8072. if iNdEx >= l {
  8073. return io.ErrUnexpectedEOF
  8074. }
  8075. b := data[iNdEx]
  8076. iNdEx++
  8077. wire |= (uint64(b) & 0x7F) << shift
  8078. if b < 0x80 {
  8079. break
  8080. }
  8081. }
  8082. fieldNum := int32(wire >> 3)
  8083. wireType := int(wire & 0x7)
  8084. if wireType == 4 {
  8085. return fmt.Errorf("proto: WatchCreateRequest: wiretype end group for non-group")
  8086. }
  8087. if fieldNum <= 0 {
  8088. return fmt.Errorf("proto: WatchCreateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  8089. }
  8090. switch fieldNum {
  8091. case 1:
  8092. if wireType != 2 {
  8093. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  8094. }
  8095. var byteLen int
  8096. for shift := uint(0); ; shift += 7 {
  8097. if shift >= 64 {
  8098. return ErrIntOverflowRpc
  8099. }
  8100. if iNdEx >= l {
  8101. return io.ErrUnexpectedEOF
  8102. }
  8103. b := data[iNdEx]
  8104. iNdEx++
  8105. byteLen |= (int(b) & 0x7F) << shift
  8106. if b < 0x80 {
  8107. break
  8108. }
  8109. }
  8110. if byteLen < 0 {
  8111. return ErrInvalidLengthRpc
  8112. }
  8113. postIndex := iNdEx + byteLen
  8114. if postIndex > l {
  8115. return io.ErrUnexpectedEOF
  8116. }
  8117. m.Key = append(m.Key[:0], data[iNdEx:postIndex]...)
  8118. if m.Key == nil {
  8119. m.Key = []byte{}
  8120. }
  8121. iNdEx = postIndex
  8122. case 2:
  8123. if wireType != 2 {
  8124. return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType)
  8125. }
  8126. var byteLen int
  8127. for shift := uint(0); ; shift += 7 {
  8128. if shift >= 64 {
  8129. return ErrIntOverflowRpc
  8130. }
  8131. if iNdEx >= l {
  8132. return io.ErrUnexpectedEOF
  8133. }
  8134. b := data[iNdEx]
  8135. iNdEx++
  8136. byteLen |= (int(b) & 0x7F) << shift
  8137. if b < 0x80 {
  8138. break
  8139. }
  8140. }
  8141. if byteLen < 0 {
  8142. return ErrInvalidLengthRpc
  8143. }
  8144. postIndex := iNdEx + byteLen
  8145. if postIndex > l {
  8146. return io.ErrUnexpectedEOF
  8147. }
  8148. m.RangeEnd = append(m.RangeEnd[:0], data[iNdEx:postIndex]...)
  8149. if m.RangeEnd == nil {
  8150. m.RangeEnd = []byte{}
  8151. }
  8152. iNdEx = postIndex
  8153. case 3:
  8154. if wireType != 0 {
  8155. return fmt.Errorf("proto: wrong wireType = %d for field StartRevision", wireType)
  8156. }
  8157. m.StartRevision = 0
  8158. for shift := uint(0); ; shift += 7 {
  8159. if shift >= 64 {
  8160. return ErrIntOverflowRpc
  8161. }
  8162. if iNdEx >= l {
  8163. return io.ErrUnexpectedEOF
  8164. }
  8165. b := data[iNdEx]
  8166. iNdEx++
  8167. m.StartRevision |= (int64(b) & 0x7F) << shift
  8168. if b < 0x80 {
  8169. break
  8170. }
  8171. }
  8172. case 4:
  8173. if wireType != 0 {
  8174. return fmt.Errorf("proto: wrong wireType = %d for field ProgressNotify", wireType)
  8175. }
  8176. var v int
  8177. for shift := uint(0); ; shift += 7 {
  8178. if shift >= 64 {
  8179. return ErrIntOverflowRpc
  8180. }
  8181. if iNdEx >= l {
  8182. return io.ErrUnexpectedEOF
  8183. }
  8184. b := data[iNdEx]
  8185. iNdEx++
  8186. v |= (int(b) & 0x7F) << shift
  8187. if b < 0x80 {
  8188. break
  8189. }
  8190. }
  8191. m.ProgressNotify = bool(v != 0)
  8192. default:
  8193. iNdEx = preIndex
  8194. skippy, err := skipRpc(data[iNdEx:])
  8195. if err != nil {
  8196. return err
  8197. }
  8198. if skippy < 0 {
  8199. return ErrInvalidLengthRpc
  8200. }
  8201. if (iNdEx + skippy) > l {
  8202. return io.ErrUnexpectedEOF
  8203. }
  8204. iNdEx += skippy
  8205. }
  8206. }
  8207. if iNdEx > l {
  8208. return io.ErrUnexpectedEOF
  8209. }
  8210. return nil
  8211. }
  8212. func (m *WatchCancelRequest) Unmarshal(data []byte) error {
  8213. l := len(data)
  8214. iNdEx := 0
  8215. for iNdEx < l {
  8216. preIndex := iNdEx
  8217. var wire uint64
  8218. for shift := uint(0); ; shift += 7 {
  8219. if shift >= 64 {
  8220. return ErrIntOverflowRpc
  8221. }
  8222. if iNdEx >= l {
  8223. return io.ErrUnexpectedEOF
  8224. }
  8225. b := data[iNdEx]
  8226. iNdEx++
  8227. wire |= (uint64(b) & 0x7F) << shift
  8228. if b < 0x80 {
  8229. break
  8230. }
  8231. }
  8232. fieldNum := int32(wire >> 3)
  8233. wireType := int(wire & 0x7)
  8234. if wireType == 4 {
  8235. return fmt.Errorf("proto: WatchCancelRequest: wiretype end group for non-group")
  8236. }
  8237. if fieldNum <= 0 {
  8238. return fmt.Errorf("proto: WatchCancelRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  8239. }
  8240. switch fieldNum {
  8241. case 1:
  8242. if wireType != 0 {
  8243. return fmt.Errorf("proto: wrong wireType = %d for field WatchId", wireType)
  8244. }
  8245. m.WatchId = 0
  8246. for shift := uint(0); ; shift += 7 {
  8247. if shift >= 64 {
  8248. return ErrIntOverflowRpc
  8249. }
  8250. if iNdEx >= l {
  8251. return io.ErrUnexpectedEOF
  8252. }
  8253. b := data[iNdEx]
  8254. iNdEx++
  8255. m.WatchId |= (int64(b) & 0x7F) << shift
  8256. if b < 0x80 {
  8257. break
  8258. }
  8259. }
  8260. default:
  8261. iNdEx = preIndex
  8262. skippy, err := skipRpc(data[iNdEx:])
  8263. if err != nil {
  8264. return err
  8265. }
  8266. if skippy < 0 {
  8267. return ErrInvalidLengthRpc
  8268. }
  8269. if (iNdEx + skippy) > l {
  8270. return io.ErrUnexpectedEOF
  8271. }
  8272. iNdEx += skippy
  8273. }
  8274. }
  8275. if iNdEx > l {
  8276. return io.ErrUnexpectedEOF
  8277. }
  8278. return nil
  8279. }
  8280. func (m *WatchResponse) Unmarshal(data []byte) error {
  8281. l := len(data)
  8282. iNdEx := 0
  8283. for iNdEx < l {
  8284. preIndex := iNdEx
  8285. var wire uint64
  8286. for shift := uint(0); ; shift += 7 {
  8287. if shift >= 64 {
  8288. return ErrIntOverflowRpc
  8289. }
  8290. if iNdEx >= l {
  8291. return io.ErrUnexpectedEOF
  8292. }
  8293. b := data[iNdEx]
  8294. iNdEx++
  8295. wire |= (uint64(b) & 0x7F) << shift
  8296. if b < 0x80 {
  8297. break
  8298. }
  8299. }
  8300. fieldNum := int32(wire >> 3)
  8301. wireType := int(wire & 0x7)
  8302. if wireType == 4 {
  8303. return fmt.Errorf("proto: WatchResponse: wiretype end group for non-group")
  8304. }
  8305. if fieldNum <= 0 {
  8306. return fmt.Errorf("proto: WatchResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  8307. }
  8308. switch fieldNum {
  8309. case 1:
  8310. if wireType != 2 {
  8311. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  8312. }
  8313. var msglen int
  8314. for shift := uint(0); ; shift += 7 {
  8315. if shift >= 64 {
  8316. return ErrIntOverflowRpc
  8317. }
  8318. if iNdEx >= l {
  8319. return io.ErrUnexpectedEOF
  8320. }
  8321. b := data[iNdEx]
  8322. iNdEx++
  8323. msglen |= (int(b) & 0x7F) << shift
  8324. if b < 0x80 {
  8325. break
  8326. }
  8327. }
  8328. if msglen < 0 {
  8329. return ErrInvalidLengthRpc
  8330. }
  8331. postIndex := iNdEx + msglen
  8332. if postIndex > l {
  8333. return io.ErrUnexpectedEOF
  8334. }
  8335. if m.Header == nil {
  8336. m.Header = &ResponseHeader{}
  8337. }
  8338. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  8339. return err
  8340. }
  8341. iNdEx = postIndex
  8342. case 2:
  8343. if wireType != 0 {
  8344. return fmt.Errorf("proto: wrong wireType = %d for field WatchId", wireType)
  8345. }
  8346. m.WatchId = 0
  8347. for shift := uint(0); ; shift += 7 {
  8348. if shift >= 64 {
  8349. return ErrIntOverflowRpc
  8350. }
  8351. if iNdEx >= l {
  8352. return io.ErrUnexpectedEOF
  8353. }
  8354. b := data[iNdEx]
  8355. iNdEx++
  8356. m.WatchId |= (int64(b) & 0x7F) << shift
  8357. if b < 0x80 {
  8358. break
  8359. }
  8360. }
  8361. case 3:
  8362. if wireType != 0 {
  8363. return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
  8364. }
  8365. var v int
  8366. for shift := uint(0); ; shift += 7 {
  8367. if shift >= 64 {
  8368. return ErrIntOverflowRpc
  8369. }
  8370. if iNdEx >= l {
  8371. return io.ErrUnexpectedEOF
  8372. }
  8373. b := data[iNdEx]
  8374. iNdEx++
  8375. v |= (int(b) & 0x7F) << shift
  8376. if b < 0x80 {
  8377. break
  8378. }
  8379. }
  8380. m.Created = bool(v != 0)
  8381. case 4:
  8382. if wireType != 0 {
  8383. return fmt.Errorf("proto: wrong wireType = %d for field Canceled", wireType)
  8384. }
  8385. var v int
  8386. for shift := uint(0); ; shift += 7 {
  8387. if shift >= 64 {
  8388. return ErrIntOverflowRpc
  8389. }
  8390. if iNdEx >= l {
  8391. return io.ErrUnexpectedEOF
  8392. }
  8393. b := data[iNdEx]
  8394. iNdEx++
  8395. v |= (int(b) & 0x7F) << shift
  8396. if b < 0x80 {
  8397. break
  8398. }
  8399. }
  8400. m.Canceled = bool(v != 0)
  8401. case 5:
  8402. if wireType != 0 {
  8403. return fmt.Errorf("proto: wrong wireType = %d for field CompactRevision", wireType)
  8404. }
  8405. m.CompactRevision = 0
  8406. for shift := uint(0); ; shift += 7 {
  8407. if shift >= 64 {
  8408. return ErrIntOverflowRpc
  8409. }
  8410. if iNdEx >= l {
  8411. return io.ErrUnexpectedEOF
  8412. }
  8413. b := data[iNdEx]
  8414. iNdEx++
  8415. m.CompactRevision |= (int64(b) & 0x7F) << shift
  8416. if b < 0x80 {
  8417. break
  8418. }
  8419. }
  8420. case 11:
  8421. if wireType != 2 {
  8422. return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
  8423. }
  8424. var msglen int
  8425. for shift := uint(0); ; shift += 7 {
  8426. if shift >= 64 {
  8427. return ErrIntOverflowRpc
  8428. }
  8429. if iNdEx >= l {
  8430. return io.ErrUnexpectedEOF
  8431. }
  8432. b := data[iNdEx]
  8433. iNdEx++
  8434. msglen |= (int(b) & 0x7F) << shift
  8435. if b < 0x80 {
  8436. break
  8437. }
  8438. }
  8439. if msglen < 0 {
  8440. return ErrInvalidLengthRpc
  8441. }
  8442. postIndex := iNdEx + msglen
  8443. if postIndex > l {
  8444. return io.ErrUnexpectedEOF
  8445. }
  8446. m.Events = append(m.Events, &storagepb.Event{})
  8447. if err := m.Events[len(m.Events)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  8448. return err
  8449. }
  8450. iNdEx = postIndex
  8451. default:
  8452. iNdEx = preIndex
  8453. skippy, err := skipRpc(data[iNdEx:])
  8454. if err != nil {
  8455. return err
  8456. }
  8457. if skippy < 0 {
  8458. return ErrInvalidLengthRpc
  8459. }
  8460. if (iNdEx + skippy) > l {
  8461. return io.ErrUnexpectedEOF
  8462. }
  8463. iNdEx += skippy
  8464. }
  8465. }
  8466. if iNdEx > l {
  8467. return io.ErrUnexpectedEOF
  8468. }
  8469. return nil
  8470. }
  8471. func (m *LeaseGrantRequest) Unmarshal(data []byte) error {
  8472. l := len(data)
  8473. iNdEx := 0
  8474. for iNdEx < l {
  8475. preIndex := iNdEx
  8476. var wire uint64
  8477. for shift := uint(0); ; shift += 7 {
  8478. if shift >= 64 {
  8479. return ErrIntOverflowRpc
  8480. }
  8481. if iNdEx >= l {
  8482. return io.ErrUnexpectedEOF
  8483. }
  8484. b := data[iNdEx]
  8485. iNdEx++
  8486. wire |= (uint64(b) & 0x7F) << shift
  8487. if b < 0x80 {
  8488. break
  8489. }
  8490. }
  8491. fieldNum := int32(wire >> 3)
  8492. wireType := int(wire & 0x7)
  8493. if wireType == 4 {
  8494. return fmt.Errorf("proto: LeaseGrantRequest: wiretype end group for non-group")
  8495. }
  8496. if fieldNum <= 0 {
  8497. return fmt.Errorf("proto: LeaseGrantRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  8498. }
  8499. switch fieldNum {
  8500. case 1:
  8501. if wireType != 0 {
  8502. return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType)
  8503. }
  8504. m.TTL = 0
  8505. for shift := uint(0); ; shift += 7 {
  8506. if shift >= 64 {
  8507. return ErrIntOverflowRpc
  8508. }
  8509. if iNdEx >= l {
  8510. return io.ErrUnexpectedEOF
  8511. }
  8512. b := data[iNdEx]
  8513. iNdEx++
  8514. m.TTL |= (int64(b) & 0x7F) << shift
  8515. if b < 0x80 {
  8516. break
  8517. }
  8518. }
  8519. case 2:
  8520. if wireType != 0 {
  8521. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  8522. }
  8523. m.ID = 0
  8524. for shift := uint(0); ; shift += 7 {
  8525. if shift >= 64 {
  8526. return ErrIntOverflowRpc
  8527. }
  8528. if iNdEx >= l {
  8529. return io.ErrUnexpectedEOF
  8530. }
  8531. b := data[iNdEx]
  8532. iNdEx++
  8533. m.ID |= (int64(b) & 0x7F) << shift
  8534. if b < 0x80 {
  8535. break
  8536. }
  8537. }
  8538. default:
  8539. iNdEx = preIndex
  8540. skippy, err := skipRpc(data[iNdEx:])
  8541. if err != nil {
  8542. return err
  8543. }
  8544. if skippy < 0 {
  8545. return ErrInvalidLengthRpc
  8546. }
  8547. if (iNdEx + skippy) > l {
  8548. return io.ErrUnexpectedEOF
  8549. }
  8550. iNdEx += skippy
  8551. }
  8552. }
  8553. if iNdEx > l {
  8554. return io.ErrUnexpectedEOF
  8555. }
  8556. return nil
  8557. }
  8558. func (m *LeaseGrantResponse) Unmarshal(data []byte) error {
  8559. l := len(data)
  8560. iNdEx := 0
  8561. for iNdEx < l {
  8562. preIndex := iNdEx
  8563. var wire uint64
  8564. for shift := uint(0); ; shift += 7 {
  8565. if shift >= 64 {
  8566. return ErrIntOverflowRpc
  8567. }
  8568. if iNdEx >= l {
  8569. return io.ErrUnexpectedEOF
  8570. }
  8571. b := data[iNdEx]
  8572. iNdEx++
  8573. wire |= (uint64(b) & 0x7F) << shift
  8574. if b < 0x80 {
  8575. break
  8576. }
  8577. }
  8578. fieldNum := int32(wire >> 3)
  8579. wireType := int(wire & 0x7)
  8580. if wireType == 4 {
  8581. return fmt.Errorf("proto: LeaseGrantResponse: wiretype end group for non-group")
  8582. }
  8583. if fieldNum <= 0 {
  8584. return fmt.Errorf("proto: LeaseGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  8585. }
  8586. switch fieldNum {
  8587. case 1:
  8588. if wireType != 2 {
  8589. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  8590. }
  8591. var msglen int
  8592. for shift := uint(0); ; shift += 7 {
  8593. if shift >= 64 {
  8594. return ErrIntOverflowRpc
  8595. }
  8596. if iNdEx >= l {
  8597. return io.ErrUnexpectedEOF
  8598. }
  8599. b := data[iNdEx]
  8600. iNdEx++
  8601. msglen |= (int(b) & 0x7F) << shift
  8602. if b < 0x80 {
  8603. break
  8604. }
  8605. }
  8606. if msglen < 0 {
  8607. return ErrInvalidLengthRpc
  8608. }
  8609. postIndex := iNdEx + msglen
  8610. if postIndex > l {
  8611. return io.ErrUnexpectedEOF
  8612. }
  8613. if m.Header == nil {
  8614. m.Header = &ResponseHeader{}
  8615. }
  8616. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  8617. return err
  8618. }
  8619. iNdEx = postIndex
  8620. case 2:
  8621. if wireType != 0 {
  8622. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  8623. }
  8624. m.ID = 0
  8625. for shift := uint(0); ; shift += 7 {
  8626. if shift >= 64 {
  8627. return ErrIntOverflowRpc
  8628. }
  8629. if iNdEx >= l {
  8630. return io.ErrUnexpectedEOF
  8631. }
  8632. b := data[iNdEx]
  8633. iNdEx++
  8634. m.ID |= (int64(b) & 0x7F) << shift
  8635. if b < 0x80 {
  8636. break
  8637. }
  8638. }
  8639. case 3:
  8640. if wireType != 0 {
  8641. return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType)
  8642. }
  8643. m.TTL = 0
  8644. for shift := uint(0); ; shift += 7 {
  8645. if shift >= 64 {
  8646. return ErrIntOverflowRpc
  8647. }
  8648. if iNdEx >= l {
  8649. return io.ErrUnexpectedEOF
  8650. }
  8651. b := data[iNdEx]
  8652. iNdEx++
  8653. m.TTL |= (int64(b) & 0x7F) << shift
  8654. if b < 0x80 {
  8655. break
  8656. }
  8657. }
  8658. case 4:
  8659. if wireType != 2 {
  8660. return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  8661. }
  8662. var stringLen uint64
  8663. for shift := uint(0); ; shift += 7 {
  8664. if shift >= 64 {
  8665. return ErrIntOverflowRpc
  8666. }
  8667. if iNdEx >= l {
  8668. return io.ErrUnexpectedEOF
  8669. }
  8670. b := data[iNdEx]
  8671. iNdEx++
  8672. stringLen |= (uint64(b) & 0x7F) << shift
  8673. if b < 0x80 {
  8674. break
  8675. }
  8676. }
  8677. intStringLen := int(stringLen)
  8678. if intStringLen < 0 {
  8679. return ErrInvalidLengthRpc
  8680. }
  8681. postIndex := iNdEx + intStringLen
  8682. if postIndex > l {
  8683. return io.ErrUnexpectedEOF
  8684. }
  8685. m.Error = string(data[iNdEx:postIndex])
  8686. iNdEx = postIndex
  8687. default:
  8688. iNdEx = preIndex
  8689. skippy, err := skipRpc(data[iNdEx:])
  8690. if err != nil {
  8691. return err
  8692. }
  8693. if skippy < 0 {
  8694. return ErrInvalidLengthRpc
  8695. }
  8696. if (iNdEx + skippy) > l {
  8697. return io.ErrUnexpectedEOF
  8698. }
  8699. iNdEx += skippy
  8700. }
  8701. }
  8702. if iNdEx > l {
  8703. return io.ErrUnexpectedEOF
  8704. }
  8705. return nil
  8706. }
  8707. func (m *LeaseRevokeRequest) Unmarshal(data []byte) error {
  8708. l := len(data)
  8709. iNdEx := 0
  8710. for iNdEx < l {
  8711. preIndex := iNdEx
  8712. var wire uint64
  8713. for shift := uint(0); ; shift += 7 {
  8714. if shift >= 64 {
  8715. return ErrIntOverflowRpc
  8716. }
  8717. if iNdEx >= l {
  8718. return io.ErrUnexpectedEOF
  8719. }
  8720. b := data[iNdEx]
  8721. iNdEx++
  8722. wire |= (uint64(b) & 0x7F) << shift
  8723. if b < 0x80 {
  8724. break
  8725. }
  8726. }
  8727. fieldNum := int32(wire >> 3)
  8728. wireType := int(wire & 0x7)
  8729. if wireType == 4 {
  8730. return fmt.Errorf("proto: LeaseRevokeRequest: wiretype end group for non-group")
  8731. }
  8732. if fieldNum <= 0 {
  8733. return fmt.Errorf("proto: LeaseRevokeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  8734. }
  8735. switch fieldNum {
  8736. case 1:
  8737. if wireType != 0 {
  8738. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  8739. }
  8740. m.ID = 0
  8741. for shift := uint(0); ; shift += 7 {
  8742. if shift >= 64 {
  8743. return ErrIntOverflowRpc
  8744. }
  8745. if iNdEx >= l {
  8746. return io.ErrUnexpectedEOF
  8747. }
  8748. b := data[iNdEx]
  8749. iNdEx++
  8750. m.ID |= (int64(b) & 0x7F) << shift
  8751. if b < 0x80 {
  8752. break
  8753. }
  8754. }
  8755. default:
  8756. iNdEx = preIndex
  8757. skippy, err := skipRpc(data[iNdEx:])
  8758. if err != nil {
  8759. return err
  8760. }
  8761. if skippy < 0 {
  8762. return ErrInvalidLengthRpc
  8763. }
  8764. if (iNdEx + skippy) > l {
  8765. return io.ErrUnexpectedEOF
  8766. }
  8767. iNdEx += skippy
  8768. }
  8769. }
  8770. if iNdEx > l {
  8771. return io.ErrUnexpectedEOF
  8772. }
  8773. return nil
  8774. }
  8775. func (m *LeaseRevokeResponse) Unmarshal(data []byte) error {
  8776. l := len(data)
  8777. iNdEx := 0
  8778. for iNdEx < l {
  8779. preIndex := iNdEx
  8780. var wire uint64
  8781. for shift := uint(0); ; shift += 7 {
  8782. if shift >= 64 {
  8783. return ErrIntOverflowRpc
  8784. }
  8785. if iNdEx >= l {
  8786. return io.ErrUnexpectedEOF
  8787. }
  8788. b := data[iNdEx]
  8789. iNdEx++
  8790. wire |= (uint64(b) & 0x7F) << shift
  8791. if b < 0x80 {
  8792. break
  8793. }
  8794. }
  8795. fieldNum := int32(wire >> 3)
  8796. wireType := int(wire & 0x7)
  8797. if wireType == 4 {
  8798. return fmt.Errorf("proto: LeaseRevokeResponse: wiretype end group for non-group")
  8799. }
  8800. if fieldNum <= 0 {
  8801. return fmt.Errorf("proto: LeaseRevokeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  8802. }
  8803. switch fieldNum {
  8804. case 1:
  8805. if wireType != 2 {
  8806. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  8807. }
  8808. var msglen int
  8809. for shift := uint(0); ; shift += 7 {
  8810. if shift >= 64 {
  8811. return ErrIntOverflowRpc
  8812. }
  8813. if iNdEx >= l {
  8814. return io.ErrUnexpectedEOF
  8815. }
  8816. b := data[iNdEx]
  8817. iNdEx++
  8818. msglen |= (int(b) & 0x7F) << shift
  8819. if b < 0x80 {
  8820. break
  8821. }
  8822. }
  8823. if msglen < 0 {
  8824. return ErrInvalidLengthRpc
  8825. }
  8826. postIndex := iNdEx + msglen
  8827. if postIndex > l {
  8828. return io.ErrUnexpectedEOF
  8829. }
  8830. if m.Header == nil {
  8831. m.Header = &ResponseHeader{}
  8832. }
  8833. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  8834. return err
  8835. }
  8836. iNdEx = postIndex
  8837. default:
  8838. iNdEx = preIndex
  8839. skippy, err := skipRpc(data[iNdEx:])
  8840. if err != nil {
  8841. return err
  8842. }
  8843. if skippy < 0 {
  8844. return ErrInvalidLengthRpc
  8845. }
  8846. if (iNdEx + skippy) > l {
  8847. return io.ErrUnexpectedEOF
  8848. }
  8849. iNdEx += skippy
  8850. }
  8851. }
  8852. if iNdEx > l {
  8853. return io.ErrUnexpectedEOF
  8854. }
  8855. return nil
  8856. }
  8857. func (m *LeaseKeepAliveRequest) Unmarshal(data []byte) error {
  8858. l := len(data)
  8859. iNdEx := 0
  8860. for iNdEx < l {
  8861. preIndex := iNdEx
  8862. var wire uint64
  8863. for shift := uint(0); ; shift += 7 {
  8864. if shift >= 64 {
  8865. return ErrIntOverflowRpc
  8866. }
  8867. if iNdEx >= l {
  8868. return io.ErrUnexpectedEOF
  8869. }
  8870. b := data[iNdEx]
  8871. iNdEx++
  8872. wire |= (uint64(b) & 0x7F) << shift
  8873. if b < 0x80 {
  8874. break
  8875. }
  8876. }
  8877. fieldNum := int32(wire >> 3)
  8878. wireType := int(wire & 0x7)
  8879. if wireType == 4 {
  8880. return fmt.Errorf("proto: LeaseKeepAliveRequest: wiretype end group for non-group")
  8881. }
  8882. if fieldNum <= 0 {
  8883. return fmt.Errorf("proto: LeaseKeepAliveRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  8884. }
  8885. switch fieldNum {
  8886. case 1:
  8887. if wireType != 0 {
  8888. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  8889. }
  8890. m.ID = 0
  8891. for shift := uint(0); ; shift += 7 {
  8892. if shift >= 64 {
  8893. return ErrIntOverflowRpc
  8894. }
  8895. if iNdEx >= l {
  8896. return io.ErrUnexpectedEOF
  8897. }
  8898. b := data[iNdEx]
  8899. iNdEx++
  8900. m.ID |= (int64(b) & 0x7F) << shift
  8901. if b < 0x80 {
  8902. break
  8903. }
  8904. }
  8905. default:
  8906. iNdEx = preIndex
  8907. skippy, err := skipRpc(data[iNdEx:])
  8908. if err != nil {
  8909. return err
  8910. }
  8911. if skippy < 0 {
  8912. return ErrInvalidLengthRpc
  8913. }
  8914. if (iNdEx + skippy) > l {
  8915. return io.ErrUnexpectedEOF
  8916. }
  8917. iNdEx += skippy
  8918. }
  8919. }
  8920. if iNdEx > l {
  8921. return io.ErrUnexpectedEOF
  8922. }
  8923. return nil
  8924. }
  8925. func (m *LeaseKeepAliveResponse) Unmarshal(data []byte) error {
  8926. l := len(data)
  8927. iNdEx := 0
  8928. for iNdEx < l {
  8929. preIndex := iNdEx
  8930. var wire uint64
  8931. for shift := uint(0); ; shift += 7 {
  8932. if shift >= 64 {
  8933. return ErrIntOverflowRpc
  8934. }
  8935. if iNdEx >= l {
  8936. return io.ErrUnexpectedEOF
  8937. }
  8938. b := data[iNdEx]
  8939. iNdEx++
  8940. wire |= (uint64(b) & 0x7F) << shift
  8941. if b < 0x80 {
  8942. break
  8943. }
  8944. }
  8945. fieldNum := int32(wire >> 3)
  8946. wireType := int(wire & 0x7)
  8947. if wireType == 4 {
  8948. return fmt.Errorf("proto: LeaseKeepAliveResponse: wiretype end group for non-group")
  8949. }
  8950. if fieldNum <= 0 {
  8951. return fmt.Errorf("proto: LeaseKeepAliveResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  8952. }
  8953. switch fieldNum {
  8954. case 1:
  8955. if wireType != 2 {
  8956. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  8957. }
  8958. var msglen int
  8959. for shift := uint(0); ; shift += 7 {
  8960. if shift >= 64 {
  8961. return ErrIntOverflowRpc
  8962. }
  8963. if iNdEx >= l {
  8964. return io.ErrUnexpectedEOF
  8965. }
  8966. b := data[iNdEx]
  8967. iNdEx++
  8968. msglen |= (int(b) & 0x7F) << shift
  8969. if b < 0x80 {
  8970. break
  8971. }
  8972. }
  8973. if msglen < 0 {
  8974. return ErrInvalidLengthRpc
  8975. }
  8976. postIndex := iNdEx + msglen
  8977. if postIndex > l {
  8978. return io.ErrUnexpectedEOF
  8979. }
  8980. if m.Header == nil {
  8981. m.Header = &ResponseHeader{}
  8982. }
  8983. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  8984. return err
  8985. }
  8986. iNdEx = postIndex
  8987. case 2:
  8988. if wireType != 0 {
  8989. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  8990. }
  8991. m.ID = 0
  8992. for shift := uint(0); ; shift += 7 {
  8993. if shift >= 64 {
  8994. return ErrIntOverflowRpc
  8995. }
  8996. if iNdEx >= l {
  8997. return io.ErrUnexpectedEOF
  8998. }
  8999. b := data[iNdEx]
  9000. iNdEx++
  9001. m.ID |= (int64(b) & 0x7F) << shift
  9002. if b < 0x80 {
  9003. break
  9004. }
  9005. }
  9006. case 3:
  9007. if wireType != 0 {
  9008. return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType)
  9009. }
  9010. m.TTL = 0
  9011. for shift := uint(0); ; shift += 7 {
  9012. if shift >= 64 {
  9013. return ErrIntOverflowRpc
  9014. }
  9015. if iNdEx >= l {
  9016. return io.ErrUnexpectedEOF
  9017. }
  9018. b := data[iNdEx]
  9019. iNdEx++
  9020. m.TTL |= (int64(b) & 0x7F) << shift
  9021. if b < 0x80 {
  9022. break
  9023. }
  9024. }
  9025. default:
  9026. iNdEx = preIndex
  9027. skippy, err := skipRpc(data[iNdEx:])
  9028. if err != nil {
  9029. return err
  9030. }
  9031. if skippy < 0 {
  9032. return ErrInvalidLengthRpc
  9033. }
  9034. if (iNdEx + skippy) > l {
  9035. return io.ErrUnexpectedEOF
  9036. }
  9037. iNdEx += skippy
  9038. }
  9039. }
  9040. if iNdEx > l {
  9041. return io.ErrUnexpectedEOF
  9042. }
  9043. return nil
  9044. }
  9045. func (m *Member) Unmarshal(data []byte) error {
  9046. l := len(data)
  9047. iNdEx := 0
  9048. for iNdEx < l {
  9049. preIndex := iNdEx
  9050. var wire uint64
  9051. for shift := uint(0); ; shift += 7 {
  9052. if shift >= 64 {
  9053. return ErrIntOverflowRpc
  9054. }
  9055. if iNdEx >= l {
  9056. return io.ErrUnexpectedEOF
  9057. }
  9058. b := data[iNdEx]
  9059. iNdEx++
  9060. wire |= (uint64(b) & 0x7F) << shift
  9061. if b < 0x80 {
  9062. break
  9063. }
  9064. }
  9065. fieldNum := int32(wire >> 3)
  9066. wireType := int(wire & 0x7)
  9067. if wireType == 4 {
  9068. return fmt.Errorf("proto: Member: wiretype end group for non-group")
  9069. }
  9070. if fieldNum <= 0 {
  9071. return fmt.Errorf("proto: Member: illegal tag %d (wire type %d)", fieldNum, wire)
  9072. }
  9073. switch fieldNum {
  9074. case 1:
  9075. if wireType != 0 {
  9076. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  9077. }
  9078. m.ID = 0
  9079. for shift := uint(0); ; shift += 7 {
  9080. if shift >= 64 {
  9081. return ErrIntOverflowRpc
  9082. }
  9083. if iNdEx >= l {
  9084. return io.ErrUnexpectedEOF
  9085. }
  9086. b := data[iNdEx]
  9087. iNdEx++
  9088. m.ID |= (uint64(b) & 0x7F) << shift
  9089. if b < 0x80 {
  9090. break
  9091. }
  9092. }
  9093. case 2:
  9094. if wireType != 2 {
  9095. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  9096. }
  9097. var stringLen uint64
  9098. for shift := uint(0); ; shift += 7 {
  9099. if shift >= 64 {
  9100. return ErrIntOverflowRpc
  9101. }
  9102. if iNdEx >= l {
  9103. return io.ErrUnexpectedEOF
  9104. }
  9105. b := data[iNdEx]
  9106. iNdEx++
  9107. stringLen |= (uint64(b) & 0x7F) << shift
  9108. if b < 0x80 {
  9109. break
  9110. }
  9111. }
  9112. intStringLen := int(stringLen)
  9113. if intStringLen < 0 {
  9114. return ErrInvalidLengthRpc
  9115. }
  9116. postIndex := iNdEx + intStringLen
  9117. if postIndex > l {
  9118. return io.ErrUnexpectedEOF
  9119. }
  9120. m.Name = string(data[iNdEx:postIndex])
  9121. iNdEx = postIndex
  9122. case 3:
  9123. if wireType != 0 {
  9124. return fmt.Errorf("proto: wrong wireType = %d for field IsLeader", wireType)
  9125. }
  9126. var v int
  9127. for shift := uint(0); ; shift += 7 {
  9128. if shift >= 64 {
  9129. return ErrIntOverflowRpc
  9130. }
  9131. if iNdEx >= l {
  9132. return io.ErrUnexpectedEOF
  9133. }
  9134. b := data[iNdEx]
  9135. iNdEx++
  9136. v |= (int(b) & 0x7F) << shift
  9137. if b < 0x80 {
  9138. break
  9139. }
  9140. }
  9141. m.IsLeader = bool(v != 0)
  9142. case 4:
  9143. if wireType != 2 {
  9144. return fmt.Errorf("proto: wrong wireType = %d for field PeerURLs", wireType)
  9145. }
  9146. var stringLen uint64
  9147. for shift := uint(0); ; shift += 7 {
  9148. if shift >= 64 {
  9149. return ErrIntOverflowRpc
  9150. }
  9151. if iNdEx >= l {
  9152. return io.ErrUnexpectedEOF
  9153. }
  9154. b := data[iNdEx]
  9155. iNdEx++
  9156. stringLen |= (uint64(b) & 0x7F) << shift
  9157. if b < 0x80 {
  9158. break
  9159. }
  9160. }
  9161. intStringLen := int(stringLen)
  9162. if intStringLen < 0 {
  9163. return ErrInvalidLengthRpc
  9164. }
  9165. postIndex := iNdEx + intStringLen
  9166. if postIndex > l {
  9167. return io.ErrUnexpectedEOF
  9168. }
  9169. m.PeerURLs = append(m.PeerURLs, string(data[iNdEx:postIndex]))
  9170. iNdEx = postIndex
  9171. case 5:
  9172. if wireType != 2 {
  9173. return fmt.Errorf("proto: wrong wireType = %d for field ClientURLs", wireType)
  9174. }
  9175. var stringLen uint64
  9176. for shift := uint(0); ; shift += 7 {
  9177. if shift >= 64 {
  9178. return ErrIntOverflowRpc
  9179. }
  9180. if iNdEx >= l {
  9181. return io.ErrUnexpectedEOF
  9182. }
  9183. b := data[iNdEx]
  9184. iNdEx++
  9185. stringLen |= (uint64(b) & 0x7F) << shift
  9186. if b < 0x80 {
  9187. break
  9188. }
  9189. }
  9190. intStringLen := int(stringLen)
  9191. if intStringLen < 0 {
  9192. return ErrInvalidLengthRpc
  9193. }
  9194. postIndex := iNdEx + intStringLen
  9195. if postIndex > l {
  9196. return io.ErrUnexpectedEOF
  9197. }
  9198. m.ClientURLs = append(m.ClientURLs, string(data[iNdEx:postIndex]))
  9199. iNdEx = postIndex
  9200. default:
  9201. iNdEx = preIndex
  9202. skippy, err := skipRpc(data[iNdEx:])
  9203. if err != nil {
  9204. return err
  9205. }
  9206. if skippy < 0 {
  9207. return ErrInvalidLengthRpc
  9208. }
  9209. if (iNdEx + skippy) > l {
  9210. return io.ErrUnexpectedEOF
  9211. }
  9212. iNdEx += skippy
  9213. }
  9214. }
  9215. if iNdEx > l {
  9216. return io.ErrUnexpectedEOF
  9217. }
  9218. return nil
  9219. }
  9220. func (m *MemberAddRequest) Unmarshal(data []byte) error {
  9221. l := len(data)
  9222. iNdEx := 0
  9223. for iNdEx < l {
  9224. preIndex := iNdEx
  9225. var wire uint64
  9226. for shift := uint(0); ; shift += 7 {
  9227. if shift >= 64 {
  9228. return ErrIntOverflowRpc
  9229. }
  9230. if iNdEx >= l {
  9231. return io.ErrUnexpectedEOF
  9232. }
  9233. b := data[iNdEx]
  9234. iNdEx++
  9235. wire |= (uint64(b) & 0x7F) << shift
  9236. if b < 0x80 {
  9237. break
  9238. }
  9239. }
  9240. fieldNum := int32(wire >> 3)
  9241. wireType := int(wire & 0x7)
  9242. if wireType == 4 {
  9243. return fmt.Errorf("proto: MemberAddRequest: wiretype end group for non-group")
  9244. }
  9245. if fieldNum <= 0 {
  9246. return fmt.Errorf("proto: MemberAddRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  9247. }
  9248. switch fieldNum {
  9249. case 1:
  9250. if wireType != 2 {
  9251. return fmt.Errorf("proto: wrong wireType = %d for field PeerURLs", wireType)
  9252. }
  9253. var stringLen uint64
  9254. for shift := uint(0); ; shift += 7 {
  9255. if shift >= 64 {
  9256. return ErrIntOverflowRpc
  9257. }
  9258. if iNdEx >= l {
  9259. return io.ErrUnexpectedEOF
  9260. }
  9261. b := data[iNdEx]
  9262. iNdEx++
  9263. stringLen |= (uint64(b) & 0x7F) << shift
  9264. if b < 0x80 {
  9265. break
  9266. }
  9267. }
  9268. intStringLen := int(stringLen)
  9269. if intStringLen < 0 {
  9270. return ErrInvalidLengthRpc
  9271. }
  9272. postIndex := iNdEx + intStringLen
  9273. if postIndex > l {
  9274. return io.ErrUnexpectedEOF
  9275. }
  9276. m.PeerURLs = append(m.PeerURLs, string(data[iNdEx:postIndex]))
  9277. iNdEx = postIndex
  9278. default:
  9279. iNdEx = preIndex
  9280. skippy, err := skipRpc(data[iNdEx:])
  9281. if err != nil {
  9282. return err
  9283. }
  9284. if skippy < 0 {
  9285. return ErrInvalidLengthRpc
  9286. }
  9287. if (iNdEx + skippy) > l {
  9288. return io.ErrUnexpectedEOF
  9289. }
  9290. iNdEx += skippy
  9291. }
  9292. }
  9293. if iNdEx > l {
  9294. return io.ErrUnexpectedEOF
  9295. }
  9296. return nil
  9297. }
  9298. func (m *MemberAddResponse) Unmarshal(data []byte) error {
  9299. l := len(data)
  9300. iNdEx := 0
  9301. for iNdEx < l {
  9302. preIndex := iNdEx
  9303. var wire uint64
  9304. for shift := uint(0); ; shift += 7 {
  9305. if shift >= 64 {
  9306. return ErrIntOverflowRpc
  9307. }
  9308. if iNdEx >= l {
  9309. return io.ErrUnexpectedEOF
  9310. }
  9311. b := data[iNdEx]
  9312. iNdEx++
  9313. wire |= (uint64(b) & 0x7F) << shift
  9314. if b < 0x80 {
  9315. break
  9316. }
  9317. }
  9318. fieldNum := int32(wire >> 3)
  9319. wireType := int(wire & 0x7)
  9320. if wireType == 4 {
  9321. return fmt.Errorf("proto: MemberAddResponse: wiretype end group for non-group")
  9322. }
  9323. if fieldNum <= 0 {
  9324. return fmt.Errorf("proto: MemberAddResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  9325. }
  9326. switch fieldNum {
  9327. case 1:
  9328. if wireType != 2 {
  9329. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  9330. }
  9331. var msglen int
  9332. for shift := uint(0); ; shift += 7 {
  9333. if shift >= 64 {
  9334. return ErrIntOverflowRpc
  9335. }
  9336. if iNdEx >= l {
  9337. return io.ErrUnexpectedEOF
  9338. }
  9339. b := data[iNdEx]
  9340. iNdEx++
  9341. msglen |= (int(b) & 0x7F) << shift
  9342. if b < 0x80 {
  9343. break
  9344. }
  9345. }
  9346. if msglen < 0 {
  9347. return ErrInvalidLengthRpc
  9348. }
  9349. postIndex := iNdEx + msglen
  9350. if postIndex > l {
  9351. return io.ErrUnexpectedEOF
  9352. }
  9353. if m.Header == nil {
  9354. m.Header = &ResponseHeader{}
  9355. }
  9356. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  9357. return err
  9358. }
  9359. iNdEx = postIndex
  9360. case 2:
  9361. if wireType != 2 {
  9362. return fmt.Errorf("proto: wrong wireType = %d for field Member", wireType)
  9363. }
  9364. var msglen int
  9365. for shift := uint(0); ; shift += 7 {
  9366. if shift >= 64 {
  9367. return ErrIntOverflowRpc
  9368. }
  9369. if iNdEx >= l {
  9370. return io.ErrUnexpectedEOF
  9371. }
  9372. b := data[iNdEx]
  9373. iNdEx++
  9374. msglen |= (int(b) & 0x7F) << shift
  9375. if b < 0x80 {
  9376. break
  9377. }
  9378. }
  9379. if msglen < 0 {
  9380. return ErrInvalidLengthRpc
  9381. }
  9382. postIndex := iNdEx + msglen
  9383. if postIndex > l {
  9384. return io.ErrUnexpectedEOF
  9385. }
  9386. if m.Member == nil {
  9387. m.Member = &Member{}
  9388. }
  9389. if err := m.Member.Unmarshal(data[iNdEx:postIndex]); err != nil {
  9390. return err
  9391. }
  9392. iNdEx = postIndex
  9393. default:
  9394. iNdEx = preIndex
  9395. skippy, err := skipRpc(data[iNdEx:])
  9396. if err != nil {
  9397. return err
  9398. }
  9399. if skippy < 0 {
  9400. return ErrInvalidLengthRpc
  9401. }
  9402. if (iNdEx + skippy) > l {
  9403. return io.ErrUnexpectedEOF
  9404. }
  9405. iNdEx += skippy
  9406. }
  9407. }
  9408. if iNdEx > l {
  9409. return io.ErrUnexpectedEOF
  9410. }
  9411. return nil
  9412. }
  9413. func (m *MemberRemoveRequest) Unmarshal(data []byte) error {
  9414. l := len(data)
  9415. iNdEx := 0
  9416. for iNdEx < l {
  9417. preIndex := iNdEx
  9418. var wire uint64
  9419. for shift := uint(0); ; shift += 7 {
  9420. if shift >= 64 {
  9421. return ErrIntOverflowRpc
  9422. }
  9423. if iNdEx >= l {
  9424. return io.ErrUnexpectedEOF
  9425. }
  9426. b := data[iNdEx]
  9427. iNdEx++
  9428. wire |= (uint64(b) & 0x7F) << shift
  9429. if b < 0x80 {
  9430. break
  9431. }
  9432. }
  9433. fieldNum := int32(wire >> 3)
  9434. wireType := int(wire & 0x7)
  9435. if wireType == 4 {
  9436. return fmt.Errorf("proto: MemberRemoveRequest: wiretype end group for non-group")
  9437. }
  9438. if fieldNum <= 0 {
  9439. return fmt.Errorf("proto: MemberRemoveRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  9440. }
  9441. switch fieldNum {
  9442. case 1:
  9443. if wireType != 0 {
  9444. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  9445. }
  9446. m.ID = 0
  9447. for shift := uint(0); ; shift += 7 {
  9448. if shift >= 64 {
  9449. return ErrIntOverflowRpc
  9450. }
  9451. if iNdEx >= l {
  9452. return io.ErrUnexpectedEOF
  9453. }
  9454. b := data[iNdEx]
  9455. iNdEx++
  9456. m.ID |= (uint64(b) & 0x7F) << shift
  9457. if b < 0x80 {
  9458. break
  9459. }
  9460. }
  9461. default:
  9462. iNdEx = preIndex
  9463. skippy, err := skipRpc(data[iNdEx:])
  9464. if err != nil {
  9465. return err
  9466. }
  9467. if skippy < 0 {
  9468. return ErrInvalidLengthRpc
  9469. }
  9470. if (iNdEx + skippy) > l {
  9471. return io.ErrUnexpectedEOF
  9472. }
  9473. iNdEx += skippy
  9474. }
  9475. }
  9476. if iNdEx > l {
  9477. return io.ErrUnexpectedEOF
  9478. }
  9479. return nil
  9480. }
  9481. func (m *MemberRemoveResponse) Unmarshal(data []byte) error {
  9482. l := len(data)
  9483. iNdEx := 0
  9484. for iNdEx < l {
  9485. preIndex := iNdEx
  9486. var wire uint64
  9487. for shift := uint(0); ; shift += 7 {
  9488. if shift >= 64 {
  9489. return ErrIntOverflowRpc
  9490. }
  9491. if iNdEx >= l {
  9492. return io.ErrUnexpectedEOF
  9493. }
  9494. b := data[iNdEx]
  9495. iNdEx++
  9496. wire |= (uint64(b) & 0x7F) << shift
  9497. if b < 0x80 {
  9498. break
  9499. }
  9500. }
  9501. fieldNum := int32(wire >> 3)
  9502. wireType := int(wire & 0x7)
  9503. if wireType == 4 {
  9504. return fmt.Errorf("proto: MemberRemoveResponse: wiretype end group for non-group")
  9505. }
  9506. if fieldNum <= 0 {
  9507. return fmt.Errorf("proto: MemberRemoveResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  9508. }
  9509. switch fieldNum {
  9510. case 1:
  9511. if wireType != 2 {
  9512. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  9513. }
  9514. var msglen int
  9515. for shift := uint(0); ; shift += 7 {
  9516. if shift >= 64 {
  9517. return ErrIntOverflowRpc
  9518. }
  9519. if iNdEx >= l {
  9520. return io.ErrUnexpectedEOF
  9521. }
  9522. b := data[iNdEx]
  9523. iNdEx++
  9524. msglen |= (int(b) & 0x7F) << shift
  9525. if b < 0x80 {
  9526. break
  9527. }
  9528. }
  9529. if msglen < 0 {
  9530. return ErrInvalidLengthRpc
  9531. }
  9532. postIndex := iNdEx + msglen
  9533. if postIndex > l {
  9534. return io.ErrUnexpectedEOF
  9535. }
  9536. if m.Header == nil {
  9537. m.Header = &ResponseHeader{}
  9538. }
  9539. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  9540. return err
  9541. }
  9542. iNdEx = postIndex
  9543. default:
  9544. iNdEx = preIndex
  9545. skippy, err := skipRpc(data[iNdEx:])
  9546. if err != nil {
  9547. return err
  9548. }
  9549. if skippy < 0 {
  9550. return ErrInvalidLengthRpc
  9551. }
  9552. if (iNdEx + skippy) > l {
  9553. return io.ErrUnexpectedEOF
  9554. }
  9555. iNdEx += skippy
  9556. }
  9557. }
  9558. if iNdEx > l {
  9559. return io.ErrUnexpectedEOF
  9560. }
  9561. return nil
  9562. }
  9563. func (m *MemberUpdateRequest) Unmarshal(data []byte) error {
  9564. l := len(data)
  9565. iNdEx := 0
  9566. for iNdEx < l {
  9567. preIndex := iNdEx
  9568. var wire uint64
  9569. for shift := uint(0); ; shift += 7 {
  9570. if shift >= 64 {
  9571. return ErrIntOverflowRpc
  9572. }
  9573. if iNdEx >= l {
  9574. return io.ErrUnexpectedEOF
  9575. }
  9576. b := data[iNdEx]
  9577. iNdEx++
  9578. wire |= (uint64(b) & 0x7F) << shift
  9579. if b < 0x80 {
  9580. break
  9581. }
  9582. }
  9583. fieldNum := int32(wire >> 3)
  9584. wireType := int(wire & 0x7)
  9585. if wireType == 4 {
  9586. return fmt.Errorf("proto: MemberUpdateRequest: wiretype end group for non-group")
  9587. }
  9588. if fieldNum <= 0 {
  9589. return fmt.Errorf("proto: MemberUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  9590. }
  9591. switch fieldNum {
  9592. case 1:
  9593. if wireType != 0 {
  9594. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  9595. }
  9596. m.ID = 0
  9597. for shift := uint(0); ; shift += 7 {
  9598. if shift >= 64 {
  9599. return ErrIntOverflowRpc
  9600. }
  9601. if iNdEx >= l {
  9602. return io.ErrUnexpectedEOF
  9603. }
  9604. b := data[iNdEx]
  9605. iNdEx++
  9606. m.ID |= (uint64(b) & 0x7F) << shift
  9607. if b < 0x80 {
  9608. break
  9609. }
  9610. }
  9611. case 2:
  9612. if wireType != 2 {
  9613. return fmt.Errorf("proto: wrong wireType = %d for field PeerURLs", wireType)
  9614. }
  9615. var stringLen uint64
  9616. for shift := uint(0); ; shift += 7 {
  9617. if shift >= 64 {
  9618. return ErrIntOverflowRpc
  9619. }
  9620. if iNdEx >= l {
  9621. return io.ErrUnexpectedEOF
  9622. }
  9623. b := data[iNdEx]
  9624. iNdEx++
  9625. stringLen |= (uint64(b) & 0x7F) << shift
  9626. if b < 0x80 {
  9627. break
  9628. }
  9629. }
  9630. intStringLen := int(stringLen)
  9631. if intStringLen < 0 {
  9632. return ErrInvalidLengthRpc
  9633. }
  9634. postIndex := iNdEx + intStringLen
  9635. if postIndex > l {
  9636. return io.ErrUnexpectedEOF
  9637. }
  9638. m.PeerURLs = append(m.PeerURLs, string(data[iNdEx:postIndex]))
  9639. iNdEx = postIndex
  9640. default:
  9641. iNdEx = preIndex
  9642. skippy, err := skipRpc(data[iNdEx:])
  9643. if err != nil {
  9644. return err
  9645. }
  9646. if skippy < 0 {
  9647. return ErrInvalidLengthRpc
  9648. }
  9649. if (iNdEx + skippy) > l {
  9650. return io.ErrUnexpectedEOF
  9651. }
  9652. iNdEx += skippy
  9653. }
  9654. }
  9655. if iNdEx > l {
  9656. return io.ErrUnexpectedEOF
  9657. }
  9658. return nil
  9659. }
  9660. func (m *MemberUpdateResponse) Unmarshal(data []byte) error {
  9661. l := len(data)
  9662. iNdEx := 0
  9663. for iNdEx < l {
  9664. preIndex := iNdEx
  9665. var wire uint64
  9666. for shift := uint(0); ; shift += 7 {
  9667. if shift >= 64 {
  9668. return ErrIntOverflowRpc
  9669. }
  9670. if iNdEx >= l {
  9671. return io.ErrUnexpectedEOF
  9672. }
  9673. b := data[iNdEx]
  9674. iNdEx++
  9675. wire |= (uint64(b) & 0x7F) << shift
  9676. if b < 0x80 {
  9677. break
  9678. }
  9679. }
  9680. fieldNum := int32(wire >> 3)
  9681. wireType := int(wire & 0x7)
  9682. if wireType == 4 {
  9683. return fmt.Errorf("proto: MemberUpdateResponse: wiretype end group for non-group")
  9684. }
  9685. if fieldNum <= 0 {
  9686. return fmt.Errorf("proto: MemberUpdateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  9687. }
  9688. switch fieldNum {
  9689. case 1:
  9690. if wireType != 2 {
  9691. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  9692. }
  9693. var msglen int
  9694. for shift := uint(0); ; shift += 7 {
  9695. if shift >= 64 {
  9696. return ErrIntOverflowRpc
  9697. }
  9698. if iNdEx >= l {
  9699. return io.ErrUnexpectedEOF
  9700. }
  9701. b := data[iNdEx]
  9702. iNdEx++
  9703. msglen |= (int(b) & 0x7F) << shift
  9704. if b < 0x80 {
  9705. break
  9706. }
  9707. }
  9708. if msglen < 0 {
  9709. return ErrInvalidLengthRpc
  9710. }
  9711. postIndex := iNdEx + msglen
  9712. if postIndex > l {
  9713. return io.ErrUnexpectedEOF
  9714. }
  9715. if m.Header == nil {
  9716. m.Header = &ResponseHeader{}
  9717. }
  9718. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  9719. return err
  9720. }
  9721. iNdEx = postIndex
  9722. default:
  9723. iNdEx = preIndex
  9724. skippy, err := skipRpc(data[iNdEx:])
  9725. if err != nil {
  9726. return err
  9727. }
  9728. if skippy < 0 {
  9729. return ErrInvalidLengthRpc
  9730. }
  9731. if (iNdEx + skippy) > l {
  9732. return io.ErrUnexpectedEOF
  9733. }
  9734. iNdEx += skippy
  9735. }
  9736. }
  9737. if iNdEx > l {
  9738. return io.ErrUnexpectedEOF
  9739. }
  9740. return nil
  9741. }
  9742. func (m *MemberListRequest) Unmarshal(data []byte) error {
  9743. l := len(data)
  9744. iNdEx := 0
  9745. for iNdEx < l {
  9746. preIndex := iNdEx
  9747. var wire uint64
  9748. for shift := uint(0); ; shift += 7 {
  9749. if shift >= 64 {
  9750. return ErrIntOverflowRpc
  9751. }
  9752. if iNdEx >= l {
  9753. return io.ErrUnexpectedEOF
  9754. }
  9755. b := data[iNdEx]
  9756. iNdEx++
  9757. wire |= (uint64(b) & 0x7F) << shift
  9758. if b < 0x80 {
  9759. break
  9760. }
  9761. }
  9762. fieldNum := int32(wire >> 3)
  9763. wireType := int(wire & 0x7)
  9764. if wireType == 4 {
  9765. return fmt.Errorf("proto: MemberListRequest: wiretype end group for non-group")
  9766. }
  9767. if fieldNum <= 0 {
  9768. return fmt.Errorf("proto: MemberListRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  9769. }
  9770. switch fieldNum {
  9771. default:
  9772. iNdEx = preIndex
  9773. skippy, err := skipRpc(data[iNdEx:])
  9774. if err != nil {
  9775. return err
  9776. }
  9777. if skippy < 0 {
  9778. return ErrInvalidLengthRpc
  9779. }
  9780. if (iNdEx + skippy) > l {
  9781. return io.ErrUnexpectedEOF
  9782. }
  9783. iNdEx += skippy
  9784. }
  9785. }
  9786. if iNdEx > l {
  9787. return io.ErrUnexpectedEOF
  9788. }
  9789. return nil
  9790. }
  9791. func (m *MemberListResponse) Unmarshal(data []byte) error {
  9792. l := len(data)
  9793. iNdEx := 0
  9794. for iNdEx < l {
  9795. preIndex := iNdEx
  9796. var wire uint64
  9797. for shift := uint(0); ; shift += 7 {
  9798. if shift >= 64 {
  9799. return ErrIntOverflowRpc
  9800. }
  9801. if iNdEx >= l {
  9802. return io.ErrUnexpectedEOF
  9803. }
  9804. b := data[iNdEx]
  9805. iNdEx++
  9806. wire |= (uint64(b) & 0x7F) << shift
  9807. if b < 0x80 {
  9808. break
  9809. }
  9810. }
  9811. fieldNum := int32(wire >> 3)
  9812. wireType := int(wire & 0x7)
  9813. if wireType == 4 {
  9814. return fmt.Errorf("proto: MemberListResponse: wiretype end group for non-group")
  9815. }
  9816. if fieldNum <= 0 {
  9817. return fmt.Errorf("proto: MemberListResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  9818. }
  9819. switch fieldNum {
  9820. case 1:
  9821. if wireType != 2 {
  9822. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  9823. }
  9824. var msglen int
  9825. for shift := uint(0); ; shift += 7 {
  9826. if shift >= 64 {
  9827. return ErrIntOverflowRpc
  9828. }
  9829. if iNdEx >= l {
  9830. return io.ErrUnexpectedEOF
  9831. }
  9832. b := data[iNdEx]
  9833. iNdEx++
  9834. msglen |= (int(b) & 0x7F) << shift
  9835. if b < 0x80 {
  9836. break
  9837. }
  9838. }
  9839. if msglen < 0 {
  9840. return ErrInvalidLengthRpc
  9841. }
  9842. postIndex := iNdEx + msglen
  9843. if postIndex > l {
  9844. return io.ErrUnexpectedEOF
  9845. }
  9846. if m.Header == nil {
  9847. m.Header = &ResponseHeader{}
  9848. }
  9849. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  9850. return err
  9851. }
  9852. iNdEx = postIndex
  9853. case 2:
  9854. if wireType != 2 {
  9855. return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType)
  9856. }
  9857. var msglen int
  9858. for shift := uint(0); ; shift += 7 {
  9859. if shift >= 64 {
  9860. return ErrIntOverflowRpc
  9861. }
  9862. if iNdEx >= l {
  9863. return io.ErrUnexpectedEOF
  9864. }
  9865. b := data[iNdEx]
  9866. iNdEx++
  9867. msglen |= (int(b) & 0x7F) << shift
  9868. if b < 0x80 {
  9869. break
  9870. }
  9871. }
  9872. if msglen < 0 {
  9873. return ErrInvalidLengthRpc
  9874. }
  9875. postIndex := iNdEx + msglen
  9876. if postIndex > l {
  9877. return io.ErrUnexpectedEOF
  9878. }
  9879. m.Members = append(m.Members, &Member{})
  9880. if err := m.Members[len(m.Members)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  9881. return err
  9882. }
  9883. iNdEx = postIndex
  9884. default:
  9885. iNdEx = preIndex
  9886. skippy, err := skipRpc(data[iNdEx:])
  9887. if err != nil {
  9888. return err
  9889. }
  9890. if skippy < 0 {
  9891. return ErrInvalidLengthRpc
  9892. }
  9893. if (iNdEx + skippy) > l {
  9894. return io.ErrUnexpectedEOF
  9895. }
  9896. iNdEx += skippy
  9897. }
  9898. }
  9899. if iNdEx > l {
  9900. return io.ErrUnexpectedEOF
  9901. }
  9902. return nil
  9903. }
  9904. func (m *DefragmentRequest) Unmarshal(data []byte) error {
  9905. l := len(data)
  9906. iNdEx := 0
  9907. for iNdEx < l {
  9908. preIndex := iNdEx
  9909. var wire uint64
  9910. for shift := uint(0); ; shift += 7 {
  9911. if shift >= 64 {
  9912. return ErrIntOverflowRpc
  9913. }
  9914. if iNdEx >= l {
  9915. return io.ErrUnexpectedEOF
  9916. }
  9917. b := data[iNdEx]
  9918. iNdEx++
  9919. wire |= (uint64(b) & 0x7F) << shift
  9920. if b < 0x80 {
  9921. break
  9922. }
  9923. }
  9924. fieldNum := int32(wire >> 3)
  9925. wireType := int(wire & 0x7)
  9926. if wireType == 4 {
  9927. return fmt.Errorf("proto: DefragmentRequest: wiretype end group for non-group")
  9928. }
  9929. if fieldNum <= 0 {
  9930. return fmt.Errorf("proto: DefragmentRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  9931. }
  9932. switch fieldNum {
  9933. default:
  9934. iNdEx = preIndex
  9935. skippy, err := skipRpc(data[iNdEx:])
  9936. if err != nil {
  9937. return err
  9938. }
  9939. if skippy < 0 {
  9940. return ErrInvalidLengthRpc
  9941. }
  9942. if (iNdEx + skippy) > l {
  9943. return io.ErrUnexpectedEOF
  9944. }
  9945. iNdEx += skippy
  9946. }
  9947. }
  9948. if iNdEx > l {
  9949. return io.ErrUnexpectedEOF
  9950. }
  9951. return nil
  9952. }
  9953. func (m *DefragmentResponse) Unmarshal(data []byte) error {
  9954. l := len(data)
  9955. iNdEx := 0
  9956. for iNdEx < l {
  9957. preIndex := iNdEx
  9958. var wire uint64
  9959. for shift := uint(0); ; shift += 7 {
  9960. if shift >= 64 {
  9961. return ErrIntOverflowRpc
  9962. }
  9963. if iNdEx >= l {
  9964. return io.ErrUnexpectedEOF
  9965. }
  9966. b := data[iNdEx]
  9967. iNdEx++
  9968. wire |= (uint64(b) & 0x7F) << shift
  9969. if b < 0x80 {
  9970. break
  9971. }
  9972. }
  9973. fieldNum := int32(wire >> 3)
  9974. wireType := int(wire & 0x7)
  9975. if wireType == 4 {
  9976. return fmt.Errorf("proto: DefragmentResponse: wiretype end group for non-group")
  9977. }
  9978. if fieldNum <= 0 {
  9979. return fmt.Errorf("proto: DefragmentResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  9980. }
  9981. switch fieldNum {
  9982. case 1:
  9983. if wireType != 2 {
  9984. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  9985. }
  9986. var msglen int
  9987. for shift := uint(0); ; shift += 7 {
  9988. if shift >= 64 {
  9989. return ErrIntOverflowRpc
  9990. }
  9991. if iNdEx >= l {
  9992. return io.ErrUnexpectedEOF
  9993. }
  9994. b := data[iNdEx]
  9995. iNdEx++
  9996. msglen |= (int(b) & 0x7F) << shift
  9997. if b < 0x80 {
  9998. break
  9999. }
  10000. }
  10001. if msglen < 0 {
  10002. return ErrInvalidLengthRpc
  10003. }
  10004. postIndex := iNdEx + msglen
  10005. if postIndex > l {
  10006. return io.ErrUnexpectedEOF
  10007. }
  10008. if m.Header == nil {
  10009. m.Header = &ResponseHeader{}
  10010. }
  10011. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  10012. return err
  10013. }
  10014. iNdEx = postIndex
  10015. default:
  10016. iNdEx = preIndex
  10017. skippy, err := skipRpc(data[iNdEx:])
  10018. if err != nil {
  10019. return err
  10020. }
  10021. if skippy < 0 {
  10022. return ErrInvalidLengthRpc
  10023. }
  10024. if (iNdEx + skippy) > l {
  10025. return io.ErrUnexpectedEOF
  10026. }
  10027. iNdEx += skippy
  10028. }
  10029. }
  10030. if iNdEx > l {
  10031. return io.ErrUnexpectedEOF
  10032. }
  10033. return nil
  10034. }
  10035. func (m *AlarmRequest) Unmarshal(data []byte) error {
  10036. l := len(data)
  10037. iNdEx := 0
  10038. for iNdEx < l {
  10039. preIndex := iNdEx
  10040. var wire uint64
  10041. for shift := uint(0); ; shift += 7 {
  10042. if shift >= 64 {
  10043. return ErrIntOverflowRpc
  10044. }
  10045. if iNdEx >= l {
  10046. return io.ErrUnexpectedEOF
  10047. }
  10048. b := data[iNdEx]
  10049. iNdEx++
  10050. wire |= (uint64(b) & 0x7F) << shift
  10051. if b < 0x80 {
  10052. break
  10053. }
  10054. }
  10055. fieldNum := int32(wire >> 3)
  10056. wireType := int(wire & 0x7)
  10057. if wireType == 4 {
  10058. return fmt.Errorf("proto: AlarmRequest: wiretype end group for non-group")
  10059. }
  10060. if fieldNum <= 0 {
  10061. return fmt.Errorf("proto: AlarmRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  10062. }
  10063. switch fieldNum {
  10064. case 1:
  10065. if wireType != 0 {
  10066. return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
  10067. }
  10068. m.Action = 0
  10069. for shift := uint(0); ; shift += 7 {
  10070. if shift >= 64 {
  10071. return ErrIntOverflowRpc
  10072. }
  10073. if iNdEx >= l {
  10074. return io.ErrUnexpectedEOF
  10075. }
  10076. b := data[iNdEx]
  10077. iNdEx++
  10078. m.Action |= (AlarmRequest_AlarmAction(b) & 0x7F) << shift
  10079. if b < 0x80 {
  10080. break
  10081. }
  10082. }
  10083. case 2:
  10084. if wireType != 0 {
  10085. return fmt.Errorf("proto: wrong wireType = %d for field MemberID", wireType)
  10086. }
  10087. m.MemberID = 0
  10088. for shift := uint(0); ; shift += 7 {
  10089. if shift >= 64 {
  10090. return ErrIntOverflowRpc
  10091. }
  10092. if iNdEx >= l {
  10093. return io.ErrUnexpectedEOF
  10094. }
  10095. b := data[iNdEx]
  10096. iNdEx++
  10097. m.MemberID |= (uint64(b) & 0x7F) << shift
  10098. if b < 0x80 {
  10099. break
  10100. }
  10101. }
  10102. case 3:
  10103. if wireType != 0 {
  10104. return fmt.Errorf("proto: wrong wireType = %d for field Alarm", wireType)
  10105. }
  10106. m.Alarm = 0
  10107. for shift := uint(0); ; shift += 7 {
  10108. if shift >= 64 {
  10109. return ErrIntOverflowRpc
  10110. }
  10111. if iNdEx >= l {
  10112. return io.ErrUnexpectedEOF
  10113. }
  10114. b := data[iNdEx]
  10115. iNdEx++
  10116. m.Alarm |= (AlarmType(b) & 0x7F) << shift
  10117. if b < 0x80 {
  10118. break
  10119. }
  10120. }
  10121. default:
  10122. iNdEx = preIndex
  10123. skippy, err := skipRpc(data[iNdEx:])
  10124. if err != nil {
  10125. return err
  10126. }
  10127. if skippy < 0 {
  10128. return ErrInvalidLengthRpc
  10129. }
  10130. if (iNdEx + skippy) > l {
  10131. return io.ErrUnexpectedEOF
  10132. }
  10133. iNdEx += skippy
  10134. }
  10135. }
  10136. if iNdEx > l {
  10137. return io.ErrUnexpectedEOF
  10138. }
  10139. return nil
  10140. }
  10141. func (m *AlarmMember) Unmarshal(data []byte) error {
  10142. l := len(data)
  10143. iNdEx := 0
  10144. for iNdEx < l {
  10145. preIndex := iNdEx
  10146. var wire uint64
  10147. for shift := uint(0); ; shift += 7 {
  10148. if shift >= 64 {
  10149. return ErrIntOverflowRpc
  10150. }
  10151. if iNdEx >= l {
  10152. return io.ErrUnexpectedEOF
  10153. }
  10154. b := data[iNdEx]
  10155. iNdEx++
  10156. wire |= (uint64(b) & 0x7F) << shift
  10157. if b < 0x80 {
  10158. break
  10159. }
  10160. }
  10161. fieldNum := int32(wire >> 3)
  10162. wireType := int(wire & 0x7)
  10163. if wireType == 4 {
  10164. return fmt.Errorf("proto: AlarmMember: wiretype end group for non-group")
  10165. }
  10166. if fieldNum <= 0 {
  10167. return fmt.Errorf("proto: AlarmMember: illegal tag %d (wire type %d)", fieldNum, wire)
  10168. }
  10169. switch fieldNum {
  10170. case 1:
  10171. if wireType != 0 {
  10172. return fmt.Errorf("proto: wrong wireType = %d for field MemberID", wireType)
  10173. }
  10174. m.MemberID = 0
  10175. for shift := uint(0); ; shift += 7 {
  10176. if shift >= 64 {
  10177. return ErrIntOverflowRpc
  10178. }
  10179. if iNdEx >= l {
  10180. return io.ErrUnexpectedEOF
  10181. }
  10182. b := data[iNdEx]
  10183. iNdEx++
  10184. m.MemberID |= (uint64(b) & 0x7F) << shift
  10185. if b < 0x80 {
  10186. break
  10187. }
  10188. }
  10189. case 2:
  10190. if wireType != 0 {
  10191. return fmt.Errorf("proto: wrong wireType = %d for field Alarm", wireType)
  10192. }
  10193. m.Alarm = 0
  10194. for shift := uint(0); ; shift += 7 {
  10195. if shift >= 64 {
  10196. return ErrIntOverflowRpc
  10197. }
  10198. if iNdEx >= l {
  10199. return io.ErrUnexpectedEOF
  10200. }
  10201. b := data[iNdEx]
  10202. iNdEx++
  10203. m.Alarm |= (AlarmType(b) & 0x7F) << shift
  10204. if b < 0x80 {
  10205. break
  10206. }
  10207. }
  10208. default:
  10209. iNdEx = preIndex
  10210. skippy, err := skipRpc(data[iNdEx:])
  10211. if err != nil {
  10212. return err
  10213. }
  10214. if skippy < 0 {
  10215. return ErrInvalidLengthRpc
  10216. }
  10217. if (iNdEx + skippy) > l {
  10218. return io.ErrUnexpectedEOF
  10219. }
  10220. iNdEx += skippy
  10221. }
  10222. }
  10223. if iNdEx > l {
  10224. return io.ErrUnexpectedEOF
  10225. }
  10226. return nil
  10227. }
  10228. func (m *AlarmResponse) Unmarshal(data []byte) error {
  10229. l := len(data)
  10230. iNdEx := 0
  10231. for iNdEx < l {
  10232. preIndex := iNdEx
  10233. var wire uint64
  10234. for shift := uint(0); ; shift += 7 {
  10235. if shift >= 64 {
  10236. return ErrIntOverflowRpc
  10237. }
  10238. if iNdEx >= l {
  10239. return io.ErrUnexpectedEOF
  10240. }
  10241. b := data[iNdEx]
  10242. iNdEx++
  10243. wire |= (uint64(b) & 0x7F) << shift
  10244. if b < 0x80 {
  10245. break
  10246. }
  10247. }
  10248. fieldNum := int32(wire >> 3)
  10249. wireType := int(wire & 0x7)
  10250. if wireType == 4 {
  10251. return fmt.Errorf("proto: AlarmResponse: wiretype end group for non-group")
  10252. }
  10253. if fieldNum <= 0 {
  10254. return fmt.Errorf("proto: AlarmResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  10255. }
  10256. switch fieldNum {
  10257. case 1:
  10258. if wireType != 2 {
  10259. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  10260. }
  10261. var msglen int
  10262. for shift := uint(0); ; shift += 7 {
  10263. if shift >= 64 {
  10264. return ErrIntOverflowRpc
  10265. }
  10266. if iNdEx >= l {
  10267. return io.ErrUnexpectedEOF
  10268. }
  10269. b := data[iNdEx]
  10270. iNdEx++
  10271. msglen |= (int(b) & 0x7F) << shift
  10272. if b < 0x80 {
  10273. break
  10274. }
  10275. }
  10276. if msglen < 0 {
  10277. return ErrInvalidLengthRpc
  10278. }
  10279. postIndex := iNdEx + msglen
  10280. if postIndex > l {
  10281. return io.ErrUnexpectedEOF
  10282. }
  10283. if m.Header == nil {
  10284. m.Header = &ResponseHeader{}
  10285. }
  10286. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  10287. return err
  10288. }
  10289. iNdEx = postIndex
  10290. case 2:
  10291. if wireType != 2 {
  10292. return fmt.Errorf("proto: wrong wireType = %d for field Alarms", wireType)
  10293. }
  10294. var msglen int
  10295. for shift := uint(0); ; shift += 7 {
  10296. if shift >= 64 {
  10297. return ErrIntOverflowRpc
  10298. }
  10299. if iNdEx >= l {
  10300. return io.ErrUnexpectedEOF
  10301. }
  10302. b := data[iNdEx]
  10303. iNdEx++
  10304. msglen |= (int(b) & 0x7F) << shift
  10305. if b < 0x80 {
  10306. break
  10307. }
  10308. }
  10309. if msglen < 0 {
  10310. return ErrInvalidLengthRpc
  10311. }
  10312. postIndex := iNdEx + msglen
  10313. if postIndex > l {
  10314. return io.ErrUnexpectedEOF
  10315. }
  10316. m.Alarms = append(m.Alarms, &AlarmMember{})
  10317. if err := m.Alarms[len(m.Alarms)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  10318. return err
  10319. }
  10320. iNdEx = postIndex
  10321. default:
  10322. iNdEx = preIndex
  10323. skippy, err := skipRpc(data[iNdEx:])
  10324. if err != nil {
  10325. return err
  10326. }
  10327. if skippy < 0 {
  10328. return ErrInvalidLengthRpc
  10329. }
  10330. if (iNdEx + skippy) > l {
  10331. return io.ErrUnexpectedEOF
  10332. }
  10333. iNdEx += skippy
  10334. }
  10335. }
  10336. if iNdEx > l {
  10337. return io.ErrUnexpectedEOF
  10338. }
  10339. return nil
  10340. }
  10341. func (m *StatusRequest) Unmarshal(data []byte) error {
  10342. l := len(data)
  10343. iNdEx := 0
  10344. for iNdEx < l {
  10345. preIndex := iNdEx
  10346. var wire uint64
  10347. for shift := uint(0); ; shift += 7 {
  10348. if shift >= 64 {
  10349. return ErrIntOverflowRpc
  10350. }
  10351. if iNdEx >= l {
  10352. return io.ErrUnexpectedEOF
  10353. }
  10354. b := data[iNdEx]
  10355. iNdEx++
  10356. wire |= (uint64(b) & 0x7F) << shift
  10357. if b < 0x80 {
  10358. break
  10359. }
  10360. }
  10361. fieldNum := int32(wire >> 3)
  10362. wireType := int(wire & 0x7)
  10363. if wireType == 4 {
  10364. return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group")
  10365. }
  10366. if fieldNum <= 0 {
  10367. return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  10368. }
  10369. switch fieldNum {
  10370. default:
  10371. iNdEx = preIndex
  10372. skippy, err := skipRpc(data[iNdEx:])
  10373. if err != nil {
  10374. return err
  10375. }
  10376. if skippy < 0 {
  10377. return ErrInvalidLengthRpc
  10378. }
  10379. if (iNdEx + skippy) > l {
  10380. return io.ErrUnexpectedEOF
  10381. }
  10382. iNdEx += skippy
  10383. }
  10384. }
  10385. if iNdEx > l {
  10386. return io.ErrUnexpectedEOF
  10387. }
  10388. return nil
  10389. }
  10390. func (m *StatusResponse) Unmarshal(data []byte) error {
  10391. l := len(data)
  10392. iNdEx := 0
  10393. for iNdEx < l {
  10394. preIndex := iNdEx
  10395. var wire uint64
  10396. for shift := uint(0); ; shift += 7 {
  10397. if shift >= 64 {
  10398. return ErrIntOverflowRpc
  10399. }
  10400. if iNdEx >= l {
  10401. return io.ErrUnexpectedEOF
  10402. }
  10403. b := data[iNdEx]
  10404. iNdEx++
  10405. wire |= (uint64(b) & 0x7F) << shift
  10406. if b < 0x80 {
  10407. break
  10408. }
  10409. }
  10410. fieldNum := int32(wire >> 3)
  10411. wireType := int(wire & 0x7)
  10412. if wireType == 4 {
  10413. return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group")
  10414. }
  10415. if fieldNum <= 0 {
  10416. return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  10417. }
  10418. switch fieldNum {
  10419. case 1:
  10420. if wireType != 2 {
  10421. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  10422. }
  10423. var msglen int
  10424. for shift := uint(0); ; shift += 7 {
  10425. if shift >= 64 {
  10426. return ErrIntOverflowRpc
  10427. }
  10428. if iNdEx >= l {
  10429. return io.ErrUnexpectedEOF
  10430. }
  10431. b := data[iNdEx]
  10432. iNdEx++
  10433. msglen |= (int(b) & 0x7F) << shift
  10434. if b < 0x80 {
  10435. break
  10436. }
  10437. }
  10438. if msglen < 0 {
  10439. return ErrInvalidLengthRpc
  10440. }
  10441. postIndex := iNdEx + msglen
  10442. if postIndex > l {
  10443. return io.ErrUnexpectedEOF
  10444. }
  10445. if m.Header == nil {
  10446. m.Header = &ResponseHeader{}
  10447. }
  10448. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  10449. return err
  10450. }
  10451. iNdEx = postIndex
  10452. case 2:
  10453. if wireType != 2 {
  10454. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  10455. }
  10456. var stringLen uint64
  10457. for shift := uint(0); ; shift += 7 {
  10458. if shift >= 64 {
  10459. return ErrIntOverflowRpc
  10460. }
  10461. if iNdEx >= l {
  10462. return io.ErrUnexpectedEOF
  10463. }
  10464. b := data[iNdEx]
  10465. iNdEx++
  10466. stringLen |= (uint64(b) & 0x7F) << shift
  10467. if b < 0x80 {
  10468. break
  10469. }
  10470. }
  10471. intStringLen := int(stringLen)
  10472. if intStringLen < 0 {
  10473. return ErrInvalidLengthRpc
  10474. }
  10475. postIndex := iNdEx + intStringLen
  10476. if postIndex > l {
  10477. return io.ErrUnexpectedEOF
  10478. }
  10479. m.Version = string(data[iNdEx:postIndex])
  10480. iNdEx = postIndex
  10481. case 3:
  10482. if wireType != 0 {
  10483. return fmt.Errorf("proto: wrong wireType = %d for field DbSize", wireType)
  10484. }
  10485. m.DbSize = 0
  10486. for shift := uint(0); ; shift += 7 {
  10487. if shift >= 64 {
  10488. return ErrIntOverflowRpc
  10489. }
  10490. if iNdEx >= l {
  10491. return io.ErrUnexpectedEOF
  10492. }
  10493. b := data[iNdEx]
  10494. iNdEx++
  10495. m.DbSize |= (int64(b) & 0x7F) << shift
  10496. if b < 0x80 {
  10497. break
  10498. }
  10499. }
  10500. case 4:
  10501. if wireType != 0 {
  10502. return fmt.Errorf("proto: wrong wireType = %d for field Leader", wireType)
  10503. }
  10504. m.Leader = 0
  10505. for shift := uint(0); ; shift += 7 {
  10506. if shift >= 64 {
  10507. return ErrIntOverflowRpc
  10508. }
  10509. if iNdEx >= l {
  10510. return io.ErrUnexpectedEOF
  10511. }
  10512. b := data[iNdEx]
  10513. iNdEx++
  10514. m.Leader |= (uint64(b) & 0x7F) << shift
  10515. if b < 0x80 {
  10516. break
  10517. }
  10518. }
  10519. case 5:
  10520. if wireType != 0 {
  10521. return fmt.Errorf("proto: wrong wireType = %d for field RaftIndex", wireType)
  10522. }
  10523. m.RaftIndex = 0
  10524. for shift := uint(0); ; shift += 7 {
  10525. if shift >= 64 {
  10526. return ErrIntOverflowRpc
  10527. }
  10528. if iNdEx >= l {
  10529. return io.ErrUnexpectedEOF
  10530. }
  10531. b := data[iNdEx]
  10532. iNdEx++
  10533. m.RaftIndex |= (uint64(b) & 0x7F) << shift
  10534. if b < 0x80 {
  10535. break
  10536. }
  10537. }
  10538. case 6:
  10539. if wireType != 0 {
  10540. return fmt.Errorf("proto: wrong wireType = %d for field RaftTerm", wireType)
  10541. }
  10542. m.RaftTerm = 0
  10543. for shift := uint(0); ; shift += 7 {
  10544. if shift >= 64 {
  10545. return ErrIntOverflowRpc
  10546. }
  10547. if iNdEx >= l {
  10548. return io.ErrUnexpectedEOF
  10549. }
  10550. b := data[iNdEx]
  10551. iNdEx++
  10552. m.RaftTerm |= (uint64(b) & 0x7F) << shift
  10553. if b < 0x80 {
  10554. break
  10555. }
  10556. }
  10557. default:
  10558. iNdEx = preIndex
  10559. skippy, err := skipRpc(data[iNdEx:])
  10560. if err != nil {
  10561. return err
  10562. }
  10563. if skippy < 0 {
  10564. return ErrInvalidLengthRpc
  10565. }
  10566. if (iNdEx + skippy) > l {
  10567. return io.ErrUnexpectedEOF
  10568. }
  10569. iNdEx += skippy
  10570. }
  10571. }
  10572. if iNdEx > l {
  10573. return io.ErrUnexpectedEOF
  10574. }
  10575. return nil
  10576. }
  10577. func (m *AuthEnableRequest) Unmarshal(data []byte) error {
  10578. l := len(data)
  10579. iNdEx := 0
  10580. for iNdEx < l {
  10581. preIndex := iNdEx
  10582. var wire uint64
  10583. for shift := uint(0); ; shift += 7 {
  10584. if shift >= 64 {
  10585. return ErrIntOverflowRpc
  10586. }
  10587. if iNdEx >= l {
  10588. return io.ErrUnexpectedEOF
  10589. }
  10590. b := data[iNdEx]
  10591. iNdEx++
  10592. wire |= (uint64(b) & 0x7F) << shift
  10593. if b < 0x80 {
  10594. break
  10595. }
  10596. }
  10597. fieldNum := int32(wire >> 3)
  10598. wireType := int(wire & 0x7)
  10599. if wireType == 4 {
  10600. return fmt.Errorf("proto: AuthEnableRequest: wiretype end group for non-group")
  10601. }
  10602. if fieldNum <= 0 {
  10603. return fmt.Errorf("proto: AuthEnableRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  10604. }
  10605. switch fieldNum {
  10606. default:
  10607. iNdEx = preIndex
  10608. skippy, err := skipRpc(data[iNdEx:])
  10609. if err != nil {
  10610. return err
  10611. }
  10612. if skippy < 0 {
  10613. return ErrInvalidLengthRpc
  10614. }
  10615. if (iNdEx + skippy) > l {
  10616. return io.ErrUnexpectedEOF
  10617. }
  10618. iNdEx += skippy
  10619. }
  10620. }
  10621. if iNdEx > l {
  10622. return io.ErrUnexpectedEOF
  10623. }
  10624. return nil
  10625. }
  10626. func (m *AuthDisableRequest) Unmarshal(data []byte) error {
  10627. l := len(data)
  10628. iNdEx := 0
  10629. for iNdEx < l {
  10630. preIndex := iNdEx
  10631. var wire uint64
  10632. for shift := uint(0); ; shift += 7 {
  10633. if shift >= 64 {
  10634. return ErrIntOverflowRpc
  10635. }
  10636. if iNdEx >= l {
  10637. return io.ErrUnexpectedEOF
  10638. }
  10639. b := data[iNdEx]
  10640. iNdEx++
  10641. wire |= (uint64(b) & 0x7F) << shift
  10642. if b < 0x80 {
  10643. break
  10644. }
  10645. }
  10646. fieldNum := int32(wire >> 3)
  10647. wireType := int(wire & 0x7)
  10648. if wireType == 4 {
  10649. return fmt.Errorf("proto: AuthDisableRequest: wiretype end group for non-group")
  10650. }
  10651. if fieldNum <= 0 {
  10652. return fmt.Errorf("proto: AuthDisableRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  10653. }
  10654. switch fieldNum {
  10655. default:
  10656. iNdEx = preIndex
  10657. skippy, err := skipRpc(data[iNdEx:])
  10658. if err != nil {
  10659. return err
  10660. }
  10661. if skippy < 0 {
  10662. return ErrInvalidLengthRpc
  10663. }
  10664. if (iNdEx + skippy) > l {
  10665. return io.ErrUnexpectedEOF
  10666. }
  10667. iNdEx += skippy
  10668. }
  10669. }
  10670. if iNdEx > l {
  10671. return io.ErrUnexpectedEOF
  10672. }
  10673. return nil
  10674. }
  10675. func (m *AuthenticateRequest) Unmarshal(data []byte) error {
  10676. l := len(data)
  10677. iNdEx := 0
  10678. for iNdEx < l {
  10679. preIndex := iNdEx
  10680. var wire uint64
  10681. for shift := uint(0); ; shift += 7 {
  10682. if shift >= 64 {
  10683. return ErrIntOverflowRpc
  10684. }
  10685. if iNdEx >= l {
  10686. return io.ErrUnexpectedEOF
  10687. }
  10688. b := data[iNdEx]
  10689. iNdEx++
  10690. wire |= (uint64(b) & 0x7F) << shift
  10691. if b < 0x80 {
  10692. break
  10693. }
  10694. }
  10695. fieldNum := int32(wire >> 3)
  10696. wireType := int(wire & 0x7)
  10697. if wireType == 4 {
  10698. return fmt.Errorf("proto: AuthenticateRequest: wiretype end group for non-group")
  10699. }
  10700. if fieldNum <= 0 {
  10701. return fmt.Errorf("proto: AuthenticateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  10702. }
  10703. switch fieldNum {
  10704. default:
  10705. iNdEx = preIndex
  10706. skippy, err := skipRpc(data[iNdEx:])
  10707. if err != nil {
  10708. return err
  10709. }
  10710. if skippy < 0 {
  10711. return ErrInvalidLengthRpc
  10712. }
  10713. if (iNdEx + skippy) > l {
  10714. return io.ErrUnexpectedEOF
  10715. }
  10716. iNdEx += skippy
  10717. }
  10718. }
  10719. if iNdEx > l {
  10720. return io.ErrUnexpectedEOF
  10721. }
  10722. return nil
  10723. }
  10724. func (m *AuthUserAddRequest) Unmarshal(data []byte) error {
  10725. l := len(data)
  10726. iNdEx := 0
  10727. for iNdEx < l {
  10728. preIndex := iNdEx
  10729. var wire uint64
  10730. for shift := uint(0); ; shift += 7 {
  10731. if shift >= 64 {
  10732. return ErrIntOverflowRpc
  10733. }
  10734. if iNdEx >= l {
  10735. return io.ErrUnexpectedEOF
  10736. }
  10737. b := data[iNdEx]
  10738. iNdEx++
  10739. wire |= (uint64(b) & 0x7F) << shift
  10740. if b < 0x80 {
  10741. break
  10742. }
  10743. }
  10744. fieldNum := int32(wire >> 3)
  10745. wireType := int(wire & 0x7)
  10746. if wireType == 4 {
  10747. return fmt.Errorf("proto: AuthUserAddRequest: wiretype end group for non-group")
  10748. }
  10749. if fieldNum <= 0 {
  10750. return fmt.Errorf("proto: AuthUserAddRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  10751. }
  10752. switch fieldNum {
  10753. case 1:
  10754. if wireType != 2 {
  10755. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  10756. }
  10757. var stringLen uint64
  10758. for shift := uint(0); ; shift += 7 {
  10759. if shift >= 64 {
  10760. return ErrIntOverflowRpc
  10761. }
  10762. if iNdEx >= l {
  10763. return io.ErrUnexpectedEOF
  10764. }
  10765. b := data[iNdEx]
  10766. iNdEx++
  10767. stringLen |= (uint64(b) & 0x7F) << shift
  10768. if b < 0x80 {
  10769. break
  10770. }
  10771. }
  10772. intStringLen := int(stringLen)
  10773. if intStringLen < 0 {
  10774. return ErrInvalidLengthRpc
  10775. }
  10776. postIndex := iNdEx + intStringLen
  10777. if postIndex > l {
  10778. return io.ErrUnexpectedEOF
  10779. }
  10780. m.Name = string(data[iNdEx:postIndex])
  10781. iNdEx = postIndex
  10782. case 2:
  10783. if wireType != 2 {
  10784. return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
  10785. }
  10786. var stringLen uint64
  10787. for shift := uint(0); ; shift += 7 {
  10788. if shift >= 64 {
  10789. return ErrIntOverflowRpc
  10790. }
  10791. if iNdEx >= l {
  10792. return io.ErrUnexpectedEOF
  10793. }
  10794. b := data[iNdEx]
  10795. iNdEx++
  10796. stringLen |= (uint64(b) & 0x7F) << shift
  10797. if b < 0x80 {
  10798. break
  10799. }
  10800. }
  10801. intStringLen := int(stringLen)
  10802. if intStringLen < 0 {
  10803. return ErrInvalidLengthRpc
  10804. }
  10805. postIndex := iNdEx + intStringLen
  10806. if postIndex > l {
  10807. return io.ErrUnexpectedEOF
  10808. }
  10809. m.Password = string(data[iNdEx:postIndex])
  10810. iNdEx = postIndex
  10811. default:
  10812. iNdEx = preIndex
  10813. skippy, err := skipRpc(data[iNdEx:])
  10814. if err != nil {
  10815. return err
  10816. }
  10817. if skippy < 0 {
  10818. return ErrInvalidLengthRpc
  10819. }
  10820. if (iNdEx + skippy) > l {
  10821. return io.ErrUnexpectedEOF
  10822. }
  10823. iNdEx += skippy
  10824. }
  10825. }
  10826. if iNdEx > l {
  10827. return io.ErrUnexpectedEOF
  10828. }
  10829. return nil
  10830. }
  10831. func (m *AuthUserGetRequest) Unmarshal(data []byte) error {
  10832. l := len(data)
  10833. iNdEx := 0
  10834. for iNdEx < l {
  10835. preIndex := iNdEx
  10836. var wire uint64
  10837. for shift := uint(0); ; shift += 7 {
  10838. if shift >= 64 {
  10839. return ErrIntOverflowRpc
  10840. }
  10841. if iNdEx >= l {
  10842. return io.ErrUnexpectedEOF
  10843. }
  10844. b := data[iNdEx]
  10845. iNdEx++
  10846. wire |= (uint64(b) & 0x7F) << shift
  10847. if b < 0x80 {
  10848. break
  10849. }
  10850. }
  10851. fieldNum := int32(wire >> 3)
  10852. wireType := int(wire & 0x7)
  10853. if wireType == 4 {
  10854. return fmt.Errorf("proto: AuthUserGetRequest: wiretype end group for non-group")
  10855. }
  10856. if fieldNum <= 0 {
  10857. return fmt.Errorf("proto: AuthUserGetRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  10858. }
  10859. switch fieldNum {
  10860. default:
  10861. iNdEx = preIndex
  10862. skippy, err := skipRpc(data[iNdEx:])
  10863. if err != nil {
  10864. return err
  10865. }
  10866. if skippy < 0 {
  10867. return ErrInvalidLengthRpc
  10868. }
  10869. if (iNdEx + skippy) > l {
  10870. return io.ErrUnexpectedEOF
  10871. }
  10872. iNdEx += skippy
  10873. }
  10874. }
  10875. if iNdEx > l {
  10876. return io.ErrUnexpectedEOF
  10877. }
  10878. return nil
  10879. }
  10880. func (m *AuthUserDeleteRequest) Unmarshal(data []byte) error {
  10881. l := len(data)
  10882. iNdEx := 0
  10883. for iNdEx < l {
  10884. preIndex := iNdEx
  10885. var wire uint64
  10886. for shift := uint(0); ; shift += 7 {
  10887. if shift >= 64 {
  10888. return ErrIntOverflowRpc
  10889. }
  10890. if iNdEx >= l {
  10891. return io.ErrUnexpectedEOF
  10892. }
  10893. b := data[iNdEx]
  10894. iNdEx++
  10895. wire |= (uint64(b) & 0x7F) << shift
  10896. if b < 0x80 {
  10897. break
  10898. }
  10899. }
  10900. fieldNum := int32(wire >> 3)
  10901. wireType := int(wire & 0x7)
  10902. if wireType == 4 {
  10903. return fmt.Errorf("proto: AuthUserDeleteRequest: wiretype end group for non-group")
  10904. }
  10905. if fieldNum <= 0 {
  10906. return fmt.Errorf("proto: AuthUserDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  10907. }
  10908. switch fieldNum {
  10909. case 1:
  10910. if wireType != 2 {
  10911. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  10912. }
  10913. var stringLen uint64
  10914. for shift := uint(0); ; shift += 7 {
  10915. if shift >= 64 {
  10916. return ErrIntOverflowRpc
  10917. }
  10918. if iNdEx >= l {
  10919. return io.ErrUnexpectedEOF
  10920. }
  10921. b := data[iNdEx]
  10922. iNdEx++
  10923. stringLen |= (uint64(b) & 0x7F) << shift
  10924. if b < 0x80 {
  10925. break
  10926. }
  10927. }
  10928. intStringLen := int(stringLen)
  10929. if intStringLen < 0 {
  10930. return ErrInvalidLengthRpc
  10931. }
  10932. postIndex := iNdEx + intStringLen
  10933. if postIndex > l {
  10934. return io.ErrUnexpectedEOF
  10935. }
  10936. m.Name = string(data[iNdEx:postIndex])
  10937. iNdEx = postIndex
  10938. default:
  10939. iNdEx = preIndex
  10940. skippy, err := skipRpc(data[iNdEx:])
  10941. if err != nil {
  10942. return err
  10943. }
  10944. if skippy < 0 {
  10945. return ErrInvalidLengthRpc
  10946. }
  10947. if (iNdEx + skippy) > l {
  10948. return io.ErrUnexpectedEOF
  10949. }
  10950. iNdEx += skippy
  10951. }
  10952. }
  10953. if iNdEx > l {
  10954. return io.ErrUnexpectedEOF
  10955. }
  10956. return nil
  10957. }
  10958. func (m *AuthUserChangePasswordRequest) Unmarshal(data []byte) error {
  10959. l := len(data)
  10960. iNdEx := 0
  10961. for iNdEx < l {
  10962. preIndex := iNdEx
  10963. var wire uint64
  10964. for shift := uint(0); ; shift += 7 {
  10965. if shift >= 64 {
  10966. return ErrIntOverflowRpc
  10967. }
  10968. if iNdEx >= l {
  10969. return io.ErrUnexpectedEOF
  10970. }
  10971. b := data[iNdEx]
  10972. iNdEx++
  10973. wire |= (uint64(b) & 0x7F) << shift
  10974. if b < 0x80 {
  10975. break
  10976. }
  10977. }
  10978. fieldNum := int32(wire >> 3)
  10979. wireType := int(wire & 0x7)
  10980. if wireType == 4 {
  10981. return fmt.Errorf("proto: AuthUserChangePasswordRequest: wiretype end group for non-group")
  10982. }
  10983. if fieldNum <= 0 {
  10984. return fmt.Errorf("proto: AuthUserChangePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  10985. }
  10986. switch fieldNum {
  10987. case 1:
  10988. if wireType != 2 {
  10989. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  10990. }
  10991. var stringLen uint64
  10992. for shift := uint(0); ; shift += 7 {
  10993. if shift >= 64 {
  10994. return ErrIntOverflowRpc
  10995. }
  10996. if iNdEx >= l {
  10997. return io.ErrUnexpectedEOF
  10998. }
  10999. b := data[iNdEx]
  11000. iNdEx++
  11001. stringLen |= (uint64(b) & 0x7F) << shift
  11002. if b < 0x80 {
  11003. break
  11004. }
  11005. }
  11006. intStringLen := int(stringLen)
  11007. if intStringLen < 0 {
  11008. return ErrInvalidLengthRpc
  11009. }
  11010. postIndex := iNdEx + intStringLen
  11011. if postIndex > l {
  11012. return io.ErrUnexpectedEOF
  11013. }
  11014. m.Name = string(data[iNdEx:postIndex])
  11015. iNdEx = postIndex
  11016. case 2:
  11017. if wireType != 2 {
  11018. return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
  11019. }
  11020. var stringLen uint64
  11021. for shift := uint(0); ; shift += 7 {
  11022. if shift >= 64 {
  11023. return ErrIntOverflowRpc
  11024. }
  11025. if iNdEx >= l {
  11026. return io.ErrUnexpectedEOF
  11027. }
  11028. b := data[iNdEx]
  11029. iNdEx++
  11030. stringLen |= (uint64(b) & 0x7F) << shift
  11031. if b < 0x80 {
  11032. break
  11033. }
  11034. }
  11035. intStringLen := int(stringLen)
  11036. if intStringLen < 0 {
  11037. return ErrInvalidLengthRpc
  11038. }
  11039. postIndex := iNdEx + intStringLen
  11040. if postIndex > l {
  11041. return io.ErrUnexpectedEOF
  11042. }
  11043. m.Password = string(data[iNdEx:postIndex])
  11044. iNdEx = postIndex
  11045. default:
  11046. iNdEx = preIndex
  11047. skippy, err := skipRpc(data[iNdEx:])
  11048. if err != nil {
  11049. return err
  11050. }
  11051. if skippy < 0 {
  11052. return ErrInvalidLengthRpc
  11053. }
  11054. if (iNdEx + skippy) > l {
  11055. return io.ErrUnexpectedEOF
  11056. }
  11057. iNdEx += skippy
  11058. }
  11059. }
  11060. if iNdEx > l {
  11061. return io.ErrUnexpectedEOF
  11062. }
  11063. return nil
  11064. }
  11065. func (m *AuthUserGrantRequest) Unmarshal(data []byte) error {
  11066. l := len(data)
  11067. iNdEx := 0
  11068. for iNdEx < l {
  11069. preIndex := iNdEx
  11070. var wire uint64
  11071. for shift := uint(0); ; shift += 7 {
  11072. if shift >= 64 {
  11073. return ErrIntOverflowRpc
  11074. }
  11075. if iNdEx >= l {
  11076. return io.ErrUnexpectedEOF
  11077. }
  11078. b := data[iNdEx]
  11079. iNdEx++
  11080. wire |= (uint64(b) & 0x7F) << shift
  11081. if b < 0x80 {
  11082. break
  11083. }
  11084. }
  11085. fieldNum := int32(wire >> 3)
  11086. wireType := int(wire & 0x7)
  11087. if wireType == 4 {
  11088. return fmt.Errorf("proto: AuthUserGrantRequest: wiretype end group for non-group")
  11089. }
  11090. if fieldNum <= 0 {
  11091. return fmt.Errorf("proto: AuthUserGrantRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  11092. }
  11093. switch fieldNum {
  11094. case 1:
  11095. if wireType != 2 {
  11096. return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
  11097. }
  11098. var stringLen uint64
  11099. for shift := uint(0); ; shift += 7 {
  11100. if shift >= 64 {
  11101. return ErrIntOverflowRpc
  11102. }
  11103. if iNdEx >= l {
  11104. return io.ErrUnexpectedEOF
  11105. }
  11106. b := data[iNdEx]
  11107. iNdEx++
  11108. stringLen |= (uint64(b) & 0x7F) << shift
  11109. if b < 0x80 {
  11110. break
  11111. }
  11112. }
  11113. intStringLen := int(stringLen)
  11114. if intStringLen < 0 {
  11115. return ErrInvalidLengthRpc
  11116. }
  11117. postIndex := iNdEx + intStringLen
  11118. if postIndex > l {
  11119. return io.ErrUnexpectedEOF
  11120. }
  11121. m.User = string(data[iNdEx:postIndex])
  11122. iNdEx = postIndex
  11123. case 2:
  11124. if wireType != 2 {
  11125. return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
  11126. }
  11127. var stringLen uint64
  11128. for shift := uint(0); ; shift += 7 {
  11129. if shift >= 64 {
  11130. return ErrIntOverflowRpc
  11131. }
  11132. if iNdEx >= l {
  11133. return io.ErrUnexpectedEOF
  11134. }
  11135. b := data[iNdEx]
  11136. iNdEx++
  11137. stringLen |= (uint64(b) & 0x7F) << shift
  11138. if b < 0x80 {
  11139. break
  11140. }
  11141. }
  11142. intStringLen := int(stringLen)
  11143. if intStringLen < 0 {
  11144. return ErrInvalidLengthRpc
  11145. }
  11146. postIndex := iNdEx + intStringLen
  11147. if postIndex > l {
  11148. return io.ErrUnexpectedEOF
  11149. }
  11150. m.Role = string(data[iNdEx:postIndex])
  11151. iNdEx = postIndex
  11152. default:
  11153. iNdEx = preIndex
  11154. skippy, err := skipRpc(data[iNdEx:])
  11155. if err != nil {
  11156. return err
  11157. }
  11158. if skippy < 0 {
  11159. return ErrInvalidLengthRpc
  11160. }
  11161. if (iNdEx + skippy) > l {
  11162. return io.ErrUnexpectedEOF
  11163. }
  11164. iNdEx += skippy
  11165. }
  11166. }
  11167. if iNdEx > l {
  11168. return io.ErrUnexpectedEOF
  11169. }
  11170. return nil
  11171. }
  11172. func (m *AuthUserRevokeRequest) Unmarshal(data []byte) error {
  11173. l := len(data)
  11174. iNdEx := 0
  11175. for iNdEx < l {
  11176. preIndex := iNdEx
  11177. var wire uint64
  11178. for shift := uint(0); ; shift += 7 {
  11179. if shift >= 64 {
  11180. return ErrIntOverflowRpc
  11181. }
  11182. if iNdEx >= l {
  11183. return io.ErrUnexpectedEOF
  11184. }
  11185. b := data[iNdEx]
  11186. iNdEx++
  11187. wire |= (uint64(b) & 0x7F) << shift
  11188. if b < 0x80 {
  11189. break
  11190. }
  11191. }
  11192. fieldNum := int32(wire >> 3)
  11193. wireType := int(wire & 0x7)
  11194. if wireType == 4 {
  11195. return fmt.Errorf("proto: AuthUserRevokeRequest: wiretype end group for non-group")
  11196. }
  11197. if fieldNum <= 0 {
  11198. return fmt.Errorf("proto: AuthUserRevokeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  11199. }
  11200. switch fieldNum {
  11201. default:
  11202. iNdEx = preIndex
  11203. skippy, err := skipRpc(data[iNdEx:])
  11204. if err != nil {
  11205. return err
  11206. }
  11207. if skippy < 0 {
  11208. return ErrInvalidLengthRpc
  11209. }
  11210. if (iNdEx + skippy) > l {
  11211. return io.ErrUnexpectedEOF
  11212. }
  11213. iNdEx += skippy
  11214. }
  11215. }
  11216. if iNdEx > l {
  11217. return io.ErrUnexpectedEOF
  11218. }
  11219. return nil
  11220. }
  11221. func (m *AuthRoleAddRequest) Unmarshal(data []byte) error {
  11222. l := len(data)
  11223. iNdEx := 0
  11224. for iNdEx < l {
  11225. preIndex := iNdEx
  11226. var wire uint64
  11227. for shift := uint(0); ; shift += 7 {
  11228. if shift >= 64 {
  11229. return ErrIntOverflowRpc
  11230. }
  11231. if iNdEx >= l {
  11232. return io.ErrUnexpectedEOF
  11233. }
  11234. b := data[iNdEx]
  11235. iNdEx++
  11236. wire |= (uint64(b) & 0x7F) << shift
  11237. if b < 0x80 {
  11238. break
  11239. }
  11240. }
  11241. fieldNum := int32(wire >> 3)
  11242. wireType := int(wire & 0x7)
  11243. if wireType == 4 {
  11244. return fmt.Errorf("proto: AuthRoleAddRequest: wiretype end group for non-group")
  11245. }
  11246. if fieldNum <= 0 {
  11247. return fmt.Errorf("proto: AuthRoleAddRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  11248. }
  11249. switch fieldNum {
  11250. case 1:
  11251. if wireType != 2 {
  11252. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  11253. }
  11254. var stringLen uint64
  11255. for shift := uint(0); ; shift += 7 {
  11256. if shift >= 64 {
  11257. return ErrIntOverflowRpc
  11258. }
  11259. if iNdEx >= l {
  11260. return io.ErrUnexpectedEOF
  11261. }
  11262. b := data[iNdEx]
  11263. iNdEx++
  11264. stringLen |= (uint64(b) & 0x7F) << shift
  11265. if b < 0x80 {
  11266. break
  11267. }
  11268. }
  11269. intStringLen := int(stringLen)
  11270. if intStringLen < 0 {
  11271. return ErrInvalidLengthRpc
  11272. }
  11273. postIndex := iNdEx + intStringLen
  11274. if postIndex > l {
  11275. return io.ErrUnexpectedEOF
  11276. }
  11277. m.Name = string(data[iNdEx:postIndex])
  11278. iNdEx = postIndex
  11279. default:
  11280. iNdEx = preIndex
  11281. skippy, err := skipRpc(data[iNdEx:])
  11282. if err != nil {
  11283. return err
  11284. }
  11285. if skippy < 0 {
  11286. return ErrInvalidLengthRpc
  11287. }
  11288. if (iNdEx + skippy) > l {
  11289. return io.ErrUnexpectedEOF
  11290. }
  11291. iNdEx += skippy
  11292. }
  11293. }
  11294. if iNdEx > l {
  11295. return io.ErrUnexpectedEOF
  11296. }
  11297. return nil
  11298. }
  11299. func (m *AuthRoleGetRequest) Unmarshal(data []byte) error {
  11300. l := len(data)
  11301. iNdEx := 0
  11302. for iNdEx < l {
  11303. preIndex := iNdEx
  11304. var wire uint64
  11305. for shift := uint(0); ; shift += 7 {
  11306. if shift >= 64 {
  11307. return ErrIntOverflowRpc
  11308. }
  11309. if iNdEx >= l {
  11310. return io.ErrUnexpectedEOF
  11311. }
  11312. b := data[iNdEx]
  11313. iNdEx++
  11314. wire |= (uint64(b) & 0x7F) << shift
  11315. if b < 0x80 {
  11316. break
  11317. }
  11318. }
  11319. fieldNum := int32(wire >> 3)
  11320. wireType := int(wire & 0x7)
  11321. if wireType == 4 {
  11322. return fmt.Errorf("proto: AuthRoleGetRequest: wiretype end group for non-group")
  11323. }
  11324. if fieldNum <= 0 {
  11325. return fmt.Errorf("proto: AuthRoleGetRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  11326. }
  11327. switch fieldNum {
  11328. default:
  11329. iNdEx = preIndex
  11330. skippy, err := skipRpc(data[iNdEx:])
  11331. if err != nil {
  11332. return err
  11333. }
  11334. if skippy < 0 {
  11335. return ErrInvalidLengthRpc
  11336. }
  11337. if (iNdEx + skippy) > l {
  11338. return io.ErrUnexpectedEOF
  11339. }
  11340. iNdEx += skippy
  11341. }
  11342. }
  11343. if iNdEx > l {
  11344. return io.ErrUnexpectedEOF
  11345. }
  11346. return nil
  11347. }
  11348. func (m *AuthRoleDeleteRequest) Unmarshal(data []byte) error {
  11349. l := len(data)
  11350. iNdEx := 0
  11351. for iNdEx < l {
  11352. preIndex := iNdEx
  11353. var wire uint64
  11354. for shift := uint(0); ; shift += 7 {
  11355. if shift >= 64 {
  11356. return ErrIntOverflowRpc
  11357. }
  11358. if iNdEx >= l {
  11359. return io.ErrUnexpectedEOF
  11360. }
  11361. b := data[iNdEx]
  11362. iNdEx++
  11363. wire |= (uint64(b) & 0x7F) << shift
  11364. if b < 0x80 {
  11365. break
  11366. }
  11367. }
  11368. fieldNum := int32(wire >> 3)
  11369. wireType := int(wire & 0x7)
  11370. if wireType == 4 {
  11371. return fmt.Errorf("proto: AuthRoleDeleteRequest: wiretype end group for non-group")
  11372. }
  11373. if fieldNum <= 0 {
  11374. return fmt.Errorf("proto: AuthRoleDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  11375. }
  11376. switch fieldNum {
  11377. default:
  11378. iNdEx = preIndex
  11379. skippy, err := skipRpc(data[iNdEx:])
  11380. if err != nil {
  11381. return err
  11382. }
  11383. if skippy < 0 {
  11384. return ErrInvalidLengthRpc
  11385. }
  11386. if (iNdEx + skippy) > l {
  11387. return io.ErrUnexpectedEOF
  11388. }
  11389. iNdEx += skippy
  11390. }
  11391. }
  11392. if iNdEx > l {
  11393. return io.ErrUnexpectedEOF
  11394. }
  11395. return nil
  11396. }
  11397. func (m *AuthRoleGrantRequest) Unmarshal(data []byte) error {
  11398. l := len(data)
  11399. iNdEx := 0
  11400. for iNdEx < l {
  11401. preIndex := iNdEx
  11402. var wire uint64
  11403. for shift := uint(0); ; shift += 7 {
  11404. if shift >= 64 {
  11405. return ErrIntOverflowRpc
  11406. }
  11407. if iNdEx >= l {
  11408. return io.ErrUnexpectedEOF
  11409. }
  11410. b := data[iNdEx]
  11411. iNdEx++
  11412. wire |= (uint64(b) & 0x7F) << shift
  11413. if b < 0x80 {
  11414. break
  11415. }
  11416. }
  11417. fieldNum := int32(wire >> 3)
  11418. wireType := int(wire & 0x7)
  11419. if wireType == 4 {
  11420. return fmt.Errorf("proto: AuthRoleGrantRequest: wiretype end group for non-group")
  11421. }
  11422. if fieldNum <= 0 {
  11423. return fmt.Errorf("proto: AuthRoleGrantRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  11424. }
  11425. switch fieldNum {
  11426. case 1:
  11427. if wireType != 2 {
  11428. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  11429. }
  11430. var stringLen uint64
  11431. for shift := uint(0); ; shift += 7 {
  11432. if shift >= 64 {
  11433. return ErrIntOverflowRpc
  11434. }
  11435. if iNdEx >= l {
  11436. return io.ErrUnexpectedEOF
  11437. }
  11438. b := data[iNdEx]
  11439. iNdEx++
  11440. stringLen |= (uint64(b) & 0x7F) << shift
  11441. if b < 0x80 {
  11442. break
  11443. }
  11444. }
  11445. intStringLen := int(stringLen)
  11446. if intStringLen < 0 {
  11447. return ErrInvalidLengthRpc
  11448. }
  11449. postIndex := iNdEx + intStringLen
  11450. if postIndex > l {
  11451. return io.ErrUnexpectedEOF
  11452. }
  11453. m.Name = string(data[iNdEx:postIndex])
  11454. iNdEx = postIndex
  11455. case 2:
  11456. if wireType != 2 {
  11457. return fmt.Errorf("proto: wrong wireType = %d for field Perm", wireType)
  11458. }
  11459. var msglen int
  11460. for shift := uint(0); ; shift += 7 {
  11461. if shift >= 64 {
  11462. return ErrIntOverflowRpc
  11463. }
  11464. if iNdEx >= l {
  11465. return io.ErrUnexpectedEOF
  11466. }
  11467. b := data[iNdEx]
  11468. iNdEx++
  11469. msglen |= (int(b) & 0x7F) << shift
  11470. if b < 0x80 {
  11471. break
  11472. }
  11473. }
  11474. if msglen < 0 {
  11475. return ErrInvalidLengthRpc
  11476. }
  11477. postIndex := iNdEx + msglen
  11478. if postIndex > l {
  11479. return io.ErrUnexpectedEOF
  11480. }
  11481. if m.Perm == nil {
  11482. m.Perm = &authpb.Permission{}
  11483. }
  11484. if err := m.Perm.Unmarshal(data[iNdEx:postIndex]); err != nil {
  11485. return err
  11486. }
  11487. iNdEx = postIndex
  11488. default:
  11489. iNdEx = preIndex
  11490. skippy, err := skipRpc(data[iNdEx:])
  11491. if err != nil {
  11492. return err
  11493. }
  11494. if skippy < 0 {
  11495. return ErrInvalidLengthRpc
  11496. }
  11497. if (iNdEx + skippy) > l {
  11498. return io.ErrUnexpectedEOF
  11499. }
  11500. iNdEx += skippy
  11501. }
  11502. }
  11503. if iNdEx > l {
  11504. return io.ErrUnexpectedEOF
  11505. }
  11506. return nil
  11507. }
  11508. func (m *AuthRoleRevokeRequest) Unmarshal(data []byte) error {
  11509. l := len(data)
  11510. iNdEx := 0
  11511. for iNdEx < l {
  11512. preIndex := iNdEx
  11513. var wire uint64
  11514. for shift := uint(0); ; shift += 7 {
  11515. if shift >= 64 {
  11516. return ErrIntOverflowRpc
  11517. }
  11518. if iNdEx >= l {
  11519. return io.ErrUnexpectedEOF
  11520. }
  11521. b := data[iNdEx]
  11522. iNdEx++
  11523. wire |= (uint64(b) & 0x7F) << shift
  11524. if b < 0x80 {
  11525. break
  11526. }
  11527. }
  11528. fieldNum := int32(wire >> 3)
  11529. wireType := int(wire & 0x7)
  11530. if wireType == 4 {
  11531. return fmt.Errorf("proto: AuthRoleRevokeRequest: wiretype end group for non-group")
  11532. }
  11533. if fieldNum <= 0 {
  11534. return fmt.Errorf("proto: AuthRoleRevokeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  11535. }
  11536. switch fieldNum {
  11537. default:
  11538. iNdEx = preIndex
  11539. skippy, err := skipRpc(data[iNdEx:])
  11540. if err != nil {
  11541. return err
  11542. }
  11543. if skippy < 0 {
  11544. return ErrInvalidLengthRpc
  11545. }
  11546. if (iNdEx + skippy) > l {
  11547. return io.ErrUnexpectedEOF
  11548. }
  11549. iNdEx += skippy
  11550. }
  11551. }
  11552. if iNdEx > l {
  11553. return io.ErrUnexpectedEOF
  11554. }
  11555. return nil
  11556. }
  11557. func (m *AuthEnableResponse) Unmarshal(data []byte) error {
  11558. l := len(data)
  11559. iNdEx := 0
  11560. for iNdEx < l {
  11561. preIndex := iNdEx
  11562. var wire uint64
  11563. for shift := uint(0); ; shift += 7 {
  11564. if shift >= 64 {
  11565. return ErrIntOverflowRpc
  11566. }
  11567. if iNdEx >= l {
  11568. return io.ErrUnexpectedEOF
  11569. }
  11570. b := data[iNdEx]
  11571. iNdEx++
  11572. wire |= (uint64(b) & 0x7F) << shift
  11573. if b < 0x80 {
  11574. break
  11575. }
  11576. }
  11577. fieldNum := int32(wire >> 3)
  11578. wireType := int(wire & 0x7)
  11579. if wireType == 4 {
  11580. return fmt.Errorf("proto: AuthEnableResponse: wiretype end group for non-group")
  11581. }
  11582. if fieldNum <= 0 {
  11583. return fmt.Errorf("proto: AuthEnableResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  11584. }
  11585. switch fieldNum {
  11586. case 1:
  11587. if wireType != 2 {
  11588. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  11589. }
  11590. var msglen int
  11591. for shift := uint(0); ; shift += 7 {
  11592. if shift >= 64 {
  11593. return ErrIntOverflowRpc
  11594. }
  11595. if iNdEx >= l {
  11596. return io.ErrUnexpectedEOF
  11597. }
  11598. b := data[iNdEx]
  11599. iNdEx++
  11600. msglen |= (int(b) & 0x7F) << shift
  11601. if b < 0x80 {
  11602. break
  11603. }
  11604. }
  11605. if msglen < 0 {
  11606. return ErrInvalidLengthRpc
  11607. }
  11608. postIndex := iNdEx + msglen
  11609. if postIndex > l {
  11610. return io.ErrUnexpectedEOF
  11611. }
  11612. if m.Header == nil {
  11613. m.Header = &ResponseHeader{}
  11614. }
  11615. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  11616. return err
  11617. }
  11618. iNdEx = postIndex
  11619. default:
  11620. iNdEx = preIndex
  11621. skippy, err := skipRpc(data[iNdEx:])
  11622. if err != nil {
  11623. return err
  11624. }
  11625. if skippy < 0 {
  11626. return ErrInvalidLengthRpc
  11627. }
  11628. if (iNdEx + skippy) > l {
  11629. return io.ErrUnexpectedEOF
  11630. }
  11631. iNdEx += skippy
  11632. }
  11633. }
  11634. if iNdEx > l {
  11635. return io.ErrUnexpectedEOF
  11636. }
  11637. return nil
  11638. }
  11639. func (m *AuthDisableResponse) Unmarshal(data []byte) error {
  11640. l := len(data)
  11641. iNdEx := 0
  11642. for iNdEx < l {
  11643. preIndex := iNdEx
  11644. var wire uint64
  11645. for shift := uint(0); ; shift += 7 {
  11646. if shift >= 64 {
  11647. return ErrIntOverflowRpc
  11648. }
  11649. if iNdEx >= l {
  11650. return io.ErrUnexpectedEOF
  11651. }
  11652. b := data[iNdEx]
  11653. iNdEx++
  11654. wire |= (uint64(b) & 0x7F) << shift
  11655. if b < 0x80 {
  11656. break
  11657. }
  11658. }
  11659. fieldNum := int32(wire >> 3)
  11660. wireType := int(wire & 0x7)
  11661. if wireType == 4 {
  11662. return fmt.Errorf("proto: AuthDisableResponse: wiretype end group for non-group")
  11663. }
  11664. if fieldNum <= 0 {
  11665. return fmt.Errorf("proto: AuthDisableResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  11666. }
  11667. switch fieldNum {
  11668. case 1:
  11669. if wireType != 2 {
  11670. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  11671. }
  11672. var msglen int
  11673. for shift := uint(0); ; shift += 7 {
  11674. if shift >= 64 {
  11675. return ErrIntOverflowRpc
  11676. }
  11677. if iNdEx >= l {
  11678. return io.ErrUnexpectedEOF
  11679. }
  11680. b := data[iNdEx]
  11681. iNdEx++
  11682. msglen |= (int(b) & 0x7F) << shift
  11683. if b < 0x80 {
  11684. break
  11685. }
  11686. }
  11687. if msglen < 0 {
  11688. return ErrInvalidLengthRpc
  11689. }
  11690. postIndex := iNdEx + msglen
  11691. if postIndex > l {
  11692. return io.ErrUnexpectedEOF
  11693. }
  11694. if m.Header == nil {
  11695. m.Header = &ResponseHeader{}
  11696. }
  11697. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  11698. return err
  11699. }
  11700. iNdEx = postIndex
  11701. default:
  11702. iNdEx = preIndex
  11703. skippy, err := skipRpc(data[iNdEx:])
  11704. if err != nil {
  11705. return err
  11706. }
  11707. if skippy < 0 {
  11708. return ErrInvalidLengthRpc
  11709. }
  11710. if (iNdEx + skippy) > l {
  11711. return io.ErrUnexpectedEOF
  11712. }
  11713. iNdEx += skippy
  11714. }
  11715. }
  11716. if iNdEx > l {
  11717. return io.ErrUnexpectedEOF
  11718. }
  11719. return nil
  11720. }
  11721. func (m *AuthenticateResponse) Unmarshal(data []byte) error {
  11722. l := len(data)
  11723. iNdEx := 0
  11724. for iNdEx < l {
  11725. preIndex := iNdEx
  11726. var wire uint64
  11727. for shift := uint(0); ; shift += 7 {
  11728. if shift >= 64 {
  11729. return ErrIntOverflowRpc
  11730. }
  11731. if iNdEx >= l {
  11732. return io.ErrUnexpectedEOF
  11733. }
  11734. b := data[iNdEx]
  11735. iNdEx++
  11736. wire |= (uint64(b) & 0x7F) << shift
  11737. if b < 0x80 {
  11738. break
  11739. }
  11740. }
  11741. fieldNum := int32(wire >> 3)
  11742. wireType := int(wire & 0x7)
  11743. if wireType == 4 {
  11744. return fmt.Errorf("proto: AuthenticateResponse: wiretype end group for non-group")
  11745. }
  11746. if fieldNum <= 0 {
  11747. return fmt.Errorf("proto: AuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  11748. }
  11749. switch fieldNum {
  11750. case 1:
  11751. if wireType != 2 {
  11752. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  11753. }
  11754. var msglen int
  11755. for shift := uint(0); ; shift += 7 {
  11756. if shift >= 64 {
  11757. return ErrIntOverflowRpc
  11758. }
  11759. if iNdEx >= l {
  11760. return io.ErrUnexpectedEOF
  11761. }
  11762. b := data[iNdEx]
  11763. iNdEx++
  11764. msglen |= (int(b) & 0x7F) << shift
  11765. if b < 0x80 {
  11766. break
  11767. }
  11768. }
  11769. if msglen < 0 {
  11770. return ErrInvalidLengthRpc
  11771. }
  11772. postIndex := iNdEx + msglen
  11773. if postIndex > l {
  11774. return io.ErrUnexpectedEOF
  11775. }
  11776. if m.Header == nil {
  11777. m.Header = &ResponseHeader{}
  11778. }
  11779. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  11780. return err
  11781. }
  11782. iNdEx = postIndex
  11783. default:
  11784. iNdEx = preIndex
  11785. skippy, err := skipRpc(data[iNdEx:])
  11786. if err != nil {
  11787. return err
  11788. }
  11789. if skippy < 0 {
  11790. return ErrInvalidLengthRpc
  11791. }
  11792. if (iNdEx + skippy) > l {
  11793. return io.ErrUnexpectedEOF
  11794. }
  11795. iNdEx += skippy
  11796. }
  11797. }
  11798. if iNdEx > l {
  11799. return io.ErrUnexpectedEOF
  11800. }
  11801. return nil
  11802. }
  11803. func (m *AuthUserAddResponse) Unmarshal(data []byte) error {
  11804. l := len(data)
  11805. iNdEx := 0
  11806. for iNdEx < l {
  11807. preIndex := iNdEx
  11808. var wire uint64
  11809. for shift := uint(0); ; shift += 7 {
  11810. if shift >= 64 {
  11811. return ErrIntOverflowRpc
  11812. }
  11813. if iNdEx >= l {
  11814. return io.ErrUnexpectedEOF
  11815. }
  11816. b := data[iNdEx]
  11817. iNdEx++
  11818. wire |= (uint64(b) & 0x7F) << shift
  11819. if b < 0x80 {
  11820. break
  11821. }
  11822. }
  11823. fieldNum := int32(wire >> 3)
  11824. wireType := int(wire & 0x7)
  11825. if wireType == 4 {
  11826. return fmt.Errorf("proto: AuthUserAddResponse: wiretype end group for non-group")
  11827. }
  11828. if fieldNum <= 0 {
  11829. return fmt.Errorf("proto: AuthUserAddResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  11830. }
  11831. switch fieldNum {
  11832. case 1:
  11833. if wireType != 2 {
  11834. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  11835. }
  11836. var msglen int
  11837. for shift := uint(0); ; shift += 7 {
  11838. if shift >= 64 {
  11839. return ErrIntOverflowRpc
  11840. }
  11841. if iNdEx >= l {
  11842. return io.ErrUnexpectedEOF
  11843. }
  11844. b := data[iNdEx]
  11845. iNdEx++
  11846. msglen |= (int(b) & 0x7F) << shift
  11847. if b < 0x80 {
  11848. break
  11849. }
  11850. }
  11851. if msglen < 0 {
  11852. return ErrInvalidLengthRpc
  11853. }
  11854. postIndex := iNdEx + msglen
  11855. if postIndex > l {
  11856. return io.ErrUnexpectedEOF
  11857. }
  11858. if m.Header == nil {
  11859. m.Header = &ResponseHeader{}
  11860. }
  11861. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  11862. return err
  11863. }
  11864. iNdEx = postIndex
  11865. default:
  11866. iNdEx = preIndex
  11867. skippy, err := skipRpc(data[iNdEx:])
  11868. if err != nil {
  11869. return err
  11870. }
  11871. if skippy < 0 {
  11872. return ErrInvalidLengthRpc
  11873. }
  11874. if (iNdEx + skippy) > l {
  11875. return io.ErrUnexpectedEOF
  11876. }
  11877. iNdEx += skippy
  11878. }
  11879. }
  11880. if iNdEx > l {
  11881. return io.ErrUnexpectedEOF
  11882. }
  11883. return nil
  11884. }
  11885. func (m *AuthUserGetResponse) Unmarshal(data []byte) error {
  11886. l := len(data)
  11887. iNdEx := 0
  11888. for iNdEx < l {
  11889. preIndex := iNdEx
  11890. var wire uint64
  11891. for shift := uint(0); ; shift += 7 {
  11892. if shift >= 64 {
  11893. return ErrIntOverflowRpc
  11894. }
  11895. if iNdEx >= l {
  11896. return io.ErrUnexpectedEOF
  11897. }
  11898. b := data[iNdEx]
  11899. iNdEx++
  11900. wire |= (uint64(b) & 0x7F) << shift
  11901. if b < 0x80 {
  11902. break
  11903. }
  11904. }
  11905. fieldNum := int32(wire >> 3)
  11906. wireType := int(wire & 0x7)
  11907. if wireType == 4 {
  11908. return fmt.Errorf("proto: AuthUserGetResponse: wiretype end group for non-group")
  11909. }
  11910. if fieldNum <= 0 {
  11911. return fmt.Errorf("proto: AuthUserGetResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  11912. }
  11913. switch fieldNum {
  11914. case 1:
  11915. if wireType != 2 {
  11916. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  11917. }
  11918. var msglen int
  11919. for shift := uint(0); ; shift += 7 {
  11920. if shift >= 64 {
  11921. return ErrIntOverflowRpc
  11922. }
  11923. if iNdEx >= l {
  11924. return io.ErrUnexpectedEOF
  11925. }
  11926. b := data[iNdEx]
  11927. iNdEx++
  11928. msglen |= (int(b) & 0x7F) << shift
  11929. if b < 0x80 {
  11930. break
  11931. }
  11932. }
  11933. if msglen < 0 {
  11934. return ErrInvalidLengthRpc
  11935. }
  11936. postIndex := iNdEx + msglen
  11937. if postIndex > l {
  11938. return io.ErrUnexpectedEOF
  11939. }
  11940. if m.Header == nil {
  11941. m.Header = &ResponseHeader{}
  11942. }
  11943. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  11944. return err
  11945. }
  11946. iNdEx = postIndex
  11947. default:
  11948. iNdEx = preIndex
  11949. skippy, err := skipRpc(data[iNdEx:])
  11950. if err != nil {
  11951. return err
  11952. }
  11953. if skippy < 0 {
  11954. return ErrInvalidLengthRpc
  11955. }
  11956. if (iNdEx + skippy) > l {
  11957. return io.ErrUnexpectedEOF
  11958. }
  11959. iNdEx += skippy
  11960. }
  11961. }
  11962. if iNdEx > l {
  11963. return io.ErrUnexpectedEOF
  11964. }
  11965. return nil
  11966. }
  11967. func (m *AuthUserDeleteResponse) Unmarshal(data []byte) error {
  11968. l := len(data)
  11969. iNdEx := 0
  11970. for iNdEx < l {
  11971. preIndex := iNdEx
  11972. var wire uint64
  11973. for shift := uint(0); ; shift += 7 {
  11974. if shift >= 64 {
  11975. return ErrIntOverflowRpc
  11976. }
  11977. if iNdEx >= l {
  11978. return io.ErrUnexpectedEOF
  11979. }
  11980. b := data[iNdEx]
  11981. iNdEx++
  11982. wire |= (uint64(b) & 0x7F) << shift
  11983. if b < 0x80 {
  11984. break
  11985. }
  11986. }
  11987. fieldNum := int32(wire >> 3)
  11988. wireType := int(wire & 0x7)
  11989. if wireType == 4 {
  11990. return fmt.Errorf("proto: AuthUserDeleteResponse: wiretype end group for non-group")
  11991. }
  11992. if fieldNum <= 0 {
  11993. return fmt.Errorf("proto: AuthUserDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  11994. }
  11995. switch fieldNum {
  11996. case 1:
  11997. if wireType != 2 {
  11998. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  11999. }
  12000. var msglen int
  12001. for shift := uint(0); ; shift += 7 {
  12002. if shift >= 64 {
  12003. return ErrIntOverflowRpc
  12004. }
  12005. if iNdEx >= l {
  12006. return io.ErrUnexpectedEOF
  12007. }
  12008. b := data[iNdEx]
  12009. iNdEx++
  12010. msglen |= (int(b) & 0x7F) << shift
  12011. if b < 0x80 {
  12012. break
  12013. }
  12014. }
  12015. if msglen < 0 {
  12016. return ErrInvalidLengthRpc
  12017. }
  12018. postIndex := iNdEx + msglen
  12019. if postIndex > l {
  12020. return io.ErrUnexpectedEOF
  12021. }
  12022. if m.Header == nil {
  12023. m.Header = &ResponseHeader{}
  12024. }
  12025. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  12026. return err
  12027. }
  12028. iNdEx = postIndex
  12029. default:
  12030. iNdEx = preIndex
  12031. skippy, err := skipRpc(data[iNdEx:])
  12032. if err != nil {
  12033. return err
  12034. }
  12035. if skippy < 0 {
  12036. return ErrInvalidLengthRpc
  12037. }
  12038. if (iNdEx + skippy) > l {
  12039. return io.ErrUnexpectedEOF
  12040. }
  12041. iNdEx += skippy
  12042. }
  12043. }
  12044. if iNdEx > l {
  12045. return io.ErrUnexpectedEOF
  12046. }
  12047. return nil
  12048. }
  12049. func (m *AuthUserChangePasswordResponse) Unmarshal(data []byte) error {
  12050. l := len(data)
  12051. iNdEx := 0
  12052. for iNdEx < l {
  12053. preIndex := iNdEx
  12054. var wire uint64
  12055. for shift := uint(0); ; shift += 7 {
  12056. if shift >= 64 {
  12057. return ErrIntOverflowRpc
  12058. }
  12059. if iNdEx >= l {
  12060. return io.ErrUnexpectedEOF
  12061. }
  12062. b := data[iNdEx]
  12063. iNdEx++
  12064. wire |= (uint64(b) & 0x7F) << shift
  12065. if b < 0x80 {
  12066. break
  12067. }
  12068. }
  12069. fieldNum := int32(wire >> 3)
  12070. wireType := int(wire & 0x7)
  12071. if wireType == 4 {
  12072. return fmt.Errorf("proto: AuthUserChangePasswordResponse: wiretype end group for non-group")
  12073. }
  12074. if fieldNum <= 0 {
  12075. return fmt.Errorf("proto: AuthUserChangePasswordResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  12076. }
  12077. switch fieldNum {
  12078. case 1:
  12079. if wireType != 2 {
  12080. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  12081. }
  12082. var msglen int
  12083. for shift := uint(0); ; shift += 7 {
  12084. if shift >= 64 {
  12085. return ErrIntOverflowRpc
  12086. }
  12087. if iNdEx >= l {
  12088. return io.ErrUnexpectedEOF
  12089. }
  12090. b := data[iNdEx]
  12091. iNdEx++
  12092. msglen |= (int(b) & 0x7F) << shift
  12093. if b < 0x80 {
  12094. break
  12095. }
  12096. }
  12097. if msglen < 0 {
  12098. return ErrInvalidLengthRpc
  12099. }
  12100. postIndex := iNdEx + msglen
  12101. if postIndex > l {
  12102. return io.ErrUnexpectedEOF
  12103. }
  12104. if m.Header == nil {
  12105. m.Header = &ResponseHeader{}
  12106. }
  12107. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  12108. return err
  12109. }
  12110. iNdEx = postIndex
  12111. default:
  12112. iNdEx = preIndex
  12113. skippy, err := skipRpc(data[iNdEx:])
  12114. if err != nil {
  12115. return err
  12116. }
  12117. if skippy < 0 {
  12118. return ErrInvalidLengthRpc
  12119. }
  12120. if (iNdEx + skippy) > l {
  12121. return io.ErrUnexpectedEOF
  12122. }
  12123. iNdEx += skippy
  12124. }
  12125. }
  12126. if iNdEx > l {
  12127. return io.ErrUnexpectedEOF
  12128. }
  12129. return nil
  12130. }
  12131. func (m *AuthUserGrantResponse) Unmarshal(data []byte) error {
  12132. l := len(data)
  12133. iNdEx := 0
  12134. for iNdEx < l {
  12135. preIndex := iNdEx
  12136. var wire uint64
  12137. for shift := uint(0); ; shift += 7 {
  12138. if shift >= 64 {
  12139. return ErrIntOverflowRpc
  12140. }
  12141. if iNdEx >= l {
  12142. return io.ErrUnexpectedEOF
  12143. }
  12144. b := data[iNdEx]
  12145. iNdEx++
  12146. wire |= (uint64(b) & 0x7F) << shift
  12147. if b < 0x80 {
  12148. break
  12149. }
  12150. }
  12151. fieldNum := int32(wire >> 3)
  12152. wireType := int(wire & 0x7)
  12153. if wireType == 4 {
  12154. return fmt.Errorf("proto: AuthUserGrantResponse: wiretype end group for non-group")
  12155. }
  12156. if fieldNum <= 0 {
  12157. return fmt.Errorf("proto: AuthUserGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  12158. }
  12159. switch fieldNum {
  12160. case 1:
  12161. if wireType != 2 {
  12162. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  12163. }
  12164. var msglen int
  12165. for shift := uint(0); ; shift += 7 {
  12166. if shift >= 64 {
  12167. return ErrIntOverflowRpc
  12168. }
  12169. if iNdEx >= l {
  12170. return io.ErrUnexpectedEOF
  12171. }
  12172. b := data[iNdEx]
  12173. iNdEx++
  12174. msglen |= (int(b) & 0x7F) << shift
  12175. if b < 0x80 {
  12176. break
  12177. }
  12178. }
  12179. if msglen < 0 {
  12180. return ErrInvalidLengthRpc
  12181. }
  12182. postIndex := iNdEx + msglen
  12183. if postIndex > l {
  12184. return io.ErrUnexpectedEOF
  12185. }
  12186. if m.Header == nil {
  12187. m.Header = &ResponseHeader{}
  12188. }
  12189. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  12190. return err
  12191. }
  12192. iNdEx = postIndex
  12193. default:
  12194. iNdEx = preIndex
  12195. skippy, err := skipRpc(data[iNdEx:])
  12196. if err != nil {
  12197. return err
  12198. }
  12199. if skippy < 0 {
  12200. return ErrInvalidLengthRpc
  12201. }
  12202. if (iNdEx + skippy) > l {
  12203. return io.ErrUnexpectedEOF
  12204. }
  12205. iNdEx += skippy
  12206. }
  12207. }
  12208. if iNdEx > l {
  12209. return io.ErrUnexpectedEOF
  12210. }
  12211. return nil
  12212. }
  12213. func (m *AuthUserRevokeResponse) Unmarshal(data []byte) error {
  12214. l := len(data)
  12215. iNdEx := 0
  12216. for iNdEx < l {
  12217. preIndex := iNdEx
  12218. var wire uint64
  12219. for shift := uint(0); ; shift += 7 {
  12220. if shift >= 64 {
  12221. return ErrIntOverflowRpc
  12222. }
  12223. if iNdEx >= l {
  12224. return io.ErrUnexpectedEOF
  12225. }
  12226. b := data[iNdEx]
  12227. iNdEx++
  12228. wire |= (uint64(b) & 0x7F) << shift
  12229. if b < 0x80 {
  12230. break
  12231. }
  12232. }
  12233. fieldNum := int32(wire >> 3)
  12234. wireType := int(wire & 0x7)
  12235. if wireType == 4 {
  12236. return fmt.Errorf("proto: AuthUserRevokeResponse: wiretype end group for non-group")
  12237. }
  12238. if fieldNum <= 0 {
  12239. return fmt.Errorf("proto: AuthUserRevokeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  12240. }
  12241. switch fieldNum {
  12242. case 1:
  12243. if wireType != 2 {
  12244. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  12245. }
  12246. var msglen int
  12247. for shift := uint(0); ; shift += 7 {
  12248. if shift >= 64 {
  12249. return ErrIntOverflowRpc
  12250. }
  12251. if iNdEx >= l {
  12252. return io.ErrUnexpectedEOF
  12253. }
  12254. b := data[iNdEx]
  12255. iNdEx++
  12256. msglen |= (int(b) & 0x7F) << shift
  12257. if b < 0x80 {
  12258. break
  12259. }
  12260. }
  12261. if msglen < 0 {
  12262. return ErrInvalidLengthRpc
  12263. }
  12264. postIndex := iNdEx + msglen
  12265. if postIndex > l {
  12266. return io.ErrUnexpectedEOF
  12267. }
  12268. if m.Header == nil {
  12269. m.Header = &ResponseHeader{}
  12270. }
  12271. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  12272. return err
  12273. }
  12274. iNdEx = postIndex
  12275. default:
  12276. iNdEx = preIndex
  12277. skippy, err := skipRpc(data[iNdEx:])
  12278. if err != nil {
  12279. return err
  12280. }
  12281. if skippy < 0 {
  12282. return ErrInvalidLengthRpc
  12283. }
  12284. if (iNdEx + skippy) > l {
  12285. return io.ErrUnexpectedEOF
  12286. }
  12287. iNdEx += skippy
  12288. }
  12289. }
  12290. if iNdEx > l {
  12291. return io.ErrUnexpectedEOF
  12292. }
  12293. return nil
  12294. }
  12295. func (m *AuthRoleAddResponse) Unmarshal(data []byte) error {
  12296. l := len(data)
  12297. iNdEx := 0
  12298. for iNdEx < l {
  12299. preIndex := iNdEx
  12300. var wire uint64
  12301. for shift := uint(0); ; shift += 7 {
  12302. if shift >= 64 {
  12303. return ErrIntOverflowRpc
  12304. }
  12305. if iNdEx >= l {
  12306. return io.ErrUnexpectedEOF
  12307. }
  12308. b := data[iNdEx]
  12309. iNdEx++
  12310. wire |= (uint64(b) & 0x7F) << shift
  12311. if b < 0x80 {
  12312. break
  12313. }
  12314. }
  12315. fieldNum := int32(wire >> 3)
  12316. wireType := int(wire & 0x7)
  12317. if wireType == 4 {
  12318. return fmt.Errorf("proto: AuthRoleAddResponse: wiretype end group for non-group")
  12319. }
  12320. if fieldNum <= 0 {
  12321. return fmt.Errorf("proto: AuthRoleAddResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  12322. }
  12323. switch fieldNum {
  12324. case 1:
  12325. if wireType != 2 {
  12326. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  12327. }
  12328. var msglen int
  12329. for shift := uint(0); ; shift += 7 {
  12330. if shift >= 64 {
  12331. return ErrIntOverflowRpc
  12332. }
  12333. if iNdEx >= l {
  12334. return io.ErrUnexpectedEOF
  12335. }
  12336. b := data[iNdEx]
  12337. iNdEx++
  12338. msglen |= (int(b) & 0x7F) << shift
  12339. if b < 0x80 {
  12340. break
  12341. }
  12342. }
  12343. if msglen < 0 {
  12344. return ErrInvalidLengthRpc
  12345. }
  12346. postIndex := iNdEx + msglen
  12347. if postIndex > l {
  12348. return io.ErrUnexpectedEOF
  12349. }
  12350. if m.Header == nil {
  12351. m.Header = &ResponseHeader{}
  12352. }
  12353. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  12354. return err
  12355. }
  12356. iNdEx = postIndex
  12357. default:
  12358. iNdEx = preIndex
  12359. skippy, err := skipRpc(data[iNdEx:])
  12360. if err != nil {
  12361. return err
  12362. }
  12363. if skippy < 0 {
  12364. return ErrInvalidLengthRpc
  12365. }
  12366. if (iNdEx + skippy) > l {
  12367. return io.ErrUnexpectedEOF
  12368. }
  12369. iNdEx += skippy
  12370. }
  12371. }
  12372. if iNdEx > l {
  12373. return io.ErrUnexpectedEOF
  12374. }
  12375. return nil
  12376. }
  12377. func (m *AuthRoleGetResponse) Unmarshal(data []byte) error {
  12378. l := len(data)
  12379. iNdEx := 0
  12380. for iNdEx < l {
  12381. preIndex := iNdEx
  12382. var wire uint64
  12383. for shift := uint(0); ; shift += 7 {
  12384. if shift >= 64 {
  12385. return ErrIntOverflowRpc
  12386. }
  12387. if iNdEx >= l {
  12388. return io.ErrUnexpectedEOF
  12389. }
  12390. b := data[iNdEx]
  12391. iNdEx++
  12392. wire |= (uint64(b) & 0x7F) << shift
  12393. if b < 0x80 {
  12394. break
  12395. }
  12396. }
  12397. fieldNum := int32(wire >> 3)
  12398. wireType := int(wire & 0x7)
  12399. if wireType == 4 {
  12400. return fmt.Errorf("proto: AuthRoleGetResponse: wiretype end group for non-group")
  12401. }
  12402. if fieldNum <= 0 {
  12403. return fmt.Errorf("proto: AuthRoleGetResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  12404. }
  12405. switch fieldNum {
  12406. case 1:
  12407. if wireType != 2 {
  12408. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  12409. }
  12410. var msglen int
  12411. for shift := uint(0); ; shift += 7 {
  12412. if shift >= 64 {
  12413. return ErrIntOverflowRpc
  12414. }
  12415. if iNdEx >= l {
  12416. return io.ErrUnexpectedEOF
  12417. }
  12418. b := data[iNdEx]
  12419. iNdEx++
  12420. msglen |= (int(b) & 0x7F) << shift
  12421. if b < 0x80 {
  12422. break
  12423. }
  12424. }
  12425. if msglen < 0 {
  12426. return ErrInvalidLengthRpc
  12427. }
  12428. postIndex := iNdEx + msglen
  12429. if postIndex > l {
  12430. return io.ErrUnexpectedEOF
  12431. }
  12432. if m.Header == nil {
  12433. m.Header = &ResponseHeader{}
  12434. }
  12435. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  12436. return err
  12437. }
  12438. iNdEx = postIndex
  12439. default:
  12440. iNdEx = preIndex
  12441. skippy, err := skipRpc(data[iNdEx:])
  12442. if err != nil {
  12443. return err
  12444. }
  12445. if skippy < 0 {
  12446. return ErrInvalidLengthRpc
  12447. }
  12448. if (iNdEx + skippy) > l {
  12449. return io.ErrUnexpectedEOF
  12450. }
  12451. iNdEx += skippy
  12452. }
  12453. }
  12454. if iNdEx > l {
  12455. return io.ErrUnexpectedEOF
  12456. }
  12457. return nil
  12458. }
  12459. func (m *AuthRoleDeleteResponse) Unmarshal(data []byte) error {
  12460. l := len(data)
  12461. iNdEx := 0
  12462. for iNdEx < l {
  12463. preIndex := iNdEx
  12464. var wire uint64
  12465. for shift := uint(0); ; shift += 7 {
  12466. if shift >= 64 {
  12467. return ErrIntOverflowRpc
  12468. }
  12469. if iNdEx >= l {
  12470. return io.ErrUnexpectedEOF
  12471. }
  12472. b := data[iNdEx]
  12473. iNdEx++
  12474. wire |= (uint64(b) & 0x7F) << shift
  12475. if b < 0x80 {
  12476. break
  12477. }
  12478. }
  12479. fieldNum := int32(wire >> 3)
  12480. wireType := int(wire & 0x7)
  12481. if wireType == 4 {
  12482. return fmt.Errorf("proto: AuthRoleDeleteResponse: wiretype end group for non-group")
  12483. }
  12484. if fieldNum <= 0 {
  12485. return fmt.Errorf("proto: AuthRoleDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  12486. }
  12487. switch fieldNum {
  12488. case 1:
  12489. if wireType != 2 {
  12490. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  12491. }
  12492. var msglen int
  12493. for shift := uint(0); ; shift += 7 {
  12494. if shift >= 64 {
  12495. return ErrIntOverflowRpc
  12496. }
  12497. if iNdEx >= l {
  12498. return io.ErrUnexpectedEOF
  12499. }
  12500. b := data[iNdEx]
  12501. iNdEx++
  12502. msglen |= (int(b) & 0x7F) << shift
  12503. if b < 0x80 {
  12504. break
  12505. }
  12506. }
  12507. if msglen < 0 {
  12508. return ErrInvalidLengthRpc
  12509. }
  12510. postIndex := iNdEx + msglen
  12511. if postIndex > l {
  12512. return io.ErrUnexpectedEOF
  12513. }
  12514. if m.Header == nil {
  12515. m.Header = &ResponseHeader{}
  12516. }
  12517. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  12518. return err
  12519. }
  12520. iNdEx = postIndex
  12521. default:
  12522. iNdEx = preIndex
  12523. skippy, err := skipRpc(data[iNdEx:])
  12524. if err != nil {
  12525. return err
  12526. }
  12527. if skippy < 0 {
  12528. return ErrInvalidLengthRpc
  12529. }
  12530. if (iNdEx + skippy) > l {
  12531. return io.ErrUnexpectedEOF
  12532. }
  12533. iNdEx += skippy
  12534. }
  12535. }
  12536. if iNdEx > l {
  12537. return io.ErrUnexpectedEOF
  12538. }
  12539. return nil
  12540. }
  12541. func (m *AuthRoleGrantResponse) Unmarshal(data []byte) error {
  12542. l := len(data)
  12543. iNdEx := 0
  12544. for iNdEx < l {
  12545. preIndex := iNdEx
  12546. var wire uint64
  12547. for shift := uint(0); ; shift += 7 {
  12548. if shift >= 64 {
  12549. return ErrIntOverflowRpc
  12550. }
  12551. if iNdEx >= l {
  12552. return io.ErrUnexpectedEOF
  12553. }
  12554. b := data[iNdEx]
  12555. iNdEx++
  12556. wire |= (uint64(b) & 0x7F) << shift
  12557. if b < 0x80 {
  12558. break
  12559. }
  12560. }
  12561. fieldNum := int32(wire >> 3)
  12562. wireType := int(wire & 0x7)
  12563. if wireType == 4 {
  12564. return fmt.Errorf("proto: AuthRoleGrantResponse: wiretype end group for non-group")
  12565. }
  12566. if fieldNum <= 0 {
  12567. return fmt.Errorf("proto: AuthRoleGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  12568. }
  12569. switch fieldNum {
  12570. case 1:
  12571. if wireType != 2 {
  12572. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  12573. }
  12574. var msglen int
  12575. for shift := uint(0); ; shift += 7 {
  12576. if shift >= 64 {
  12577. return ErrIntOverflowRpc
  12578. }
  12579. if iNdEx >= l {
  12580. return io.ErrUnexpectedEOF
  12581. }
  12582. b := data[iNdEx]
  12583. iNdEx++
  12584. msglen |= (int(b) & 0x7F) << shift
  12585. if b < 0x80 {
  12586. break
  12587. }
  12588. }
  12589. if msglen < 0 {
  12590. return ErrInvalidLengthRpc
  12591. }
  12592. postIndex := iNdEx + msglen
  12593. if postIndex > l {
  12594. return io.ErrUnexpectedEOF
  12595. }
  12596. if m.Header == nil {
  12597. m.Header = &ResponseHeader{}
  12598. }
  12599. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  12600. return err
  12601. }
  12602. iNdEx = postIndex
  12603. default:
  12604. iNdEx = preIndex
  12605. skippy, err := skipRpc(data[iNdEx:])
  12606. if err != nil {
  12607. return err
  12608. }
  12609. if skippy < 0 {
  12610. return ErrInvalidLengthRpc
  12611. }
  12612. if (iNdEx + skippy) > l {
  12613. return io.ErrUnexpectedEOF
  12614. }
  12615. iNdEx += skippy
  12616. }
  12617. }
  12618. if iNdEx > l {
  12619. return io.ErrUnexpectedEOF
  12620. }
  12621. return nil
  12622. }
  12623. func (m *AuthRoleRevokeResponse) Unmarshal(data []byte) error {
  12624. l := len(data)
  12625. iNdEx := 0
  12626. for iNdEx < l {
  12627. preIndex := iNdEx
  12628. var wire uint64
  12629. for shift := uint(0); ; shift += 7 {
  12630. if shift >= 64 {
  12631. return ErrIntOverflowRpc
  12632. }
  12633. if iNdEx >= l {
  12634. return io.ErrUnexpectedEOF
  12635. }
  12636. b := data[iNdEx]
  12637. iNdEx++
  12638. wire |= (uint64(b) & 0x7F) << shift
  12639. if b < 0x80 {
  12640. break
  12641. }
  12642. }
  12643. fieldNum := int32(wire >> 3)
  12644. wireType := int(wire & 0x7)
  12645. if wireType == 4 {
  12646. return fmt.Errorf("proto: AuthRoleRevokeResponse: wiretype end group for non-group")
  12647. }
  12648. if fieldNum <= 0 {
  12649. return fmt.Errorf("proto: AuthRoleRevokeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  12650. }
  12651. switch fieldNum {
  12652. case 1:
  12653. if wireType != 2 {
  12654. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  12655. }
  12656. var msglen int
  12657. for shift := uint(0); ; shift += 7 {
  12658. if shift >= 64 {
  12659. return ErrIntOverflowRpc
  12660. }
  12661. if iNdEx >= l {
  12662. return io.ErrUnexpectedEOF
  12663. }
  12664. b := data[iNdEx]
  12665. iNdEx++
  12666. msglen |= (int(b) & 0x7F) << shift
  12667. if b < 0x80 {
  12668. break
  12669. }
  12670. }
  12671. if msglen < 0 {
  12672. return ErrInvalidLengthRpc
  12673. }
  12674. postIndex := iNdEx + msglen
  12675. if postIndex > l {
  12676. return io.ErrUnexpectedEOF
  12677. }
  12678. if m.Header == nil {
  12679. m.Header = &ResponseHeader{}
  12680. }
  12681. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  12682. return err
  12683. }
  12684. iNdEx = postIndex
  12685. default:
  12686. iNdEx = preIndex
  12687. skippy, err := skipRpc(data[iNdEx:])
  12688. if err != nil {
  12689. return err
  12690. }
  12691. if skippy < 0 {
  12692. return ErrInvalidLengthRpc
  12693. }
  12694. if (iNdEx + skippy) > l {
  12695. return io.ErrUnexpectedEOF
  12696. }
  12697. iNdEx += skippy
  12698. }
  12699. }
  12700. if iNdEx > l {
  12701. return io.ErrUnexpectedEOF
  12702. }
  12703. return nil
  12704. }
  12705. func skipRpc(data []byte) (n int, err error) {
  12706. l := len(data)
  12707. iNdEx := 0
  12708. for iNdEx < l {
  12709. var wire uint64
  12710. for shift := uint(0); ; shift += 7 {
  12711. if shift >= 64 {
  12712. return 0, ErrIntOverflowRpc
  12713. }
  12714. if iNdEx >= l {
  12715. return 0, io.ErrUnexpectedEOF
  12716. }
  12717. b := data[iNdEx]
  12718. iNdEx++
  12719. wire |= (uint64(b) & 0x7F) << shift
  12720. if b < 0x80 {
  12721. break
  12722. }
  12723. }
  12724. wireType := int(wire & 0x7)
  12725. switch wireType {
  12726. case 0:
  12727. for shift := uint(0); ; shift += 7 {
  12728. if shift >= 64 {
  12729. return 0, ErrIntOverflowRpc
  12730. }
  12731. if iNdEx >= l {
  12732. return 0, io.ErrUnexpectedEOF
  12733. }
  12734. iNdEx++
  12735. if data[iNdEx-1] < 0x80 {
  12736. break
  12737. }
  12738. }
  12739. return iNdEx, nil
  12740. case 1:
  12741. iNdEx += 8
  12742. return iNdEx, nil
  12743. case 2:
  12744. var length int
  12745. for shift := uint(0); ; shift += 7 {
  12746. if shift >= 64 {
  12747. return 0, ErrIntOverflowRpc
  12748. }
  12749. if iNdEx >= l {
  12750. return 0, io.ErrUnexpectedEOF
  12751. }
  12752. b := data[iNdEx]
  12753. iNdEx++
  12754. length |= (int(b) & 0x7F) << shift
  12755. if b < 0x80 {
  12756. break
  12757. }
  12758. }
  12759. iNdEx += length
  12760. if length < 0 {
  12761. return 0, ErrInvalidLengthRpc
  12762. }
  12763. return iNdEx, nil
  12764. case 3:
  12765. for {
  12766. var innerWire uint64
  12767. var start int = iNdEx
  12768. for shift := uint(0); ; shift += 7 {
  12769. if shift >= 64 {
  12770. return 0, ErrIntOverflowRpc
  12771. }
  12772. if iNdEx >= l {
  12773. return 0, io.ErrUnexpectedEOF
  12774. }
  12775. b := data[iNdEx]
  12776. iNdEx++
  12777. innerWire |= (uint64(b) & 0x7F) << shift
  12778. if b < 0x80 {
  12779. break
  12780. }
  12781. }
  12782. innerWireType := int(innerWire & 0x7)
  12783. if innerWireType == 4 {
  12784. break
  12785. }
  12786. next, err := skipRpc(data[start:])
  12787. if err != nil {
  12788. return 0, err
  12789. }
  12790. iNdEx = start + next
  12791. }
  12792. return iNdEx, nil
  12793. case 4:
  12794. return iNdEx, nil
  12795. case 5:
  12796. iNdEx += 4
  12797. return iNdEx, nil
  12798. default:
  12799. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  12800. }
  12801. }
  12802. panic("unreachable")
  12803. }
  12804. var (
  12805. ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling")
  12806. ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow")
  12807. )