bep.pb.go 122 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: bep.proto
  3. package protocol
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. io "io"
  9. math "math"
  10. math_bits "math/bits"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  21. type MessageType int32
  22. const (
  23. messageTypeClusterConfig MessageType = 0
  24. messageTypeIndex MessageType = 1
  25. messageTypeIndexUpdate MessageType = 2
  26. messageTypeRequest MessageType = 3
  27. messageTypeResponse MessageType = 4
  28. messageTypeDownloadProgress MessageType = 5
  29. messageTypePing MessageType = 6
  30. messageTypeClose MessageType = 7
  31. )
  32. var MessageType_name = map[int32]string{
  33. 0: "CLUSTER_CONFIG",
  34. 1: "INDEX",
  35. 2: "INDEX_UPDATE",
  36. 3: "REQUEST",
  37. 4: "RESPONSE",
  38. 5: "DOWNLOAD_PROGRESS",
  39. 6: "PING",
  40. 7: "CLOSE",
  41. }
  42. var MessageType_value = map[string]int32{
  43. "CLUSTER_CONFIG": 0,
  44. "INDEX": 1,
  45. "INDEX_UPDATE": 2,
  46. "REQUEST": 3,
  47. "RESPONSE": 4,
  48. "DOWNLOAD_PROGRESS": 5,
  49. "PING": 6,
  50. "CLOSE": 7,
  51. }
  52. func (x MessageType) String() string {
  53. return proto.EnumName(MessageType_name, int32(x))
  54. }
  55. func (MessageType) EnumDescriptor() ([]byte, []int) {
  56. return fileDescriptor_e3f59eb60afbbc6e, []int{0}
  57. }
  58. type MessageCompression int32
  59. const (
  60. MessageCompressionNone MessageCompression = 0
  61. MessageCompressionLZ4 MessageCompression = 1
  62. )
  63. var MessageCompression_name = map[int32]string{
  64. 0: "NONE",
  65. 1: "LZ4",
  66. }
  67. var MessageCompression_value = map[string]int32{
  68. "NONE": 0,
  69. "LZ4": 1,
  70. }
  71. func (x MessageCompression) String() string {
  72. return proto.EnumName(MessageCompression_name, int32(x))
  73. }
  74. func (MessageCompression) EnumDescriptor() ([]byte, []int) {
  75. return fileDescriptor_e3f59eb60afbbc6e, []int{1}
  76. }
  77. type Compression int32
  78. const (
  79. CompressMetadata Compression = 0
  80. CompressNever Compression = 1
  81. CompressAlways Compression = 2
  82. )
  83. var Compression_name = map[int32]string{
  84. 0: "METADATA",
  85. 1: "NEVER",
  86. 2: "ALWAYS",
  87. }
  88. var Compression_value = map[string]int32{
  89. "METADATA": 0,
  90. "NEVER": 1,
  91. "ALWAYS": 2,
  92. }
  93. func (x Compression) String() string {
  94. return proto.EnumName(Compression_name, int32(x))
  95. }
  96. func (Compression) EnumDescriptor() ([]byte, []int) {
  97. return fileDescriptor_e3f59eb60afbbc6e, []int{2}
  98. }
  99. type FileInfoType int32
  100. const (
  101. FileInfoTypeFile FileInfoType = 0
  102. FileInfoTypeDirectory FileInfoType = 1
  103. FileInfoTypeDeprecatedSymlinkFile FileInfoType = 2 // Deprecated: Do not use.
  104. FileInfoTypeDeprecatedSymlinkDirectory FileInfoType = 3 // Deprecated: Do not use.
  105. FileInfoTypeSymlink FileInfoType = 4
  106. )
  107. var FileInfoType_name = map[int32]string{
  108. 0: "FILE",
  109. 1: "DIRECTORY",
  110. 2: "SYMLINK_FILE",
  111. 3: "SYMLINK_DIRECTORY",
  112. 4: "SYMLINK",
  113. }
  114. var FileInfoType_value = map[string]int32{
  115. "FILE": 0,
  116. "DIRECTORY": 1,
  117. "SYMLINK_FILE": 2,
  118. "SYMLINK_DIRECTORY": 3,
  119. "SYMLINK": 4,
  120. }
  121. func (x FileInfoType) String() string {
  122. return proto.EnumName(FileInfoType_name, int32(x))
  123. }
  124. func (FileInfoType) EnumDescriptor() ([]byte, []int) {
  125. return fileDescriptor_e3f59eb60afbbc6e, []int{3}
  126. }
  127. type ErrorCode int32
  128. const (
  129. ErrorCodeNoError ErrorCode = 0
  130. ErrorCodeGeneric ErrorCode = 1
  131. ErrorCodeNoSuchFile ErrorCode = 2
  132. ErrorCodeInvalidFile ErrorCode = 3
  133. )
  134. var ErrorCode_name = map[int32]string{
  135. 0: "NO_ERROR",
  136. 1: "GENERIC",
  137. 2: "NO_SUCH_FILE",
  138. 3: "INVALID_FILE",
  139. }
  140. var ErrorCode_value = map[string]int32{
  141. "NO_ERROR": 0,
  142. "GENERIC": 1,
  143. "NO_SUCH_FILE": 2,
  144. "INVALID_FILE": 3,
  145. }
  146. func (x ErrorCode) String() string {
  147. return proto.EnumName(ErrorCode_name, int32(x))
  148. }
  149. func (ErrorCode) EnumDescriptor() ([]byte, []int) {
  150. return fileDescriptor_e3f59eb60afbbc6e, []int{4}
  151. }
  152. type FileDownloadProgressUpdateType int32
  153. const (
  154. UpdateTypeAppend FileDownloadProgressUpdateType = 0
  155. UpdateTypeForget FileDownloadProgressUpdateType = 1
  156. )
  157. var FileDownloadProgressUpdateType_name = map[int32]string{
  158. 0: "APPEND",
  159. 1: "FORGET",
  160. }
  161. var FileDownloadProgressUpdateType_value = map[string]int32{
  162. "APPEND": 0,
  163. "FORGET": 1,
  164. }
  165. func (x FileDownloadProgressUpdateType) String() string {
  166. return proto.EnumName(FileDownloadProgressUpdateType_name, int32(x))
  167. }
  168. func (FileDownloadProgressUpdateType) EnumDescriptor() ([]byte, []int) {
  169. return fileDescriptor_e3f59eb60afbbc6e, []int{5}
  170. }
  171. type Hello struct {
  172. DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
  173. ClientName string `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"`
  174. ClientVersion string `protobuf:"bytes,3,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"`
  175. }
  176. func (m *Hello) Reset() { *m = Hello{} }
  177. func (m *Hello) String() string { return proto.CompactTextString(m) }
  178. func (*Hello) ProtoMessage() {}
  179. func (*Hello) Descriptor() ([]byte, []int) {
  180. return fileDescriptor_e3f59eb60afbbc6e, []int{0}
  181. }
  182. func (m *Hello) XXX_Unmarshal(b []byte) error {
  183. return m.Unmarshal(b)
  184. }
  185. func (m *Hello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  186. if deterministic {
  187. return xxx_messageInfo_Hello.Marshal(b, m, deterministic)
  188. } else {
  189. b = b[:cap(b)]
  190. n, err := m.MarshalToSizedBuffer(b)
  191. if err != nil {
  192. return nil, err
  193. }
  194. return b[:n], nil
  195. }
  196. }
  197. func (m *Hello) XXX_Merge(src proto.Message) {
  198. xxx_messageInfo_Hello.Merge(m, src)
  199. }
  200. func (m *Hello) XXX_Size() int {
  201. return m.ProtoSize()
  202. }
  203. func (m *Hello) XXX_DiscardUnknown() {
  204. xxx_messageInfo_Hello.DiscardUnknown(m)
  205. }
  206. var xxx_messageInfo_Hello proto.InternalMessageInfo
  207. type Header struct {
  208. Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.MessageType" json:"type,omitempty"`
  209. Compression MessageCompression `protobuf:"varint,2,opt,name=compression,proto3,enum=protocol.MessageCompression" json:"compression,omitempty"`
  210. }
  211. func (m *Header) Reset() { *m = Header{} }
  212. func (m *Header) String() string { return proto.CompactTextString(m) }
  213. func (*Header) ProtoMessage() {}
  214. func (*Header) Descriptor() ([]byte, []int) {
  215. return fileDescriptor_e3f59eb60afbbc6e, []int{1}
  216. }
  217. func (m *Header) XXX_Unmarshal(b []byte) error {
  218. return m.Unmarshal(b)
  219. }
  220. func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  221. if deterministic {
  222. return xxx_messageInfo_Header.Marshal(b, m, deterministic)
  223. } else {
  224. b = b[:cap(b)]
  225. n, err := m.MarshalToSizedBuffer(b)
  226. if err != nil {
  227. return nil, err
  228. }
  229. return b[:n], nil
  230. }
  231. }
  232. func (m *Header) XXX_Merge(src proto.Message) {
  233. xxx_messageInfo_Header.Merge(m, src)
  234. }
  235. func (m *Header) XXX_Size() int {
  236. return m.ProtoSize()
  237. }
  238. func (m *Header) XXX_DiscardUnknown() {
  239. xxx_messageInfo_Header.DiscardUnknown(m)
  240. }
  241. var xxx_messageInfo_Header proto.InternalMessageInfo
  242. type ClusterConfig struct {
  243. Folders []Folder `protobuf:"bytes,1,rep,name=folders,proto3" json:"folders"`
  244. }
  245. func (m *ClusterConfig) Reset() { *m = ClusterConfig{} }
  246. func (m *ClusterConfig) String() string { return proto.CompactTextString(m) }
  247. func (*ClusterConfig) ProtoMessage() {}
  248. func (*ClusterConfig) Descriptor() ([]byte, []int) {
  249. return fileDescriptor_e3f59eb60afbbc6e, []int{2}
  250. }
  251. func (m *ClusterConfig) XXX_Unmarshal(b []byte) error {
  252. return m.Unmarshal(b)
  253. }
  254. func (m *ClusterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  255. if deterministic {
  256. return xxx_messageInfo_ClusterConfig.Marshal(b, m, deterministic)
  257. } else {
  258. b = b[:cap(b)]
  259. n, err := m.MarshalToSizedBuffer(b)
  260. if err != nil {
  261. return nil, err
  262. }
  263. return b[:n], nil
  264. }
  265. }
  266. func (m *ClusterConfig) XXX_Merge(src proto.Message) {
  267. xxx_messageInfo_ClusterConfig.Merge(m, src)
  268. }
  269. func (m *ClusterConfig) XXX_Size() int {
  270. return m.ProtoSize()
  271. }
  272. func (m *ClusterConfig) XXX_DiscardUnknown() {
  273. xxx_messageInfo_ClusterConfig.DiscardUnknown(m)
  274. }
  275. var xxx_messageInfo_ClusterConfig proto.InternalMessageInfo
  276. type Folder struct {
  277. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  278. Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
  279. ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
  280. IgnorePermissions bool `protobuf:"varint,4,opt,name=ignore_permissions,json=ignorePermissions,proto3" json:"ignore_permissions,omitempty"`
  281. IgnoreDelete bool `protobuf:"varint,5,opt,name=ignore_delete,json=ignoreDelete,proto3" json:"ignore_delete,omitempty"`
  282. DisableTempIndexes bool `protobuf:"varint,6,opt,name=disable_temp_indexes,json=disableTempIndexes,proto3" json:"disable_temp_indexes,omitempty"`
  283. Paused bool `protobuf:"varint,7,opt,name=paused,proto3" json:"paused,omitempty"`
  284. Devices []Device `protobuf:"bytes,16,rep,name=devices,proto3" json:"devices"`
  285. }
  286. func (m *Folder) Reset() { *m = Folder{} }
  287. func (m *Folder) String() string { return proto.CompactTextString(m) }
  288. func (*Folder) ProtoMessage() {}
  289. func (*Folder) Descriptor() ([]byte, []int) {
  290. return fileDescriptor_e3f59eb60afbbc6e, []int{3}
  291. }
  292. func (m *Folder) XXX_Unmarshal(b []byte) error {
  293. return m.Unmarshal(b)
  294. }
  295. func (m *Folder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  296. if deterministic {
  297. return xxx_messageInfo_Folder.Marshal(b, m, deterministic)
  298. } else {
  299. b = b[:cap(b)]
  300. n, err := m.MarshalToSizedBuffer(b)
  301. if err != nil {
  302. return nil, err
  303. }
  304. return b[:n], nil
  305. }
  306. }
  307. func (m *Folder) XXX_Merge(src proto.Message) {
  308. xxx_messageInfo_Folder.Merge(m, src)
  309. }
  310. func (m *Folder) XXX_Size() int {
  311. return m.ProtoSize()
  312. }
  313. func (m *Folder) XXX_DiscardUnknown() {
  314. xxx_messageInfo_Folder.DiscardUnknown(m)
  315. }
  316. var xxx_messageInfo_Folder proto.InternalMessageInfo
  317. type Device struct {
  318. ID DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=DeviceID" json:"id"`
  319. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  320. Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty"`
  321. Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression,omitempty"`
  322. CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"cert_name,omitempty"`
  323. MaxSequence int64 `protobuf:"varint,6,opt,name=max_sequence,json=maxSequence,proto3" json:"max_sequence,omitempty"`
  324. Introducer bool `protobuf:"varint,7,opt,name=introducer,proto3" json:"introducer,omitempty"`
  325. IndexID IndexID `protobuf:"varint,8,opt,name=index_id,json=indexId,proto3,customtype=IndexID" json:"index_id"`
  326. SkipIntroductionRemovals bool `protobuf:"varint,9,opt,name=skip_introduction_removals,json=skipIntroductionRemovals,proto3" json:"skip_introduction_removals,omitempty"`
  327. }
  328. func (m *Device) Reset() { *m = Device{} }
  329. func (m *Device) String() string { return proto.CompactTextString(m) }
  330. func (*Device) ProtoMessage() {}
  331. func (*Device) Descriptor() ([]byte, []int) {
  332. return fileDescriptor_e3f59eb60afbbc6e, []int{4}
  333. }
  334. func (m *Device) XXX_Unmarshal(b []byte) error {
  335. return m.Unmarshal(b)
  336. }
  337. func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  338. if deterministic {
  339. return xxx_messageInfo_Device.Marshal(b, m, deterministic)
  340. } else {
  341. b = b[:cap(b)]
  342. n, err := m.MarshalToSizedBuffer(b)
  343. if err != nil {
  344. return nil, err
  345. }
  346. return b[:n], nil
  347. }
  348. }
  349. func (m *Device) XXX_Merge(src proto.Message) {
  350. xxx_messageInfo_Device.Merge(m, src)
  351. }
  352. func (m *Device) XXX_Size() int {
  353. return m.ProtoSize()
  354. }
  355. func (m *Device) XXX_DiscardUnknown() {
  356. xxx_messageInfo_Device.DiscardUnknown(m)
  357. }
  358. var xxx_messageInfo_Device proto.InternalMessageInfo
  359. type Index struct {
  360. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  361. Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files"`
  362. }
  363. func (m *Index) Reset() { *m = Index{} }
  364. func (m *Index) String() string { return proto.CompactTextString(m) }
  365. func (*Index) ProtoMessage() {}
  366. func (*Index) Descriptor() ([]byte, []int) {
  367. return fileDescriptor_e3f59eb60afbbc6e, []int{5}
  368. }
  369. func (m *Index) XXX_Unmarshal(b []byte) error {
  370. return m.Unmarshal(b)
  371. }
  372. func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  373. if deterministic {
  374. return xxx_messageInfo_Index.Marshal(b, m, deterministic)
  375. } else {
  376. b = b[:cap(b)]
  377. n, err := m.MarshalToSizedBuffer(b)
  378. if err != nil {
  379. return nil, err
  380. }
  381. return b[:n], nil
  382. }
  383. }
  384. func (m *Index) XXX_Merge(src proto.Message) {
  385. xxx_messageInfo_Index.Merge(m, src)
  386. }
  387. func (m *Index) XXX_Size() int {
  388. return m.ProtoSize()
  389. }
  390. func (m *Index) XXX_DiscardUnknown() {
  391. xxx_messageInfo_Index.DiscardUnknown(m)
  392. }
  393. var xxx_messageInfo_Index proto.InternalMessageInfo
  394. type IndexUpdate struct {
  395. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  396. Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files"`
  397. }
  398. func (m *IndexUpdate) Reset() { *m = IndexUpdate{} }
  399. func (m *IndexUpdate) String() string { return proto.CompactTextString(m) }
  400. func (*IndexUpdate) ProtoMessage() {}
  401. func (*IndexUpdate) Descriptor() ([]byte, []int) {
  402. return fileDescriptor_e3f59eb60afbbc6e, []int{6}
  403. }
  404. func (m *IndexUpdate) XXX_Unmarshal(b []byte) error {
  405. return m.Unmarshal(b)
  406. }
  407. func (m *IndexUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  408. if deterministic {
  409. return xxx_messageInfo_IndexUpdate.Marshal(b, m, deterministic)
  410. } else {
  411. b = b[:cap(b)]
  412. n, err := m.MarshalToSizedBuffer(b)
  413. if err != nil {
  414. return nil, err
  415. }
  416. return b[:n], nil
  417. }
  418. }
  419. func (m *IndexUpdate) XXX_Merge(src proto.Message) {
  420. xxx_messageInfo_IndexUpdate.Merge(m, src)
  421. }
  422. func (m *IndexUpdate) XXX_Size() int {
  423. return m.ProtoSize()
  424. }
  425. func (m *IndexUpdate) XXX_DiscardUnknown() {
  426. xxx_messageInfo_IndexUpdate.DiscardUnknown(m)
  427. }
  428. var xxx_messageInfo_IndexUpdate proto.InternalMessageInfo
  429. type FileInfo struct {
  430. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  431. Type FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
  432. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  433. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
  434. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
  435. ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
  436. ModifiedBy ShortID `protobuf:"varint,12,opt,name=modified_by,json=modifiedBy,proto3,customtype=ShortID" json:"modified_by"`
  437. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
  438. RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
  439. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
  440. Version Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version"`
  441. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
  442. RawBlockSize int32 `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
  443. Blocks []BlockInfo `protobuf:"bytes,16,rep,name=Blocks,proto3" json:"Blocks"`
  444. SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlink_target,omitempty"`
  445. // The local_flags fields stores flags that are relevant to the local
  446. // host only. It is not part of the protocol, doesn't get sent or
  447. // received (we make sure to zero it), nonetheless we need it on our
  448. // struct and to be able to serialize it to/from the database.
  449. LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"local_flags,omitempty"`
  450. }
  451. func (m *FileInfo) Reset() { *m = FileInfo{} }
  452. func (*FileInfo) ProtoMessage() {}
  453. func (*FileInfo) Descriptor() ([]byte, []int) {
  454. return fileDescriptor_e3f59eb60afbbc6e, []int{7}
  455. }
  456. func (m *FileInfo) XXX_Unmarshal(b []byte) error {
  457. return m.Unmarshal(b)
  458. }
  459. func (m *FileInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  460. if deterministic {
  461. return xxx_messageInfo_FileInfo.Marshal(b, m, deterministic)
  462. } else {
  463. b = b[:cap(b)]
  464. n, err := m.MarshalToSizedBuffer(b)
  465. if err != nil {
  466. return nil, err
  467. }
  468. return b[:n], nil
  469. }
  470. }
  471. func (m *FileInfo) XXX_Merge(src proto.Message) {
  472. xxx_messageInfo_FileInfo.Merge(m, src)
  473. }
  474. func (m *FileInfo) XXX_Size() int {
  475. return m.ProtoSize()
  476. }
  477. func (m *FileInfo) XXX_DiscardUnknown() {
  478. xxx_messageInfo_FileInfo.DiscardUnknown(m)
  479. }
  480. var xxx_messageInfo_FileInfo proto.InternalMessageInfo
  481. type BlockInfo struct {
  482. Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
  483. Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
  484. Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
  485. WeakHash uint32 `protobuf:"varint,4,opt,name=weak_hash,json=weakHash,proto3" json:"weak_hash,omitempty"`
  486. }
  487. func (m *BlockInfo) Reset() { *m = BlockInfo{} }
  488. func (*BlockInfo) ProtoMessage() {}
  489. func (*BlockInfo) Descriptor() ([]byte, []int) {
  490. return fileDescriptor_e3f59eb60afbbc6e, []int{8}
  491. }
  492. func (m *BlockInfo) XXX_Unmarshal(b []byte) error {
  493. return m.Unmarshal(b)
  494. }
  495. func (m *BlockInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  496. if deterministic {
  497. return xxx_messageInfo_BlockInfo.Marshal(b, m, deterministic)
  498. } else {
  499. b = b[:cap(b)]
  500. n, err := m.MarshalToSizedBuffer(b)
  501. if err != nil {
  502. return nil, err
  503. }
  504. return b[:n], nil
  505. }
  506. }
  507. func (m *BlockInfo) XXX_Merge(src proto.Message) {
  508. xxx_messageInfo_BlockInfo.Merge(m, src)
  509. }
  510. func (m *BlockInfo) XXX_Size() int {
  511. return m.ProtoSize()
  512. }
  513. func (m *BlockInfo) XXX_DiscardUnknown() {
  514. xxx_messageInfo_BlockInfo.DiscardUnknown(m)
  515. }
  516. var xxx_messageInfo_BlockInfo proto.InternalMessageInfo
  517. type Vector struct {
  518. Counters []Counter `protobuf:"bytes,1,rep,name=counters,proto3" json:"counters"`
  519. }
  520. func (m *Vector) Reset() { *m = Vector{} }
  521. func (m *Vector) String() string { return proto.CompactTextString(m) }
  522. func (*Vector) ProtoMessage() {}
  523. func (*Vector) Descriptor() ([]byte, []int) {
  524. return fileDescriptor_e3f59eb60afbbc6e, []int{9}
  525. }
  526. func (m *Vector) XXX_Unmarshal(b []byte) error {
  527. return m.Unmarshal(b)
  528. }
  529. func (m *Vector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  530. if deterministic {
  531. return xxx_messageInfo_Vector.Marshal(b, m, deterministic)
  532. } else {
  533. b = b[:cap(b)]
  534. n, err := m.MarshalToSizedBuffer(b)
  535. if err != nil {
  536. return nil, err
  537. }
  538. return b[:n], nil
  539. }
  540. }
  541. func (m *Vector) XXX_Merge(src proto.Message) {
  542. xxx_messageInfo_Vector.Merge(m, src)
  543. }
  544. func (m *Vector) XXX_Size() int {
  545. return m.ProtoSize()
  546. }
  547. func (m *Vector) XXX_DiscardUnknown() {
  548. xxx_messageInfo_Vector.DiscardUnknown(m)
  549. }
  550. var xxx_messageInfo_Vector proto.InternalMessageInfo
  551. type Counter struct {
  552. ID ShortID `protobuf:"varint,1,opt,name=id,proto3,customtype=ShortID" json:"id"`
  553. Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
  554. }
  555. func (m *Counter) Reset() { *m = Counter{} }
  556. func (m *Counter) String() string { return proto.CompactTextString(m) }
  557. func (*Counter) ProtoMessage() {}
  558. func (*Counter) Descriptor() ([]byte, []int) {
  559. return fileDescriptor_e3f59eb60afbbc6e, []int{10}
  560. }
  561. func (m *Counter) XXX_Unmarshal(b []byte) error {
  562. return m.Unmarshal(b)
  563. }
  564. func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  565. if deterministic {
  566. return xxx_messageInfo_Counter.Marshal(b, m, deterministic)
  567. } else {
  568. b = b[:cap(b)]
  569. n, err := m.MarshalToSizedBuffer(b)
  570. if err != nil {
  571. return nil, err
  572. }
  573. return b[:n], nil
  574. }
  575. }
  576. func (m *Counter) XXX_Merge(src proto.Message) {
  577. xxx_messageInfo_Counter.Merge(m, src)
  578. }
  579. func (m *Counter) XXX_Size() int {
  580. return m.ProtoSize()
  581. }
  582. func (m *Counter) XXX_DiscardUnknown() {
  583. xxx_messageInfo_Counter.DiscardUnknown(m)
  584. }
  585. var xxx_messageInfo_Counter proto.InternalMessageInfo
  586. type Request struct {
  587. ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  588. Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"`
  589. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
  590. Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
  591. Size int32 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
  592. Hash []byte `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash,omitempty"`
  593. FromTemporary bool `protobuf:"varint,7,opt,name=from_temporary,json=fromTemporary,proto3" json:"from_temporary,omitempty"`
  594. WeakHash uint32 `protobuf:"varint,8,opt,name=weak_hash,json=weakHash,proto3" json:"weak_hash,omitempty"`
  595. }
  596. func (m *Request) Reset() { *m = Request{} }
  597. func (m *Request) String() string { return proto.CompactTextString(m) }
  598. func (*Request) ProtoMessage() {}
  599. func (*Request) Descriptor() ([]byte, []int) {
  600. return fileDescriptor_e3f59eb60afbbc6e, []int{11}
  601. }
  602. func (m *Request) XXX_Unmarshal(b []byte) error {
  603. return m.Unmarshal(b)
  604. }
  605. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  606. if deterministic {
  607. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  608. } else {
  609. b = b[:cap(b)]
  610. n, err := m.MarshalToSizedBuffer(b)
  611. if err != nil {
  612. return nil, err
  613. }
  614. return b[:n], nil
  615. }
  616. }
  617. func (m *Request) XXX_Merge(src proto.Message) {
  618. xxx_messageInfo_Request.Merge(m, src)
  619. }
  620. func (m *Request) XXX_Size() int {
  621. return m.ProtoSize()
  622. }
  623. func (m *Request) XXX_DiscardUnknown() {
  624. xxx_messageInfo_Request.DiscardUnknown(m)
  625. }
  626. var xxx_messageInfo_Request proto.InternalMessageInfo
  627. type Response struct {
  628. ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  629. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  630. Code ErrorCode `protobuf:"varint,3,opt,name=code,proto3,enum=protocol.ErrorCode" json:"code,omitempty"`
  631. }
  632. func (m *Response) Reset() { *m = Response{} }
  633. func (m *Response) String() string { return proto.CompactTextString(m) }
  634. func (*Response) ProtoMessage() {}
  635. func (*Response) Descriptor() ([]byte, []int) {
  636. return fileDescriptor_e3f59eb60afbbc6e, []int{12}
  637. }
  638. func (m *Response) XXX_Unmarshal(b []byte) error {
  639. return m.Unmarshal(b)
  640. }
  641. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  642. if deterministic {
  643. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  644. } else {
  645. b = b[:cap(b)]
  646. n, err := m.MarshalToSizedBuffer(b)
  647. if err != nil {
  648. return nil, err
  649. }
  650. return b[:n], nil
  651. }
  652. }
  653. func (m *Response) XXX_Merge(src proto.Message) {
  654. xxx_messageInfo_Response.Merge(m, src)
  655. }
  656. func (m *Response) XXX_Size() int {
  657. return m.ProtoSize()
  658. }
  659. func (m *Response) XXX_DiscardUnknown() {
  660. xxx_messageInfo_Response.DiscardUnknown(m)
  661. }
  662. var xxx_messageInfo_Response proto.InternalMessageInfo
  663. type DownloadProgress struct {
  664. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  665. Updates []FileDownloadProgressUpdate `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates"`
  666. }
  667. func (m *DownloadProgress) Reset() { *m = DownloadProgress{} }
  668. func (m *DownloadProgress) String() string { return proto.CompactTextString(m) }
  669. func (*DownloadProgress) ProtoMessage() {}
  670. func (*DownloadProgress) Descriptor() ([]byte, []int) {
  671. return fileDescriptor_e3f59eb60afbbc6e, []int{13}
  672. }
  673. func (m *DownloadProgress) XXX_Unmarshal(b []byte) error {
  674. return m.Unmarshal(b)
  675. }
  676. func (m *DownloadProgress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  677. if deterministic {
  678. return xxx_messageInfo_DownloadProgress.Marshal(b, m, deterministic)
  679. } else {
  680. b = b[:cap(b)]
  681. n, err := m.MarshalToSizedBuffer(b)
  682. if err != nil {
  683. return nil, err
  684. }
  685. return b[:n], nil
  686. }
  687. }
  688. func (m *DownloadProgress) XXX_Merge(src proto.Message) {
  689. xxx_messageInfo_DownloadProgress.Merge(m, src)
  690. }
  691. func (m *DownloadProgress) XXX_Size() int {
  692. return m.ProtoSize()
  693. }
  694. func (m *DownloadProgress) XXX_DiscardUnknown() {
  695. xxx_messageInfo_DownloadProgress.DiscardUnknown(m)
  696. }
  697. var xxx_messageInfo_DownloadProgress proto.InternalMessageInfo
  698. type FileDownloadProgressUpdate struct {
  699. UpdateType FileDownloadProgressUpdateType `protobuf:"varint,1,opt,name=update_type,json=updateType,proto3,enum=protocol.FileDownloadProgressUpdateType" json:"update_type,omitempty"`
  700. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  701. Version Vector `protobuf:"bytes,3,opt,name=version,proto3" json:"version"`
  702. BlockIndexes []int32 `protobuf:"varint,4,rep,name=block_indexes,json=blockIndexes,proto3" json:"block_indexes,omitempty"`
  703. }
  704. func (m *FileDownloadProgressUpdate) Reset() { *m = FileDownloadProgressUpdate{} }
  705. func (m *FileDownloadProgressUpdate) String() string { return proto.CompactTextString(m) }
  706. func (*FileDownloadProgressUpdate) ProtoMessage() {}
  707. func (*FileDownloadProgressUpdate) Descriptor() ([]byte, []int) {
  708. return fileDescriptor_e3f59eb60afbbc6e, []int{14}
  709. }
  710. func (m *FileDownloadProgressUpdate) XXX_Unmarshal(b []byte) error {
  711. return m.Unmarshal(b)
  712. }
  713. func (m *FileDownloadProgressUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  714. if deterministic {
  715. return xxx_messageInfo_FileDownloadProgressUpdate.Marshal(b, m, deterministic)
  716. } else {
  717. b = b[:cap(b)]
  718. n, err := m.MarshalToSizedBuffer(b)
  719. if err != nil {
  720. return nil, err
  721. }
  722. return b[:n], nil
  723. }
  724. }
  725. func (m *FileDownloadProgressUpdate) XXX_Merge(src proto.Message) {
  726. xxx_messageInfo_FileDownloadProgressUpdate.Merge(m, src)
  727. }
  728. func (m *FileDownloadProgressUpdate) XXX_Size() int {
  729. return m.ProtoSize()
  730. }
  731. func (m *FileDownloadProgressUpdate) XXX_DiscardUnknown() {
  732. xxx_messageInfo_FileDownloadProgressUpdate.DiscardUnknown(m)
  733. }
  734. var xxx_messageInfo_FileDownloadProgressUpdate proto.InternalMessageInfo
  735. type Ping struct {
  736. }
  737. func (m *Ping) Reset() { *m = Ping{} }
  738. func (m *Ping) String() string { return proto.CompactTextString(m) }
  739. func (*Ping) ProtoMessage() {}
  740. func (*Ping) Descriptor() ([]byte, []int) {
  741. return fileDescriptor_e3f59eb60afbbc6e, []int{15}
  742. }
  743. func (m *Ping) XXX_Unmarshal(b []byte) error {
  744. return m.Unmarshal(b)
  745. }
  746. func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  747. if deterministic {
  748. return xxx_messageInfo_Ping.Marshal(b, m, deterministic)
  749. } else {
  750. b = b[:cap(b)]
  751. n, err := m.MarshalToSizedBuffer(b)
  752. if err != nil {
  753. return nil, err
  754. }
  755. return b[:n], nil
  756. }
  757. }
  758. func (m *Ping) XXX_Merge(src proto.Message) {
  759. xxx_messageInfo_Ping.Merge(m, src)
  760. }
  761. func (m *Ping) XXX_Size() int {
  762. return m.ProtoSize()
  763. }
  764. func (m *Ping) XXX_DiscardUnknown() {
  765. xxx_messageInfo_Ping.DiscardUnknown(m)
  766. }
  767. var xxx_messageInfo_Ping proto.InternalMessageInfo
  768. type Close struct {
  769. Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
  770. }
  771. func (m *Close) Reset() { *m = Close{} }
  772. func (m *Close) String() string { return proto.CompactTextString(m) }
  773. func (*Close) ProtoMessage() {}
  774. func (*Close) Descriptor() ([]byte, []int) {
  775. return fileDescriptor_e3f59eb60afbbc6e, []int{16}
  776. }
  777. func (m *Close) XXX_Unmarshal(b []byte) error {
  778. return m.Unmarshal(b)
  779. }
  780. func (m *Close) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  781. if deterministic {
  782. return xxx_messageInfo_Close.Marshal(b, m, deterministic)
  783. } else {
  784. b = b[:cap(b)]
  785. n, err := m.MarshalToSizedBuffer(b)
  786. if err != nil {
  787. return nil, err
  788. }
  789. return b[:n], nil
  790. }
  791. }
  792. func (m *Close) XXX_Merge(src proto.Message) {
  793. xxx_messageInfo_Close.Merge(m, src)
  794. }
  795. func (m *Close) XXX_Size() int {
  796. return m.ProtoSize()
  797. }
  798. func (m *Close) XXX_DiscardUnknown() {
  799. xxx_messageInfo_Close.DiscardUnknown(m)
  800. }
  801. var xxx_messageInfo_Close proto.InternalMessageInfo
  802. func init() {
  803. proto.RegisterEnum("protocol.MessageType", MessageType_name, MessageType_value)
  804. proto.RegisterEnum("protocol.MessageCompression", MessageCompression_name, MessageCompression_value)
  805. proto.RegisterEnum("protocol.Compression", Compression_name, Compression_value)
  806. proto.RegisterEnum("protocol.FileInfoType", FileInfoType_name, FileInfoType_value)
  807. proto.RegisterEnum("protocol.ErrorCode", ErrorCode_name, ErrorCode_value)
  808. proto.RegisterEnum("protocol.FileDownloadProgressUpdateType", FileDownloadProgressUpdateType_name, FileDownloadProgressUpdateType_value)
  809. proto.RegisterType((*Hello)(nil), "protocol.Hello")
  810. proto.RegisterType((*Header)(nil), "protocol.Header")
  811. proto.RegisterType((*ClusterConfig)(nil), "protocol.ClusterConfig")
  812. proto.RegisterType((*Folder)(nil), "protocol.Folder")
  813. proto.RegisterType((*Device)(nil), "protocol.Device")
  814. proto.RegisterType((*Index)(nil), "protocol.Index")
  815. proto.RegisterType((*IndexUpdate)(nil), "protocol.IndexUpdate")
  816. proto.RegisterType((*FileInfo)(nil), "protocol.FileInfo")
  817. proto.RegisterType((*BlockInfo)(nil), "protocol.BlockInfo")
  818. proto.RegisterType((*Vector)(nil), "protocol.Vector")
  819. proto.RegisterType((*Counter)(nil), "protocol.Counter")
  820. proto.RegisterType((*Request)(nil), "protocol.Request")
  821. proto.RegisterType((*Response)(nil), "protocol.Response")
  822. proto.RegisterType((*DownloadProgress)(nil), "protocol.DownloadProgress")
  823. proto.RegisterType((*FileDownloadProgressUpdate)(nil), "protocol.FileDownloadProgressUpdate")
  824. proto.RegisterType((*Ping)(nil), "protocol.Ping")
  825. proto.RegisterType((*Close)(nil), "protocol.Close")
  826. }
  827. func init() { proto.RegisterFile("bep.proto", fileDescriptor_e3f59eb60afbbc6e) }
  828. var fileDescriptor_e3f59eb60afbbc6e = []byte{
  829. // 1802 bytes of a gzipped FileDescriptorProto
  830. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0xdb, 0xc8,
  831. 0xf5, 0x17, 0x25, 0x4a, 0xa2, 0x9e, 0x64, 0x2f, 0x3d, 0x49, 0xfc, 0xe5, 0x97, 0x9b, 0x95, 0x18,
  832. 0x25, 0xd9, 0x68, 0x8d, 0x6d, 0xe2, 0xee, 0x6e, 0x5b, 0xb4, 0x68, 0x0b, 0xe8, 0x07, 0xed, 0x08,
  833. 0x75, 0x28, 0x77, 0x24, 0x67, 0x9b, 0x3d, 0x94, 0xa0, 0xc5, 0x91, 0x4c, 0x84, 0xe2, 0xa8, 0x24,
  834. 0x65, 0x47, 0xfb, 0x27, 0xe8, 0xd4, 0x63, 0x2f, 0x02, 0x16, 0xe8, 0xa9, 0xff, 0x49, 0x8e, 0x69,
  835. 0x0f, 0x45, 0xd1, 0x83, 0xd1, 0x75, 0x2e, 0x7b, 0xec, 0x5f, 0x50, 0x14, 0x9c, 0x21, 0x25, 0xca,
  836. 0x4e, 0x16, 0x7b, 0xe8, 0x89, 0x33, 0xef, 0x7d, 0xe6, 0x0d, 0xe7, 0xf3, 0xde, 0xfb, 0xcc, 0x40,
  837. 0xe9, 0x94, 0x4c, 0x1f, 0x4f, 0x7d, 0x1a, 0x52, 0x24, 0xb1, 0xcf, 0x90, 0xba, 0xea, 0x7d, 0x9f,
  838. 0x4c, 0x69, 0xf0, 0x84, 0xcd, 0x4f, 0x67, 0xa3, 0x27, 0x63, 0x3a, 0xa6, 0x6c, 0xc2, 0x46, 0x1c,
  839. 0x5e, 0x9f, 0x42, 0xfe, 0x29, 0x71, 0x5d, 0x8a, 0x6a, 0x50, 0xb6, 0xc9, 0xb9, 0x33, 0x24, 0xa6,
  840. 0x67, 0x4d, 0x88, 0x22, 0x68, 0x42, 0xa3, 0x84, 0x81, 0x9b, 0x0c, 0x6b, 0x42, 0x22, 0xc0, 0xd0,
  841. 0x75, 0x88, 0x17, 0x72, 0x40, 0x96, 0x03, 0xb8, 0x89, 0x01, 0x1e, 0xc2, 0x76, 0x0c, 0x38, 0x27,
  842. 0x7e, 0xe0, 0x50, 0x4f, 0xc9, 0x31, 0xcc, 0x16, 0xb7, 0x3e, 0xe7, 0xc6, 0x7a, 0x00, 0x85, 0xa7,
  843. 0xc4, 0xb2, 0x89, 0x8f, 0x3e, 0x01, 0x31, 0x9c, 0x4f, 0xf9, 0x5e, 0xdb, 0x9f, 0xdd, 0x79, 0x9c,
  844. 0xfc, 0xf9, 0xe3, 0x67, 0x24, 0x08, 0xac, 0x31, 0x19, 0xcc, 0xa7, 0x04, 0x33, 0x08, 0xfa, 0x35,
  845. 0x94, 0x87, 0x74, 0x32, 0xf5, 0x49, 0xc0, 0x02, 0x67, 0xd9, 0x8a, 0xbb, 0x37, 0x56, 0xb4, 0xd7,
  846. 0x18, 0x9c, 0x5e, 0x50, 0x6f, 0xc2, 0x56, 0xdb, 0x9d, 0x05, 0x21, 0xf1, 0xdb, 0xd4, 0x1b, 0x39,
  847. 0x63, 0xb4, 0x0f, 0xc5, 0x11, 0x75, 0x6d, 0xe2, 0x07, 0x8a, 0xa0, 0xe5, 0x1a, 0xe5, 0xcf, 0xe4,
  848. 0x75, 0xb0, 0x03, 0xe6, 0x68, 0x89, 0xaf, 0x2f, 0x6b, 0x19, 0x9c, 0xc0, 0xea, 0x7f, 0xce, 0x42,
  849. 0x81, 0x7b, 0xd0, 0x2e, 0x64, 0x1d, 0x9b, 0x53, 0xd4, 0x2a, 0x5c, 0x5d, 0xd6, 0xb2, 0xdd, 0x0e,
  850. 0xce, 0x3a, 0x36, 0xba, 0x0d, 0x79, 0xd7, 0x3a, 0x25, 0x6e, 0x4c, 0x0e, 0x9f, 0xa0, 0x0f, 0xa1,
  851. 0xe4, 0x13, 0xcb, 0x36, 0xa9, 0xe7, 0xce, 0x19, 0x25, 0x12, 0x96, 0x22, 0x43, 0xcf, 0x73, 0xe7,
  852. 0xe8, 0x47, 0x80, 0x9c, 0xb1, 0x47, 0x7d, 0x62, 0x4e, 0x89, 0x3f, 0x71, 0xd8, 0xdf, 0x06, 0x8a,
  853. 0xc8, 0x50, 0x3b, 0xdc, 0x73, 0xbc, 0x76, 0xa0, 0xfb, 0xb0, 0x15, 0xc3, 0x6d, 0xe2, 0x92, 0x90,
  854. 0x28, 0x79, 0x86, 0xac, 0x70, 0x63, 0x87, 0xd9, 0xd0, 0x3e, 0xdc, 0xb6, 0x9d, 0xc0, 0x3a, 0x75,
  855. 0x89, 0x19, 0x92, 0xc9, 0xd4, 0x74, 0x3c, 0x9b, 0xbc, 0x22, 0x81, 0x52, 0x60, 0x58, 0x14, 0xfb,
  856. 0x06, 0x64, 0x32, 0xed, 0x72, 0x0f, 0xda, 0x85, 0xc2, 0xd4, 0x9a, 0x05, 0xc4, 0x56, 0x8a, 0x0c,
  857. 0x13, 0xcf, 0x22, 0x96, 0x78, 0x05, 0x04, 0x8a, 0x7c, 0x9d, 0xa5, 0x0e, 0x73, 0x24, 0x2c, 0xc5,
  858. 0xb0, 0xfa, 0xbf, 0xb3, 0x50, 0xe0, 0x1e, 0xf4, 0xf1, 0x8a, 0xa5, 0x4a, 0x6b, 0x37, 0x42, 0xfd,
  859. 0xf3, 0xb2, 0x26, 0x71, 0x5f, 0xb7, 0x93, 0x62, 0x0d, 0x81, 0x98, 0xaa, 0x28, 0x36, 0x46, 0x77,
  860. 0xa1, 0x64, 0xd9, 0x76, 0x94, 0x3d, 0x12, 0x28, 0x39, 0x2d, 0xd7, 0x28, 0xe1, 0xb5, 0x01, 0xfd,
  861. 0x6c, 0xb3, 0x1a, 0xc4, 0xeb, 0xf5, 0xf3, 0xbe, 0x32, 0x88, 0x52, 0x31, 0x24, 0x7e, 0x5c, 0xc1,
  862. 0x79, 0xb6, 0x9f, 0x14, 0x19, 0x58, 0xfd, 0xde, 0x83, 0xca, 0xc4, 0x7a, 0x65, 0x06, 0xe4, 0x0f,
  863. 0x33, 0xe2, 0x0d, 0x09, 0xa3, 0x2b, 0x87, 0xcb, 0x13, 0xeb, 0x55, 0x3f, 0x36, 0xa1, 0x2a, 0x80,
  864. 0xe3, 0x85, 0x3e, 0xb5, 0x67, 0x43, 0xe2, 0xc7, 0x5c, 0xa5, 0x2c, 0xe8, 0x27, 0x20, 0x31, 0xb2,
  865. 0x4d, 0xc7, 0x56, 0x24, 0x4d, 0x68, 0x88, 0x2d, 0x35, 0x3e, 0x78, 0x91, 0x51, 0xcd, 0xce, 0x9d,
  866. 0x0c, 0x71, 0x91, 0x61, 0xbb, 0x36, 0xfa, 0x25, 0xa8, 0xc1, 0x4b, 0x27, 0x4a, 0x14, 0x8f, 0x14,
  867. 0x3a, 0xd4, 0x33, 0x7d, 0x32, 0xa1, 0xe7, 0x96, 0x1b, 0x28, 0x25, 0xb6, 0x8d, 0x12, 0x21, 0xba,
  868. 0x29, 0x00, 0x8e, 0xfd, 0xf5, 0x1e, 0xe4, 0x59, 0xc4, 0x28, 0x8b, 0xbc, 0x58, 0xe3, 0xee, 0x8d,
  869. 0x67, 0xe8, 0x31, 0xe4, 0x47, 0x8e, 0x4b, 0x02, 0x25, 0xcb, 0x72, 0x88, 0x52, 0x95, 0xee, 0xb8,
  870. 0xa4, 0xeb, 0x8d, 0x68, 0x9c, 0x45, 0x0e, 0xab, 0x9f, 0x40, 0x99, 0x05, 0x3c, 0x99, 0xda, 0x56,
  871. 0x48, 0xfe, 0x67, 0x61, 0x2f, 0x45, 0x90, 0x12, 0xcf, 0x2a, 0xe9, 0x42, 0x2a, 0xe9, 0x7b, 0xb1,
  872. 0x1e, 0xf0, 0xee, 0xde, 0xbd, 0x19, 0x2f, 0x25, 0x08, 0x08, 0xc4, 0xc0, 0xf9, 0x9a, 0xb0, 0x7e,
  873. 0xca, 0x61, 0x36, 0x46, 0x1a, 0x94, 0xaf, 0x37, 0xd1, 0x16, 0x4e, 0x9b, 0xd0, 0x47, 0x00, 0x13,
  874. 0x6a, 0x3b, 0x23, 0x87, 0xd8, 0x66, 0xc0, 0x0a, 0x20, 0x87, 0x4b, 0x89, 0xa5, 0x1f, 0x49, 0xdc,
  875. 0xca, 0xed, 0x05, 0x4a, 0x59, 0x13, 0x1a, 0x79, 0xbc, 0x5a, 0x61, 0x04, 0x68, 0x3f, 0x05, 0x38,
  876. 0x9d, 0x2b, 0x15, 0x96, 0xe2, 0x0f, 0x92, 0x14, 0xf7, 0xcf, 0xa8, 0x1f, 0x76, 0x3b, 0xeb, 0x15,
  877. 0xad, 0x39, 0x52, 0xa2, 0x0e, 0x8a, 0xba, 0xd2, 0x8e, 0xdb, 0x2f, 0x99, 0xa2, 0x06, 0x14, 0x1d,
  878. 0xef, 0xdc, 0x72, 0x9d, 0xb8, 0xe9, 0x5a, 0xdb, 0x57, 0x97, 0x35, 0xc0, 0xd6, 0x45, 0x97, 0x5b,
  879. 0x71, 0xe2, 0x8e, 0x84, 0xd5, 0xa3, 0x1b, 0xfa, 0x20, 0xb1, 0x50, 0x5b, 0x1e, 0x4d, 0x6b, 0xc3,
  880. 0x3e, 0x14, 0x13, 0xe1, 0x8d, 0x4a, 0x66, 0xa3, 0x59, 0x9f, 0x93, 0x61, 0x48, 0x57, 0x92, 0x16,
  881. 0xc3, 0x90, 0x0a, 0xd2, 0xaa, 0xda, 0x81, 0x91, 0xb1, 0x9a, 0xa3, 0x27, 0x00, 0xa7, 0x2e, 0x1d,
  882. 0xbe, 0x34, 0x19, 0xcd, 0x5b, 0x11, 0x15, 0x2d, 0xf9, 0xea, 0xb2, 0x56, 0xc1, 0xd6, 0x45, 0x2b,
  883. 0x72, 0xf4, 0x9d, 0xaf, 0x09, 0x2e, 0x9d, 0x26, 0x43, 0xf4, 0x63, 0x28, 0x30, 0x7b, 0x22, 0x15,
  884. 0xb7, 0xd6, 0xbb, 0x33, 0x7b, 0xaa, 0x20, 0x62, 0x60, 0x74, 0xb0, 0x60, 0x3e, 0x71, 0x1d, 0xef,
  885. 0xa5, 0x19, 0x5a, 0xfe, 0x98, 0x84, 0xca, 0x0e, 0xbf, 0x31, 0x62, 0xeb, 0x80, 0x19, 0xa3, 0xbc,
  886. 0xba, 0x74, 0x68, 0xb9, 0xe6, 0xc8, 0xb5, 0xc6, 0x81, 0xf2, 0x5d, 0x91, 0x25, 0x16, 0x98, 0xed,
  887. 0x20, 0x32, 0xfd, 0x42, 0xfc, 0xd3, 0x37, 0xb5, 0x4c, 0xdd, 0x83, 0xd2, 0x6a, 0xa7, 0xa8, 0x6a,
  888. 0xe9, 0x68, 0x14, 0x90, 0x90, 0x95, 0x58, 0x0e, 0xc7, 0xb3, 0x55, 0xe1, 0x64, 0x59, 0x72, 0x79,
  889. 0xe1, 0x20, 0x10, 0xcf, 0xac, 0xe0, 0x8c, 0x15, 0x53, 0x05, 0xb3, 0x71, 0x24, 0x15, 0x17, 0xc4,
  890. 0x7a, 0x69, 0x32, 0x07, 0x2f, 0x25, 0x29, 0x32, 0x3c, 0xb5, 0x82, 0xb3, 0x78, 0xbf, 0x5f, 0x41,
  891. 0x81, 0xf3, 0x8a, 0x3e, 0x07, 0x69, 0x48, 0x67, 0x5e, 0xb8, 0xbe, 0x4e, 0x76, 0xd2, 0x6a, 0xc4,
  892. 0x3c, 0xf1, 0xd9, 0x57, 0xc0, 0xfa, 0x01, 0x14, 0x63, 0x17, 0x7a, 0xb8, 0x92, 0x4a, 0xb1, 0x75,
  893. 0xe7, 0x5a, 0x39, 0x6d, 0xde, 0x2f, 0xe7, 0x96, 0x3b, 0xe3, 0x3f, 0x2f, 0x62, 0x3e, 0xa9, 0xff,
  894. 0x55, 0x80, 0x22, 0x8e, 0xd2, 0x16, 0x84, 0xa9, 0x9b, 0x29, 0xbf, 0x71, 0x33, 0xad, 0x7b, 0x38,
  895. 0xbb, 0xd1, 0xc3, 0x49, 0x1b, 0xe6, 0x52, 0x6d, 0xb8, 0x66, 0x4e, 0x7c, 0x27, 0x73, 0xf9, 0x77,
  896. 0x30, 0x57, 0x48, 0x31, 0xf7, 0x10, 0xb6, 0x47, 0x3e, 0x9d, 0xb0, 0xbb, 0x87, 0xfa, 0x96, 0x3f,
  897. 0x8f, 0x85, 0x72, 0x2b, 0xb2, 0x0e, 0x12, 0xe3, 0x26, 0xc1, 0xd2, 0x26, 0xc1, 0x75, 0x13, 0x24,
  898. 0x4c, 0x82, 0x29, 0xf5, 0x02, 0xf2, 0xde, 0x33, 0x21, 0x10, 0x6d, 0x2b, 0xb4, 0xd8, 0x89, 0x2a,
  899. 0x98, 0x8d, 0xd1, 0x23, 0x10, 0x87, 0xd4, 0xe6, 0xe7, 0xd9, 0x4e, 0x97, 0xa0, 0xee, 0xfb, 0xd4,
  900. 0x6f, 0x53, 0x9b, 0x60, 0x06, 0xa8, 0x4f, 0x41, 0xee, 0xd0, 0x0b, 0xcf, 0xa5, 0x96, 0x7d, 0xec,
  901. 0xd3, 0x71, 0x74, 0x41, 0xbc, 0x57, 0xe8, 0x3a, 0x50, 0x9c, 0x31, 0x29, 0x4c, 0xa4, 0xee, 0xc1,
  902. 0xa6, 0x34, 0x5d, 0x0f, 0xc4, 0x75, 0x33, 0x69, 0xb6, 0x78, 0x69, 0xfd, 0xef, 0x02, 0xa8, 0xef,
  903. 0x47, 0xa3, 0x2e, 0x94, 0x39, 0xd2, 0x4c, 0xbd, 0x89, 0x1a, 0x3f, 0x64, 0x23, 0xa6, 0x8a, 0x30,
  904. 0x5b, 0x8d, 0xdf, 0x79, 0xa1, 0xa6, 0xc4, 0x21, 0xf7, 0xc3, 0xc4, 0xe1, 0x11, 0x6c, 0x71, 0x01,
  905. 0x48, 0x9e, 0x0f, 0xa2, 0x96, 0x6b, 0xe4, 0x5b, 0x59, 0x39, 0x83, 0x2b, 0xa7, 0xbc, 0xcd, 0x98,
  906. 0xbd, 0x5e, 0x00, 0xf1, 0xd8, 0xf1, 0xc6, 0xf5, 0x1a, 0xe4, 0xdb, 0x2e, 0x65, 0x09, 0x2b, 0xf8,
  907. 0xc4, 0x0a, 0xa8, 0x97, 0xf0, 0xc8, 0x67, 0x7b, 0x7f, 0xcb, 0x42, 0x39, 0xf5, 0xb4, 0x43, 0xfb,
  908. 0xb0, 0xdd, 0x3e, 0x3a, 0xe9, 0x0f, 0x74, 0x6c, 0xb6, 0x7b, 0xc6, 0x41, 0xf7, 0x50, 0xce, 0xa8,
  909. 0x77, 0x17, 0x4b, 0x4d, 0x99, 0xac, 0x41, 0x9b, 0xaf, 0xb6, 0x1a, 0xe4, 0xbb, 0x46, 0x47, 0xff,
  910. 0x9d, 0x2c, 0xa8, 0xb7, 0x17, 0x4b, 0x4d, 0x4e, 0x01, 0xf9, 0x15, 0xf8, 0x29, 0x54, 0x18, 0xc0,
  911. 0x3c, 0x39, 0xee, 0x34, 0x07, 0xba, 0x9c, 0x55, 0xd5, 0xc5, 0x52, 0xdb, 0xbd, 0x8e, 0x8b, 0x39,
  912. 0xbf, 0x0f, 0x45, 0xac, 0xff, 0xf6, 0x44, 0xef, 0x0f, 0xe4, 0x9c, 0xba, 0xbb, 0x58, 0x6a, 0x28,
  913. 0x05, 0x4c, 0x5a, 0xea, 0x21, 0x48, 0x58, 0xef, 0x1f, 0xf7, 0x8c, 0xbe, 0x2e, 0x8b, 0xea, 0xff,
  914. 0x2d, 0x96, 0xda, 0xad, 0x0d, 0x54, 0x5c, 0xa5, 0x3f, 0x85, 0x9d, 0x4e, 0xef, 0x4b, 0xe3, 0xa8,
  915. 0xd7, 0xec, 0x98, 0xc7, 0xb8, 0x77, 0x88, 0xf5, 0x7e, 0x5f, 0xce, 0xab, 0xb5, 0xc5, 0x52, 0xfb,
  916. 0x30, 0x85, 0xbf, 0x51, 0x74, 0x1f, 0x81, 0x78, 0xdc, 0x35, 0x0e, 0xe5, 0x82, 0x7a, 0x6b, 0xb1,
  917. 0xd4, 0x3e, 0x48, 0x41, 0x23, 0x52, 0xa3, 0x13, 0xb7, 0x8f, 0x7a, 0x7d, 0x5d, 0x2e, 0xde, 0x38,
  918. 0x31, 0x23, 0x7b, 0xef, 0xf7, 0x80, 0x6e, 0x3e, 0x7e, 0xd1, 0x03, 0x10, 0x8d, 0x9e, 0xa1, 0xcb,
  919. 0x19, 0x7e, 0xfe, 0x9b, 0x08, 0x83, 0x7a, 0x04, 0xd5, 0x21, 0x77, 0xf4, 0xd5, 0x17, 0xb2, 0xa0,
  920. 0xfe, 0xff, 0x62, 0xa9, 0xdd, 0xb9, 0x09, 0x3a, 0xfa, 0xea, 0x8b, 0x3d, 0x0a, 0xe5, 0x74, 0xe0,
  921. 0x3a, 0x48, 0xcf, 0xf4, 0x41, 0xb3, 0xd3, 0x1c, 0x34, 0xe5, 0x0c, 0xff, 0xa5, 0xc4, 0xfd, 0x8c,
  922. 0x84, 0x16, 0x6b, 0xc2, 0xbb, 0x90, 0x37, 0xf4, 0xe7, 0x3a, 0x96, 0x05, 0x75, 0x67, 0xb1, 0xd4,
  923. 0xb6, 0x12, 0x80, 0x41, 0xce, 0x89, 0x8f, 0xaa, 0x50, 0x68, 0x1e, 0x7d, 0xd9, 0x7c, 0xd1, 0x97,
  924. 0xb3, 0x2a, 0x5a, 0x2c, 0xb5, 0xed, 0xc4, 0xdd, 0x74, 0x2f, 0xac, 0x79, 0xb0, 0xf7, 0x1f, 0x01,
  925. 0x2a, 0xe9, 0x0b, 0x1f, 0x55, 0x41, 0x3c, 0xe8, 0x1e, 0xe9, 0xc9, 0x76, 0x69, 0x5f, 0x34, 0x46,
  926. 0x0d, 0x28, 0x75, 0xba, 0x58, 0x6f, 0x0f, 0x7a, 0xf8, 0x45, 0x72, 0x96, 0x34, 0xa8, 0xe3, 0xf8,
  927. 0xac, 0xc0, 0xe7, 0xe8, 0xe7, 0x50, 0xe9, 0xbf, 0x78, 0x76, 0xd4, 0x35, 0x7e, 0x63, 0xb2, 0x88,
  928. 0x59, 0xf5, 0xd1, 0x62, 0xa9, 0xdd, 0xdb, 0x00, 0x93, 0xa9, 0x4f, 0x86, 0x56, 0x48, 0xec, 0x3e,
  929. 0xbf, 0x83, 0x22, 0xa7, 0x24, 0xa0, 0x36, 0xec, 0x24, 0x4b, 0xd7, 0x9b, 0xe5, 0xd4, 0x4f, 0x17,
  930. 0x4b, 0xed, 0xe3, 0xef, 0x5d, 0xbf, 0xda, 0x5d, 0x12, 0xd0, 0x03, 0x28, 0xc6, 0x41, 0x92, 0x4a,
  931. 0x4a, 0x2f, 0x8d, 0x17, 0xec, 0xfd, 0x45, 0x80, 0xd2, 0x4a, 0xae, 0x22, 0xc2, 0x8d, 0x9e, 0xa9,
  932. 0x63, 0xdc, 0xc3, 0x09, 0x03, 0x2b, 0xa7, 0x41, 0xd9, 0x10, 0xdd, 0x83, 0xe2, 0xa1, 0x6e, 0xe8,
  933. 0xb8, 0xdb, 0x4e, 0x1a, 0x63, 0x05, 0x39, 0x24, 0x1e, 0xf1, 0x9d, 0x21, 0xfa, 0x04, 0x2a, 0x46,
  934. 0xcf, 0xec, 0x9f, 0xb4, 0x9f, 0x26, 0x47, 0x67, 0xfb, 0xa7, 0x42, 0xf5, 0x67, 0xc3, 0x33, 0xc6,
  935. 0xe7, 0x5e, 0xd4, 0x43, 0xcf, 0x9b, 0x47, 0xdd, 0x0e, 0x87, 0xe6, 0x54, 0x65, 0xb1, 0xd4, 0x6e,
  936. 0xaf, 0xa0, 0xf1, 0xfb, 0x24, 0xc2, 0xee, 0xd9, 0x50, 0xfd, 0x7e, 0x61, 0x42, 0x1a, 0x14, 0x9a,
  937. 0xc7, 0xc7, 0xba, 0xd1, 0x49, 0xfe, 0x7e, 0xed, 0x6b, 0x4e, 0xa7, 0xc4, 0xb3, 0x23, 0xc4, 0x41,
  938. 0x0f, 0x1f, 0xea, 0x83, 0xe4, 0xe7, 0xd7, 0x88, 0x03, 0x1a, 0x3d, 0x00, 0x5a, 0x8d, 0xd7, 0xdf,
  939. 0x56, 0x33, 0x6f, 0xbe, 0xad, 0x66, 0x5e, 0x5f, 0x55, 0x85, 0x37, 0x57, 0x55, 0xe1, 0x5f, 0x57,
  940. 0xd5, 0xcc, 0x77, 0x57, 0x55, 0xe1, 0x8f, 0x6f, 0xab, 0x99, 0x6f, 0xde, 0x56, 0x85, 0x37, 0x6f,
  941. 0xab, 0x99, 0x7f, 0xbc, 0xad, 0x66, 0x4e, 0x0b, 0x4c, 0xd4, 0x3e, 0xff, 0x6f, 0x00, 0x00, 0x00,
  942. 0xff, 0xff, 0x64, 0xa1, 0x2b, 0x55, 0x11, 0x0f, 0x00, 0x00,
  943. }
  944. func (m *Hello) Marshal() (dAtA []byte, err error) {
  945. size := m.ProtoSize()
  946. dAtA = make([]byte, size)
  947. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  948. if err != nil {
  949. return nil, err
  950. }
  951. return dAtA[:n], nil
  952. }
  953. func (m *Hello) MarshalTo(dAtA []byte) (int, error) {
  954. size := m.ProtoSize()
  955. return m.MarshalToSizedBuffer(dAtA[:size])
  956. }
  957. func (m *Hello) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  958. i := len(dAtA)
  959. _ = i
  960. var l int
  961. _ = l
  962. if len(m.ClientVersion) > 0 {
  963. i -= len(m.ClientVersion)
  964. copy(dAtA[i:], m.ClientVersion)
  965. i = encodeVarintBep(dAtA, i, uint64(len(m.ClientVersion)))
  966. i--
  967. dAtA[i] = 0x1a
  968. }
  969. if len(m.ClientName) > 0 {
  970. i -= len(m.ClientName)
  971. copy(dAtA[i:], m.ClientName)
  972. i = encodeVarintBep(dAtA, i, uint64(len(m.ClientName)))
  973. i--
  974. dAtA[i] = 0x12
  975. }
  976. if len(m.DeviceName) > 0 {
  977. i -= len(m.DeviceName)
  978. copy(dAtA[i:], m.DeviceName)
  979. i = encodeVarintBep(dAtA, i, uint64(len(m.DeviceName)))
  980. i--
  981. dAtA[i] = 0xa
  982. }
  983. return len(dAtA) - i, nil
  984. }
  985. func (m *Header) Marshal() (dAtA []byte, err error) {
  986. size := m.ProtoSize()
  987. dAtA = make([]byte, size)
  988. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  989. if err != nil {
  990. return nil, err
  991. }
  992. return dAtA[:n], nil
  993. }
  994. func (m *Header) MarshalTo(dAtA []byte) (int, error) {
  995. size := m.ProtoSize()
  996. return m.MarshalToSizedBuffer(dAtA[:size])
  997. }
  998. func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  999. i := len(dAtA)
  1000. _ = i
  1001. var l int
  1002. _ = l
  1003. if m.Compression != 0 {
  1004. i = encodeVarintBep(dAtA, i, uint64(m.Compression))
  1005. i--
  1006. dAtA[i] = 0x10
  1007. }
  1008. if m.Type != 0 {
  1009. i = encodeVarintBep(dAtA, i, uint64(m.Type))
  1010. i--
  1011. dAtA[i] = 0x8
  1012. }
  1013. return len(dAtA) - i, nil
  1014. }
  1015. func (m *ClusterConfig) Marshal() (dAtA []byte, err error) {
  1016. size := m.ProtoSize()
  1017. dAtA = make([]byte, size)
  1018. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1019. if err != nil {
  1020. return nil, err
  1021. }
  1022. return dAtA[:n], nil
  1023. }
  1024. func (m *ClusterConfig) MarshalTo(dAtA []byte) (int, error) {
  1025. size := m.ProtoSize()
  1026. return m.MarshalToSizedBuffer(dAtA[:size])
  1027. }
  1028. func (m *ClusterConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1029. i := len(dAtA)
  1030. _ = i
  1031. var l int
  1032. _ = l
  1033. if len(m.Folders) > 0 {
  1034. for iNdEx := len(m.Folders) - 1; iNdEx >= 0; iNdEx-- {
  1035. {
  1036. size, err := m.Folders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1037. if err != nil {
  1038. return 0, err
  1039. }
  1040. i -= size
  1041. i = encodeVarintBep(dAtA, i, uint64(size))
  1042. }
  1043. i--
  1044. dAtA[i] = 0xa
  1045. }
  1046. }
  1047. return len(dAtA) - i, nil
  1048. }
  1049. func (m *Folder) Marshal() (dAtA []byte, err error) {
  1050. size := m.ProtoSize()
  1051. dAtA = make([]byte, size)
  1052. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1053. if err != nil {
  1054. return nil, err
  1055. }
  1056. return dAtA[:n], nil
  1057. }
  1058. func (m *Folder) MarshalTo(dAtA []byte) (int, error) {
  1059. size := m.ProtoSize()
  1060. return m.MarshalToSizedBuffer(dAtA[:size])
  1061. }
  1062. func (m *Folder) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1063. i := len(dAtA)
  1064. _ = i
  1065. var l int
  1066. _ = l
  1067. if len(m.Devices) > 0 {
  1068. for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  1069. {
  1070. size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1071. if err != nil {
  1072. return 0, err
  1073. }
  1074. i -= size
  1075. i = encodeVarintBep(dAtA, i, uint64(size))
  1076. }
  1077. i--
  1078. dAtA[i] = 0x1
  1079. i--
  1080. dAtA[i] = 0x82
  1081. }
  1082. }
  1083. if m.Paused {
  1084. i--
  1085. if m.Paused {
  1086. dAtA[i] = 1
  1087. } else {
  1088. dAtA[i] = 0
  1089. }
  1090. i--
  1091. dAtA[i] = 0x38
  1092. }
  1093. if m.DisableTempIndexes {
  1094. i--
  1095. if m.DisableTempIndexes {
  1096. dAtA[i] = 1
  1097. } else {
  1098. dAtA[i] = 0
  1099. }
  1100. i--
  1101. dAtA[i] = 0x30
  1102. }
  1103. if m.IgnoreDelete {
  1104. i--
  1105. if m.IgnoreDelete {
  1106. dAtA[i] = 1
  1107. } else {
  1108. dAtA[i] = 0
  1109. }
  1110. i--
  1111. dAtA[i] = 0x28
  1112. }
  1113. if m.IgnorePermissions {
  1114. i--
  1115. if m.IgnorePermissions {
  1116. dAtA[i] = 1
  1117. } else {
  1118. dAtA[i] = 0
  1119. }
  1120. i--
  1121. dAtA[i] = 0x20
  1122. }
  1123. if m.ReadOnly {
  1124. i--
  1125. if m.ReadOnly {
  1126. dAtA[i] = 1
  1127. } else {
  1128. dAtA[i] = 0
  1129. }
  1130. i--
  1131. dAtA[i] = 0x18
  1132. }
  1133. if len(m.Label) > 0 {
  1134. i -= len(m.Label)
  1135. copy(dAtA[i:], m.Label)
  1136. i = encodeVarintBep(dAtA, i, uint64(len(m.Label)))
  1137. i--
  1138. dAtA[i] = 0x12
  1139. }
  1140. if len(m.ID) > 0 {
  1141. i -= len(m.ID)
  1142. copy(dAtA[i:], m.ID)
  1143. i = encodeVarintBep(dAtA, i, uint64(len(m.ID)))
  1144. i--
  1145. dAtA[i] = 0xa
  1146. }
  1147. return len(dAtA) - i, nil
  1148. }
  1149. func (m *Device) Marshal() (dAtA []byte, err error) {
  1150. size := m.ProtoSize()
  1151. dAtA = make([]byte, size)
  1152. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1153. if err != nil {
  1154. return nil, err
  1155. }
  1156. return dAtA[:n], nil
  1157. }
  1158. func (m *Device) MarshalTo(dAtA []byte) (int, error) {
  1159. size := m.ProtoSize()
  1160. return m.MarshalToSizedBuffer(dAtA[:size])
  1161. }
  1162. func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1163. i := len(dAtA)
  1164. _ = i
  1165. var l int
  1166. _ = l
  1167. if m.SkipIntroductionRemovals {
  1168. i--
  1169. if m.SkipIntroductionRemovals {
  1170. dAtA[i] = 1
  1171. } else {
  1172. dAtA[i] = 0
  1173. }
  1174. i--
  1175. dAtA[i] = 0x48
  1176. }
  1177. if m.IndexID != 0 {
  1178. i = encodeVarintBep(dAtA, i, uint64(m.IndexID))
  1179. i--
  1180. dAtA[i] = 0x40
  1181. }
  1182. if m.Introducer {
  1183. i--
  1184. if m.Introducer {
  1185. dAtA[i] = 1
  1186. } else {
  1187. dAtA[i] = 0
  1188. }
  1189. i--
  1190. dAtA[i] = 0x38
  1191. }
  1192. if m.MaxSequence != 0 {
  1193. i = encodeVarintBep(dAtA, i, uint64(m.MaxSequence))
  1194. i--
  1195. dAtA[i] = 0x30
  1196. }
  1197. if len(m.CertName) > 0 {
  1198. i -= len(m.CertName)
  1199. copy(dAtA[i:], m.CertName)
  1200. i = encodeVarintBep(dAtA, i, uint64(len(m.CertName)))
  1201. i--
  1202. dAtA[i] = 0x2a
  1203. }
  1204. if m.Compression != 0 {
  1205. i = encodeVarintBep(dAtA, i, uint64(m.Compression))
  1206. i--
  1207. dAtA[i] = 0x20
  1208. }
  1209. if len(m.Addresses) > 0 {
  1210. for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
  1211. i -= len(m.Addresses[iNdEx])
  1212. copy(dAtA[i:], m.Addresses[iNdEx])
  1213. i = encodeVarintBep(dAtA, i, uint64(len(m.Addresses[iNdEx])))
  1214. i--
  1215. dAtA[i] = 0x1a
  1216. }
  1217. }
  1218. if len(m.Name) > 0 {
  1219. i -= len(m.Name)
  1220. copy(dAtA[i:], m.Name)
  1221. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1222. i--
  1223. dAtA[i] = 0x12
  1224. }
  1225. {
  1226. size := m.ID.ProtoSize()
  1227. i -= size
  1228. if _, err := m.ID.MarshalTo(dAtA[i:]); err != nil {
  1229. return 0, err
  1230. }
  1231. i = encodeVarintBep(dAtA, i, uint64(size))
  1232. }
  1233. i--
  1234. dAtA[i] = 0xa
  1235. return len(dAtA) - i, nil
  1236. }
  1237. func (m *Index) Marshal() (dAtA []byte, err error) {
  1238. size := m.ProtoSize()
  1239. dAtA = make([]byte, size)
  1240. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1241. if err != nil {
  1242. return nil, err
  1243. }
  1244. return dAtA[:n], nil
  1245. }
  1246. func (m *Index) MarshalTo(dAtA []byte) (int, error) {
  1247. size := m.ProtoSize()
  1248. return m.MarshalToSizedBuffer(dAtA[:size])
  1249. }
  1250. func (m *Index) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1251. i := len(dAtA)
  1252. _ = i
  1253. var l int
  1254. _ = l
  1255. if len(m.Files) > 0 {
  1256. for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- {
  1257. {
  1258. size, err := m.Files[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1259. if err != nil {
  1260. return 0, err
  1261. }
  1262. i -= size
  1263. i = encodeVarintBep(dAtA, i, uint64(size))
  1264. }
  1265. i--
  1266. dAtA[i] = 0x12
  1267. }
  1268. }
  1269. if len(m.Folder) > 0 {
  1270. i -= len(m.Folder)
  1271. copy(dAtA[i:], m.Folder)
  1272. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1273. i--
  1274. dAtA[i] = 0xa
  1275. }
  1276. return len(dAtA) - i, nil
  1277. }
  1278. func (m *IndexUpdate) Marshal() (dAtA []byte, err error) {
  1279. size := m.ProtoSize()
  1280. dAtA = make([]byte, size)
  1281. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1282. if err != nil {
  1283. return nil, err
  1284. }
  1285. return dAtA[:n], nil
  1286. }
  1287. func (m *IndexUpdate) MarshalTo(dAtA []byte) (int, error) {
  1288. size := m.ProtoSize()
  1289. return m.MarshalToSizedBuffer(dAtA[:size])
  1290. }
  1291. func (m *IndexUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1292. i := len(dAtA)
  1293. _ = i
  1294. var l int
  1295. _ = l
  1296. if len(m.Files) > 0 {
  1297. for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- {
  1298. {
  1299. size, err := m.Files[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1300. if err != nil {
  1301. return 0, err
  1302. }
  1303. i -= size
  1304. i = encodeVarintBep(dAtA, i, uint64(size))
  1305. }
  1306. i--
  1307. dAtA[i] = 0x12
  1308. }
  1309. }
  1310. if len(m.Folder) > 0 {
  1311. i -= len(m.Folder)
  1312. copy(dAtA[i:], m.Folder)
  1313. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1314. i--
  1315. dAtA[i] = 0xa
  1316. }
  1317. return len(dAtA) - i, nil
  1318. }
  1319. func (m *FileInfo) Marshal() (dAtA []byte, err error) {
  1320. size := m.ProtoSize()
  1321. dAtA = make([]byte, size)
  1322. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1323. if err != nil {
  1324. return nil, err
  1325. }
  1326. return dAtA[:n], nil
  1327. }
  1328. func (m *FileInfo) MarshalTo(dAtA []byte) (int, error) {
  1329. size := m.ProtoSize()
  1330. return m.MarshalToSizedBuffer(dAtA[:size])
  1331. }
  1332. func (m *FileInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1333. i := len(dAtA)
  1334. _ = i
  1335. var l int
  1336. _ = l
  1337. if m.LocalFlags != 0 {
  1338. i = encodeVarintBep(dAtA, i, uint64(m.LocalFlags))
  1339. i--
  1340. dAtA[i] = 0x3e
  1341. i--
  1342. dAtA[i] = 0xc0
  1343. }
  1344. if len(m.SymlinkTarget) > 0 {
  1345. i -= len(m.SymlinkTarget)
  1346. copy(dAtA[i:], m.SymlinkTarget)
  1347. i = encodeVarintBep(dAtA, i, uint64(len(m.SymlinkTarget)))
  1348. i--
  1349. dAtA[i] = 0x1
  1350. i--
  1351. dAtA[i] = 0x8a
  1352. }
  1353. if len(m.Blocks) > 0 {
  1354. for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- {
  1355. {
  1356. size, err := m.Blocks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1357. if err != nil {
  1358. return 0, err
  1359. }
  1360. i -= size
  1361. i = encodeVarintBep(dAtA, i, uint64(size))
  1362. }
  1363. i--
  1364. dAtA[i] = 0x1
  1365. i--
  1366. dAtA[i] = 0x82
  1367. }
  1368. }
  1369. if m.RawBlockSize != 0 {
  1370. i = encodeVarintBep(dAtA, i, uint64(m.RawBlockSize))
  1371. i--
  1372. dAtA[i] = 0x68
  1373. }
  1374. if m.ModifiedBy != 0 {
  1375. i = encodeVarintBep(dAtA, i, uint64(m.ModifiedBy))
  1376. i--
  1377. dAtA[i] = 0x60
  1378. }
  1379. if m.ModifiedNs != 0 {
  1380. i = encodeVarintBep(dAtA, i, uint64(m.ModifiedNs))
  1381. i--
  1382. dAtA[i] = 0x58
  1383. }
  1384. if m.Sequence != 0 {
  1385. i = encodeVarintBep(dAtA, i, uint64(m.Sequence))
  1386. i--
  1387. dAtA[i] = 0x50
  1388. }
  1389. {
  1390. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  1391. if err != nil {
  1392. return 0, err
  1393. }
  1394. i -= size
  1395. i = encodeVarintBep(dAtA, i, uint64(size))
  1396. }
  1397. i--
  1398. dAtA[i] = 0x4a
  1399. if m.NoPermissions {
  1400. i--
  1401. if m.NoPermissions {
  1402. dAtA[i] = 1
  1403. } else {
  1404. dAtA[i] = 0
  1405. }
  1406. i--
  1407. dAtA[i] = 0x40
  1408. }
  1409. if m.RawInvalid {
  1410. i--
  1411. if m.RawInvalid {
  1412. dAtA[i] = 1
  1413. } else {
  1414. dAtA[i] = 0
  1415. }
  1416. i--
  1417. dAtA[i] = 0x38
  1418. }
  1419. if m.Deleted {
  1420. i--
  1421. if m.Deleted {
  1422. dAtA[i] = 1
  1423. } else {
  1424. dAtA[i] = 0
  1425. }
  1426. i--
  1427. dAtA[i] = 0x30
  1428. }
  1429. if m.ModifiedS != 0 {
  1430. i = encodeVarintBep(dAtA, i, uint64(m.ModifiedS))
  1431. i--
  1432. dAtA[i] = 0x28
  1433. }
  1434. if m.Permissions != 0 {
  1435. i = encodeVarintBep(dAtA, i, uint64(m.Permissions))
  1436. i--
  1437. dAtA[i] = 0x20
  1438. }
  1439. if m.Size != 0 {
  1440. i = encodeVarintBep(dAtA, i, uint64(m.Size))
  1441. i--
  1442. dAtA[i] = 0x18
  1443. }
  1444. if m.Type != 0 {
  1445. i = encodeVarintBep(dAtA, i, uint64(m.Type))
  1446. i--
  1447. dAtA[i] = 0x10
  1448. }
  1449. if len(m.Name) > 0 {
  1450. i -= len(m.Name)
  1451. copy(dAtA[i:], m.Name)
  1452. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1453. i--
  1454. dAtA[i] = 0xa
  1455. }
  1456. return len(dAtA) - i, nil
  1457. }
  1458. func (m *BlockInfo) Marshal() (dAtA []byte, err error) {
  1459. size := m.ProtoSize()
  1460. dAtA = make([]byte, size)
  1461. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1462. if err != nil {
  1463. return nil, err
  1464. }
  1465. return dAtA[:n], nil
  1466. }
  1467. func (m *BlockInfo) MarshalTo(dAtA []byte) (int, error) {
  1468. size := m.ProtoSize()
  1469. return m.MarshalToSizedBuffer(dAtA[:size])
  1470. }
  1471. func (m *BlockInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1472. i := len(dAtA)
  1473. _ = i
  1474. var l int
  1475. _ = l
  1476. if m.WeakHash != 0 {
  1477. i = encodeVarintBep(dAtA, i, uint64(m.WeakHash))
  1478. i--
  1479. dAtA[i] = 0x20
  1480. }
  1481. if len(m.Hash) > 0 {
  1482. i -= len(m.Hash)
  1483. copy(dAtA[i:], m.Hash)
  1484. i = encodeVarintBep(dAtA, i, uint64(len(m.Hash)))
  1485. i--
  1486. dAtA[i] = 0x1a
  1487. }
  1488. if m.Size != 0 {
  1489. i = encodeVarintBep(dAtA, i, uint64(m.Size))
  1490. i--
  1491. dAtA[i] = 0x10
  1492. }
  1493. if m.Offset != 0 {
  1494. i = encodeVarintBep(dAtA, i, uint64(m.Offset))
  1495. i--
  1496. dAtA[i] = 0x8
  1497. }
  1498. return len(dAtA) - i, nil
  1499. }
  1500. func (m *Vector) Marshal() (dAtA []byte, err error) {
  1501. size := m.ProtoSize()
  1502. dAtA = make([]byte, size)
  1503. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1504. if err != nil {
  1505. return nil, err
  1506. }
  1507. return dAtA[:n], nil
  1508. }
  1509. func (m *Vector) MarshalTo(dAtA []byte) (int, error) {
  1510. size := m.ProtoSize()
  1511. return m.MarshalToSizedBuffer(dAtA[:size])
  1512. }
  1513. func (m *Vector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1514. i := len(dAtA)
  1515. _ = i
  1516. var l int
  1517. _ = l
  1518. if len(m.Counters) > 0 {
  1519. for iNdEx := len(m.Counters) - 1; iNdEx >= 0; iNdEx-- {
  1520. {
  1521. size, err := m.Counters[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1522. if err != nil {
  1523. return 0, err
  1524. }
  1525. i -= size
  1526. i = encodeVarintBep(dAtA, i, uint64(size))
  1527. }
  1528. i--
  1529. dAtA[i] = 0xa
  1530. }
  1531. }
  1532. return len(dAtA) - i, nil
  1533. }
  1534. func (m *Counter) Marshal() (dAtA []byte, err error) {
  1535. size := m.ProtoSize()
  1536. dAtA = make([]byte, size)
  1537. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1538. if err != nil {
  1539. return nil, err
  1540. }
  1541. return dAtA[:n], nil
  1542. }
  1543. func (m *Counter) MarshalTo(dAtA []byte) (int, error) {
  1544. size := m.ProtoSize()
  1545. return m.MarshalToSizedBuffer(dAtA[:size])
  1546. }
  1547. func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1548. i := len(dAtA)
  1549. _ = i
  1550. var l int
  1551. _ = l
  1552. if m.Value != 0 {
  1553. i = encodeVarintBep(dAtA, i, uint64(m.Value))
  1554. i--
  1555. dAtA[i] = 0x10
  1556. }
  1557. if m.ID != 0 {
  1558. i = encodeVarintBep(dAtA, i, uint64(m.ID))
  1559. i--
  1560. dAtA[i] = 0x8
  1561. }
  1562. return len(dAtA) - i, nil
  1563. }
  1564. func (m *Request) Marshal() (dAtA []byte, err error) {
  1565. size := m.ProtoSize()
  1566. dAtA = make([]byte, size)
  1567. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1568. if err != nil {
  1569. return nil, err
  1570. }
  1571. return dAtA[:n], nil
  1572. }
  1573. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  1574. size := m.ProtoSize()
  1575. return m.MarshalToSizedBuffer(dAtA[:size])
  1576. }
  1577. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1578. i := len(dAtA)
  1579. _ = i
  1580. var l int
  1581. _ = l
  1582. if m.WeakHash != 0 {
  1583. i = encodeVarintBep(dAtA, i, uint64(m.WeakHash))
  1584. i--
  1585. dAtA[i] = 0x40
  1586. }
  1587. if m.FromTemporary {
  1588. i--
  1589. if m.FromTemporary {
  1590. dAtA[i] = 1
  1591. } else {
  1592. dAtA[i] = 0
  1593. }
  1594. i--
  1595. dAtA[i] = 0x38
  1596. }
  1597. if len(m.Hash) > 0 {
  1598. i -= len(m.Hash)
  1599. copy(dAtA[i:], m.Hash)
  1600. i = encodeVarintBep(dAtA, i, uint64(len(m.Hash)))
  1601. i--
  1602. dAtA[i] = 0x32
  1603. }
  1604. if m.Size != 0 {
  1605. i = encodeVarintBep(dAtA, i, uint64(m.Size))
  1606. i--
  1607. dAtA[i] = 0x28
  1608. }
  1609. if m.Offset != 0 {
  1610. i = encodeVarintBep(dAtA, i, uint64(m.Offset))
  1611. i--
  1612. dAtA[i] = 0x20
  1613. }
  1614. if len(m.Name) > 0 {
  1615. i -= len(m.Name)
  1616. copy(dAtA[i:], m.Name)
  1617. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1618. i--
  1619. dAtA[i] = 0x1a
  1620. }
  1621. if len(m.Folder) > 0 {
  1622. i -= len(m.Folder)
  1623. copy(dAtA[i:], m.Folder)
  1624. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1625. i--
  1626. dAtA[i] = 0x12
  1627. }
  1628. if m.ID != 0 {
  1629. i = encodeVarintBep(dAtA, i, uint64(m.ID))
  1630. i--
  1631. dAtA[i] = 0x8
  1632. }
  1633. return len(dAtA) - i, nil
  1634. }
  1635. func (m *Response) Marshal() (dAtA []byte, err error) {
  1636. size := m.ProtoSize()
  1637. dAtA = make([]byte, size)
  1638. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1639. if err != nil {
  1640. return nil, err
  1641. }
  1642. return dAtA[:n], nil
  1643. }
  1644. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  1645. size := m.ProtoSize()
  1646. return m.MarshalToSizedBuffer(dAtA[:size])
  1647. }
  1648. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1649. i := len(dAtA)
  1650. _ = i
  1651. var l int
  1652. _ = l
  1653. if m.Code != 0 {
  1654. i = encodeVarintBep(dAtA, i, uint64(m.Code))
  1655. i--
  1656. dAtA[i] = 0x18
  1657. }
  1658. if len(m.Data) > 0 {
  1659. i -= len(m.Data)
  1660. copy(dAtA[i:], m.Data)
  1661. i = encodeVarintBep(dAtA, i, uint64(len(m.Data)))
  1662. i--
  1663. dAtA[i] = 0x12
  1664. }
  1665. if m.ID != 0 {
  1666. i = encodeVarintBep(dAtA, i, uint64(m.ID))
  1667. i--
  1668. dAtA[i] = 0x8
  1669. }
  1670. return len(dAtA) - i, nil
  1671. }
  1672. func (m *DownloadProgress) Marshal() (dAtA []byte, err error) {
  1673. size := m.ProtoSize()
  1674. dAtA = make([]byte, size)
  1675. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1676. if err != nil {
  1677. return nil, err
  1678. }
  1679. return dAtA[:n], nil
  1680. }
  1681. func (m *DownloadProgress) MarshalTo(dAtA []byte) (int, error) {
  1682. size := m.ProtoSize()
  1683. return m.MarshalToSizedBuffer(dAtA[:size])
  1684. }
  1685. func (m *DownloadProgress) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1686. i := len(dAtA)
  1687. _ = i
  1688. var l int
  1689. _ = l
  1690. if len(m.Updates) > 0 {
  1691. for iNdEx := len(m.Updates) - 1; iNdEx >= 0; iNdEx-- {
  1692. {
  1693. size, err := m.Updates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1694. if err != nil {
  1695. return 0, err
  1696. }
  1697. i -= size
  1698. i = encodeVarintBep(dAtA, i, uint64(size))
  1699. }
  1700. i--
  1701. dAtA[i] = 0x12
  1702. }
  1703. }
  1704. if len(m.Folder) > 0 {
  1705. i -= len(m.Folder)
  1706. copy(dAtA[i:], m.Folder)
  1707. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1708. i--
  1709. dAtA[i] = 0xa
  1710. }
  1711. return len(dAtA) - i, nil
  1712. }
  1713. func (m *FileDownloadProgressUpdate) Marshal() (dAtA []byte, err error) {
  1714. size := m.ProtoSize()
  1715. dAtA = make([]byte, size)
  1716. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1717. if err != nil {
  1718. return nil, err
  1719. }
  1720. return dAtA[:n], nil
  1721. }
  1722. func (m *FileDownloadProgressUpdate) MarshalTo(dAtA []byte) (int, error) {
  1723. size := m.ProtoSize()
  1724. return m.MarshalToSizedBuffer(dAtA[:size])
  1725. }
  1726. func (m *FileDownloadProgressUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1727. i := len(dAtA)
  1728. _ = i
  1729. var l int
  1730. _ = l
  1731. if len(m.BlockIndexes) > 0 {
  1732. for iNdEx := len(m.BlockIndexes) - 1; iNdEx >= 0; iNdEx-- {
  1733. i = encodeVarintBep(dAtA, i, uint64(m.BlockIndexes[iNdEx]))
  1734. i--
  1735. dAtA[i] = 0x20
  1736. }
  1737. }
  1738. {
  1739. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  1740. if err != nil {
  1741. return 0, err
  1742. }
  1743. i -= size
  1744. i = encodeVarintBep(dAtA, i, uint64(size))
  1745. }
  1746. i--
  1747. dAtA[i] = 0x1a
  1748. if len(m.Name) > 0 {
  1749. i -= len(m.Name)
  1750. copy(dAtA[i:], m.Name)
  1751. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1752. i--
  1753. dAtA[i] = 0x12
  1754. }
  1755. if m.UpdateType != 0 {
  1756. i = encodeVarintBep(dAtA, i, uint64(m.UpdateType))
  1757. i--
  1758. dAtA[i] = 0x8
  1759. }
  1760. return len(dAtA) - i, nil
  1761. }
  1762. func (m *Ping) Marshal() (dAtA []byte, err error) {
  1763. size := m.ProtoSize()
  1764. dAtA = make([]byte, size)
  1765. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1766. if err != nil {
  1767. return nil, err
  1768. }
  1769. return dAtA[:n], nil
  1770. }
  1771. func (m *Ping) MarshalTo(dAtA []byte) (int, error) {
  1772. size := m.ProtoSize()
  1773. return m.MarshalToSizedBuffer(dAtA[:size])
  1774. }
  1775. func (m *Ping) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1776. i := len(dAtA)
  1777. _ = i
  1778. var l int
  1779. _ = l
  1780. return len(dAtA) - i, nil
  1781. }
  1782. func (m *Close) Marshal() (dAtA []byte, err error) {
  1783. size := m.ProtoSize()
  1784. dAtA = make([]byte, size)
  1785. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1786. if err != nil {
  1787. return nil, err
  1788. }
  1789. return dAtA[:n], nil
  1790. }
  1791. func (m *Close) MarshalTo(dAtA []byte) (int, error) {
  1792. size := m.ProtoSize()
  1793. return m.MarshalToSizedBuffer(dAtA[:size])
  1794. }
  1795. func (m *Close) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1796. i := len(dAtA)
  1797. _ = i
  1798. var l int
  1799. _ = l
  1800. if len(m.Reason) > 0 {
  1801. i -= len(m.Reason)
  1802. copy(dAtA[i:], m.Reason)
  1803. i = encodeVarintBep(dAtA, i, uint64(len(m.Reason)))
  1804. i--
  1805. dAtA[i] = 0xa
  1806. }
  1807. return len(dAtA) - i, nil
  1808. }
  1809. func encodeVarintBep(dAtA []byte, offset int, v uint64) int {
  1810. offset -= sovBep(v)
  1811. base := offset
  1812. for v >= 1<<7 {
  1813. dAtA[offset] = uint8(v&0x7f | 0x80)
  1814. v >>= 7
  1815. offset++
  1816. }
  1817. dAtA[offset] = uint8(v)
  1818. return base
  1819. }
  1820. func (m *Hello) ProtoSize() (n int) {
  1821. if m == nil {
  1822. return 0
  1823. }
  1824. var l int
  1825. _ = l
  1826. l = len(m.DeviceName)
  1827. if l > 0 {
  1828. n += 1 + l + sovBep(uint64(l))
  1829. }
  1830. l = len(m.ClientName)
  1831. if l > 0 {
  1832. n += 1 + l + sovBep(uint64(l))
  1833. }
  1834. l = len(m.ClientVersion)
  1835. if l > 0 {
  1836. n += 1 + l + sovBep(uint64(l))
  1837. }
  1838. return n
  1839. }
  1840. func (m *Header) ProtoSize() (n int) {
  1841. if m == nil {
  1842. return 0
  1843. }
  1844. var l int
  1845. _ = l
  1846. if m.Type != 0 {
  1847. n += 1 + sovBep(uint64(m.Type))
  1848. }
  1849. if m.Compression != 0 {
  1850. n += 1 + sovBep(uint64(m.Compression))
  1851. }
  1852. return n
  1853. }
  1854. func (m *ClusterConfig) ProtoSize() (n int) {
  1855. if m == nil {
  1856. return 0
  1857. }
  1858. var l int
  1859. _ = l
  1860. if len(m.Folders) > 0 {
  1861. for _, e := range m.Folders {
  1862. l = e.ProtoSize()
  1863. n += 1 + l + sovBep(uint64(l))
  1864. }
  1865. }
  1866. return n
  1867. }
  1868. func (m *Folder) ProtoSize() (n int) {
  1869. if m == nil {
  1870. return 0
  1871. }
  1872. var l int
  1873. _ = l
  1874. l = len(m.ID)
  1875. if l > 0 {
  1876. n += 1 + l + sovBep(uint64(l))
  1877. }
  1878. l = len(m.Label)
  1879. if l > 0 {
  1880. n += 1 + l + sovBep(uint64(l))
  1881. }
  1882. if m.ReadOnly {
  1883. n += 2
  1884. }
  1885. if m.IgnorePermissions {
  1886. n += 2
  1887. }
  1888. if m.IgnoreDelete {
  1889. n += 2
  1890. }
  1891. if m.DisableTempIndexes {
  1892. n += 2
  1893. }
  1894. if m.Paused {
  1895. n += 2
  1896. }
  1897. if len(m.Devices) > 0 {
  1898. for _, e := range m.Devices {
  1899. l = e.ProtoSize()
  1900. n += 2 + l + sovBep(uint64(l))
  1901. }
  1902. }
  1903. return n
  1904. }
  1905. func (m *Device) ProtoSize() (n int) {
  1906. if m == nil {
  1907. return 0
  1908. }
  1909. var l int
  1910. _ = l
  1911. l = m.ID.ProtoSize()
  1912. n += 1 + l + sovBep(uint64(l))
  1913. l = len(m.Name)
  1914. if l > 0 {
  1915. n += 1 + l + sovBep(uint64(l))
  1916. }
  1917. if len(m.Addresses) > 0 {
  1918. for _, s := range m.Addresses {
  1919. l = len(s)
  1920. n += 1 + l + sovBep(uint64(l))
  1921. }
  1922. }
  1923. if m.Compression != 0 {
  1924. n += 1 + sovBep(uint64(m.Compression))
  1925. }
  1926. l = len(m.CertName)
  1927. if l > 0 {
  1928. n += 1 + l + sovBep(uint64(l))
  1929. }
  1930. if m.MaxSequence != 0 {
  1931. n += 1 + sovBep(uint64(m.MaxSequence))
  1932. }
  1933. if m.Introducer {
  1934. n += 2
  1935. }
  1936. if m.IndexID != 0 {
  1937. n += 1 + sovBep(uint64(m.IndexID))
  1938. }
  1939. if m.SkipIntroductionRemovals {
  1940. n += 2
  1941. }
  1942. return n
  1943. }
  1944. func (m *Index) ProtoSize() (n int) {
  1945. if m == nil {
  1946. return 0
  1947. }
  1948. var l int
  1949. _ = l
  1950. l = len(m.Folder)
  1951. if l > 0 {
  1952. n += 1 + l + sovBep(uint64(l))
  1953. }
  1954. if len(m.Files) > 0 {
  1955. for _, e := range m.Files {
  1956. l = e.ProtoSize()
  1957. n += 1 + l + sovBep(uint64(l))
  1958. }
  1959. }
  1960. return n
  1961. }
  1962. func (m *IndexUpdate) ProtoSize() (n int) {
  1963. if m == nil {
  1964. return 0
  1965. }
  1966. var l int
  1967. _ = l
  1968. l = len(m.Folder)
  1969. if l > 0 {
  1970. n += 1 + l + sovBep(uint64(l))
  1971. }
  1972. if len(m.Files) > 0 {
  1973. for _, e := range m.Files {
  1974. l = e.ProtoSize()
  1975. n += 1 + l + sovBep(uint64(l))
  1976. }
  1977. }
  1978. return n
  1979. }
  1980. func (m *FileInfo) ProtoSize() (n int) {
  1981. if m == nil {
  1982. return 0
  1983. }
  1984. var l int
  1985. _ = l
  1986. l = len(m.Name)
  1987. if l > 0 {
  1988. n += 1 + l + sovBep(uint64(l))
  1989. }
  1990. if m.Type != 0 {
  1991. n += 1 + sovBep(uint64(m.Type))
  1992. }
  1993. if m.Size != 0 {
  1994. n += 1 + sovBep(uint64(m.Size))
  1995. }
  1996. if m.Permissions != 0 {
  1997. n += 1 + sovBep(uint64(m.Permissions))
  1998. }
  1999. if m.ModifiedS != 0 {
  2000. n += 1 + sovBep(uint64(m.ModifiedS))
  2001. }
  2002. if m.Deleted {
  2003. n += 2
  2004. }
  2005. if m.RawInvalid {
  2006. n += 2
  2007. }
  2008. if m.NoPermissions {
  2009. n += 2
  2010. }
  2011. l = m.Version.ProtoSize()
  2012. n += 1 + l + sovBep(uint64(l))
  2013. if m.Sequence != 0 {
  2014. n += 1 + sovBep(uint64(m.Sequence))
  2015. }
  2016. if m.ModifiedNs != 0 {
  2017. n += 1 + sovBep(uint64(m.ModifiedNs))
  2018. }
  2019. if m.ModifiedBy != 0 {
  2020. n += 1 + sovBep(uint64(m.ModifiedBy))
  2021. }
  2022. if m.RawBlockSize != 0 {
  2023. n += 1 + sovBep(uint64(m.RawBlockSize))
  2024. }
  2025. if len(m.Blocks) > 0 {
  2026. for _, e := range m.Blocks {
  2027. l = e.ProtoSize()
  2028. n += 2 + l + sovBep(uint64(l))
  2029. }
  2030. }
  2031. l = len(m.SymlinkTarget)
  2032. if l > 0 {
  2033. n += 2 + l + sovBep(uint64(l))
  2034. }
  2035. if m.LocalFlags != 0 {
  2036. n += 2 + sovBep(uint64(m.LocalFlags))
  2037. }
  2038. return n
  2039. }
  2040. func (m *BlockInfo) ProtoSize() (n int) {
  2041. if m == nil {
  2042. return 0
  2043. }
  2044. var l int
  2045. _ = l
  2046. if m.Offset != 0 {
  2047. n += 1 + sovBep(uint64(m.Offset))
  2048. }
  2049. if m.Size != 0 {
  2050. n += 1 + sovBep(uint64(m.Size))
  2051. }
  2052. l = len(m.Hash)
  2053. if l > 0 {
  2054. n += 1 + l + sovBep(uint64(l))
  2055. }
  2056. if m.WeakHash != 0 {
  2057. n += 1 + sovBep(uint64(m.WeakHash))
  2058. }
  2059. return n
  2060. }
  2061. func (m *Vector) ProtoSize() (n int) {
  2062. if m == nil {
  2063. return 0
  2064. }
  2065. var l int
  2066. _ = l
  2067. if len(m.Counters) > 0 {
  2068. for _, e := range m.Counters {
  2069. l = e.ProtoSize()
  2070. n += 1 + l + sovBep(uint64(l))
  2071. }
  2072. }
  2073. return n
  2074. }
  2075. func (m *Counter) ProtoSize() (n int) {
  2076. if m == nil {
  2077. return 0
  2078. }
  2079. var l int
  2080. _ = l
  2081. if m.ID != 0 {
  2082. n += 1 + sovBep(uint64(m.ID))
  2083. }
  2084. if m.Value != 0 {
  2085. n += 1 + sovBep(uint64(m.Value))
  2086. }
  2087. return n
  2088. }
  2089. func (m *Request) ProtoSize() (n int) {
  2090. if m == nil {
  2091. return 0
  2092. }
  2093. var l int
  2094. _ = l
  2095. if m.ID != 0 {
  2096. n += 1 + sovBep(uint64(m.ID))
  2097. }
  2098. l = len(m.Folder)
  2099. if l > 0 {
  2100. n += 1 + l + sovBep(uint64(l))
  2101. }
  2102. l = len(m.Name)
  2103. if l > 0 {
  2104. n += 1 + l + sovBep(uint64(l))
  2105. }
  2106. if m.Offset != 0 {
  2107. n += 1 + sovBep(uint64(m.Offset))
  2108. }
  2109. if m.Size != 0 {
  2110. n += 1 + sovBep(uint64(m.Size))
  2111. }
  2112. l = len(m.Hash)
  2113. if l > 0 {
  2114. n += 1 + l + sovBep(uint64(l))
  2115. }
  2116. if m.FromTemporary {
  2117. n += 2
  2118. }
  2119. if m.WeakHash != 0 {
  2120. n += 1 + sovBep(uint64(m.WeakHash))
  2121. }
  2122. return n
  2123. }
  2124. func (m *Response) ProtoSize() (n int) {
  2125. if m == nil {
  2126. return 0
  2127. }
  2128. var l int
  2129. _ = l
  2130. if m.ID != 0 {
  2131. n += 1 + sovBep(uint64(m.ID))
  2132. }
  2133. l = len(m.Data)
  2134. if l > 0 {
  2135. n += 1 + l + sovBep(uint64(l))
  2136. }
  2137. if m.Code != 0 {
  2138. n += 1 + sovBep(uint64(m.Code))
  2139. }
  2140. return n
  2141. }
  2142. func (m *DownloadProgress) ProtoSize() (n int) {
  2143. if m == nil {
  2144. return 0
  2145. }
  2146. var l int
  2147. _ = l
  2148. l = len(m.Folder)
  2149. if l > 0 {
  2150. n += 1 + l + sovBep(uint64(l))
  2151. }
  2152. if len(m.Updates) > 0 {
  2153. for _, e := range m.Updates {
  2154. l = e.ProtoSize()
  2155. n += 1 + l + sovBep(uint64(l))
  2156. }
  2157. }
  2158. return n
  2159. }
  2160. func (m *FileDownloadProgressUpdate) ProtoSize() (n int) {
  2161. if m == nil {
  2162. return 0
  2163. }
  2164. var l int
  2165. _ = l
  2166. if m.UpdateType != 0 {
  2167. n += 1 + sovBep(uint64(m.UpdateType))
  2168. }
  2169. l = len(m.Name)
  2170. if l > 0 {
  2171. n += 1 + l + sovBep(uint64(l))
  2172. }
  2173. l = m.Version.ProtoSize()
  2174. n += 1 + l + sovBep(uint64(l))
  2175. if len(m.BlockIndexes) > 0 {
  2176. for _, e := range m.BlockIndexes {
  2177. n += 1 + sovBep(uint64(e))
  2178. }
  2179. }
  2180. return n
  2181. }
  2182. func (m *Ping) ProtoSize() (n int) {
  2183. if m == nil {
  2184. return 0
  2185. }
  2186. var l int
  2187. _ = l
  2188. return n
  2189. }
  2190. func (m *Close) ProtoSize() (n int) {
  2191. if m == nil {
  2192. return 0
  2193. }
  2194. var l int
  2195. _ = l
  2196. l = len(m.Reason)
  2197. if l > 0 {
  2198. n += 1 + l + sovBep(uint64(l))
  2199. }
  2200. return n
  2201. }
  2202. func sovBep(x uint64) (n int) {
  2203. return (math_bits.Len64(x|1) + 6) / 7
  2204. }
  2205. func sozBep(x uint64) (n int) {
  2206. return sovBep(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2207. }
  2208. func (m *Hello) Unmarshal(dAtA []byte) error {
  2209. l := len(dAtA)
  2210. iNdEx := 0
  2211. for iNdEx < l {
  2212. preIndex := iNdEx
  2213. var wire uint64
  2214. for shift := uint(0); ; shift += 7 {
  2215. if shift >= 64 {
  2216. return ErrIntOverflowBep
  2217. }
  2218. if iNdEx >= l {
  2219. return io.ErrUnexpectedEOF
  2220. }
  2221. b := dAtA[iNdEx]
  2222. iNdEx++
  2223. wire |= uint64(b&0x7F) << shift
  2224. if b < 0x80 {
  2225. break
  2226. }
  2227. }
  2228. fieldNum := int32(wire >> 3)
  2229. wireType := int(wire & 0x7)
  2230. if wireType == 4 {
  2231. return fmt.Errorf("proto: Hello: wiretype end group for non-group")
  2232. }
  2233. if fieldNum <= 0 {
  2234. return fmt.Errorf("proto: Hello: illegal tag %d (wire type %d)", fieldNum, wire)
  2235. }
  2236. switch fieldNum {
  2237. case 1:
  2238. if wireType != 2 {
  2239. return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType)
  2240. }
  2241. var stringLen uint64
  2242. for shift := uint(0); ; shift += 7 {
  2243. if shift >= 64 {
  2244. return ErrIntOverflowBep
  2245. }
  2246. if iNdEx >= l {
  2247. return io.ErrUnexpectedEOF
  2248. }
  2249. b := dAtA[iNdEx]
  2250. iNdEx++
  2251. stringLen |= uint64(b&0x7F) << shift
  2252. if b < 0x80 {
  2253. break
  2254. }
  2255. }
  2256. intStringLen := int(stringLen)
  2257. if intStringLen < 0 {
  2258. return ErrInvalidLengthBep
  2259. }
  2260. postIndex := iNdEx + intStringLen
  2261. if postIndex < 0 {
  2262. return ErrInvalidLengthBep
  2263. }
  2264. if postIndex > l {
  2265. return io.ErrUnexpectedEOF
  2266. }
  2267. m.DeviceName = string(dAtA[iNdEx:postIndex])
  2268. iNdEx = postIndex
  2269. case 2:
  2270. if wireType != 2 {
  2271. return fmt.Errorf("proto: wrong wireType = %d for field ClientName", wireType)
  2272. }
  2273. var stringLen uint64
  2274. for shift := uint(0); ; shift += 7 {
  2275. if shift >= 64 {
  2276. return ErrIntOverflowBep
  2277. }
  2278. if iNdEx >= l {
  2279. return io.ErrUnexpectedEOF
  2280. }
  2281. b := dAtA[iNdEx]
  2282. iNdEx++
  2283. stringLen |= uint64(b&0x7F) << shift
  2284. if b < 0x80 {
  2285. break
  2286. }
  2287. }
  2288. intStringLen := int(stringLen)
  2289. if intStringLen < 0 {
  2290. return ErrInvalidLengthBep
  2291. }
  2292. postIndex := iNdEx + intStringLen
  2293. if postIndex < 0 {
  2294. return ErrInvalidLengthBep
  2295. }
  2296. if postIndex > l {
  2297. return io.ErrUnexpectedEOF
  2298. }
  2299. m.ClientName = string(dAtA[iNdEx:postIndex])
  2300. iNdEx = postIndex
  2301. case 3:
  2302. if wireType != 2 {
  2303. return fmt.Errorf("proto: wrong wireType = %d for field ClientVersion", wireType)
  2304. }
  2305. var stringLen uint64
  2306. for shift := uint(0); ; shift += 7 {
  2307. if shift >= 64 {
  2308. return ErrIntOverflowBep
  2309. }
  2310. if iNdEx >= l {
  2311. return io.ErrUnexpectedEOF
  2312. }
  2313. b := dAtA[iNdEx]
  2314. iNdEx++
  2315. stringLen |= uint64(b&0x7F) << shift
  2316. if b < 0x80 {
  2317. break
  2318. }
  2319. }
  2320. intStringLen := int(stringLen)
  2321. if intStringLen < 0 {
  2322. return ErrInvalidLengthBep
  2323. }
  2324. postIndex := iNdEx + intStringLen
  2325. if postIndex < 0 {
  2326. return ErrInvalidLengthBep
  2327. }
  2328. if postIndex > l {
  2329. return io.ErrUnexpectedEOF
  2330. }
  2331. m.ClientVersion = string(dAtA[iNdEx:postIndex])
  2332. iNdEx = postIndex
  2333. default:
  2334. iNdEx = preIndex
  2335. skippy, err := skipBep(dAtA[iNdEx:])
  2336. if err != nil {
  2337. return err
  2338. }
  2339. if skippy < 0 {
  2340. return ErrInvalidLengthBep
  2341. }
  2342. if (iNdEx + skippy) < 0 {
  2343. return ErrInvalidLengthBep
  2344. }
  2345. if (iNdEx + skippy) > l {
  2346. return io.ErrUnexpectedEOF
  2347. }
  2348. iNdEx += skippy
  2349. }
  2350. }
  2351. if iNdEx > l {
  2352. return io.ErrUnexpectedEOF
  2353. }
  2354. return nil
  2355. }
  2356. func (m *Header) Unmarshal(dAtA []byte) error {
  2357. l := len(dAtA)
  2358. iNdEx := 0
  2359. for iNdEx < l {
  2360. preIndex := iNdEx
  2361. var wire uint64
  2362. for shift := uint(0); ; shift += 7 {
  2363. if shift >= 64 {
  2364. return ErrIntOverflowBep
  2365. }
  2366. if iNdEx >= l {
  2367. return io.ErrUnexpectedEOF
  2368. }
  2369. b := dAtA[iNdEx]
  2370. iNdEx++
  2371. wire |= uint64(b&0x7F) << shift
  2372. if b < 0x80 {
  2373. break
  2374. }
  2375. }
  2376. fieldNum := int32(wire >> 3)
  2377. wireType := int(wire & 0x7)
  2378. if wireType == 4 {
  2379. return fmt.Errorf("proto: Header: wiretype end group for non-group")
  2380. }
  2381. if fieldNum <= 0 {
  2382. return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire)
  2383. }
  2384. switch fieldNum {
  2385. case 1:
  2386. if wireType != 0 {
  2387. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2388. }
  2389. m.Type = 0
  2390. for shift := uint(0); ; shift += 7 {
  2391. if shift >= 64 {
  2392. return ErrIntOverflowBep
  2393. }
  2394. if iNdEx >= l {
  2395. return io.ErrUnexpectedEOF
  2396. }
  2397. b := dAtA[iNdEx]
  2398. iNdEx++
  2399. m.Type |= MessageType(b&0x7F) << shift
  2400. if b < 0x80 {
  2401. break
  2402. }
  2403. }
  2404. case 2:
  2405. if wireType != 0 {
  2406. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  2407. }
  2408. m.Compression = 0
  2409. for shift := uint(0); ; shift += 7 {
  2410. if shift >= 64 {
  2411. return ErrIntOverflowBep
  2412. }
  2413. if iNdEx >= l {
  2414. return io.ErrUnexpectedEOF
  2415. }
  2416. b := dAtA[iNdEx]
  2417. iNdEx++
  2418. m.Compression |= MessageCompression(b&0x7F) << shift
  2419. if b < 0x80 {
  2420. break
  2421. }
  2422. }
  2423. default:
  2424. iNdEx = preIndex
  2425. skippy, err := skipBep(dAtA[iNdEx:])
  2426. if err != nil {
  2427. return err
  2428. }
  2429. if skippy < 0 {
  2430. return ErrInvalidLengthBep
  2431. }
  2432. if (iNdEx + skippy) < 0 {
  2433. return ErrInvalidLengthBep
  2434. }
  2435. if (iNdEx + skippy) > l {
  2436. return io.ErrUnexpectedEOF
  2437. }
  2438. iNdEx += skippy
  2439. }
  2440. }
  2441. if iNdEx > l {
  2442. return io.ErrUnexpectedEOF
  2443. }
  2444. return nil
  2445. }
  2446. func (m *ClusterConfig) Unmarshal(dAtA []byte) error {
  2447. l := len(dAtA)
  2448. iNdEx := 0
  2449. for iNdEx < l {
  2450. preIndex := iNdEx
  2451. var wire uint64
  2452. for shift := uint(0); ; shift += 7 {
  2453. if shift >= 64 {
  2454. return ErrIntOverflowBep
  2455. }
  2456. if iNdEx >= l {
  2457. return io.ErrUnexpectedEOF
  2458. }
  2459. b := dAtA[iNdEx]
  2460. iNdEx++
  2461. wire |= uint64(b&0x7F) << shift
  2462. if b < 0x80 {
  2463. break
  2464. }
  2465. }
  2466. fieldNum := int32(wire >> 3)
  2467. wireType := int(wire & 0x7)
  2468. if wireType == 4 {
  2469. return fmt.Errorf("proto: ClusterConfig: wiretype end group for non-group")
  2470. }
  2471. if fieldNum <= 0 {
  2472. return fmt.Errorf("proto: ClusterConfig: illegal tag %d (wire type %d)", fieldNum, wire)
  2473. }
  2474. switch fieldNum {
  2475. case 1:
  2476. if wireType != 2 {
  2477. return fmt.Errorf("proto: wrong wireType = %d for field Folders", wireType)
  2478. }
  2479. var msglen int
  2480. for shift := uint(0); ; shift += 7 {
  2481. if shift >= 64 {
  2482. return ErrIntOverflowBep
  2483. }
  2484. if iNdEx >= l {
  2485. return io.ErrUnexpectedEOF
  2486. }
  2487. b := dAtA[iNdEx]
  2488. iNdEx++
  2489. msglen |= int(b&0x7F) << shift
  2490. if b < 0x80 {
  2491. break
  2492. }
  2493. }
  2494. if msglen < 0 {
  2495. return ErrInvalidLengthBep
  2496. }
  2497. postIndex := iNdEx + msglen
  2498. if postIndex < 0 {
  2499. return ErrInvalidLengthBep
  2500. }
  2501. if postIndex > l {
  2502. return io.ErrUnexpectedEOF
  2503. }
  2504. m.Folders = append(m.Folders, Folder{})
  2505. if err := m.Folders[len(m.Folders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2506. return err
  2507. }
  2508. iNdEx = postIndex
  2509. default:
  2510. iNdEx = preIndex
  2511. skippy, err := skipBep(dAtA[iNdEx:])
  2512. if err != nil {
  2513. return err
  2514. }
  2515. if skippy < 0 {
  2516. return ErrInvalidLengthBep
  2517. }
  2518. if (iNdEx + skippy) < 0 {
  2519. return ErrInvalidLengthBep
  2520. }
  2521. if (iNdEx + skippy) > l {
  2522. return io.ErrUnexpectedEOF
  2523. }
  2524. iNdEx += skippy
  2525. }
  2526. }
  2527. if iNdEx > l {
  2528. return io.ErrUnexpectedEOF
  2529. }
  2530. return nil
  2531. }
  2532. func (m *Folder) Unmarshal(dAtA []byte) error {
  2533. l := len(dAtA)
  2534. iNdEx := 0
  2535. for iNdEx < l {
  2536. preIndex := iNdEx
  2537. var wire uint64
  2538. for shift := uint(0); ; shift += 7 {
  2539. if shift >= 64 {
  2540. return ErrIntOverflowBep
  2541. }
  2542. if iNdEx >= l {
  2543. return io.ErrUnexpectedEOF
  2544. }
  2545. b := dAtA[iNdEx]
  2546. iNdEx++
  2547. wire |= uint64(b&0x7F) << shift
  2548. if b < 0x80 {
  2549. break
  2550. }
  2551. }
  2552. fieldNum := int32(wire >> 3)
  2553. wireType := int(wire & 0x7)
  2554. if wireType == 4 {
  2555. return fmt.Errorf("proto: Folder: wiretype end group for non-group")
  2556. }
  2557. if fieldNum <= 0 {
  2558. return fmt.Errorf("proto: Folder: illegal tag %d (wire type %d)", fieldNum, wire)
  2559. }
  2560. switch fieldNum {
  2561. case 1:
  2562. if wireType != 2 {
  2563. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2564. }
  2565. var stringLen uint64
  2566. for shift := uint(0); ; shift += 7 {
  2567. if shift >= 64 {
  2568. return ErrIntOverflowBep
  2569. }
  2570. if iNdEx >= l {
  2571. return io.ErrUnexpectedEOF
  2572. }
  2573. b := dAtA[iNdEx]
  2574. iNdEx++
  2575. stringLen |= uint64(b&0x7F) << shift
  2576. if b < 0x80 {
  2577. break
  2578. }
  2579. }
  2580. intStringLen := int(stringLen)
  2581. if intStringLen < 0 {
  2582. return ErrInvalidLengthBep
  2583. }
  2584. postIndex := iNdEx + intStringLen
  2585. if postIndex < 0 {
  2586. return ErrInvalidLengthBep
  2587. }
  2588. if postIndex > l {
  2589. return io.ErrUnexpectedEOF
  2590. }
  2591. m.ID = string(dAtA[iNdEx:postIndex])
  2592. iNdEx = postIndex
  2593. case 2:
  2594. if wireType != 2 {
  2595. return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
  2596. }
  2597. var stringLen uint64
  2598. for shift := uint(0); ; shift += 7 {
  2599. if shift >= 64 {
  2600. return ErrIntOverflowBep
  2601. }
  2602. if iNdEx >= l {
  2603. return io.ErrUnexpectedEOF
  2604. }
  2605. b := dAtA[iNdEx]
  2606. iNdEx++
  2607. stringLen |= uint64(b&0x7F) << shift
  2608. if b < 0x80 {
  2609. break
  2610. }
  2611. }
  2612. intStringLen := int(stringLen)
  2613. if intStringLen < 0 {
  2614. return ErrInvalidLengthBep
  2615. }
  2616. postIndex := iNdEx + intStringLen
  2617. if postIndex < 0 {
  2618. return ErrInvalidLengthBep
  2619. }
  2620. if postIndex > l {
  2621. return io.ErrUnexpectedEOF
  2622. }
  2623. m.Label = string(dAtA[iNdEx:postIndex])
  2624. iNdEx = postIndex
  2625. case 3:
  2626. if wireType != 0 {
  2627. return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
  2628. }
  2629. var v int
  2630. for shift := uint(0); ; shift += 7 {
  2631. if shift >= 64 {
  2632. return ErrIntOverflowBep
  2633. }
  2634. if iNdEx >= l {
  2635. return io.ErrUnexpectedEOF
  2636. }
  2637. b := dAtA[iNdEx]
  2638. iNdEx++
  2639. v |= int(b&0x7F) << shift
  2640. if b < 0x80 {
  2641. break
  2642. }
  2643. }
  2644. m.ReadOnly = bool(v != 0)
  2645. case 4:
  2646. if wireType != 0 {
  2647. return fmt.Errorf("proto: wrong wireType = %d for field IgnorePermissions", wireType)
  2648. }
  2649. var v int
  2650. for shift := uint(0); ; shift += 7 {
  2651. if shift >= 64 {
  2652. return ErrIntOverflowBep
  2653. }
  2654. if iNdEx >= l {
  2655. return io.ErrUnexpectedEOF
  2656. }
  2657. b := dAtA[iNdEx]
  2658. iNdEx++
  2659. v |= int(b&0x7F) << shift
  2660. if b < 0x80 {
  2661. break
  2662. }
  2663. }
  2664. m.IgnorePermissions = bool(v != 0)
  2665. case 5:
  2666. if wireType != 0 {
  2667. return fmt.Errorf("proto: wrong wireType = %d for field IgnoreDelete", wireType)
  2668. }
  2669. var v int
  2670. for shift := uint(0); ; shift += 7 {
  2671. if shift >= 64 {
  2672. return ErrIntOverflowBep
  2673. }
  2674. if iNdEx >= l {
  2675. return io.ErrUnexpectedEOF
  2676. }
  2677. b := dAtA[iNdEx]
  2678. iNdEx++
  2679. v |= int(b&0x7F) << shift
  2680. if b < 0x80 {
  2681. break
  2682. }
  2683. }
  2684. m.IgnoreDelete = bool(v != 0)
  2685. case 6:
  2686. if wireType != 0 {
  2687. return fmt.Errorf("proto: wrong wireType = %d for field DisableTempIndexes", wireType)
  2688. }
  2689. var v int
  2690. for shift := uint(0); ; shift += 7 {
  2691. if shift >= 64 {
  2692. return ErrIntOverflowBep
  2693. }
  2694. if iNdEx >= l {
  2695. return io.ErrUnexpectedEOF
  2696. }
  2697. b := dAtA[iNdEx]
  2698. iNdEx++
  2699. v |= int(b&0x7F) << shift
  2700. if b < 0x80 {
  2701. break
  2702. }
  2703. }
  2704. m.DisableTempIndexes = bool(v != 0)
  2705. case 7:
  2706. if wireType != 0 {
  2707. return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
  2708. }
  2709. var v int
  2710. for shift := uint(0); ; shift += 7 {
  2711. if shift >= 64 {
  2712. return ErrIntOverflowBep
  2713. }
  2714. if iNdEx >= l {
  2715. return io.ErrUnexpectedEOF
  2716. }
  2717. b := dAtA[iNdEx]
  2718. iNdEx++
  2719. v |= int(b&0x7F) << shift
  2720. if b < 0x80 {
  2721. break
  2722. }
  2723. }
  2724. m.Paused = bool(v != 0)
  2725. case 16:
  2726. if wireType != 2 {
  2727. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  2728. }
  2729. var msglen int
  2730. for shift := uint(0); ; shift += 7 {
  2731. if shift >= 64 {
  2732. return ErrIntOverflowBep
  2733. }
  2734. if iNdEx >= l {
  2735. return io.ErrUnexpectedEOF
  2736. }
  2737. b := dAtA[iNdEx]
  2738. iNdEx++
  2739. msglen |= int(b&0x7F) << shift
  2740. if b < 0x80 {
  2741. break
  2742. }
  2743. }
  2744. if msglen < 0 {
  2745. return ErrInvalidLengthBep
  2746. }
  2747. postIndex := iNdEx + msglen
  2748. if postIndex < 0 {
  2749. return ErrInvalidLengthBep
  2750. }
  2751. if postIndex > l {
  2752. return io.ErrUnexpectedEOF
  2753. }
  2754. m.Devices = append(m.Devices, Device{})
  2755. if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2756. return err
  2757. }
  2758. iNdEx = postIndex
  2759. default:
  2760. iNdEx = preIndex
  2761. skippy, err := skipBep(dAtA[iNdEx:])
  2762. if err != nil {
  2763. return err
  2764. }
  2765. if skippy < 0 {
  2766. return ErrInvalidLengthBep
  2767. }
  2768. if (iNdEx + skippy) < 0 {
  2769. return ErrInvalidLengthBep
  2770. }
  2771. if (iNdEx + skippy) > l {
  2772. return io.ErrUnexpectedEOF
  2773. }
  2774. iNdEx += skippy
  2775. }
  2776. }
  2777. if iNdEx > l {
  2778. return io.ErrUnexpectedEOF
  2779. }
  2780. return nil
  2781. }
  2782. func (m *Device) Unmarshal(dAtA []byte) error {
  2783. l := len(dAtA)
  2784. iNdEx := 0
  2785. for iNdEx < l {
  2786. preIndex := iNdEx
  2787. var wire uint64
  2788. for shift := uint(0); ; shift += 7 {
  2789. if shift >= 64 {
  2790. return ErrIntOverflowBep
  2791. }
  2792. if iNdEx >= l {
  2793. return io.ErrUnexpectedEOF
  2794. }
  2795. b := dAtA[iNdEx]
  2796. iNdEx++
  2797. wire |= uint64(b&0x7F) << shift
  2798. if b < 0x80 {
  2799. break
  2800. }
  2801. }
  2802. fieldNum := int32(wire >> 3)
  2803. wireType := int(wire & 0x7)
  2804. if wireType == 4 {
  2805. return fmt.Errorf("proto: Device: wiretype end group for non-group")
  2806. }
  2807. if fieldNum <= 0 {
  2808. return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
  2809. }
  2810. switch fieldNum {
  2811. case 1:
  2812. if wireType != 2 {
  2813. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2814. }
  2815. var byteLen int
  2816. for shift := uint(0); ; shift += 7 {
  2817. if shift >= 64 {
  2818. return ErrIntOverflowBep
  2819. }
  2820. if iNdEx >= l {
  2821. return io.ErrUnexpectedEOF
  2822. }
  2823. b := dAtA[iNdEx]
  2824. iNdEx++
  2825. byteLen |= int(b&0x7F) << shift
  2826. if b < 0x80 {
  2827. break
  2828. }
  2829. }
  2830. if byteLen < 0 {
  2831. return ErrInvalidLengthBep
  2832. }
  2833. postIndex := iNdEx + byteLen
  2834. if postIndex < 0 {
  2835. return ErrInvalidLengthBep
  2836. }
  2837. if postIndex > l {
  2838. return io.ErrUnexpectedEOF
  2839. }
  2840. if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2841. return err
  2842. }
  2843. iNdEx = postIndex
  2844. case 2:
  2845. if wireType != 2 {
  2846. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2847. }
  2848. var stringLen uint64
  2849. for shift := uint(0); ; shift += 7 {
  2850. if shift >= 64 {
  2851. return ErrIntOverflowBep
  2852. }
  2853. if iNdEx >= l {
  2854. return io.ErrUnexpectedEOF
  2855. }
  2856. b := dAtA[iNdEx]
  2857. iNdEx++
  2858. stringLen |= uint64(b&0x7F) << shift
  2859. if b < 0x80 {
  2860. break
  2861. }
  2862. }
  2863. intStringLen := int(stringLen)
  2864. if intStringLen < 0 {
  2865. return ErrInvalidLengthBep
  2866. }
  2867. postIndex := iNdEx + intStringLen
  2868. if postIndex < 0 {
  2869. return ErrInvalidLengthBep
  2870. }
  2871. if postIndex > l {
  2872. return io.ErrUnexpectedEOF
  2873. }
  2874. m.Name = string(dAtA[iNdEx:postIndex])
  2875. iNdEx = postIndex
  2876. case 3:
  2877. if wireType != 2 {
  2878. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  2879. }
  2880. var stringLen uint64
  2881. for shift := uint(0); ; shift += 7 {
  2882. if shift >= 64 {
  2883. return ErrIntOverflowBep
  2884. }
  2885. if iNdEx >= l {
  2886. return io.ErrUnexpectedEOF
  2887. }
  2888. b := dAtA[iNdEx]
  2889. iNdEx++
  2890. stringLen |= uint64(b&0x7F) << shift
  2891. if b < 0x80 {
  2892. break
  2893. }
  2894. }
  2895. intStringLen := int(stringLen)
  2896. if intStringLen < 0 {
  2897. return ErrInvalidLengthBep
  2898. }
  2899. postIndex := iNdEx + intStringLen
  2900. if postIndex < 0 {
  2901. return ErrInvalidLengthBep
  2902. }
  2903. if postIndex > l {
  2904. return io.ErrUnexpectedEOF
  2905. }
  2906. m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
  2907. iNdEx = postIndex
  2908. case 4:
  2909. if wireType != 0 {
  2910. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  2911. }
  2912. m.Compression = 0
  2913. for shift := uint(0); ; shift += 7 {
  2914. if shift >= 64 {
  2915. return ErrIntOverflowBep
  2916. }
  2917. if iNdEx >= l {
  2918. return io.ErrUnexpectedEOF
  2919. }
  2920. b := dAtA[iNdEx]
  2921. iNdEx++
  2922. m.Compression |= Compression(b&0x7F) << shift
  2923. if b < 0x80 {
  2924. break
  2925. }
  2926. }
  2927. case 5:
  2928. if wireType != 2 {
  2929. return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType)
  2930. }
  2931. var stringLen uint64
  2932. for shift := uint(0); ; shift += 7 {
  2933. if shift >= 64 {
  2934. return ErrIntOverflowBep
  2935. }
  2936. if iNdEx >= l {
  2937. return io.ErrUnexpectedEOF
  2938. }
  2939. b := dAtA[iNdEx]
  2940. iNdEx++
  2941. stringLen |= uint64(b&0x7F) << shift
  2942. if b < 0x80 {
  2943. break
  2944. }
  2945. }
  2946. intStringLen := int(stringLen)
  2947. if intStringLen < 0 {
  2948. return ErrInvalidLengthBep
  2949. }
  2950. postIndex := iNdEx + intStringLen
  2951. if postIndex < 0 {
  2952. return ErrInvalidLengthBep
  2953. }
  2954. if postIndex > l {
  2955. return io.ErrUnexpectedEOF
  2956. }
  2957. m.CertName = string(dAtA[iNdEx:postIndex])
  2958. iNdEx = postIndex
  2959. case 6:
  2960. if wireType != 0 {
  2961. return fmt.Errorf("proto: wrong wireType = %d for field MaxSequence", wireType)
  2962. }
  2963. m.MaxSequence = 0
  2964. for shift := uint(0); ; shift += 7 {
  2965. if shift >= 64 {
  2966. return ErrIntOverflowBep
  2967. }
  2968. if iNdEx >= l {
  2969. return io.ErrUnexpectedEOF
  2970. }
  2971. b := dAtA[iNdEx]
  2972. iNdEx++
  2973. m.MaxSequence |= int64(b&0x7F) << shift
  2974. if b < 0x80 {
  2975. break
  2976. }
  2977. }
  2978. case 7:
  2979. if wireType != 0 {
  2980. return fmt.Errorf("proto: wrong wireType = %d for field Introducer", wireType)
  2981. }
  2982. var v int
  2983. for shift := uint(0); ; shift += 7 {
  2984. if shift >= 64 {
  2985. return ErrIntOverflowBep
  2986. }
  2987. if iNdEx >= l {
  2988. return io.ErrUnexpectedEOF
  2989. }
  2990. b := dAtA[iNdEx]
  2991. iNdEx++
  2992. v |= int(b&0x7F) << shift
  2993. if b < 0x80 {
  2994. break
  2995. }
  2996. }
  2997. m.Introducer = bool(v != 0)
  2998. case 8:
  2999. if wireType != 0 {
  3000. return fmt.Errorf("proto: wrong wireType = %d for field IndexID", wireType)
  3001. }
  3002. m.IndexID = 0
  3003. for shift := uint(0); ; shift += 7 {
  3004. if shift >= 64 {
  3005. return ErrIntOverflowBep
  3006. }
  3007. if iNdEx >= l {
  3008. return io.ErrUnexpectedEOF
  3009. }
  3010. b := dAtA[iNdEx]
  3011. iNdEx++
  3012. m.IndexID |= IndexID(b&0x7F) << shift
  3013. if b < 0x80 {
  3014. break
  3015. }
  3016. }
  3017. case 9:
  3018. if wireType != 0 {
  3019. return fmt.Errorf("proto: wrong wireType = %d for field SkipIntroductionRemovals", wireType)
  3020. }
  3021. var v int
  3022. for shift := uint(0); ; shift += 7 {
  3023. if shift >= 64 {
  3024. return ErrIntOverflowBep
  3025. }
  3026. if iNdEx >= l {
  3027. return io.ErrUnexpectedEOF
  3028. }
  3029. b := dAtA[iNdEx]
  3030. iNdEx++
  3031. v |= int(b&0x7F) << shift
  3032. if b < 0x80 {
  3033. break
  3034. }
  3035. }
  3036. m.SkipIntroductionRemovals = bool(v != 0)
  3037. default:
  3038. iNdEx = preIndex
  3039. skippy, err := skipBep(dAtA[iNdEx:])
  3040. if err != nil {
  3041. return err
  3042. }
  3043. if skippy < 0 {
  3044. return ErrInvalidLengthBep
  3045. }
  3046. if (iNdEx + skippy) < 0 {
  3047. return ErrInvalidLengthBep
  3048. }
  3049. if (iNdEx + skippy) > l {
  3050. return io.ErrUnexpectedEOF
  3051. }
  3052. iNdEx += skippy
  3053. }
  3054. }
  3055. if iNdEx > l {
  3056. return io.ErrUnexpectedEOF
  3057. }
  3058. return nil
  3059. }
  3060. func (m *Index) Unmarshal(dAtA []byte) error {
  3061. l := len(dAtA)
  3062. iNdEx := 0
  3063. for iNdEx < l {
  3064. preIndex := iNdEx
  3065. var wire uint64
  3066. for shift := uint(0); ; shift += 7 {
  3067. if shift >= 64 {
  3068. return ErrIntOverflowBep
  3069. }
  3070. if iNdEx >= l {
  3071. return io.ErrUnexpectedEOF
  3072. }
  3073. b := dAtA[iNdEx]
  3074. iNdEx++
  3075. wire |= uint64(b&0x7F) << shift
  3076. if b < 0x80 {
  3077. break
  3078. }
  3079. }
  3080. fieldNum := int32(wire >> 3)
  3081. wireType := int(wire & 0x7)
  3082. if wireType == 4 {
  3083. return fmt.Errorf("proto: Index: wiretype end group for non-group")
  3084. }
  3085. if fieldNum <= 0 {
  3086. return fmt.Errorf("proto: Index: illegal tag %d (wire type %d)", fieldNum, wire)
  3087. }
  3088. switch fieldNum {
  3089. case 1:
  3090. if wireType != 2 {
  3091. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3092. }
  3093. var stringLen uint64
  3094. for shift := uint(0); ; shift += 7 {
  3095. if shift >= 64 {
  3096. return ErrIntOverflowBep
  3097. }
  3098. if iNdEx >= l {
  3099. return io.ErrUnexpectedEOF
  3100. }
  3101. b := dAtA[iNdEx]
  3102. iNdEx++
  3103. stringLen |= uint64(b&0x7F) << shift
  3104. if b < 0x80 {
  3105. break
  3106. }
  3107. }
  3108. intStringLen := int(stringLen)
  3109. if intStringLen < 0 {
  3110. return ErrInvalidLengthBep
  3111. }
  3112. postIndex := iNdEx + intStringLen
  3113. if postIndex < 0 {
  3114. return ErrInvalidLengthBep
  3115. }
  3116. if postIndex > l {
  3117. return io.ErrUnexpectedEOF
  3118. }
  3119. m.Folder = string(dAtA[iNdEx:postIndex])
  3120. iNdEx = postIndex
  3121. case 2:
  3122. if wireType != 2 {
  3123. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  3124. }
  3125. var msglen int
  3126. for shift := uint(0); ; shift += 7 {
  3127. if shift >= 64 {
  3128. return ErrIntOverflowBep
  3129. }
  3130. if iNdEx >= l {
  3131. return io.ErrUnexpectedEOF
  3132. }
  3133. b := dAtA[iNdEx]
  3134. iNdEx++
  3135. msglen |= int(b&0x7F) << shift
  3136. if b < 0x80 {
  3137. break
  3138. }
  3139. }
  3140. if msglen < 0 {
  3141. return ErrInvalidLengthBep
  3142. }
  3143. postIndex := iNdEx + msglen
  3144. if postIndex < 0 {
  3145. return ErrInvalidLengthBep
  3146. }
  3147. if postIndex > l {
  3148. return io.ErrUnexpectedEOF
  3149. }
  3150. m.Files = append(m.Files, FileInfo{})
  3151. if err := m.Files[len(m.Files)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3152. return err
  3153. }
  3154. iNdEx = postIndex
  3155. default:
  3156. iNdEx = preIndex
  3157. skippy, err := skipBep(dAtA[iNdEx:])
  3158. if err != nil {
  3159. return err
  3160. }
  3161. if skippy < 0 {
  3162. return ErrInvalidLengthBep
  3163. }
  3164. if (iNdEx + skippy) < 0 {
  3165. return ErrInvalidLengthBep
  3166. }
  3167. if (iNdEx + skippy) > l {
  3168. return io.ErrUnexpectedEOF
  3169. }
  3170. iNdEx += skippy
  3171. }
  3172. }
  3173. if iNdEx > l {
  3174. return io.ErrUnexpectedEOF
  3175. }
  3176. return nil
  3177. }
  3178. func (m *IndexUpdate) Unmarshal(dAtA []byte) error {
  3179. l := len(dAtA)
  3180. iNdEx := 0
  3181. for iNdEx < l {
  3182. preIndex := iNdEx
  3183. var wire uint64
  3184. for shift := uint(0); ; shift += 7 {
  3185. if shift >= 64 {
  3186. return ErrIntOverflowBep
  3187. }
  3188. if iNdEx >= l {
  3189. return io.ErrUnexpectedEOF
  3190. }
  3191. b := dAtA[iNdEx]
  3192. iNdEx++
  3193. wire |= uint64(b&0x7F) << shift
  3194. if b < 0x80 {
  3195. break
  3196. }
  3197. }
  3198. fieldNum := int32(wire >> 3)
  3199. wireType := int(wire & 0x7)
  3200. if wireType == 4 {
  3201. return fmt.Errorf("proto: IndexUpdate: wiretype end group for non-group")
  3202. }
  3203. if fieldNum <= 0 {
  3204. return fmt.Errorf("proto: IndexUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  3205. }
  3206. switch fieldNum {
  3207. case 1:
  3208. if wireType != 2 {
  3209. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3210. }
  3211. var stringLen uint64
  3212. for shift := uint(0); ; shift += 7 {
  3213. if shift >= 64 {
  3214. return ErrIntOverflowBep
  3215. }
  3216. if iNdEx >= l {
  3217. return io.ErrUnexpectedEOF
  3218. }
  3219. b := dAtA[iNdEx]
  3220. iNdEx++
  3221. stringLen |= uint64(b&0x7F) << shift
  3222. if b < 0x80 {
  3223. break
  3224. }
  3225. }
  3226. intStringLen := int(stringLen)
  3227. if intStringLen < 0 {
  3228. return ErrInvalidLengthBep
  3229. }
  3230. postIndex := iNdEx + intStringLen
  3231. if postIndex < 0 {
  3232. return ErrInvalidLengthBep
  3233. }
  3234. if postIndex > l {
  3235. return io.ErrUnexpectedEOF
  3236. }
  3237. m.Folder = string(dAtA[iNdEx:postIndex])
  3238. iNdEx = postIndex
  3239. case 2:
  3240. if wireType != 2 {
  3241. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  3242. }
  3243. var msglen int
  3244. for shift := uint(0); ; shift += 7 {
  3245. if shift >= 64 {
  3246. return ErrIntOverflowBep
  3247. }
  3248. if iNdEx >= l {
  3249. return io.ErrUnexpectedEOF
  3250. }
  3251. b := dAtA[iNdEx]
  3252. iNdEx++
  3253. msglen |= int(b&0x7F) << shift
  3254. if b < 0x80 {
  3255. break
  3256. }
  3257. }
  3258. if msglen < 0 {
  3259. return ErrInvalidLengthBep
  3260. }
  3261. postIndex := iNdEx + msglen
  3262. if postIndex < 0 {
  3263. return ErrInvalidLengthBep
  3264. }
  3265. if postIndex > l {
  3266. return io.ErrUnexpectedEOF
  3267. }
  3268. m.Files = append(m.Files, FileInfo{})
  3269. if err := m.Files[len(m.Files)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3270. return err
  3271. }
  3272. iNdEx = postIndex
  3273. default:
  3274. iNdEx = preIndex
  3275. skippy, err := skipBep(dAtA[iNdEx:])
  3276. if err != nil {
  3277. return err
  3278. }
  3279. if skippy < 0 {
  3280. return ErrInvalidLengthBep
  3281. }
  3282. if (iNdEx + skippy) < 0 {
  3283. return ErrInvalidLengthBep
  3284. }
  3285. if (iNdEx + skippy) > l {
  3286. return io.ErrUnexpectedEOF
  3287. }
  3288. iNdEx += skippy
  3289. }
  3290. }
  3291. if iNdEx > l {
  3292. return io.ErrUnexpectedEOF
  3293. }
  3294. return nil
  3295. }
  3296. func (m *FileInfo) Unmarshal(dAtA []byte) error {
  3297. l := len(dAtA)
  3298. iNdEx := 0
  3299. for iNdEx < l {
  3300. preIndex := iNdEx
  3301. var wire uint64
  3302. for shift := uint(0); ; shift += 7 {
  3303. if shift >= 64 {
  3304. return ErrIntOverflowBep
  3305. }
  3306. if iNdEx >= l {
  3307. return io.ErrUnexpectedEOF
  3308. }
  3309. b := dAtA[iNdEx]
  3310. iNdEx++
  3311. wire |= uint64(b&0x7F) << shift
  3312. if b < 0x80 {
  3313. break
  3314. }
  3315. }
  3316. fieldNum := int32(wire >> 3)
  3317. wireType := int(wire & 0x7)
  3318. if wireType == 4 {
  3319. return fmt.Errorf("proto: FileInfo: wiretype end group for non-group")
  3320. }
  3321. if fieldNum <= 0 {
  3322. return fmt.Errorf("proto: FileInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  3323. }
  3324. switch fieldNum {
  3325. case 1:
  3326. if wireType != 2 {
  3327. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3328. }
  3329. var stringLen uint64
  3330. for shift := uint(0); ; shift += 7 {
  3331. if shift >= 64 {
  3332. return ErrIntOverflowBep
  3333. }
  3334. if iNdEx >= l {
  3335. return io.ErrUnexpectedEOF
  3336. }
  3337. b := dAtA[iNdEx]
  3338. iNdEx++
  3339. stringLen |= uint64(b&0x7F) << shift
  3340. if b < 0x80 {
  3341. break
  3342. }
  3343. }
  3344. intStringLen := int(stringLen)
  3345. if intStringLen < 0 {
  3346. return ErrInvalidLengthBep
  3347. }
  3348. postIndex := iNdEx + intStringLen
  3349. if postIndex < 0 {
  3350. return ErrInvalidLengthBep
  3351. }
  3352. if postIndex > l {
  3353. return io.ErrUnexpectedEOF
  3354. }
  3355. m.Name = string(dAtA[iNdEx:postIndex])
  3356. iNdEx = postIndex
  3357. case 2:
  3358. if wireType != 0 {
  3359. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  3360. }
  3361. m.Type = 0
  3362. for shift := uint(0); ; shift += 7 {
  3363. if shift >= 64 {
  3364. return ErrIntOverflowBep
  3365. }
  3366. if iNdEx >= l {
  3367. return io.ErrUnexpectedEOF
  3368. }
  3369. b := dAtA[iNdEx]
  3370. iNdEx++
  3371. m.Type |= FileInfoType(b&0x7F) << shift
  3372. if b < 0x80 {
  3373. break
  3374. }
  3375. }
  3376. case 3:
  3377. if wireType != 0 {
  3378. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  3379. }
  3380. m.Size = 0
  3381. for shift := uint(0); ; shift += 7 {
  3382. if shift >= 64 {
  3383. return ErrIntOverflowBep
  3384. }
  3385. if iNdEx >= l {
  3386. return io.ErrUnexpectedEOF
  3387. }
  3388. b := dAtA[iNdEx]
  3389. iNdEx++
  3390. m.Size |= int64(b&0x7F) << shift
  3391. if b < 0x80 {
  3392. break
  3393. }
  3394. }
  3395. case 4:
  3396. if wireType != 0 {
  3397. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  3398. }
  3399. m.Permissions = 0
  3400. for shift := uint(0); ; shift += 7 {
  3401. if shift >= 64 {
  3402. return ErrIntOverflowBep
  3403. }
  3404. if iNdEx >= l {
  3405. return io.ErrUnexpectedEOF
  3406. }
  3407. b := dAtA[iNdEx]
  3408. iNdEx++
  3409. m.Permissions |= uint32(b&0x7F) << shift
  3410. if b < 0x80 {
  3411. break
  3412. }
  3413. }
  3414. case 5:
  3415. if wireType != 0 {
  3416. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  3417. }
  3418. m.ModifiedS = 0
  3419. for shift := uint(0); ; shift += 7 {
  3420. if shift >= 64 {
  3421. return ErrIntOverflowBep
  3422. }
  3423. if iNdEx >= l {
  3424. return io.ErrUnexpectedEOF
  3425. }
  3426. b := dAtA[iNdEx]
  3427. iNdEx++
  3428. m.ModifiedS |= int64(b&0x7F) << shift
  3429. if b < 0x80 {
  3430. break
  3431. }
  3432. }
  3433. case 6:
  3434. if wireType != 0 {
  3435. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  3436. }
  3437. var v int
  3438. for shift := uint(0); ; shift += 7 {
  3439. if shift >= 64 {
  3440. return ErrIntOverflowBep
  3441. }
  3442. if iNdEx >= l {
  3443. return io.ErrUnexpectedEOF
  3444. }
  3445. b := dAtA[iNdEx]
  3446. iNdEx++
  3447. v |= int(b&0x7F) << shift
  3448. if b < 0x80 {
  3449. break
  3450. }
  3451. }
  3452. m.Deleted = bool(v != 0)
  3453. case 7:
  3454. if wireType != 0 {
  3455. return fmt.Errorf("proto: wrong wireType = %d for field RawInvalid", wireType)
  3456. }
  3457. var v int
  3458. for shift := uint(0); ; shift += 7 {
  3459. if shift >= 64 {
  3460. return ErrIntOverflowBep
  3461. }
  3462. if iNdEx >= l {
  3463. return io.ErrUnexpectedEOF
  3464. }
  3465. b := dAtA[iNdEx]
  3466. iNdEx++
  3467. v |= int(b&0x7F) << shift
  3468. if b < 0x80 {
  3469. break
  3470. }
  3471. }
  3472. m.RawInvalid = bool(v != 0)
  3473. case 8:
  3474. if wireType != 0 {
  3475. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  3476. }
  3477. var v int
  3478. for shift := uint(0); ; shift += 7 {
  3479. if shift >= 64 {
  3480. return ErrIntOverflowBep
  3481. }
  3482. if iNdEx >= l {
  3483. return io.ErrUnexpectedEOF
  3484. }
  3485. b := dAtA[iNdEx]
  3486. iNdEx++
  3487. v |= int(b&0x7F) << shift
  3488. if b < 0x80 {
  3489. break
  3490. }
  3491. }
  3492. m.NoPermissions = bool(v != 0)
  3493. case 9:
  3494. if wireType != 2 {
  3495. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  3496. }
  3497. var msglen int
  3498. for shift := uint(0); ; shift += 7 {
  3499. if shift >= 64 {
  3500. return ErrIntOverflowBep
  3501. }
  3502. if iNdEx >= l {
  3503. return io.ErrUnexpectedEOF
  3504. }
  3505. b := dAtA[iNdEx]
  3506. iNdEx++
  3507. msglen |= int(b&0x7F) << shift
  3508. if b < 0x80 {
  3509. break
  3510. }
  3511. }
  3512. if msglen < 0 {
  3513. return ErrInvalidLengthBep
  3514. }
  3515. postIndex := iNdEx + msglen
  3516. if postIndex < 0 {
  3517. return ErrInvalidLengthBep
  3518. }
  3519. if postIndex > l {
  3520. return io.ErrUnexpectedEOF
  3521. }
  3522. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3523. return err
  3524. }
  3525. iNdEx = postIndex
  3526. case 10:
  3527. if wireType != 0 {
  3528. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  3529. }
  3530. m.Sequence = 0
  3531. for shift := uint(0); ; shift += 7 {
  3532. if shift >= 64 {
  3533. return ErrIntOverflowBep
  3534. }
  3535. if iNdEx >= l {
  3536. return io.ErrUnexpectedEOF
  3537. }
  3538. b := dAtA[iNdEx]
  3539. iNdEx++
  3540. m.Sequence |= int64(b&0x7F) << shift
  3541. if b < 0x80 {
  3542. break
  3543. }
  3544. }
  3545. case 11:
  3546. if wireType != 0 {
  3547. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  3548. }
  3549. m.ModifiedNs = 0
  3550. for shift := uint(0); ; shift += 7 {
  3551. if shift >= 64 {
  3552. return ErrIntOverflowBep
  3553. }
  3554. if iNdEx >= l {
  3555. return io.ErrUnexpectedEOF
  3556. }
  3557. b := dAtA[iNdEx]
  3558. iNdEx++
  3559. m.ModifiedNs |= int32(b&0x7F) << shift
  3560. if b < 0x80 {
  3561. break
  3562. }
  3563. }
  3564. case 12:
  3565. if wireType != 0 {
  3566. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedBy", wireType)
  3567. }
  3568. m.ModifiedBy = 0
  3569. for shift := uint(0); ; shift += 7 {
  3570. if shift >= 64 {
  3571. return ErrIntOverflowBep
  3572. }
  3573. if iNdEx >= l {
  3574. return io.ErrUnexpectedEOF
  3575. }
  3576. b := dAtA[iNdEx]
  3577. iNdEx++
  3578. m.ModifiedBy |= ShortID(b&0x7F) << shift
  3579. if b < 0x80 {
  3580. break
  3581. }
  3582. }
  3583. case 13:
  3584. if wireType != 0 {
  3585. return fmt.Errorf("proto: wrong wireType = %d for field RawBlockSize", wireType)
  3586. }
  3587. m.RawBlockSize = 0
  3588. for shift := uint(0); ; shift += 7 {
  3589. if shift >= 64 {
  3590. return ErrIntOverflowBep
  3591. }
  3592. if iNdEx >= l {
  3593. return io.ErrUnexpectedEOF
  3594. }
  3595. b := dAtA[iNdEx]
  3596. iNdEx++
  3597. m.RawBlockSize |= int32(b&0x7F) << shift
  3598. if b < 0x80 {
  3599. break
  3600. }
  3601. }
  3602. case 16:
  3603. if wireType != 2 {
  3604. return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType)
  3605. }
  3606. var msglen int
  3607. for shift := uint(0); ; shift += 7 {
  3608. if shift >= 64 {
  3609. return ErrIntOverflowBep
  3610. }
  3611. if iNdEx >= l {
  3612. return io.ErrUnexpectedEOF
  3613. }
  3614. b := dAtA[iNdEx]
  3615. iNdEx++
  3616. msglen |= int(b&0x7F) << shift
  3617. if b < 0x80 {
  3618. break
  3619. }
  3620. }
  3621. if msglen < 0 {
  3622. return ErrInvalidLengthBep
  3623. }
  3624. postIndex := iNdEx + msglen
  3625. if postIndex < 0 {
  3626. return ErrInvalidLengthBep
  3627. }
  3628. if postIndex > l {
  3629. return io.ErrUnexpectedEOF
  3630. }
  3631. m.Blocks = append(m.Blocks, BlockInfo{})
  3632. if err := m.Blocks[len(m.Blocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3633. return err
  3634. }
  3635. iNdEx = postIndex
  3636. case 17:
  3637. if wireType != 2 {
  3638. return fmt.Errorf("proto: wrong wireType = %d for field SymlinkTarget", wireType)
  3639. }
  3640. var stringLen uint64
  3641. for shift := uint(0); ; shift += 7 {
  3642. if shift >= 64 {
  3643. return ErrIntOverflowBep
  3644. }
  3645. if iNdEx >= l {
  3646. return io.ErrUnexpectedEOF
  3647. }
  3648. b := dAtA[iNdEx]
  3649. iNdEx++
  3650. stringLen |= uint64(b&0x7F) << shift
  3651. if b < 0x80 {
  3652. break
  3653. }
  3654. }
  3655. intStringLen := int(stringLen)
  3656. if intStringLen < 0 {
  3657. return ErrInvalidLengthBep
  3658. }
  3659. postIndex := iNdEx + intStringLen
  3660. if postIndex < 0 {
  3661. return ErrInvalidLengthBep
  3662. }
  3663. if postIndex > l {
  3664. return io.ErrUnexpectedEOF
  3665. }
  3666. m.SymlinkTarget = string(dAtA[iNdEx:postIndex])
  3667. iNdEx = postIndex
  3668. case 1000:
  3669. if wireType != 0 {
  3670. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  3671. }
  3672. m.LocalFlags = 0
  3673. for shift := uint(0); ; shift += 7 {
  3674. if shift >= 64 {
  3675. return ErrIntOverflowBep
  3676. }
  3677. if iNdEx >= l {
  3678. return io.ErrUnexpectedEOF
  3679. }
  3680. b := dAtA[iNdEx]
  3681. iNdEx++
  3682. m.LocalFlags |= uint32(b&0x7F) << shift
  3683. if b < 0x80 {
  3684. break
  3685. }
  3686. }
  3687. default:
  3688. iNdEx = preIndex
  3689. skippy, err := skipBep(dAtA[iNdEx:])
  3690. if err != nil {
  3691. return err
  3692. }
  3693. if skippy < 0 {
  3694. return ErrInvalidLengthBep
  3695. }
  3696. if (iNdEx + skippy) < 0 {
  3697. return ErrInvalidLengthBep
  3698. }
  3699. if (iNdEx + skippy) > l {
  3700. return io.ErrUnexpectedEOF
  3701. }
  3702. iNdEx += skippy
  3703. }
  3704. }
  3705. if iNdEx > l {
  3706. return io.ErrUnexpectedEOF
  3707. }
  3708. return nil
  3709. }
  3710. func (m *BlockInfo) Unmarshal(dAtA []byte) error {
  3711. l := len(dAtA)
  3712. iNdEx := 0
  3713. for iNdEx < l {
  3714. preIndex := iNdEx
  3715. var wire uint64
  3716. for shift := uint(0); ; shift += 7 {
  3717. if shift >= 64 {
  3718. return ErrIntOverflowBep
  3719. }
  3720. if iNdEx >= l {
  3721. return io.ErrUnexpectedEOF
  3722. }
  3723. b := dAtA[iNdEx]
  3724. iNdEx++
  3725. wire |= uint64(b&0x7F) << shift
  3726. if b < 0x80 {
  3727. break
  3728. }
  3729. }
  3730. fieldNum := int32(wire >> 3)
  3731. wireType := int(wire & 0x7)
  3732. if wireType == 4 {
  3733. return fmt.Errorf("proto: BlockInfo: wiretype end group for non-group")
  3734. }
  3735. if fieldNum <= 0 {
  3736. return fmt.Errorf("proto: BlockInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  3737. }
  3738. switch fieldNum {
  3739. case 1:
  3740. if wireType != 0 {
  3741. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  3742. }
  3743. m.Offset = 0
  3744. for shift := uint(0); ; shift += 7 {
  3745. if shift >= 64 {
  3746. return ErrIntOverflowBep
  3747. }
  3748. if iNdEx >= l {
  3749. return io.ErrUnexpectedEOF
  3750. }
  3751. b := dAtA[iNdEx]
  3752. iNdEx++
  3753. m.Offset |= int64(b&0x7F) << shift
  3754. if b < 0x80 {
  3755. break
  3756. }
  3757. }
  3758. case 2:
  3759. if wireType != 0 {
  3760. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  3761. }
  3762. m.Size = 0
  3763. for shift := uint(0); ; shift += 7 {
  3764. if shift >= 64 {
  3765. return ErrIntOverflowBep
  3766. }
  3767. if iNdEx >= l {
  3768. return io.ErrUnexpectedEOF
  3769. }
  3770. b := dAtA[iNdEx]
  3771. iNdEx++
  3772. m.Size |= int32(b&0x7F) << shift
  3773. if b < 0x80 {
  3774. break
  3775. }
  3776. }
  3777. case 3:
  3778. if wireType != 2 {
  3779. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  3780. }
  3781. var byteLen int
  3782. for shift := uint(0); ; shift += 7 {
  3783. if shift >= 64 {
  3784. return ErrIntOverflowBep
  3785. }
  3786. if iNdEx >= l {
  3787. return io.ErrUnexpectedEOF
  3788. }
  3789. b := dAtA[iNdEx]
  3790. iNdEx++
  3791. byteLen |= int(b&0x7F) << shift
  3792. if b < 0x80 {
  3793. break
  3794. }
  3795. }
  3796. if byteLen < 0 {
  3797. return ErrInvalidLengthBep
  3798. }
  3799. postIndex := iNdEx + byteLen
  3800. if postIndex < 0 {
  3801. return ErrInvalidLengthBep
  3802. }
  3803. if postIndex > l {
  3804. return io.ErrUnexpectedEOF
  3805. }
  3806. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  3807. if m.Hash == nil {
  3808. m.Hash = []byte{}
  3809. }
  3810. iNdEx = postIndex
  3811. case 4:
  3812. if wireType != 0 {
  3813. return fmt.Errorf("proto: wrong wireType = %d for field WeakHash", wireType)
  3814. }
  3815. m.WeakHash = 0
  3816. for shift := uint(0); ; shift += 7 {
  3817. if shift >= 64 {
  3818. return ErrIntOverflowBep
  3819. }
  3820. if iNdEx >= l {
  3821. return io.ErrUnexpectedEOF
  3822. }
  3823. b := dAtA[iNdEx]
  3824. iNdEx++
  3825. m.WeakHash |= uint32(b&0x7F) << shift
  3826. if b < 0x80 {
  3827. break
  3828. }
  3829. }
  3830. default:
  3831. iNdEx = preIndex
  3832. skippy, err := skipBep(dAtA[iNdEx:])
  3833. if err != nil {
  3834. return err
  3835. }
  3836. if skippy < 0 {
  3837. return ErrInvalidLengthBep
  3838. }
  3839. if (iNdEx + skippy) < 0 {
  3840. return ErrInvalidLengthBep
  3841. }
  3842. if (iNdEx + skippy) > l {
  3843. return io.ErrUnexpectedEOF
  3844. }
  3845. iNdEx += skippy
  3846. }
  3847. }
  3848. if iNdEx > l {
  3849. return io.ErrUnexpectedEOF
  3850. }
  3851. return nil
  3852. }
  3853. func (m *Vector) Unmarshal(dAtA []byte) error {
  3854. l := len(dAtA)
  3855. iNdEx := 0
  3856. for iNdEx < l {
  3857. preIndex := iNdEx
  3858. var wire uint64
  3859. for shift := uint(0); ; shift += 7 {
  3860. if shift >= 64 {
  3861. return ErrIntOverflowBep
  3862. }
  3863. if iNdEx >= l {
  3864. return io.ErrUnexpectedEOF
  3865. }
  3866. b := dAtA[iNdEx]
  3867. iNdEx++
  3868. wire |= uint64(b&0x7F) << shift
  3869. if b < 0x80 {
  3870. break
  3871. }
  3872. }
  3873. fieldNum := int32(wire >> 3)
  3874. wireType := int(wire & 0x7)
  3875. if wireType == 4 {
  3876. return fmt.Errorf("proto: Vector: wiretype end group for non-group")
  3877. }
  3878. if fieldNum <= 0 {
  3879. return fmt.Errorf("proto: Vector: illegal tag %d (wire type %d)", fieldNum, wire)
  3880. }
  3881. switch fieldNum {
  3882. case 1:
  3883. if wireType != 2 {
  3884. return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
  3885. }
  3886. var msglen int
  3887. for shift := uint(0); ; shift += 7 {
  3888. if shift >= 64 {
  3889. return ErrIntOverflowBep
  3890. }
  3891. if iNdEx >= l {
  3892. return io.ErrUnexpectedEOF
  3893. }
  3894. b := dAtA[iNdEx]
  3895. iNdEx++
  3896. msglen |= int(b&0x7F) << shift
  3897. if b < 0x80 {
  3898. break
  3899. }
  3900. }
  3901. if msglen < 0 {
  3902. return ErrInvalidLengthBep
  3903. }
  3904. postIndex := iNdEx + msglen
  3905. if postIndex < 0 {
  3906. return ErrInvalidLengthBep
  3907. }
  3908. if postIndex > l {
  3909. return io.ErrUnexpectedEOF
  3910. }
  3911. m.Counters = append(m.Counters, Counter{})
  3912. if err := m.Counters[len(m.Counters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3913. return err
  3914. }
  3915. iNdEx = postIndex
  3916. default:
  3917. iNdEx = preIndex
  3918. skippy, err := skipBep(dAtA[iNdEx:])
  3919. if err != nil {
  3920. return err
  3921. }
  3922. if skippy < 0 {
  3923. return ErrInvalidLengthBep
  3924. }
  3925. if (iNdEx + skippy) < 0 {
  3926. return ErrInvalidLengthBep
  3927. }
  3928. if (iNdEx + skippy) > l {
  3929. return io.ErrUnexpectedEOF
  3930. }
  3931. iNdEx += skippy
  3932. }
  3933. }
  3934. if iNdEx > l {
  3935. return io.ErrUnexpectedEOF
  3936. }
  3937. return nil
  3938. }
  3939. func (m *Counter) Unmarshal(dAtA []byte) error {
  3940. l := len(dAtA)
  3941. iNdEx := 0
  3942. for iNdEx < l {
  3943. preIndex := iNdEx
  3944. var wire uint64
  3945. for shift := uint(0); ; shift += 7 {
  3946. if shift >= 64 {
  3947. return ErrIntOverflowBep
  3948. }
  3949. if iNdEx >= l {
  3950. return io.ErrUnexpectedEOF
  3951. }
  3952. b := dAtA[iNdEx]
  3953. iNdEx++
  3954. wire |= uint64(b&0x7F) << shift
  3955. if b < 0x80 {
  3956. break
  3957. }
  3958. }
  3959. fieldNum := int32(wire >> 3)
  3960. wireType := int(wire & 0x7)
  3961. if wireType == 4 {
  3962. return fmt.Errorf("proto: Counter: wiretype end group for non-group")
  3963. }
  3964. if fieldNum <= 0 {
  3965. return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire)
  3966. }
  3967. switch fieldNum {
  3968. case 1:
  3969. if wireType != 0 {
  3970. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3971. }
  3972. m.ID = 0
  3973. for shift := uint(0); ; shift += 7 {
  3974. if shift >= 64 {
  3975. return ErrIntOverflowBep
  3976. }
  3977. if iNdEx >= l {
  3978. return io.ErrUnexpectedEOF
  3979. }
  3980. b := dAtA[iNdEx]
  3981. iNdEx++
  3982. m.ID |= ShortID(b&0x7F) << shift
  3983. if b < 0x80 {
  3984. break
  3985. }
  3986. }
  3987. case 2:
  3988. if wireType != 0 {
  3989. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  3990. }
  3991. m.Value = 0
  3992. for shift := uint(0); ; shift += 7 {
  3993. if shift >= 64 {
  3994. return ErrIntOverflowBep
  3995. }
  3996. if iNdEx >= l {
  3997. return io.ErrUnexpectedEOF
  3998. }
  3999. b := dAtA[iNdEx]
  4000. iNdEx++
  4001. m.Value |= uint64(b&0x7F) << shift
  4002. if b < 0x80 {
  4003. break
  4004. }
  4005. }
  4006. default:
  4007. iNdEx = preIndex
  4008. skippy, err := skipBep(dAtA[iNdEx:])
  4009. if err != nil {
  4010. return err
  4011. }
  4012. if skippy < 0 {
  4013. return ErrInvalidLengthBep
  4014. }
  4015. if (iNdEx + skippy) < 0 {
  4016. return ErrInvalidLengthBep
  4017. }
  4018. if (iNdEx + skippy) > l {
  4019. return io.ErrUnexpectedEOF
  4020. }
  4021. iNdEx += skippy
  4022. }
  4023. }
  4024. if iNdEx > l {
  4025. return io.ErrUnexpectedEOF
  4026. }
  4027. return nil
  4028. }
  4029. func (m *Request) Unmarshal(dAtA []byte) error {
  4030. l := len(dAtA)
  4031. iNdEx := 0
  4032. for iNdEx < l {
  4033. preIndex := iNdEx
  4034. var wire uint64
  4035. for shift := uint(0); ; shift += 7 {
  4036. if shift >= 64 {
  4037. return ErrIntOverflowBep
  4038. }
  4039. if iNdEx >= l {
  4040. return io.ErrUnexpectedEOF
  4041. }
  4042. b := dAtA[iNdEx]
  4043. iNdEx++
  4044. wire |= uint64(b&0x7F) << shift
  4045. if b < 0x80 {
  4046. break
  4047. }
  4048. }
  4049. fieldNum := int32(wire >> 3)
  4050. wireType := int(wire & 0x7)
  4051. if wireType == 4 {
  4052. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  4053. }
  4054. if fieldNum <= 0 {
  4055. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  4056. }
  4057. switch fieldNum {
  4058. case 1:
  4059. if wireType != 0 {
  4060. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4061. }
  4062. m.ID = 0
  4063. for shift := uint(0); ; shift += 7 {
  4064. if shift >= 64 {
  4065. return ErrIntOverflowBep
  4066. }
  4067. if iNdEx >= l {
  4068. return io.ErrUnexpectedEOF
  4069. }
  4070. b := dAtA[iNdEx]
  4071. iNdEx++
  4072. m.ID |= int32(b&0x7F) << shift
  4073. if b < 0x80 {
  4074. break
  4075. }
  4076. }
  4077. case 2:
  4078. if wireType != 2 {
  4079. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  4080. }
  4081. var stringLen uint64
  4082. for shift := uint(0); ; shift += 7 {
  4083. if shift >= 64 {
  4084. return ErrIntOverflowBep
  4085. }
  4086. if iNdEx >= l {
  4087. return io.ErrUnexpectedEOF
  4088. }
  4089. b := dAtA[iNdEx]
  4090. iNdEx++
  4091. stringLen |= uint64(b&0x7F) << shift
  4092. if b < 0x80 {
  4093. break
  4094. }
  4095. }
  4096. intStringLen := int(stringLen)
  4097. if intStringLen < 0 {
  4098. return ErrInvalidLengthBep
  4099. }
  4100. postIndex := iNdEx + intStringLen
  4101. if postIndex < 0 {
  4102. return ErrInvalidLengthBep
  4103. }
  4104. if postIndex > l {
  4105. return io.ErrUnexpectedEOF
  4106. }
  4107. m.Folder = string(dAtA[iNdEx:postIndex])
  4108. iNdEx = postIndex
  4109. case 3:
  4110. if wireType != 2 {
  4111. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  4112. }
  4113. var stringLen uint64
  4114. for shift := uint(0); ; shift += 7 {
  4115. if shift >= 64 {
  4116. return ErrIntOverflowBep
  4117. }
  4118. if iNdEx >= l {
  4119. return io.ErrUnexpectedEOF
  4120. }
  4121. b := dAtA[iNdEx]
  4122. iNdEx++
  4123. stringLen |= uint64(b&0x7F) << shift
  4124. if b < 0x80 {
  4125. break
  4126. }
  4127. }
  4128. intStringLen := int(stringLen)
  4129. if intStringLen < 0 {
  4130. return ErrInvalidLengthBep
  4131. }
  4132. postIndex := iNdEx + intStringLen
  4133. if postIndex < 0 {
  4134. return ErrInvalidLengthBep
  4135. }
  4136. if postIndex > l {
  4137. return io.ErrUnexpectedEOF
  4138. }
  4139. m.Name = string(dAtA[iNdEx:postIndex])
  4140. iNdEx = postIndex
  4141. case 4:
  4142. if wireType != 0 {
  4143. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  4144. }
  4145. m.Offset = 0
  4146. for shift := uint(0); ; shift += 7 {
  4147. if shift >= 64 {
  4148. return ErrIntOverflowBep
  4149. }
  4150. if iNdEx >= l {
  4151. return io.ErrUnexpectedEOF
  4152. }
  4153. b := dAtA[iNdEx]
  4154. iNdEx++
  4155. m.Offset |= int64(b&0x7F) << shift
  4156. if b < 0x80 {
  4157. break
  4158. }
  4159. }
  4160. case 5:
  4161. if wireType != 0 {
  4162. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  4163. }
  4164. m.Size = 0
  4165. for shift := uint(0); ; shift += 7 {
  4166. if shift >= 64 {
  4167. return ErrIntOverflowBep
  4168. }
  4169. if iNdEx >= l {
  4170. return io.ErrUnexpectedEOF
  4171. }
  4172. b := dAtA[iNdEx]
  4173. iNdEx++
  4174. m.Size |= int32(b&0x7F) << shift
  4175. if b < 0x80 {
  4176. break
  4177. }
  4178. }
  4179. case 6:
  4180. if wireType != 2 {
  4181. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  4182. }
  4183. var byteLen int
  4184. for shift := uint(0); ; shift += 7 {
  4185. if shift >= 64 {
  4186. return ErrIntOverflowBep
  4187. }
  4188. if iNdEx >= l {
  4189. return io.ErrUnexpectedEOF
  4190. }
  4191. b := dAtA[iNdEx]
  4192. iNdEx++
  4193. byteLen |= int(b&0x7F) << shift
  4194. if b < 0x80 {
  4195. break
  4196. }
  4197. }
  4198. if byteLen < 0 {
  4199. return ErrInvalidLengthBep
  4200. }
  4201. postIndex := iNdEx + byteLen
  4202. if postIndex < 0 {
  4203. return ErrInvalidLengthBep
  4204. }
  4205. if postIndex > l {
  4206. return io.ErrUnexpectedEOF
  4207. }
  4208. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  4209. if m.Hash == nil {
  4210. m.Hash = []byte{}
  4211. }
  4212. iNdEx = postIndex
  4213. case 7:
  4214. if wireType != 0 {
  4215. return fmt.Errorf("proto: wrong wireType = %d for field FromTemporary", wireType)
  4216. }
  4217. var v int
  4218. for shift := uint(0); ; shift += 7 {
  4219. if shift >= 64 {
  4220. return ErrIntOverflowBep
  4221. }
  4222. if iNdEx >= l {
  4223. return io.ErrUnexpectedEOF
  4224. }
  4225. b := dAtA[iNdEx]
  4226. iNdEx++
  4227. v |= int(b&0x7F) << shift
  4228. if b < 0x80 {
  4229. break
  4230. }
  4231. }
  4232. m.FromTemporary = bool(v != 0)
  4233. case 8:
  4234. if wireType != 0 {
  4235. return fmt.Errorf("proto: wrong wireType = %d for field WeakHash", wireType)
  4236. }
  4237. m.WeakHash = 0
  4238. for shift := uint(0); ; shift += 7 {
  4239. if shift >= 64 {
  4240. return ErrIntOverflowBep
  4241. }
  4242. if iNdEx >= l {
  4243. return io.ErrUnexpectedEOF
  4244. }
  4245. b := dAtA[iNdEx]
  4246. iNdEx++
  4247. m.WeakHash |= uint32(b&0x7F) << shift
  4248. if b < 0x80 {
  4249. break
  4250. }
  4251. }
  4252. default:
  4253. iNdEx = preIndex
  4254. skippy, err := skipBep(dAtA[iNdEx:])
  4255. if err != nil {
  4256. return err
  4257. }
  4258. if skippy < 0 {
  4259. return ErrInvalidLengthBep
  4260. }
  4261. if (iNdEx + skippy) < 0 {
  4262. return ErrInvalidLengthBep
  4263. }
  4264. if (iNdEx + skippy) > l {
  4265. return io.ErrUnexpectedEOF
  4266. }
  4267. iNdEx += skippy
  4268. }
  4269. }
  4270. if iNdEx > l {
  4271. return io.ErrUnexpectedEOF
  4272. }
  4273. return nil
  4274. }
  4275. func (m *Response) Unmarshal(dAtA []byte) error {
  4276. l := len(dAtA)
  4277. iNdEx := 0
  4278. for iNdEx < l {
  4279. preIndex := iNdEx
  4280. var wire uint64
  4281. for shift := uint(0); ; shift += 7 {
  4282. if shift >= 64 {
  4283. return ErrIntOverflowBep
  4284. }
  4285. if iNdEx >= l {
  4286. return io.ErrUnexpectedEOF
  4287. }
  4288. b := dAtA[iNdEx]
  4289. iNdEx++
  4290. wire |= uint64(b&0x7F) << shift
  4291. if b < 0x80 {
  4292. break
  4293. }
  4294. }
  4295. fieldNum := int32(wire >> 3)
  4296. wireType := int(wire & 0x7)
  4297. if wireType == 4 {
  4298. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  4299. }
  4300. if fieldNum <= 0 {
  4301. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  4302. }
  4303. switch fieldNum {
  4304. case 1:
  4305. if wireType != 0 {
  4306. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4307. }
  4308. m.ID = 0
  4309. for shift := uint(0); ; shift += 7 {
  4310. if shift >= 64 {
  4311. return ErrIntOverflowBep
  4312. }
  4313. if iNdEx >= l {
  4314. return io.ErrUnexpectedEOF
  4315. }
  4316. b := dAtA[iNdEx]
  4317. iNdEx++
  4318. m.ID |= int32(b&0x7F) << shift
  4319. if b < 0x80 {
  4320. break
  4321. }
  4322. }
  4323. case 2:
  4324. if wireType != 2 {
  4325. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  4326. }
  4327. var byteLen int
  4328. for shift := uint(0); ; shift += 7 {
  4329. if shift >= 64 {
  4330. return ErrIntOverflowBep
  4331. }
  4332. if iNdEx >= l {
  4333. return io.ErrUnexpectedEOF
  4334. }
  4335. b := dAtA[iNdEx]
  4336. iNdEx++
  4337. byteLen |= int(b&0x7F) << shift
  4338. if b < 0x80 {
  4339. break
  4340. }
  4341. }
  4342. if byteLen < 0 {
  4343. return ErrInvalidLengthBep
  4344. }
  4345. postIndex := iNdEx + byteLen
  4346. if postIndex < 0 {
  4347. return ErrInvalidLengthBep
  4348. }
  4349. if postIndex > l {
  4350. return io.ErrUnexpectedEOF
  4351. }
  4352. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  4353. if m.Data == nil {
  4354. m.Data = []byte{}
  4355. }
  4356. iNdEx = postIndex
  4357. case 3:
  4358. if wireType != 0 {
  4359. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  4360. }
  4361. m.Code = 0
  4362. for shift := uint(0); ; shift += 7 {
  4363. if shift >= 64 {
  4364. return ErrIntOverflowBep
  4365. }
  4366. if iNdEx >= l {
  4367. return io.ErrUnexpectedEOF
  4368. }
  4369. b := dAtA[iNdEx]
  4370. iNdEx++
  4371. m.Code |= ErrorCode(b&0x7F) << shift
  4372. if b < 0x80 {
  4373. break
  4374. }
  4375. }
  4376. default:
  4377. iNdEx = preIndex
  4378. skippy, err := skipBep(dAtA[iNdEx:])
  4379. if err != nil {
  4380. return err
  4381. }
  4382. if skippy < 0 {
  4383. return ErrInvalidLengthBep
  4384. }
  4385. if (iNdEx + skippy) < 0 {
  4386. return ErrInvalidLengthBep
  4387. }
  4388. if (iNdEx + skippy) > l {
  4389. return io.ErrUnexpectedEOF
  4390. }
  4391. iNdEx += skippy
  4392. }
  4393. }
  4394. if iNdEx > l {
  4395. return io.ErrUnexpectedEOF
  4396. }
  4397. return nil
  4398. }
  4399. func (m *DownloadProgress) Unmarshal(dAtA []byte) error {
  4400. l := len(dAtA)
  4401. iNdEx := 0
  4402. for iNdEx < l {
  4403. preIndex := iNdEx
  4404. var wire uint64
  4405. for shift := uint(0); ; shift += 7 {
  4406. if shift >= 64 {
  4407. return ErrIntOverflowBep
  4408. }
  4409. if iNdEx >= l {
  4410. return io.ErrUnexpectedEOF
  4411. }
  4412. b := dAtA[iNdEx]
  4413. iNdEx++
  4414. wire |= uint64(b&0x7F) << shift
  4415. if b < 0x80 {
  4416. break
  4417. }
  4418. }
  4419. fieldNum := int32(wire >> 3)
  4420. wireType := int(wire & 0x7)
  4421. if wireType == 4 {
  4422. return fmt.Errorf("proto: DownloadProgress: wiretype end group for non-group")
  4423. }
  4424. if fieldNum <= 0 {
  4425. return fmt.Errorf("proto: DownloadProgress: illegal tag %d (wire type %d)", fieldNum, wire)
  4426. }
  4427. switch fieldNum {
  4428. case 1:
  4429. if wireType != 2 {
  4430. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  4431. }
  4432. var stringLen uint64
  4433. for shift := uint(0); ; shift += 7 {
  4434. if shift >= 64 {
  4435. return ErrIntOverflowBep
  4436. }
  4437. if iNdEx >= l {
  4438. return io.ErrUnexpectedEOF
  4439. }
  4440. b := dAtA[iNdEx]
  4441. iNdEx++
  4442. stringLen |= uint64(b&0x7F) << shift
  4443. if b < 0x80 {
  4444. break
  4445. }
  4446. }
  4447. intStringLen := int(stringLen)
  4448. if intStringLen < 0 {
  4449. return ErrInvalidLengthBep
  4450. }
  4451. postIndex := iNdEx + intStringLen
  4452. if postIndex < 0 {
  4453. return ErrInvalidLengthBep
  4454. }
  4455. if postIndex > l {
  4456. return io.ErrUnexpectedEOF
  4457. }
  4458. m.Folder = string(dAtA[iNdEx:postIndex])
  4459. iNdEx = postIndex
  4460. case 2:
  4461. if wireType != 2 {
  4462. return fmt.Errorf("proto: wrong wireType = %d for field Updates", wireType)
  4463. }
  4464. var msglen int
  4465. for shift := uint(0); ; shift += 7 {
  4466. if shift >= 64 {
  4467. return ErrIntOverflowBep
  4468. }
  4469. if iNdEx >= l {
  4470. return io.ErrUnexpectedEOF
  4471. }
  4472. b := dAtA[iNdEx]
  4473. iNdEx++
  4474. msglen |= int(b&0x7F) << shift
  4475. if b < 0x80 {
  4476. break
  4477. }
  4478. }
  4479. if msglen < 0 {
  4480. return ErrInvalidLengthBep
  4481. }
  4482. postIndex := iNdEx + msglen
  4483. if postIndex < 0 {
  4484. return ErrInvalidLengthBep
  4485. }
  4486. if postIndex > l {
  4487. return io.ErrUnexpectedEOF
  4488. }
  4489. m.Updates = append(m.Updates, FileDownloadProgressUpdate{})
  4490. if err := m.Updates[len(m.Updates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4491. return err
  4492. }
  4493. iNdEx = postIndex
  4494. default:
  4495. iNdEx = preIndex
  4496. skippy, err := skipBep(dAtA[iNdEx:])
  4497. if err != nil {
  4498. return err
  4499. }
  4500. if skippy < 0 {
  4501. return ErrInvalidLengthBep
  4502. }
  4503. if (iNdEx + skippy) < 0 {
  4504. return ErrInvalidLengthBep
  4505. }
  4506. if (iNdEx + skippy) > l {
  4507. return io.ErrUnexpectedEOF
  4508. }
  4509. iNdEx += skippy
  4510. }
  4511. }
  4512. if iNdEx > l {
  4513. return io.ErrUnexpectedEOF
  4514. }
  4515. return nil
  4516. }
  4517. func (m *FileDownloadProgressUpdate) Unmarshal(dAtA []byte) error {
  4518. l := len(dAtA)
  4519. iNdEx := 0
  4520. for iNdEx < l {
  4521. preIndex := iNdEx
  4522. var wire uint64
  4523. for shift := uint(0); ; shift += 7 {
  4524. if shift >= 64 {
  4525. return ErrIntOverflowBep
  4526. }
  4527. if iNdEx >= l {
  4528. return io.ErrUnexpectedEOF
  4529. }
  4530. b := dAtA[iNdEx]
  4531. iNdEx++
  4532. wire |= uint64(b&0x7F) << shift
  4533. if b < 0x80 {
  4534. break
  4535. }
  4536. }
  4537. fieldNum := int32(wire >> 3)
  4538. wireType := int(wire & 0x7)
  4539. if wireType == 4 {
  4540. return fmt.Errorf("proto: FileDownloadProgressUpdate: wiretype end group for non-group")
  4541. }
  4542. if fieldNum <= 0 {
  4543. return fmt.Errorf("proto: FileDownloadProgressUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  4544. }
  4545. switch fieldNum {
  4546. case 1:
  4547. if wireType != 0 {
  4548. return fmt.Errorf("proto: wrong wireType = %d for field UpdateType", wireType)
  4549. }
  4550. m.UpdateType = 0
  4551. for shift := uint(0); ; shift += 7 {
  4552. if shift >= 64 {
  4553. return ErrIntOverflowBep
  4554. }
  4555. if iNdEx >= l {
  4556. return io.ErrUnexpectedEOF
  4557. }
  4558. b := dAtA[iNdEx]
  4559. iNdEx++
  4560. m.UpdateType |= FileDownloadProgressUpdateType(b&0x7F) << shift
  4561. if b < 0x80 {
  4562. break
  4563. }
  4564. }
  4565. case 2:
  4566. if wireType != 2 {
  4567. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  4568. }
  4569. var stringLen uint64
  4570. for shift := uint(0); ; shift += 7 {
  4571. if shift >= 64 {
  4572. return ErrIntOverflowBep
  4573. }
  4574. if iNdEx >= l {
  4575. return io.ErrUnexpectedEOF
  4576. }
  4577. b := dAtA[iNdEx]
  4578. iNdEx++
  4579. stringLen |= uint64(b&0x7F) << shift
  4580. if b < 0x80 {
  4581. break
  4582. }
  4583. }
  4584. intStringLen := int(stringLen)
  4585. if intStringLen < 0 {
  4586. return ErrInvalidLengthBep
  4587. }
  4588. postIndex := iNdEx + intStringLen
  4589. if postIndex < 0 {
  4590. return ErrInvalidLengthBep
  4591. }
  4592. if postIndex > l {
  4593. return io.ErrUnexpectedEOF
  4594. }
  4595. m.Name = string(dAtA[iNdEx:postIndex])
  4596. iNdEx = postIndex
  4597. case 3:
  4598. if wireType != 2 {
  4599. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  4600. }
  4601. var msglen int
  4602. for shift := uint(0); ; shift += 7 {
  4603. if shift >= 64 {
  4604. return ErrIntOverflowBep
  4605. }
  4606. if iNdEx >= l {
  4607. return io.ErrUnexpectedEOF
  4608. }
  4609. b := dAtA[iNdEx]
  4610. iNdEx++
  4611. msglen |= int(b&0x7F) << shift
  4612. if b < 0x80 {
  4613. break
  4614. }
  4615. }
  4616. if msglen < 0 {
  4617. return ErrInvalidLengthBep
  4618. }
  4619. postIndex := iNdEx + msglen
  4620. if postIndex < 0 {
  4621. return ErrInvalidLengthBep
  4622. }
  4623. if postIndex > l {
  4624. return io.ErrUnexpectedEOF
  4625. }
  4626. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4627. return err
  4628. }
  4629. iNdEx = postIndex
  4630. case 4:
  4631. if wireType == 0 {
  4632. var v int32
  4633. for shift := uint(0); ; shift += 7 {
  4634. if shift >= 64 {
  4635. return ErrIntOverflowBep
  4636. }
  4637. if iNdEx >= l {
  4638. return io.ErrUnexpectedEOF
  4639. }
  4640. b := dAtA[iNdEx]
  4641. iNdEx++
  4642. v |= int32(b&0x7F) << shift
  4643. if b < 0x80 {
  4644. break
  4645. }
  4646. }
  4647. m.BlockIndexes = append(m.BlockIndexes, v)
  4648. } else if wireType == 2 {
  4649. var packedLen int
  4650. for shift := uint(0); ; shift += 7 {
  4651. if shift >= 64 {
  4652. return ErrIntOverflowBep
  4653. }
  4654. if iNdEx >= l {
  4655. return io.ErrUnexpectedEOF
  4656. }
  4657. b := dAtA[iNdEx]
  4658. iNdEx++
  4659. packedLen |= int(b&0x7F) << shift
  4660. if b < 0x80 {
  4661. break
  4662. }
  4663. }
  4664. if packedLen < 0 {
  4665. return ErrInvalidLengthBep
  4666. }
  4667. postIndex := iNdEx + packedLen
  4668. if postIndex < 0 {
  4669. return ErrInvalidLengthBep
  4670. }
  4671. if postIndex > l {
  4672. return io.ErrUnexpectedEOF
  4673. }
  4674. var elementCount int
  4675. var count int
  4676. for _, integer := range dAtA[iNdEx:postIndex] {
  4677. if integer < 128 {
  4678. count++
  4679. }
  4680. }
  4681. elementCount = count
  4682. if elementCount != 0 && len(m.BlockIndexes) == 0 {
  4683. m.BlockIndexes = make([]int32, 0, elementCount)
  4684. }
  4685. for iNdEx < postIndex {
  4686. var v int32
  4687. for shift := uint(0); ; shift += 7 {
  4688. if shift >= 64 {
  4689. return ErrIntOverflowBep
  4690. }
  4691. if iNdEx >= l {
  4692. return io.ErrUnexpectedEOF
  4693. }
  4694. b := dAtA[iNdEx]
  4695. iNdEx++
  4696. v |= int32(b&0x7F) << shift
  4697. if b < 0x80 {
  4698. break
  4699. }
  4700. }
  4701. m.BlockIndexes = append(m.BlockIndexes, v)
  4702. }
  4703. } else {
  4704. return fmt.Errorf("proto: wrong wireType = %d for field BlockIndexes", wireType)
  4705. }
  4706. default:
  4707. iNdEx = preIndex
  4708. skippy, err := skipBep(dAtA[iNdEx:])
  4709. if err != nil {
  4710. return err
  4711. }
  4712. if skippy < 0 {
  4713. return ErrInvalidLengthBep
  4714. }
  4715. if (iNdEx + skippy) < 0 {
  4716. return ErrInvalidLengthBep
  4717. }
  4718. if (iNdEx + skippy) > l {
  4719. return io.ErrUnexpectedEOF
  4720. }
  4721. iNdEx += skippy
  4722. }
  4723. }
  4724. if iNdEx > l {
  4725. return io.ErrUnexpectedEOF
  4726. }
  4727. return nil
  4728. }
  4729. func (m *Ping) Unmarshal(dAtA []byte) error {
  4730. l := len(dAtA)
  4731. iNdEx := 0
  4732. for iNdEx < l {
  4733. preIndex := iNdEx
  4734. var wire uint64
  4735. for shift := uint(0); ; shift += 7 {
  4736. if shift >= 64 {
  4737. return ErrIntOverflowBep
  4738. }
  4739. if iNdEx >= l {
  4740. return io.ErrUnexpectedEOF
  4741. }
  4742. b := dAtA[iNdEx]
  4743. iNdEx++
  4744. wire |= uint64(b&0x7F) << shift
  4745. if b < 0x80 {
  4746. break
  4747. }
  4748. }
  4749. fieldNum := int32(wire >> 3)
  4750. wireType := int(wire & 0x7)
  4751. if wireType == 4 {
  4752. return fmt.Errorf("proto: Ping: wiretype end group for non-group")
  4753. }
  4754. if fieldNum <= 0 {
  4755. return fmt.Errorf("proto: Ping: illegal tag %d (wire type %d)", fieldNum, wire)
  4756. }
  4757. switch fieldNum {
  4758. default:
  4759. iNdEx = preIndex
  4760. skippy, err := skipBep(dAtA[iNdEx:])
  4761. if err != nil {
  4762. return err
  4763. }
  4764. if skippy < 0 {
  4765. return ErrInvalidLengthBep
  4766. }
  4767. if (iNdEx + skippy) < 0 {
  4768. return ErrInvalidLengthBep
  4769. }
  4770. if (iNdEx + skippy) > l {
  4771. return io.ErrUnexpectedEOF
  4772. }
  4773. iNdEx += skippy
  4774. }
  4775. }
  4776. if iNdEx > l {
  4777. return io.ErrUnexpectedEOF
  4778. }
  4779. return nil
  4780. }
  4781. func (m *Close) Unmarshal(dAtA []byte) error {
  4782. l := len(dAtA)
  4783. iNdEx := 0
  4784. for iNdEx < l {
  4785. preIndex := iNdEx
  4786. var wire uint64
  4787. for shift := uint(0); ; shift += 7 {
  4788. if shift >= 64 {
  4789. return ErrIntOverflowBep
  4790. }
  4791. if iNdEx >= l {
  4792. return io.ErrUnexpectedEOF
  4793. }
  4794. b := dAtA[iNdEx]
  4795. iNdEx++
  4796. wire |= uint64(b&0x7F) << shift
  4797. if b < 0x80 {
  4798. break
  4799. }
  4800. }
  4801. fieldNum := int32(wire >> 3)
  4802. wireType := int(wire & 0x7)
  4803. if wireType == 4 {
  4804. return fmt.Errorf("proto: Close: wiretype end group for non-group")
  4805. }
  4806. if fieldNum <= 0 {
  4807. return fmt.Errorf("proto: Close: illegal tag %d (wire type %d)", fieldNum, wire)
  4808. }
  4809. switch fieldNum {
  4810. case 1:
  4811. if wireType != 2 {
  4812. return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
  4813. }
  4814. var stringLen uint64
  4815. for shift := uint(0); ; shift += 7 {
  4816. if shift >= 64 {
  4817. return ErrIntOverflowBep
  4818. }
  4819. if iNdEx >= l {
  4820. return io.ErrUnexpectedEOF
  4821. }
  4822. b := dAtA[iNdEx]
  4823. iNdEx++
  4824. stringLen |= uint64(b&0x7F) << shift
  4825. if b < 0x80 {
  4826. break
  4827. }
  4828. }
  4829. intStringLen := int(stringLen)
  4830. if intStringLen < 0 {
  4831. return ErrInvalidLengthBep
  4832. }
  4833. postIndex := iNdEx + intStringLen
  4834. if postIndex < 0 {
  4835. return ErrInvalidLengthBep
  4836. }
  4837. if postIndex > l {
  4838. return io.ErrUnexpectedEOF
  4839. }
  4840. m.Reason = string(dAtA[iNdEx:postIndex])
  4841. iNdEx = postIndex
  4842. default:
  4843. iNdEx = preIndex
  4844. skippy, err := skipBep(dAtA[iNdEx:])
  4845. if err != nil {
  4846. return err
  4847. }
  4848. if skippy < 0 {
  4849. return ErrInvalidLengthBep
  4850. }
  4851. if (iNdEx + skippy) < 0 {
  4852. return ErrInvalidLengthBep
  4853. }
  4854. if (iNdEx + skippy) > l {
  4855. return io.ErrUnexpectedEOF
  4856. }
  4857. iNdEx += skippy
  4858. }
  4859. }
  4860. if iNdEx > l {
  4861. return io.ErrUnexpectedEOF
  4862. }
  4863. return nil
  4864. }
  4865. func skipBep(dAtA []byte) (n int, err error) {
  4866. l := len(dAtA)
  4867. iNdEx := 0
  4868. depth := 0
  4869. for iNdEx < l {
  4870. var wire uint64
  4871. for shift := uint(0); ; shift += 7 {
  4872. if shift >= 64 {
  4873. return 0, ErrIntOverflowBep
  4874. }
  4875. if iNdEx >= l {
  4876. return 0, io.ErrUnexpectedEOF
  4877. }
  4878. b := dAtA[iNdEx]
  4879. iNdEx++
  4880. wire |= (uint64(b) & 0x7F) << shift
  4881. if b < 0x80 {
  4882. break
  4883. }
  4884. }
  4885. wireType := int(wire & 0x7)
  4886. switch wireType {
  4887. case 0:
  4888. for shift := uint(0); ; shift += 7 {
  4889. if shift >= 64 {
  4890. return 0, ErrIntOverflowBep
  4891. }
  4892. if iNdEx >= l {
  4893. return 0, io.ErrUnexpectedEOF
  4894. }
  4895. iNdEx++
  4896. if dAtA[iNdEx-1] < 0x80 {
  4897. break
  4898. }
  4899. }
  4900. case 1:
  4901. iNdEx += 8
  4902. case 2:
  4903. var length int
  4904. for shift := uint(0); ; shift += 7 {
  4905. if shift >= 64 {
  4906. return 0, ErrIntOverflowBep
  4907. }
  4908. if iNdEx >= l {
  4909. return 0, io.ErrUnexpectedEOF
  4910. }
  4911. b := dAtA[iNdEx]
  4912. iNdEx++
  4913. length |= (int(b) & 0x7F) << shift
  4914. if b < 0x80 {
  4915. break
  4916. }
  4917. }
  4918. if length < 0 {
  4919. return 0, ErrInvalidLengthBep
  4920. }
  4921. iNdEx += length
  4922. case 3:
  4923. depth++
  4924. case 4:
  4925. if depth == 0 {
  4926. return 0, ErrUnexpectedEndOfGroupBep
  4927. }
  4928. depth--
  4929. case 5:
  4930. iNdEx += 4
  4931. default:
  4932. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  4933. }
  4934. if iNdEx < 0 {
  4935. return 0, ErrInvalidLengthBep
  4936. }
  4937. if depth == 0 {
  4938. return iNdEx, nil
  4939. }
  4940. }
  4941. return 0, io.ErrUnexpectedEOF
  4942. }
  4943. var (
  4944. ErrInvalidLengthBep = fmt.Errorf("proto: negative length found during unmarshaling")
  4945. ErrIntOverflowBep = fmt.Errorf("proto: integer overflow")
  4946. ErrUnexpectedEndOfGroupBep = fmt.Errorf("proto: unexpected end of group")
  4947. )