1
0

bep.pb.go 96 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029
  1. // Code generated by protoc-gen-gogo.
  2. // source: bep.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package protocol is a generated protocol buffer package.
  6. It is generated from these files:
  7. bep.proto
  8. It has these top-level messages:
  9. Hello
  10. Header
  11. ClusterConfig
  12. Folder
  13. Device
  14. Index
  15. IndexUpdate
  16. FileInfo
  17. BlockInfo
  18. Vector
  19. Counter
  20. Request
  21. Response
  22. DownloadProgress
  23. FileDownloadProgressUpdate
  24. Ping
  25. Close
  26. */
  27. package protocol
  28. import proto "github.com/gogo/protobuf/proto"
  29. import fmt "fmt"
  30. import math "math"
  31. import _ "github.com/gogo/protobuf/gogoproto"
  32. import io "io"
  33. // Reference imports to suppress errors if they are not otherwise used.
  34. var _ = proto.Marshal
  35. var _ = fmt.Errorf
  36. var _ = math.Inf
  37. // This is a compile-time assertion to ensure that this generated file
  38. // is compatible with the proto package it is being compiled against.
  39. const _ = proto.GoGoProtoPackageIsVersion1
  40. type MessageType int32
  41. const (
  42. messageTypeClusterConfig MessageType = 0
  43. messageTypeIndex MessageType = 1
  44. messageTypeIndexUpdate MessageType = 2
  45. messageTypeRequest MessageType = 3
  46. messageTypeResponse MessageType = 4
  47. messageTypeDownloadProgress MessageType = 5
  48. messageTypePing MessageType = 6
  49. messageTypeClose MessageType = 7
  50. )
  51. var MessageType_name = map[int32]string{
  52. 0: "CLUSTER_CONFIG",
  53. 1: "INDEX",
  54. 2: "INDEX_UPDATE",
  55. 3: "REQUEST",
  56. 4: "RESPONSE",
  57. 5: "DOWNLOAD_PROGRESS",
  58. 6: "PING",
  59. 7: "CLOSE",
  60. }
  61. var MessageType_value = map[string]int32{
  62. "CLUSTER_CONFIG": 0,
  63. "INDEX": 1,
  64. "INDEX_UPDATE": 2,
  65. "REQUEST": 3,
  66. "RESPONSE": 4,
  67. "DOWNLOAD_PROGRESS": 5,
  68. "PING": 6,
  69. "CLOSE": 7,
  70. }
  71. func (x MessageType) String() string {
  72. return proto.EnumName(MessageType_name, int32(x))
  73. }
  74. func (MessageType) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{0} }
  75. type MessageCompression int32
  76. const (
  77. MessageCompressionNone MessageCompression = 0
  78. MessageCompressionLZ4 MessageCompression = 1
  79. )
  80. var MessageCompression_name = map[int32]string{
  81. 0: "NONE",
  82. 1: "LZ4",
  83. }
  84. var MessageCompression_value = map[string]int32{
  85. "NONE": 0,
  86. "LZ4": 1,
  87. }
  88. func (x MessageCompression) String() string {
  89. return proto.EnumName(MessageCompression_name, int32(x))
  90. }
  91. func (MessageCompression) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{1} }
  92. type Compression int32
  93. const (
  94. CompressMetadata Compression = 0
  95. CompressNever Compression = 1
  96. CompressAlways Compression = 2
  97. )
  98. var Compression_name = map[int32]string{
  99. 0: "METADATA",
  100. 1: "NEVER",
  101. 2: "ALWAYS",
  102. }
  103. var Compression_value = map[string]int32{
  104. "METADATA": 0,
  105. "NEVER": 1,
  106. "ALWAYS": 2,
  107. }
  108. func (x Compression) String() string {
  109. return proto.EnumName(Compression_name, int32(x))
  110. }
  111. func (Compression) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{2} }
  112. type FileInfoType int32
  113. const (
  114. FileInfoTypeFile FileInfoType = 0
  115. FileInfoTypeDirectory FileInfoType = 1
  116. FileInfoTypeSymlinkFile FileInfoType = 2
  117. FileInfoTypeSymlinkDirectory FileInfoType = 3
  118. FileInfoTypeSymlinkUnknown FileInfoType = 4
  119. )
  120. var FileInfoType_name = map[int32]string{
  121. 0: "FILE",
  122. 1: "DIRECTORY",
  123. 2: "SYMLINK_FILE",
  124. 3: "SYMLINK_DIRECTORY",
  125. 4: "SYMLINK_UNKNOWN",
  126. }
  127. var FileInfoType_value = map[string]int32{
  128. "FILE": 0,
  129. "DIRECTORY": 1,
  130. "SYMLINK_FILE": 2,
  131. "SYMLINK_DIRECTORY": 3,
  132. "SYMLINK_UNKNOWN": 4,
  133. }
  134. func (x FileInfoType) String() string {
  135. return proto.EnumName(FileInfoType_name, int32(x))
  136. }
  137. func (FileInfoType) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{3} }
  138. type ErrorCode int32
  139. const (
  140. ErrorCodeNoError ErrorCode = 0
  141. ErrorCodeGeneric ErrorCode = 1
  142. ErrorCodeNoSuchFile ErrorCode = 2
  143. ErrorCodeInvalidFile ErrorCode = 3
  144. )
  145. var ErrorCode_name = map[int32]string{
  146. 0: "NO_ERROR",
  147. 1: "GENERIC",
  148. 2: "NO_SUCH_FILE",
  149. 3: "INVALID_FILE",
  150. }
  151. var ErrorCode_value = map[string]int32{
  152. "NO_ERROR": 0,
  153. "GENERIC": 1,
  154. "NO_SUCH_FILE": 2,
  155. "INVALID_FILE": 3,
  156. }
  157. func (x ErrorCode) String() string {
  158. return proto.EnumName(ErrorCode_name, int32(x))
  159. }
  160. func (ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{4} }
  161. type FileDownloadProgressUpdateType int32
  162. const (
  163. UpdateTypeAppend FileDownloadProgressUpdateType = 0
  164. UpdateTypeForget FileDownloadProgressUpdateType = 1
  165. )
  166. var FileDownloadProgressUpdateType_name = map[int32]string{
  167. 0: "APPEND",
  168. 1: "FORGET",
  169. }
  170. var FileDownloadProgressUpdateType_value = map[string]int32{
  171. "APPEND": 0,
  172. "FORGET": 1,
  173. }
  174. func (x FileDownloadProgressUpdateType) String() string {
  175. return proto.EnumName(FileDownloadProgressUpdateType_name, int32(x))
  176. }
  177. func (FileDownloadProgressUpdateType) EnumDescriptor() ([]byte, []int) {
  178. return fileDescriptorBep, []int{5}
  179. }
  180. type Hello struct {
  181. DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
  182. ClientName string `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"`
  183. ClientVersion string `protobuf:"bytes,3,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"`
  184. }
  185. func (m *Hello) Reset() { *m = Hello{} }
  186. func (m *Hello) String() string { return proto.CompactTextString(m) }
  187. func (*Hello) ProtoMessage() {}
  188. func (*Hello) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{0} }
  189. type Header struct {
  190. Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.MessageType" json:"type,omitempty"`
  191. Compression MessageCompression `protobuf:"varint,2,opt,name=compression,proto3,enum=protocol.MessageCompression" json:"compression,omitempty"`
  192. }
  193. func (m *Header) Reset() { *m = Header{} }
  194. func (m *Header) String() string { return proto.CompactTextString(m) }
  195. func (*Header) ProtoMessage() {}
  196. func (*Header) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{1} }
  197. type ClusterConfig struct {
  198. Folders []Folder `protobuf:"bytes,1,rep,name=folders" json:"folders"`
  199. }
  200. func (m *ClusterConfig) Reset() { *m = ClusterConfig{} }
  201. func (m *ClusterConfig) String() string { return proto.CompactTextString(m) }
  202. func (*ClusterConfig) ProtoMessage() {}
  203. func (*ClusterConfig) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{2} }
  204. type Folder struct {
  205. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  206. Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
  207. ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
  208. IgnorePermissions bool `protobuf:"varint,4,opt,name=ignore_permissions,json=ignorePermissions,proto3" json:"ignore_permissions,omitempty"`
  209. IgnoreDelete bool `protobuf:"varint,5,opt,name=ignore_delete,json=ignoreDelete,proto3" json:"ignore_delete,omitempty"`
  210. DisableTempIndexes bool `protobuf:"varint,6,opt,name=disable_temp_indexes,json=disableTempIndexes,proto3" json:"disable_temp_indexes,omitempty"`
  211. Devices []Device `protobuf:"bytes,16,rep,name=devices" json:"devices"`
  212. }
  213. func (m *Folder) Reset() { *m = Folder{} }
  214. func (m *Folder) String() string { return proto.CompactTextString(m) }
  215. func (*Folder) ProtoMessage() {}
  216. func (*Folder) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{3} }
  217. type Device struct {
  218. ID []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  219. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  220. Addresses []string `protobuf:"bytes,3,rep,name=addresses" json:"addresses,omitempty"`
  221. Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression,omitempty"`
  222. CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"cert_name,omitempty"`
  223. MaxLocalVersion int64 `protobuf:"varint,6,opt,name=max_local_version,json=maxLocalVersion,proto3" json:"max_local_version,omitempty"`
  224. Introducer bool `protobuf:"varint,7,opt,name=introducer,proto3" json:"introducer,omitempty"`
  225. IndexID IndexID `protobuf:"varint,8,opt,name=index_id,json=indexId,proto3,customtype=IndexID" json:"index_id"`
  226. }
  227. func (m *Device) Reset() { *m = Device{} }
  228. func (m *Device) String() string { return proto.CompactTextString(m) }
  229. func (*Device) ProtoMessage() {}
  230. func (*Device) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{4} }
  231. type Index struct {
  232. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  233. Files []FileInfo `protobuf:"bytes,2,rep,name=files" json:"files"`
  234. }
  235. func (m *Index) Reset() { *m = Index{} }
  236. func (m *Index) String() string { return proto.CompactTextString(m) }
  237. func (*Index) ProtoMessage() {}
  238. func (*Index) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{5} }
  239. type IndexUpdate struct {
  240. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  241. Files []FileInfo `protobuf:"bytes,2,rep,name=files" json:"files"`
  242. }
  243. func (m *IndexUpdate) Reset() { *m = IndexUpdate{} }
  244. func (m *IndexUpdate) String() string { return proto.CompactTextString(m) }
  245. func (*IndexUpdate) ProtoMessage() {}
  246. func (*IndexUpdate) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{6} }
  247. type FileInfo struct {
  248. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  249. Type FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
  250. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  251. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
  252. Modified int64 `protobuf:"varint,5,opt,name=modified,proto3" json:"modified,omitempty"`
  253. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
  254. Invalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
  255. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
  256. Version Vector `protobuf:"bytes,9,opt,name=version" json:"version"`
  257. LocalVersion int64 `protobuf:"varint,10,opt,name=local_version,json=localVersion,proto3" json:"local_version,omitempty"`
  258. Blocks []BlockInfo `protobuf:"bytes,16,rep,name=Blocks,json=blocks" json:"Blocks"`
  259. }
  260. func (m *FileInfo) Reset() { *m = FileInfo{} }
  261. func (*FileInfo) ProtoMessage() {}
  262. func (*FileInfo) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{7} }
  263. type BlockInfo struct {
  264. Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
  265. Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
  266. Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
  267. }
  268. func (m *BlockInfo) Reset() { *m = BlockInfo{} }
  269. func (*BlockInfo) ProtoMessage() {}
  270. func (*BlockInfo) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{8} }
  271. type Vector struct {
  272. Counters []Counter `protobuf:"bytes,1,rep,name=counters" json:"counters"`
  273. }
  274. func (m *Vector) Reset() { *m = Vector{} }
  275. func (m *Vector) String() string { return proto.CompactTextString(m) }
  276. func (*Vector) ProtoMessage() {}
  277. func (*Vector) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{9} }
  278. type Counter struct {
  279. ID ShortID `protobuf:"varint,1,opt,name=id,proto3,customtype=ShortID" json:"id"`
  280. Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
  281. }
  282. func (m *Counter) Reset() { *m = Counter{} }
  283. func (m *Counter) String() string { return proto.CompactTextString(m) }
  284. func (*Counter) ProtoMessage() {}
  285. func (*Counter) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{10} }
  286. type Request struct {
  287. ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  288. Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"`
  289. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
  290. Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
  291. Size int32 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
  292. Hash []byte `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash,omitempty"`
  293. FromTemporary bool `protobuf:"varint,7,opt,name=from_temporary,json=fromTemporary,proto3" json:"from_temporary,omitempty"`
  294. }
  295. func (m *Request) Reset() { *m = Request{} }
  296. func (m *Request) String() string { return proto.CompactTextString(m) }
  297. func (*Request) ProtoMessage() {}
  298. func (*Request) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{11} }
  299. type Response struct {
  300. ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  301. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  302. Code ErrorCode `protobuf:"varint,3,opt,name=code,proto3,enum=protocol.ErrorCode" json:"code,omitempty"`
  303. }
  304. func (m *Response) Reset() { *m = Response{} }
  305. func (m *Response) String() string { return proto.CompactTextString(m) }
  306. func (*Response) ProtoMessage() {}
  307. func (*Response) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{12} }
  308. type DownloadProgress struct {
  309. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  310. Updates []FileDownloadProgressUpdate `protobuf:"bytes,2,rep,name=updates" json:"updates"`
  311. }
  312. func (m *DownloadProgress) Reset() { *m = DownloadProgress{} }
  313. func (m *DownloadProgress) String() string { return proto.CompactTextString(m) }
  314. func (*DownloadProgress) ProtoMessage() {}
  315. func (*DownloadProgress) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{13} }
  316. type FileDownloadProgressUpdate struct {
  317. UpdateType FileDownloadProgressUpdateType `protobuf:"varint,1,opt,name=update_type,json=updateType,proto3,enum=protocol.FileDownloadProgressUpdateType" json:"update_type,omitempty"`
  318. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  319. Version Vector `protobuf:"bytes,3,opt,name=version" json:"version"`
  320. BlockIndexes []int32 `protobuf:"varint,4,rep,name=block_indexes,json=blockIndexes" json:"block_indexes,omitempty"`
  321. }
  322. func (m *FileDownloadProgressUpdate) Reset() { *m = FileDownloadProgressUpdate{} }
  323. func (m *FileDownloadProgressUpdate) String() string { return proto.CompactTextString(m) }
  324. func (*FileDownloadProgressUpdate) ProtoMessage() {}
  325. func (*FileDownloadProgressUpdate) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{14} }
  326. type Ping struct {
  327. }
  328. func (m *Ping) Reset() { *m = Ping{} }
  329. func (m *Ping) String() string { return proto.CompactTextString(m) }
  330. func (*Ping) ProtoMessage() {}
  331. func (*Ping) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{15} }
  332. type Close struct {
  333. Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
  334. }
  335. func (m *Close) Reset() { *m = Close{} }
  336. func (m *Close) String() string { return proto.CompactTextString(m) }
  337. func (*Close) ProtoMessage() {}
  338. func (*Close) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{16} }
  339. func init() {
  340. proto.RegisterType((*Hello)(nil), "protocol.Hello")
  341. proto.RegisterType((*Header)(nil), "protocol.Header")
  342. proto.RegisterType((*ClusterConfig)(nil), "protocol.ClusterConfig")
  343. proto.RegisterType((*Folder)(nil), "protocol.Folder")
  344. proto.RegisterType((*Device)(nil), "protocol.Device")
  345. proto.RegisterType((*Index)(nil), "protocol.Index")
  346. proto.RegisterType((*IndexUpdate)(nil), "protocol.IndexUpdate")
  347. proto.RegisterType((*FileInfo)(nil), "protocol.FileInfo")
  348. proto.RegisterType((*BlockInfo)(nil), "protocol.BlockInfo")
  349. proto.RegisterType((*Vector)(nil), "protocol.Vector")
  350. proto.RegisterType((*Counter)(nil), "protocol.Counter")
  351. proto.RegisterType((*Request)(nil), "protocol.Request")
  352. proto.RegisterType((*Response)(nil), "protocol.Response")
  353. proto.RegisterType((*DownloadProgress)(nil), "protocol.DownloadProgress")
  354. proto.RegisterType((*FileDownloadProgressUpdate)(nil), "protocol.FileDownloadProgressUpdate")
  355. proto.RegisterType((*Ping)(nil), "protocol.Ping")
  356. proto.RegisterType((*Close)(nil), "protocol.Close")
  357. proto.RegisterEnum("protocol.MessageType", MessageType_name, MessageType_value)
  358. proto.RegisterEnum("protocol.MessageCompression", MessageCompression_name, MessageCompression_value)
  359. proto.RegisterEnum("protocol.Compression", Compression_name, Compression_value)
  360. proto.RegisterEnum("protocol.FileInfoType", FileInfoType_name, FileInfoType_value)
  361. proto.RegisterEnum("protocol.ErrorCode", ErrorCode_name, ErrorCode_value)
  362. proto.RegisterEnum("protocol.FileDownloadProgressUpdateType", FileDownloadProgressUpdateType_name, FileDownloadProgressUpdateType_value)
  363. }
  364. func (m *Hello) Marshal() (data []byte, err error) {
  365. size := m.ProtoSize()
  366. data = make([]byte, size)
  367. n, err := m.MarshalTo(data)
  368. if err != nil {
  369. return nil, err
  370. }
  371. return data[:n], nil
  372. }
  373. func (m *Hello) MarshalTo(data []byte) (int, error) {
  374. var i int
  375. _ = i
  376. var l int
  377. _ = l
  378. if len(m.DeviceName) > 0 {
  379. data[i] = 0xa
  380. i++
  381. i = encodeVarintBep(data, i, uint64(len(m.DeviceName)))
  382. i += copy(data[i:], m.DeviceName)
  383. }
  384. if len(m.ClientName) > 0 {
  385. data[i] = 0x12
  386. i++
  387. i = encodeVarintBep(data, i, uint64(len(m.ClientName)))
  388. i += copy(data[i:], m.ClientName)
  389. }
  390. if len(m.ClientVersion) > 0 {
  391. data[i] = 0x1a
  392. i++
  393. i = encodeVarintBep(data, i, uint64(len(m.ClientVersion)))
  394. i += copy(data[i:], m.ClientVersion)
  395. }
  396. return i, nil
  397. }
  398. func (m *Header) Marshal() (data []byte, err error) {
  399. size := m.ProtoSize()
  400. data = make([]byte, size)
  401. n, err := m.MarshalTo(data)
  402. if err != nil {
  403. return nil, err
  404. }
  405. return data[:n], nil
  406. }
  407. func (m *Header) MarshalTo(data []byte) (int, error) {
  408. var i int
  409. _ = i
  410. var l int
  411. _ = l
  412. if m.Type != 0 {
  413. data[i] = 0x8
  414. i++
  415. i = encodeVarintBep(data, i, uint64(m.Type))
  416. }
  417. if m.Compression != 0 {
  418. data[i] = 0x10
  419. i++
  420. i = encodeVarintBep(data, i, uint64(m.Compression))
  421. }
  422. return i, nil
  423. }
  424. func (m *ClusterConfig) Marshal() (data []byte, err error) {
  425. size := m.ProtoSize()
  426. data = make([]byte, size)
  427. n, err := m.MarshalTo(data)
  428. if err != nil {
  429. return nil, err
  430. }
  431. return data[:n], nil
  432. }
  433. func (m *ClusterConfig) MarshalTo(data []byte) (int, error) {
  434. var i int
  435. _ = i
  436. var l int
  437. _ = l
  438. if len(m.Folders) > 0 {
  439. for _, msg := range m.Folders {
  440. data[i] = 0xa
  441. i++
  442. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  443. n, err := msg.MarshalTo(data[i:])
  444. if err != nil {
  445. return 0, err
  446. }
  447. i += n
  448. }
  449. }
  450. return i, nil
  451. }
  452. func (m *Folder) Marshal() (data []byte, err error) {
  453. size := m.ProtoSize()
  454. data = make([]byte, size)
  455. n, err := m.MarshalTo(data)
  456. if err != nil {
  457. return nil, err
  458. }
  459. return data[:n], nil
  460. }
  461. func (m *Folder) MarshalTo(data []byte) (int, error) {
  462. var i int
  463. _ = i
  464. var l int
  465. _ = l
  466. if len(m.ID) > 0 {
  467. data[i] = 0xa
  468. i++
  469. i = encodeVarintBep(data, i, uint64(len(m.ID)))
  470. i += copy(data[i:], m.ID)
  471. }
  472. if len(m.Label) > 0 {
  473. data[i] = 0x12
  474. i++
  475. i = encodeVarintBep(data, i, uint64(len(m.Label)))
  476. i += copy(data[i:], m.Label)
  477. }
  478. if m.ReadOnly {
  479. data[i] = 0x18
  480. i++
  481. if m.ReadOnly {
  482. data[i] = 1
  483. } else {
  484. data[i] = 0
  485. }
  486. i++
  487. }
  488. if m.IgnorePermissions {
  489. data[i] = 0x20
  490. i++
  491. if m.IgnorePermissions {
  492. data[i] = 1
  493. } else {
  494. data[i] = 0
  495. }
  496. i++
  497. }
  498. if m.IgnoreDelete {
  499. data[i] = 0x28
  500. i++
  501. if m.IgnoreDelete {
  502. data[i] = 1
  503. } else {
  504. data[i] = 0
  505. }
  506. i++
  507. }
  508. if m.DisableTempIndexes {
  509. data[i] = 0x30
  510. i++
  511. if m.DisableTempIndexes {
  512. data[i] = 1
  513. } else {
  514. data[i] = 0
  515. }
  516. i++
  517. }
  518. if len(m.Devices) > 0 {
  519. for _, msg := range m.Devices {
  520. data[i] = 0x82
  521. i++
  522. data[i] = 0x1
  523. i++
  524. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  525. n, err := msg.MarshalTo(data[i:])
  526. if err != nil {
  527. return 0, err
  528. }
  529. i += n
  530. }
  531. }
  532. return i, nil
  533. }
  534. func (m *Device) Marshal() (data []byte, err error) {
  535. size := m.ProtoSize()
  536. data = make([]byte, size)
  537. n, err := m.MarshalTo(data)
  538. if err != nil {
  539. return nil, err
  540. }
  541. return data[:n], nil
  542. }
  543. func (m *Device) MarshalTo(data []byte) (int, error) {
  544. var i int
  545. _ = i
  546. var l int
  547. _ = l
  548. if len(m.ID) > 0 {
  549. data[i] = 0xa
  550. i++
  551. i = encodeVarintBep(data, i, uint64(len(m.ID)))
  552. i += copy(data[i:], m.ID)
  553. }
  554. if len(m.Name) > 0 {
  555. data[i] = 0x12
  556. i++
  557. i = encodeVarintBep(data, i, uint64(len(m.Name)))
  558. i += copy(data[i:], m.Name)
  559. }
  560. if len(m.Addresses) > 0 {
  561. for _, s := range m.Addresses {
  562. data[i] = 0x1a
  563. i++
  564. l = len(s)
  565. for l >= 1<<7 {
  566. data[i] = uint8(uint64(l)&0x7f | 0x80)
  567. l >>= 7
  568. i++
  569. }
  570. data[i] = uint8(l)
  571. i++
  572. i += copy(data[i:], s)
  573. }
  574. }
  575. if m.Compression != 0 {
  576. data[i] = 0x20
  577. i++
  578. i = encodeVarintBep(data, i, uint64(m.Compression))
  579. }
  580. if len(m.CertName) > 0 {
  581. data[i] = 0x2a
  582. i++
  583. i = encodeVarintBep(data, i, uint64(len(m.CertName)))
  584. i += copy(data[i:], m.CertName)
  585. }
  586. if m.MaxLocalVersion != 0 {
  587. data[i] = 0x30
  588. i++
  589. i = encodeVarintBep(data, i, uint64(m.MaxLocalVersion))
  590. }
  591. if m.Introducer {
  592. data[i] = 0x38
  593. i++
  594. if m.Introducer {
  595. data[i] = 1
  596. } else {
  597. data[i] = 0
  598. }
  599. i++
  600. }
  601. if m.IndexID != 0 {
  602. data[i] = 0x40
  603. i++
  604. i = encodeVarintBep(data, i, uint64(m.IndexID))
  605. }
  606. return i, nil
  607. }
  608. func (m *Index) Marshal() (data []byte, err error) {
  609. size := m.ProtoSize()
  610. data = make([]byte, size)
  611. n, err := m.MarshalTo(data)
  612. if err != nil {
  613. return nil, err
  614. }
  615. return data[:n], nil
  616. }
  617. func (m *Index) MarshalTo(data []byte) (int, error) {
  618. var i int
  619. _ = i
  620. var l int
  621. _ = l
  622. if len(m.Folder) > 0 {
  623. data[i] = 0xa
  624. i++
  625. i = encodeVarintBep(data, i, uint64(len(m.Folder)))
  626. i += copy(data[i:], m.Folder)
  627. }
  628. if len(m.Files) > 0 {
  629. for _, msg := range m.Files {
  630. data[i] = 0x12
  631. i++
  632. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  633. n, err := msg.MarshalTo(data[i:])
  634. if err != nil {
  635. return 0, err
  636. }
  637. i += n
  638. }
  639. }
  640. return i, nil
  641. }
  642. func (m *IndexUpdate) Marshal() (data []byte, err error) {
  643. size := m.ProtoSize()
  644. data = make([]byte, size)
  645. n, err := m.MarshalTo(data)
  646. if err != nil {
  647. return nil, err
  648. }
  649. return data[:n], nil
  650. }
  651. func (m *IndexUpdate) MarshalTo(data []byte) (int, error) {
  652. var i int
  653. _ = i
  654. var l int
  655. _ = l
  656. if len(m.Folder) > 0 {
  657. data[i] = 0xa
  658. i++
  659. i = encodeVarintBep(data, i, uint64(len(m.Folder)))
  660. i += copy(data[i:], m.Folder)
  661. }
  662. if len(m.Files) > 0 {
  663. for _, msg := range m.Files {
  664. data[i] = 0x12
  665. i++
  666. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  667. n, err := msg.MarshalTo(data[i:])
  668. if err != nil {
  669. return 0, err
  670. }
  671. i += n
  672. }
  673. }
  674. return i, nil
  675. }
  676. func (m *FileInfo) Marshal() (data []byte, err error) {
  677. size := m.ProtoSize()
  678. data = make([]byte, size)
  679. n, err := m.MarshalTo(data)
  680. if err != nil {
  681. return nil, err
  682. }
  683. return data[:n], nil
  684. }
  685. func (m *FileInfo) MarshalTo(data []byte) (int, error) {
  686. var i int
  687. _ = i
  688. var l int
  689. _ = l
  690. if len(m.Name) > 0 {
  691. data[i] = 0xa
  692. i++
  693. i = encodeVarintBep(data, i, uint64(len(m.Name)))
  694. i += copy(data[i:], m.Name)
  695. }
  696. if m.Type != 0 {
  697. data[i] = 0x10
  698. i++
  699. i = encodeVarintBep(data, i, uint64(m.Type))
  700. }
  701. if m.Size != 0 {
  702. data[i] = 0x18
  703. i++
  704. i = encodeVarintBep(data, i, uint64(m.Size))
  705. }
  706. if m.Permissions != 0 {
  707. data[i] = 0x20
  708. i++
  709. i = encodeVarintBep(data, i, uint64(m.Permissions))
  710. }
  711. if m.Modified != 0 {
  712. data[i] = 0x28
  713. i++
  714. i = encodeVarintBep(data, i, uint64(m.Modified))
  715. }
  716. if m.Deleted {
  717. data[i] = 0x30
  718. i++
  719. if m.Deleted {
  720. data[i] = 1
  721. } else {
  722. data[i] = 0
  723. }
  724. i++
  725. }
  726. if m.Invalid {
  727. data[i] = 0x38
  728. i++
  729. if m.Invalid {
  730. data[i] = 1
  731. } else {
  732. data[i] = 0
  733. }
  734. i++
  735. }
  736. if m.NoPermissions {
  737. data[i] = 0x40
  738. i++
  739. if m.NoPermissions {
  740. data[i] = 1
  741. } else {
  742. data[i] = 0
  743. }
  744. i++
  745. }
  746. data[i] = 0x4a
  747. i++
  748. i = encodeVarintBep(data, i, uint64(m.Version.ProtoSize()))
  749. n1, err := m.Version.MarshalTo(data[i:])
  750. if err != nil {
  751. return 0, err
  752. }
  753. i += n1
  754. if m.LocalVersion != 0 {
  755. data[i] = 0x50
  756. i++
  757. i = encodeVarintBep(data, i, uint64(m.LocalVersion))
  758. }
  759. if len(m.Blocks) > 0 {
  760. for _, msg := range m.Blocks {
  761. data[i] = 0x82
  762. i++
  763. data[i] = 0x1
  764. i++
  765. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  766. n, err := msg.MarshalTo(data[i:])
  767. if err != nil {
  768. return 0, err
  769. }
  770. i += n
  771. }
  772. }
  773. return i, nil
  774. }
  775. func (m *BlockInfo) Marshal() (data []byte, err error) {
  776. size := m.ProtoSize()
  777. data = make([]byte, size)
  778. n, err := m.MarshalTo(data)
  779. if err != nil {
  780. return nil, err
  781. }
  782. return data[:n], nil
  783. }
  784. func (m *BlockInfo) MarshalTo(data []byte) (int, error) {
  785. var i int
  786. _ = i
  787. var l int
  788. _ = l
  789. if m.Offset != 0 {
  790. data[i] = 0x8
  791. i++
  792. i = encodeVarintBep(data, i, uint64(m.Offset))
  793. }
  794. if m.Size != 0 {
  795. data[i] = 0x10
  796. i++
  797. i = encodeVarintBep(data, i, uint64(m.Size))
  798. }
  799. if len(m.Hash) > 0 {
  800. data[i] = 0x1a
  801. i++
  802. i = encodeVarintBep(data, i, uint64(len(m.Hash)))
  803. i += copy(data[i:], m.Hash)
  804. }
  805. return i, nil
  806. }
  807. func (m *Vector) Marshal() (data []byte, err error) {
  808. size := m.ProtoSize()
  809. data = make([]byte, size)
  810. n, err := m.MarshalTo(data)
  811. if err != nil {
  812. return nil, err
  813. }
  814. return data[:n], nil
  815. }
  816. func (m *Vector) MarshalTo(data []byte) (int, error) {
  817. var i int
  818. _ = i
  819. var l int
  820. _ = l
  821. if len(m.Counters) > 0 {
  822. for _, msg := range m.Counters {
  823. data[i] = 0xa
  824. i++
  825. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  826. n, err := msg.MarshalTo(data[i:])
  827. if err != nil {
  828. return 0, err
  829. }
  830. i += n
  831. }
  832. }
  833. return i, nil
  834. }
  835. func (m *Counter) Marshal() (data []byte, err error) {
  836. size := m.ProtoSize()
  837. data = make([]byte, size)
  838. n, err := m.MarshalTo(data)
  839. if err != nil {
  840. return nil, err
  841. }
  842. return data[:n], nil
  843. }
  844. func (m *Counter) MarshalTo(data []byte) (int, error) {
  845. var i int
  846. _ = i
  847. var l int
  848. _ = l
  849. if m.ID != 0 {
  850. data[i] = 0x8
  851. i++
  852. i = encodeVarintBep(data, i, uint64(m.ID))
  853. }
  854. if m.Value != 0 {
  855. data[i] = 0x10
  856. i++
  857. i = encodeVarintBep(data, i, uint64(m.Value))
  858. }
  859. return i, nil
  860. }
  861. func (m *Request) Marshal() (data []byte, err error) {
  862. size := m.ProtoSize()
  863. data = make([]byte, size)
  864. n, err := m.MarshalTo(data)
  865. if err != nil {
  866. return nil, err
  867. }
  868. return data[:n], nil
  869. }
  870. func (m *Request) MarshalTo(data []byte) (int, error) {
  871. var i int
  872. _ = i
  873. var l int
  874. _ = l
  875. if m.ID != 0 {
  876. data[i] = 0x8
  877. i++
  878. i = encodeVarintBep(data, i, uint64(m.ID))
  879. }
  880. if len(m.Folder) > 0 {
  881. data[i] = 0x12
  882. i++
  883. i = encodeVarintBep(data, i, uint64(len(m.Folder)))
  884. i += copy(data[i:], m.Folder)
  885. }
  886. if len(m.Name) > 0 {
  887. data[i] = 0x1a
  888. i++
  889. i = encodeVarintBep(data, i, uint64(len(m.Name)))
  890. i += copy(data[i:], m.Name)
  891. }
  892. if m.Offset != 0 {
  893. data[i] = 0x20
  894. i++
  895. i = encodeVarintBep(data, i, uint64(m.Offset))
  896. }
  897. if m.Size != 0 {
  898. data[i] = 0x28
  899. i++
  900. i = encodeVarintBep(data, i, uint64(m.Size))
  901. }
  902. if len(m.Hash) > 0 {
  903. data[i] = 0x32
  904. i++
  905. i = encodeVarintBep(data, i, uint64(len(m.Hash)))
  906. i += copy(data[i:], m.Hash)
  907. }
  908. if m.FromTemporary {
  909. data[i] = 0x38
  910. i++
  911. if m.FromTemporary {
  912. data[i] = 1
  913. } else {
  914. data[i] = 0
  915. }
  916. i++
  917. }
  918. return i, nil
  919. }
  920. func (m *Response) Marshal() (data []byte, err error) {
  921. size := m.ProtoSize()
  922. data = make([]byte, size)
  923. n, err := m.MarshalTo(data)
  924. if err != nil {
  925. return nil, err
  926. }
  927. return data[:n], nil
  928. }
  929. func (m *Response) MarshalTo(data []byte) (int, error) {
  930. var i int
  931. _ = i
  932. var l int
  933. _ = l
  934. if m.ID != 0 {
  935. data[i] = 0x8
  936. i++
  937. i = encodeVarintBep(data, i, uint64(m.ID))
  938. }
  939. if len(m.Data) > 0 {
  940. data[i] = 0x12
  941. i++
  942. i = encodeVarintBep(data, i, uint64(len(m.Data)))
  943. i += copy(data[i:], m.Data)
  944. }
  945. if m.Code != 0 {
  946. data[i] = 0x18
  947. i++
  948. i = encodeVarintBep(data, i, uint64(m.Code))
  949. }
  950. return i, nil
  951. }
  952. func (m *DownloadProgress) Marshal() (data []byte, err error) {
  953. size := m.ProtoSize()
  954. data = make([]byte, size)
  955. n, err := m.MarshalTo(data)
  956. if err != nil {
  957. return nil, err
  958. }
  959. return data[:n], nil
  960. }
  961. func (m *DownloadProgress) MarshalTo(data []byte) (int, error) {
  962. var i int
  963. _ = i
  964. var l int
  965. _ = l
  966. if len(m.Folder) > 0 {
  967. data[i] = 0xa
  968. i++
  969. i = encodeVarintBep(data, i, uint64(len(m.Folder)))
  970. i += copy(data[i:], m.Folder)
  971. }
  972. if len(m.Updates) > 0 {
  973. for _, msg := range m.Updates {
  974. data[i] = 0x12
  975. i++
  976. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  977. n, err := msg.MarshalTo(data[i:])
  978. if err != nil {
  979. return 0, err
  980. }
  981. i += n
  982. }
  983. }
  984. return i, nil
  985. }
  986. func (m *FileDownloadProgressUpdate) Marshal() (data []byte, err error) {
  987. size := m.ProtoSize()
  988. data = make([]byte, size)
  989. n, err := m.MarshalTo(data)
  990. if err != nil {
  991. return nil, err
  992. }
  993. return data[:n], nil
  994. }
  995. func (m *FileDownloadProgressUpdate) MarshalTo(data []byte) (int, error) {
  996. var i int
  997. _ = i
  998. var l int
  999. _ = l
  1000. if m.UpdateType != 0 {
  1001. data[i] = 0x8
  1002. i++
  1003. i = encodeVarintBep(data, i, uint64(m.UpdateType))
  1004. }
  1005. if len(m.Name) > 0 {
  1006. data[i] = 0x12
  1007. i++
  1008. i = encodeVarintBep(data, i, uint64(len(m.Name)))
  1009. i += copy(data[i:], m.Name)
  1010. }
  1011. data[i] = 0x1a
  1012. i++
  1013. i = encodeVarintBep(data, i, uint64(m.Version.ProtoSize()))
  1014. n2, err := m.Version.MarshalTo(data[i:])
  1015. if err != nil {
  1016. return 0, err
  1017. }
  1018. i += n2
  1019. if len(m.BlockIndexes) > 0 {
  1020. for _, num := range m.BlockIndexes {
  1021. data[i] = 0x20
  1022. i++
  1023. i = encodeVarintBep(data, i, uint64(num))
  1024. }
  1025. }
  1026. return i, nil
  1027. }
  1028. func (m *Ping) Marshal() (data []byte, err error) {
  1029. size := m.ProtoSize()
  1030. data = make([]byte, size)
  1031. n, err := m.MarshalTo(data)
  1032. if err != nil {
  1033. return nil, err
  1034. }
  1035. return data[:n], nil
  1036. }
  1037. func (m *Ping) MarshalTo(data []byte) (int, error) {
  1038. var i int
  1039. _ = i
  1040. var l int
  1041. _ = l
  1042. return i, nil
  1043. }
  1044. func (m *Close) Marshal() (data []byte, err error) {
  1045. size := m.ProtoSize()
  1046. data = make([]byte, size)
  1047. n, err := m.MarshalTo(data)
  1048. if err != nil {
  1049. return nil, err
  1050. }
  1051. return data[:n], nil
  1052. }
  1053. func (m *Close) MarshalTo(data []byte) (int, error) {
  1054. var i int
  1055. _ = i
  1056. var l int
  1057. _ = l
  1058. if len(m.Reason) > 0 {
  1059. data[i] = 0xa
  1060. i++
  1061. i = encodeVarintBep(data, i, uint64(len(m.Reason)))
  1062. i += copy(data[i:], m.Reason)
  1063. }
  1064. return i, nil
  1065. }
  1066. func encodeFixed64Bep(data []byte, offset int, v uint64) int {
  1067. data[offset] = uint8(v)
  1068. data[offset+1] = uint8(v >> 8)
  1069. data[offset+2] = uint8(v >> 16)
  1070. data[offset+3] = uint8(v >> 24)
  1071. data[offset+4] = uint8(v >> 32)
  1072. data[offset+5] = uint8(v >> 40)
  1073. data[offset+6] = uint8(v >> 48)
  1074. data[offset+7] = uint8(v >> 56)
  1075. return offset + 8
  1076. }
  1077. func encodeFixed32Bep(data []byte, offset int, v uint32) int {
  1078. data[offset] = uint8(v)
  1079. data[offset+1] = uint8(v >> 8)
  1080. data[offset+2] = uint8(v >> 16)
  1081. data[offset+3] = uint8(v >> 24)
  1082. return offset + 4
  1083. }
  1084. func encodeVarintBep(data []byte, offset int, v uint64) int {
  1085. for v >= 1<<7 {
  1086. data[offset] = uint8(v&0x7f | 0x80)
  1087. v >>= 7
  1088. offset++
  1089. }
  1090. data[offset] = uint8(v)
  1091. return offset + 1
  1092. }
  1093. func (m *Hello) ProtoSize() (n int) {
  1094. var l int
  1095. _ = l
  1096. l = len(m.DeviceName)
  1097. if l > 0 {
  1098. n += 1 + l + sovBep(uint64(l))
  1099. }
  1100. l = len(m.ClientName)
  1101. if l > 0 {
  1102. n += 1 + l + sovBep(uint64(l))
  1103. }
  1104. l = len(m.ClientVersion)
  1105. if l > 0 {
  1106. n += 1 + l + sovBep(uint64(l))
  1107. }
  1108. return n
  1109. }
  1110. func (m *Header) ProtoSize() (n int) {
  1111. var l int
  1112. _ = l
  1113. if m.Type != 0 {
  1114. n += 1 + sovBep(uint64(m.Type))
  1115. }
  1116. if m.Compression != 0 {
  1117. n += 1 + sovBep(uint64(m.Compression))
  1118. }
  1119. return n
  1120. }
  1121. func (m *ClusterConfig) ProtoSize() (n int) {
  1122. var l int
  1123. _ = l
  1124. if len(m.Folders) > 0 {
  1125. for _, e := range m.Folders {
  1126. l = e.ProtoSize()
  1127. n += 1 + l + sovBep(uint64(l))
  1128. }
  1129. }
  1130. return n
  1131. }
  1132. func (m *Folder) ProtoSize() (n int) {
  1133. var l int
  1134. _ = l
  1135. l = len(m.ID)
  1136. if l > 0 {
  1137. n += 1 + l + sovBep(uint64(l))
  1138. }
  1139. l = len(m.Label)
  1140. if l > 0 {
  1141. n += 1 + l + sovBep(uint64(l))
  1142. }
  1143. if m.ReadOnly {
  1144. n += 2
  1145. }
  1146. if m.IgnorePermissions {
  1147. n += 2
  1148. }
  1149. if m.IgnoreDelete {
  1150. n += 2
  1151. }
  1152. if m.DisableTempIndexes {
  1153. n += 2
  1154. }
  1155. if len(m.Devices) > 0 {
  1156. for _, e := range m.Devices {
  1157. l = e.ProtoSize()
  1158. n += 2 + l + sovBep(uint64(l))
  1159. }
  1160. }
  1161. return n
  1162. }
  1163. func (m *Device) ProtoSize() (n int) {
  1164. var l int
  1165. _ = l
  1166. l = len(m.ID)
  1167. if l > 0 {
  1168. n += 1 + l + sovBep(uint64(l))
  1169. }
  1170. l = len(m.Name)
  1171. if l > 0 {
  1172. n += 1 + l + sovBep(uint64(l))
  1173. }
  1174. if len(m.Addresses) > 0 {
  1175. for _, s := range m.Addresses {
  1176. l = len(s)
  1177. n += 1 + l + sovBep(uint64(l))
  1178. }
  1179. }
  1180. if m.Compression != 0 {
  1181. n += 1 + sovBep(uint64(m.Compression))
  1182. }
  1183. l = len(m.CertName)
  1184. if l > 0 {
  1185. n += 1 + l + sovBep(uint64(l))
  1186. }
  1187. if m.MaxLocalVersion != 0 {
  1188. n += 1 + sovBep(uint64(m.MaxLocalVersion))
  1189. }
  1190. if m.Introducer {
  1191. n += 2
  1192. }
  1193. if m.IndexID != 0 {
  1194. n += 1 + sovBep(uint64(m.IndexID))
  1195. }
  1196. return n
  1197. }
  1198. func (m *Index) ProtoSize() (n int) {
  1199. var l int
  1200. _ = l
  1201. l = len(m.Folder)
  1202. if l > 0 {
  1203. n += 1 + l + sovBep(uint64(l))
  1204. }
  1205. if len(m.Files) > 0 {
  1206. for _, e := range m.Files {
  1207. l = e.ProtoSize()
  1208. n += 1 + l + sovBep(uint64(l))
  1209. }
  1210. }
  1211. return n
  1212. }
  1213. func (m *IndexUpdate) ProtoSize() (n int) {
  1214. var l int
  1215. _ = l
  1216. l = len(m.Folder)
  1217. if l > 0 {
  1218. n += 1 + l + sovBep(uint64(l))
  1219. }
  1220. if len(m.Files) > 0 {
  1221. for _, e := range m.Files {
  1222. l = e.ProtoSize()
  1223. n += 1 + l + sovBep(uint64(l))
  1224. }
  1225. }
  1226. return n
  1227. }
  1228. func (m *FileInfo) ProtoSize() (n int) {
  1229. var l int
  1230. _ = l
  1231. l = len(m.Name)
  1232. if l > 0 {
  1233. n += 1 + l + sovBep(uint64(l))
  1234. }
  1235. if m.Type != 0 {
  1236. n += 1 + sovBep(uint64(m.Type))
  1237. }
  1238. if m.Size != 0 {
  1239. n += 1 + sovBep(uint64(m.Size))
  1240. }
  1241. if m.Permissions != 0 {
  1242. n += 1 + sovBep(uint64(m.Permissions))
  1243. }
  1244. if m.Modified != 0 {
  1245. n += 1 + sovBep(uint64(m.Modified))
  1246. }
  1247. if m.Deleted {
  1248. n += 2
  1249. }
  1250. if m.Invalid {
  1251. n += 2
  1252. }
  1253. if m.NoPermissions {
  1254. n += 2
  1255. }
  1256. l = m.Version.ProtoSize()
  1257. n += 1 + l + sovBep(uint64(l))
  1258. if m.LocalVersion != 0 {
  1259. n += 1 + sovBep(uint64(m.LocalVersion))
  1260. }
  1261. if len(m.Blocks) > 0 {
  1262. for _, e := range m.Blocks {
  1263. l = e.ProtoSize()
  1264. n += 2 + l + sovBep(uint64(l))
  1265. }
  1266. }
  1267. return n
  1268. }
  1269. func (m *BlockInfo) ProtoSize() (n int) {
  1270. var l int
  1271. _ = l
  1272. if m.Offset != 0 {
  1273. n += 1 + sovBep(uint64(m.Offset))
  1274. }
  1275. if m.Size != 0 {
  1276. n += 1 + sovBep(uint64(m.Size))
  1277. }
  1278. l = len(m.Hash)
  1279. if l > 0 {
  1280. n += 1 + l + sovBep(uint64(l))
  1281. }
  1282. return n
  1283. }
  1284. func (m *Vector) ProtoSize() (n int) {
  1285. var l int
  1286. _ = l
  1287. if len(m.Counters) > 0 {
  1288. for _, e := range m.Counters {
  1289. l = e.ProtoSize()
  1290. n += 1 + l + sovBep(uint64(l))
  1291. }
  1292. }
  1293. return n
  1294. }
  1295. func (m *Counter) ProtoSize() (n int) {
  1296. var l int
  1297. _ = l
  1298. if m.ID != 0 {
  1299. n += 1 + sovBep(uint64(m.ID))
  1300. }
  1301. if m.Value != 0 {
  1302. n += 1 + sovBep(uint64(m.Value))
  1303. }
  1304. return n
  1305. }
  1306. func (m *Request) ProtoSize() (n int) {
  1307. var l int
  1308. _ = l
  1309. if m.ID != 0 {
  1310. n += 1 + sovBep(uint64(m.ID))
  1311. }
  1312. l = len(m.Folder)
  1313. if l > 0 {
  1314. n += 1 + l + sovBep(uint64(l))
  1315. }
  1316. l = len(m.Name)
  1317. if l > 0 {
  1318. n += 1 + l + sovBep(uint64(l))
  1319. }
  1320. if m.Offset != 0 {
  1321. n += 1 + sovBep(uint64(m.Offset))
  1322. }
  1323. if m.Size != 0 {
  1324. n += 1 + sovBep(uint64(m.Size))
  1325. }
  1326. l = len(m.Hash)
  1327. if l > 0 {
  1328. n += 1 + l + sovBep(uint64(l))
  1329. }
  1330. if m.FromTemporary {
  1331. n += 2
  1332. }
  1333. return n
  1334. }
  1335. func (m *Response) ProtoSize() (n int) {
  1336. var l int
  1337. _ = l
  1338. if m.ID != 0 {
  1339. n += 1 + sovBep(uint64(m.ID))
  1340. }
  1341. l = len(m.Data)
  1342. if l > 0 {
  1343. n += 1 + l + sovBep(uint64(l))
  1344. }
  1345. if m.Code != 0 {
  1346. n += 1 + sovBep(uint64(m.Code))
  1347. }
  1348. return n
  1349. }
  1350. func (m *DownloadProgress) ProtoSize() (n int) {
  1351. var l int
  1352. _ = l
  1353. l = len(m.Folder)
  1354. if l > 0 {
  1355. n += 1 + l + sovBep(uint64(l))
  1356. }
  1357. if len(m.Updates) > 0 {
  1358. for _, e := range m.Updates {
  1359. l = e.ProtoSize()
  1360. n += 1 + l + sovBep(uint64(l))
  1361. }
  1362. }
  1363. return n
  1364. }
  1365. func (m *FileDownloadProgressUpdate) ProtoSize() (n int) {
  1366. var l int
  1367. _ = l
  1368. if m.UpdateType != 0 {
  1369. n += 1 + sovBep(uint64(m.UpdateType))
  1370. }
  1371. l = len(m.Name)
  1372. if l > 0 {
  1373. n += 1 + l + sovBep(uint64(l))
  1374. }
  1375. l = m.Version.ProtoSize()
  1376. n += 1 + l + sovBep(uint64(l))
  1377. if len(m.BlockIndexes) > 0 {
  1378. for _, e := range m.BlockIndexes {
  1379. n += 1 + sovBep(uint64(e))
  1380. }
  1381. }
  1382. return n
  1383. }
  1384. func (m *Ping) ProtoSize() (n int) {
  1385. var l int
  1386. _ = l
  1387. return n
  1388. }
  1389. func (m *Close) ProtoSize() (n int) {
  1390. var l int
  1391. _ = l
  1392. l = len(m.Reason)
  1393. if l > 0 {
  1394. n += 1 + l + sovBep(uint64(l))
  1395. }
  1396. return n
  1397. }
  1398. func sovBep(x uint64) (n int) {
  1399. for {
  1400. n++
  1401. x >>= 7
  1402. if x == 0 {
  1403. break
  1404. }
  1405. }
  1406. return n
  1407. }
  1408. func sozBep(x uint64) (n int) {
  1409. return sovBep(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1410. }
  1411. func (m *Hello) Unmarshal(data []byte) error {
  1412. l := len(data)
  1413. iNdEx := 0
  1414. for iNdEx < l {
  1415. preIndex := iNdEx
  1416. var wire uint64
  1417. for shift := uint(0); ; shift += 7 {
  1418. if shift >= 64 {
  1419. return ErrIntOverflowBep
  1420. }
  1421. if iNdEx >= l {
  1422. return io.ErrUnexpectedEOF
  1423. }
  1424. b := data[iNdEx]
  1425. iNdEx++
  1426. wire |= (uint64(b) & 0x7F) << shift
  1427. if b < 0x80 {
  1428. break
  1429. }
  1430. }
  1431. fieldNum := int32(wire >> 3)
  1432. wireType := int(wire & 0x7)
  1433. if wireType == 4 {
  1434. return fmt.Errorf("proto: Hello: wiretype end group for non-group")
  1435. }
  1436. if fieldNum <= 0 {
  1437. return fmt.Errorf("proto: Hello: illegal tag %d (wire type %d)", fieldNum, wire)
  1438. }
  1439. switch fieldNum {
  1440. case 1:
  1441. if wireType != 2 {
  1442. return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType)
  1443. }
  1444. var stringLen uint64
  1445. for shift := uint(0); ; shift += 7 {
  1446. if shift >= 64 {
  1447. return ErrIntOverflowBep
  1448. }
  1449. if iNdEx >= l {
  1450. return io.ErrUnexpectedEOF
  1451. }
  1452. b := data[iNdEx]
  1453. iNdEx++
  1454. stringLen |= (uint64(b) & 0x7F) << shift
  1455. if b < 0x80 {
  1456. break
  1457. }
  1458. }
  1459. intStringLen := int(stringLen)
  1460. if intStringLen < 0 {
  1461. return ErrInvalidLengthBep
  1462. }
  1463. postIndex := iNdEx + intStringLen
  1464. if postIndex > l {
  1465. return io.ErrUnexpectedEOF
  1466. }
  1467. m.DeviceName = string(data[iNdEx:postIndex])
  1468. iNdEx = postIndex
  1469. case 2:
  1470. if wireType != 2 {
  1471. return fmt.Errorf("proto: wrong wireType = %d for field ClientName", wireType)
  1472. }
  1473. var stringLen uint64
  1474. for shift := uint(0); ; shift += 7 {
  1475. if shift >= 64 {
  1476. return ErrIntOverflowBep
  1477. }
  1478. if iNdEx >= l {
  1479. return io.ErrUnexpectedEOF
  1480. }
  1481. b := data[iNdEx]
  1482. iNdEx++
  1483. stringLen |= (uint64(b) & 0x7F) << shift
  1484. if b < 0x80 {
  1485. break
  1486. }
  1487. }
  1488. intStringLen := int(stringLen)
  1489. if intStringLen < 0 {
  1490. return ErrInvalidLengthBep
  1491. }
  1492. postIndex := iNdEx + intStringLen
  1493. if postIndex > l {
  1494. return io.ErrUnexpectedEOF
  1495. }
  1496. m.ClientName = string(data[iNdEx:postIndex])
  1497. iNdEx = postIndex
  1498. case 3:
  1499. if wireType != 2 {
  1500. return fmt.Errorf("proto: wrong wireType = %d for field ClientVersion", wireType)
  1501. }
  1502. var stringLen uint64
  1503. for shift := uint(0); ; shift += 7 {
  1504. if shift >= 64 {
  1505. return ErrIntOverflowBep
  1506. }
  1507. if iNdEx >= l {
  1508. return io.ErrUnexpectedEOF
  1509. }
  1510. b := data[iNdEx]
  1511. iNdEx++
  1512. stringLen |= (uint64(b) & 0x7F) << shift
  1513. if b < 0x80 {
  1514. break
  1515. }
  1516. }
  1517. intStringLen := int(stringLen)
  1518. if intStringLen < 0 {
  1519. return ErrInvalidLengthBep
  1520. }
  1521. postIndex := iNdEx + intStringLen
  1522. if postIndex > l {
  1523. return io.ErrUnexpectedEOF
  1524. }
  1525. m.ClientVersion = string(data[iNdEx:postIndex])
  1526. iNdEx = postIndex
  1527. default:
  1528. iNdEx = preIndex
  1529. skippy, err := skipBep(data[iNdEx:])
  1530. if err != nil {
  1531. return err
  1532. }
  1533. if skippy < 0 {
  1534. return ErrInvalidLengthBep
  1535. }
  1536. if (iNdEx + skippy) > l {
  1537. return io.ErrUnexpectedEOF
  1538. }
  1539. iNdEx += skippy
  1540. }
  1541. }
  1542. if iNdEx > l {
  1543. return io.ErrUnexpectedEOF
  1544. }
  1545. return nil
  1546. }
  1547. func (m *Header) Unmarshal(data []byte) error {
  1548. l := len(data)
  1549. iNdEx := 0
  1550. for iNdEx < l {
  1551. preIndex := iNdEx
  1552. var wire uint64
  1553. for shift := uint(0); ; shift += 7 {
  1554. if shift >= 64 {
  1555. return ErrIntOverflowBep
  1556. }
  1557. if iNdEx >= l {
  1558. return io.ErrUnexpectedEOF
  1559. }
  1560. b := data[iNdEx]
  1561. iNdEx++
  1562. wire |= (uint64(b) & 0x7F) << shift
  1563. if b < 0x80 {
  1564. break
  1565. }
  1566. }
  1567. fieldNum := int32(wire >> 3)
  1568. wireType := int(wire & 0x7)
  1569. if wireType == 4 {
  1570. return fmt.Errorf("proto: Header: wiretype end group for non-group")
  1571. }
  1572. if fieldNum <= 0 {
  1573. return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire)
  1574. }
  1575. switch fieldNum {
  1576. case 1:
  1577. if wireType != 0 {
  1578. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1579. }
  1580. m.Type = 0
  1581. for shift := uint(0); ; shift += 7 {
  1582. if shift >= 64 {
  1583. return ErrIntOverflowBep
  1584. }
  1585. if iNdEx >= l {
  1586. return io.ErrUnexpectedEOF
  1587. }
  1588. b := data[iNdEx]
  1589. iNdEx++
  1590. m.Type |= (MessageType(b) & 0x7F) << shift
  1591. if b < 0x80 {
  1592. break
  1593. }
  1594. }
  1595. case 2:
  1596. if wireType != 0 {
  1597. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  1598. }
  1599. m.Compression = 0
  1600. for shift := uint(0); ; shift += 7 {
  1601. if shift >= 64 {
  1602. return ErrIntOverflowBep
  1603. }
  1604. if iNdEx >= l {
  1605. return io.ErrUnexpectedEOF
  1606. }
  1607. b := data[iNdEx]
  1608. iNdEx++
  1609. m.Compression |= (MessageCompression(b) & 0x7F) << shift
  1610. if b < 0x80 {
  1611. break
  1612. }
  1613. }
  1614. default:
  1615. iNdEx = preIndex
  1616. skippy, err := skipBep(data[iNdEx:])
  1617. if err != nil {
  1618. return err
  1619. }
  1620. if skippy < 0 {
  1621. return ErrInvalidLengthBep
  1622. }
  1623. if (iNdEx + skippy) > l {
  1624. return io.ErrUnexpectedEOF
  1625. }
  1626. iNdEx += skippy
  1627. }
  1628. }
  1629. if iNdEx > l {
  1630. return io.ErrUnexpectedEOF
  1631. }
  1632. return nil
  1633. }
  1634. func (m *ClusterConfig) Unmarshal(data []byte) error {
  1635. l := len(data)
  1636. iNdEx := 0
  1637. for iNdEx < l {
  1638. preIndex := iNdEx
  1639. var wire uint64
  1640. for shift := uint(0); ; shift += 7 {
  1641. if shift >= 64 {
  1642. return ErrIntOverflowBep
  1643. }
  1644. if iNdEx >= l {
  1645. return io.ErrUnexpectedEOF
  1646. }
  1647. b := data[iNdEx]
  1648. iNdEx++
  1649. wire |= (uint64(b) & 0x7F) << shift
  1650. if b < 0x80 {
  1651. break
  1652. }
  1653. }
  1654. fieldNum := int32(wire >> 3)
  1655. wireType := int(wire & 0x7)
  1656. if wireType == 4 {
  1657. return fmt.Errorf("proto: ClusterConfig: wiretype end group for non-group")
  1658. }
  1659. if fieldNum <= 0 {
  1660. return fmt.Errorf("proto: ClusterConfig: illegal tag %d (wire type %d)", fieldNum, wire)
  1661. }
  1662. switch fieldNum {
  1663. case 1:
  1664. if wireType != 2 {
  1665. return fmt.Errorf("proto: wrong wireType = %d for field Folders", wireType)
  1666. }
  1667. var msglen int
  1668. for shift := uint(0); ; shift += 7 {
  1669. if shift >= 64 {
  1670. return ErrIntOverflowBep
  1671. }
  1672. if iNdEx >= l {
  1673. return io.ErrUnexpectedEOF
  1674. }
  1675. b := data[iNdEx]
  1676. iNdEx++
  1677. msglen |= (int(b) & 0x7F) << shift
  1678. if b < 0x80 {
  1679. break
  1680. }
  1681. }
  1682. if msglen < 0 {
  1683. return ErrInvalidLengthBep
  1684. }
  1685. postIndex := iNdEx + msglen
  1686. if postIndex > l {
  1687. return io.ErrUnexpectedEOF
  1688. }
  1689. m.Folders = append(m.Folders, Folder{})
  1690. if err := m.Folders[len(m.Folders)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  1691. return err
  1692. }
  1693. iNdEx = postIndex
  1694. default:
  1695. iNdEx = preIndex
  1696. skippy, err := skipBep(data[iNdEx:])
  1697. if err != nil {
  1698. return err
  1699. }
  1700. if skippy < 0 {
  1701. return ErrInvalidLengthBep
  1702. }
  1703. if (iNdEx + skippy) > l {
  1704. return io.ErrUnexpectedEOF
  1705. }
  1706. iNdEx += skippy
  1707. }
  1708. }
  1709. if iNdEx > l {
  1710. return io.ErrUnexpectedEOF
  1711. }
  1712. return nil
  1713. }
  1714. func (m *Folder) Unmarshal(data []byte) error {
  1715. l := len(data)
  1716. iNdEx := 0
  1717. for iNdEx < l {
  1718. preIndex := iNdEx
  1719. var wire uint64
  1720. for shift := uint(0); ; shift += 7 {
  1721. if shift >= 64 {
  1722. return ErrIntOverflowBep
  1723. }
  1724. if iNdEx >= l {
  1725. return io.ErrUnexpectedEOF
  1726. }
  1727. b := data[iNdEx]
  1728. iNdEx++
  1729. wire |= (uint64(b) & 0x7F) << shift
  1730. if b < 0x80 {
  1731. break
  1732. }
  1733. }
  1734. fieldNum := int32(wire >> 3)
  1735. wireType := int(wire & 0x7)
  1736. if wireType == 4 {
  1737. return fmt.Errorf("proto: Folder: wiretype end group for non-group")
  1738. }
  1739. if fieldNum <= 0 {
  1740. return fmt.Errorf("proto: Folder: illegal tag %d (wire type %d)", fieldNum, wire)
  1741. }
  1742. switch fieldNum {
  1743. case 1:
  1744. if wireType != 2 {
  1745. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1746. }
  1747. var stringLen uint64
  1748. for shift := uint(0); ; shift += 7 {
  1749. if shift >= 64 {
  1750. return ErrIntOverflowBep
  1751. }
  1752. if iNdEx >= l {
  1753. return io.ErrUnexpectedEOF
  1754. }
  1755. b := data[iNdEx]
  1756. iNdEx++
  1757. stringLen |= (uint64(b) & 0x7F) << shift
  1758. if b < 0x80 {
  1759. break
  1760. }
  1761. }
  1762. intStringLen := int(stringLen)
  1763. if intStringLen < 0 {
  1764. return ErrInvalidLengthBep
  1765. }
  1766. postIndex := iNdEx + intStringLen
  1767. if postIndex > l {
  1768. return io.ErrUnexpectedEOF
  1769. }
  1770. m.ID = string(data[iNdEx:postIndex])
  1771. iNdEx = postIndex
  1772. case 2:
  1773. if wireType != 2 {
  1774. return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
  1775. }
  1776. var stringLen uint64
  1777. for shift := uint(0); ; shift += 7 {
  1778. if shift >= 64 {
  1779. return ErrIntOverflowBep
  1780. }
  1781. if iNdEx >= l {
  1782. return io.ErrUnexpectedEOF
  1783. }
  1784. b := data[iNdEx]
  1785. iNdEx++
  1786. stringLen |= (uint64(b) & 0x7F) << shift
  1787. if b < 0x80 {
  1788. break
  1789. }
  1790. }
  1791. intStringLen := int(stringLen)
  1792. if intStringLen < 0 {
  1793. return ErrInvalidLengthBep
  1794. }
  1795. postIndex := iNdEx + intStringLen
  1796. if postIndex > l {
  1797. return io.ErrUnexpectedEOF
  1798. }
  1799. m.Label = string(data[iNdEx:postIndex])
  1800. iNdEx = postIndex
  1801. case 3:
  1802. if wireType != 0 {
  1803. return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
  1804. }
  1805. var v int
  1806. for shift := uint(0); ; shift += 7 {
  1807. if shift >= 64 {
  1808. return ErrIntOverflowBep
  1809. }
  1810. if iNdEx >= l {
  1811. return io.ErrUnexpectedEOF
  1812. }
  1813. b := data[iNdEx]
  1814. iNdEx++
  1815. v |= (int(b) & 0x7F) << shift
  1816. if b < 0x80 {
  1817. break
  1818. }
  1819. }
  1820. m.ReadOnly = bool(v != 0)
  1821. case 4:
  1822. if wireType != 0 {
  1823. return fmt.Errorf("proto: wrong wireType = %d for field IgnorePermissions", wireType)
  1824. }
  1825. var v int
  1826. for shift := uint(0); ; shift += 7 {
  1827. if shift >= 64 {
  1828. return ErrIntOverflowBep
  1829. }
  1830. if iNdEx >= l {
  1831. return io.ErrUnexpectedEOF
  1832. }
  1833. b := data[iNdEx]
  1834. iNdEx++
  1835. v |= (int(b) & 0x7F) << shift
  1836. if b < 0x80 {
  1837. break
  1838. }
  1839. }
  1840. m.IgnorePermissions = bool(v != 0)
  1841. case 5:
  1842. if wireType != 0 {
  1843. return fmt.Errorf("proto: wrong wireType = %d for field IgnoreDelete", wireType)
  1844. }
  1845. var v int
  1846. for shift := uint(0); ; shift += 7 {
  1847. if shift >= 64 {
  1848. return ErrIntOverflowBep
  1849. }
  1850. if iNdEx >= l {
  1851. return io.ErrUnexpectedEOF
  1852. }
  1853. b := data[iNdEx]
  1854. iNdEx++
  1855. v |= (int(b) & 0x7F) << shift
  1856. if b < 0x80 {
  1857. break
  1858. }
  1859. }
  1860. m.IgnoreDelete = bool(v != 0)
  1861. case 6:
  1862. if wireType != 0 {
  1863. return fmt.Errorf("proto: wrong wireType = %d for field DisableTempIndexes", wireType)
  1864. }
  1865. var v int
  1866. for shift := uint(0); ; shift += 7 {
  1867. if shift >= 64 {
  1868. return ErrIntOverflowBep
  1869. }
  1870. if iNdEx >= l {
  1871. return io.ErrUnexpectedEOF
  1872. }
  1873. b := data[iNdEx]
  1874. iNdEx++
  1875. v |= (int(b) & 0x7F) << shift
  1876. if b < 0x80 {
  1877. break
  1878. }
  1879. }
  1880. m.DisableTempIndexes = bool(v != 0)
  1881. case 16:
  1882. if wireType != 2 {
  1883. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  1884. }
  1885. var msglen int
  1886. for shift := uint(0); ; shift += 7 {
  1887. if shift >= 64 {
  1888. return ErrIntOverflowBep
  1889. }
  1890. if iNdEx >= l {
  1891. return io.ErrUnexpectedEOF
  1892. }
  1893. b := data[iNdEx]
  1894. iNdEx++
  1895. msglen |= (int(b) & 0x7F) << shift
  1896. if b < 0x80 {
  1897. break
  1898. }
  1899. }
  1900. if msglen < 0 {
  1901. return ErrInvalidLengthBep
  1902. }
  1903. postIndex := iNdEx + msglen
  1904. if postIndex > l {
  1905. return io.ErrUnexpectedEOF
  1906. }
  1907. m.Devices = append(m.Devices, Device{})
  1908. if err := m.Devices[len(m.Devices)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  1909. return err
  1910. }
  1911. iNdEx = postIndex
  1912. default:
  1913. iNdEx = preIndex
  1914. skippy, err := skipBep(data[iNdEx:])
  1915. if err != nil {
  1916. return err
  1917. }
  1918. if skippy < 0 {
  1919. return ErrInvalidLengthBep
  1920. }
  1921. if (iNdEx + skippy) > l {
  1922. return io.ErrUnexpectedEOF
  1923. }
  1924. iNdEx += skippy
  1925. }
  1926. }
  1927. if iNdEx > l {
  1928. return io.ErrUnexpectedEOF
  1929. }
  1930. return nil
  1931. }
  1932. func (m *Device) Unmarshal(data []byte) error {
  1933. l := len(data)
  1934. iNdEx := 0
  1935. for iNdEx < l {
  1936. preIndex := iNdEx
  1937. var wire uint64
  1938. for shift := uint(0); ; shift += 7 {
  1939. if shift >= 64 {
  1940. return ErrIntOverflowBep
  1941. }
  1942. if iNdEx >= l {
  1943. return io.ErrUnexpectedEOF
  1944. }
  1945. b := data[iNdEx]
  1946. iNdEx++
  1947. wire |= (uint64(b) & 0x7F) << shift
  1948. if b < 0x80 {
  1949. break
  1950. }
  1951. }
  1952. fieldNum := int32(wire >> 3)
  1953. wireType := int(wire & 0x7)
  1954. if wireType == 4 {
  1955. return fmt.Errorf("proto: Device: wiretype end group for non-group")
  1956. }
  1957. if fieldNum <= 0 {
  1958. return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
  1959. }
  1960. switch fieldNum {
  1961. case 1:
  1962. if wireType != 2 {
  1963. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1964. }
  1965. var byteLen int
  1966. for shift := uint(0); ; shift += 7 {
  1967. if shift >= 64 {
  1968. return ErrIntOverflowBep
  1969. }
  1970. if iNdEx >= l {
  1971. return io.ErrUnexpectedEOF
  1972. }
  1973. b := data[iNdEx]
  1974. iNdEx++
  1975. byteLen |= (int(b) & 0x7F) << shift
  1976. if b < 0x80 {
  1977. break
  1978. }
  1979. }
  1980. if byteLen < 0 {
  1981. return ErrInvalidLengthBep
  1982. }
  1983. postIndex := iNdEx + byteLen
  1984. if postIndex > l {
  1985. return io.ErrUnexpectedEOF
  1986. }
  1987. m.ID = append(m.ID[:0], data[iNdEx:postIndex]...)
  1988. if m.ID == nil {
  1989. m.ID = []byte{}
  1990. }
  1991. iNdEx = postIndex
  1992. case 2:
  1993. if wireType != 2 {
  1994. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1995. }
  1996. var stringLen uint64
  1997. for shift := uint(0); ; shift += 7 {
  1998. if shift >= 64 {
  1999. return ErrIntOverflowBep
  2000. }
  2001. if iNdEx >= l {
  2002. return io.ErrUnexpectedEOF
  2003. }
  2004. b := data[iNdEx]
  2005. iNdEx++
  2006. stringLen |= (uint64(b) & 0x7F) << shift
  2007. if b < 0x80 {
  2008. break
  2009. }
  2010. }
  2011. intStringLen := int(stringLen)
  2012. if intStringLen < 0 {
  2013. return ErrInvalidLengthBep
  2014. }
  2015. postIndex := iNdEx + intStringLen
  2016. if postIndex > l {
  2017. return io.ErrUnexpectedEOF
  2018. }
  2019. m.Name = string(data[iNdEx:postIndex])
  2020. iNdEx = postIndex
  2021. case 3:
  2022. if wireType != 2 {
  2023. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  2024. }
  2025. var stringLen uint64
  2026. for shift := uint(0); ; shift += 7 {
  2027. if shift >= 64 {
  2028. return ErrIntOverflowBep
  2029. }
  2030. if iNdEx >= l {
  2031. return io.ErrUnexpectedEOF
  2032. }
  2033. b := data[iNdEx]
  2034. iNdEx++
  2035. stringLen |= (uint64(b) & 0x7F) << shift
  2036. if b < 0x80 {
  2037. break
  2038. }
  2039. }
  2040. intStringLen := int(stringLen)
  2041. if intStringLen < 0 {
  2042. return ErrInvalidLengthBep
  2043. }
  2044. postIndex := iNdEx + intStringLen
  2045. if postIndex > l {
  2046. return io.ErrUnexpectedEOF
  2047. }
  2048. m.Addresses = append(m.Addresses, string(data[iNdEx:postIndex]))
  2049. iNdEx = postIndex
  2050. case 4:
  2051. if wireType != 0 {
  2052. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  2053. }
  2054. m.Compression = 0
  2055. for shift := uint(0); ; shift += 7 {
  2056. if shift >= 64 {
  2057. return ErrIntOverflowBep
  2058. }
  2059. if iNdEx >= l {
  2060. return io.ErrUnexpectedEOF
  2061. }
  2062. b := data[iNdEx]
  2063. iNdEx++
  2064. m.Compression |= (Compression(b) & 0x7F) << shift
  2065. if b < 0x80 {
  2066. break
  2067. }
  2068. }
  2069. case 5:
  2070. if wireType != 2 {
  2071. return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType)
  2072. }
  2073. var stringLen uint64
  2074. for shift := uint(0); ; shift += 7 {
  2075. if shift >= 64 {
  2076. return ErrIntOverflowBep
  2077. }
  2078. if iNdEx >= l {
  2079. return io.ErrUnexpectedEOF
  2080. }
  2081. b := data[iNdEx]
  2082. iNdEx++
  2083. stringLen |= (uint64(b) & 0x7F) << shift
  2084. if b < 0x80 {
  2085. break
  2086. }
  2087. }
  2088. intStringLen := int(stringLen)
  2089. if intStringLen < 0 {
  2090. return ErrInvalidLengthBep
  2091. }
  2092. postIndex := iNdEx + intStringLen
  2093. if postIndex > l {
  2094. return io.ErrUnexpectedEOF
  2095. }
  2096. m.CertName = string(data[iNdEx:postIndex])
  2097. iNdEx = postIndex
  2098. case 6:
  2099. if wireType != 0 {
  2100. return fmt.Errorf("proto: wrong wireType = %d for field MaxLocalVersion", wireType)
  2101. }
  2102. m.MaxLocalVersion = 0
  2103. for shift := uint(0); ; shift += 7 {
  2104. if shift >= 64 {
  2105. return ErrIntOverflowBep
  2106. }
  2107. if iNdEx >= l {
  2108. return io.ErrUnexpectedEOF
  2109. }
  2110. b := data[iNdEx]
  2111. iNdEx++
  2112. m.MaxLocalVersion |= (int64(b) & 0x7F) << shift
  2113. if b < 0x80 {
  2114. break
  2115. }
  2116. }
  2117. case 7:
  2118. if wireType != 0 {
  2119. return fmt.Errorf("proto: wrong wireType = %d for field Introducer", wireType)
  2120. }
  2121. var v int
  2122. for shift := uint(0); ; shift += 7 {
  2123. if shift >= 64 {
  2124. return ErrIntOverflowBep
  2125. }
  2126. if iNdEx >= l {
  2127. return io.ErrUnexpectedEOF
  2128. }
  2129. b := data[iNdEx]
  2130. iNdEx++
  2131. v |= (int(b) & 0x7F) << shift
  2132. if b < 0x80 {
  2133. break
  2134. }
  2135. }
  2136. m.Introducer = bool(v != 0)
  2137. case 8:
  2138. if wireType != 0 {
  2139. return fmt.Errorf("proto: wrong wireType = %d for field IndexID", wireType)
  2140. }
  2141. m.IndexID = 0
  2142. for shift := uint(0); ; shift += 7 {
  2143. if shift >= 64 {
  2144. return ErrIntOverflowBep
  2145. }
  2146. if iNdEx >= l {
  2147. return io.ErrUnexpectedEOF
  2148. }
  2149. b := data[iNdEx]
  2150. iNdEx++
  2151. m.IndexID |= (IndexID(b) & 0x7F) << shift
  2152. if b < 0x80 {
  2153. break
  2154. }
  2155. }
  2156. default:
  2157. iNdEx = preIndex
  2158. skippy, err := skipBep(data[iNdEx:])
  2159. if err != nil {
  2160. return err
  2161. }
  2162. if skippy < 0 {
  2163. return ErrInvalidLengthBep
  2164. }
  2165. if (iNdEx + skippy) > l {
  2166. return io.ErrUnexpectedEOF
  2167. }
  2168. iNdEx += skippy
  2169. }
  2170. }
  2171. if iNdEx > l {
  2172. return io.ErrUnexpectedEOF
  2173. }
  2174. return nil
  2175. }
  2176. func (m *Index) Unmarshal(data []byte) error {
  2177. l := len(data)
  2178. iNdEx := 0
  2179. for iNdEx < l {
  2180. preIndex := iNdEx
  2181. var wire uint64
  2182. for shift := uint(0); ; shift += 7 {
  2183. if shift >= 64 {
  2184. return ErrIntOverflowBep
  2185. }
  2186. if iNdEx >= l {
  2187. return io.ErrUnexpectedEOF
  2188. }
  2189. b := data[iNdEx]
  2190. iNdEx++
  2191. wire |= (uint64(b) & 0x7F) << shift
  2192. if b < 0x80 {
  2193. break
  2194. }
  2195. }
  2196. fieldNum := int32(wire >> 3)
  2197. wireType := int(wire & 0x7)
  2198. if wireType == 4 {
  2199. return fmt.Errorf("proto: Index: wiretype end group for non-group")
  2200. }
  2201. if fieldNum <= 0 {
  2202. return fmt.Errorf("proto: Index: illegal tag %d (wire type %d)", fieldNum, wire)
  2203. }
  2204. switch fieldNum {
  2205. case 1:
  2206. if wireType != 2 {
  2207. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  2208. }
  2209. var stringLen uint64
  2210. for shift := uint(0); ; shift += 7 {
  2211. if shift >= 64 {
  2212. return ErrIntOverflowBep
  2213. }
  2214. if iNdEx >= l {
  2215. return io.ErrUnexpectedEOF
  2216. }
  2217. b := data[iNdEx]
  2218. iNdEx++
  2219. stringLen |= (uint64(b) & 0x7F) << shift
  2220. if b < 0x80 {
  2221. break
  2222. }
  2223. }
  2224. intStringLen := int(stringLen)
  2225. if intStringLen < 0 {
  2226. return ErrInvalidLengthBep
  2227. }
  2228. postIndex := iNdEx + intStringLen
  2229. if postIndex > l {
  2230. return io.ErrUnexpectedEOF
  2231. }
  2232. m.Folder = string(data[iNdEx:postIndex])
  2233. iNdEx = postIndex
  2234. case 2:
  2235. if wireType != 2 {
  2236. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  2237. }
  2238. var msglen int
  2239. for shift := uint(0); ; shift += 7 {
  2240. if shift >= 64 {
  2241. return ErrIntOverflowBep
  2242. }
  2243. if iNdEx >= l {
  2244. return io.ErrUnexpectedEOF
  2245. }
  2246. b := data[iNdEx]
  2247. iNdEx++
  2248. msglen |= (int(b) & 0x7F) << shift
  2249. if b < 0x80 {
  2250. break
  2251. }
  2252. }
  2253. if msglen < 0 {
  2254. return ErrInvalidLengthBep
  2255. }
  2256. postIndex := iNdEx + msglen
  2257. if postIndex > l {
  2258. return io.ErrUnexpectedEOF
  2259. }
  2260. m.Files = append(m.Files, FileInfo{})
  2261. if err := m.Files[len(m.Files)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2262. return err
  2263. }
  2264. iNdEx = postIndex
  2265. default:
  2266. iNdEx = preIndex
  2267. skippy, err := skipBep(data[iNdEx:])
  2268. if err != nil {
  2269. return err
  2270. }
  2271. if skippy < 0 {
  2272. return ErrInvalidLengthBep
  2273. }
  2274. if (iNdEx + skippy) > l {
  2275. return io.ErrUnexpectedEOF
  2276. }
  2277. iNdEx += skippy
  2278. }
  2279. }
  2280. if iNdEx > l {
  2281. return io.ErrUnexpectedEOF
  2282. }
  2283. return nil
  2284. }
  2285. func (m *IndexUpdate) Unmarshal(data []byte) error {
  2286. l := len(data)
  2287. iNdEx := 0
  2288. for iNdEx < l {
  2289. preIndex := iNdEx
  2290. var wire uint64
  2291. for shift := uint(0); ; shift += 7 {
  2292. if shift >= 64 {
  2293. return ErrIntOverflowBep
  2294. }
  2295. if iNdEx >= l {
  2296. return io.ErrUnexpectedEOF
  2297. }
  2298. b := data[iNdEx]
  2299. iNdEx++
  2300. wire |= (uint64(b) & 0x7F) << shift
  2301. if b < 0x80 {
  2302. break
  2303. }
  2304. }
  2305. fieldNum := int32(wire >> 3)
  2306. wireType := int(wire & 0x7)
  2307. if wireType == 4 {
  2308. return fmt.Errorf("proto: IndexUpdate: wiretype end group for non-group")
  2309. }
  2310. if fieldNum <= 0 {
  2311. return fmt.Errorf("proto: IndexUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  2312. }
  2313. switch fieldNum {
  2314. case 1:
  2315. if wireType != 2 {
  2316. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  2317. }
  2318. var stringLen uint64
  2319. for shift := uint(0); ; shift += 7 {
  2320. if shift >= 64 {
  2321. return ErrIntOverflowBep
  2322. }
  2323. if iNdEx >= l {
  2324. return io.ErrUnexpectedEOF
  2325. }
  2326. b := data[iNdEx]
  2327. iNdEx++
  2328. stringLen |= (uint64(b) & 0x7F) << shift
  2329. if b < 0x80 {
  2330. break
  2331. }
  2332. }
  2333. intStringLen := int(stringLen)
  2334. if intStringLen < 0 {
  2335. return ErrInvalidLengthBep
  2336. }
  2337. postIndex := iNdEx + intStringLen
  2338. if postIndex > l {
  2339. return io.ErrUnexpectedEOF
  2340. }
  2341. m.Folder = string(data[iNdEx:postIndex])
  2342. iNdEx = postIndex
  2343. case 2:
  2344. if wireType != 2 {
  2345. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  2346. }
  2347. var msglen int
  2348. for shift := uint(0); ; shift += 7 {
  2349. if shift >= 64 {
  2350. return ErrIntOverflowBep
  2351. }
  2352. if iNdEx >= l {
  2353. return io.ErrUnexpectedEOF
  2354. }
  2355. b := data[iNdEx]
  2356. iNdEx++
  2357. msglen |= (int(b) & 0x7F) << shift
  2358. if b < 0x80 {
  2359. break
  2360. }
  2361. }
  2362. if msglen < 0 {
  2363. return ErrInvalidLengthBep
  2364. }
  2365. postIndex := iNdEx + msglen
  2366. if postIndex > l {
  2367. return io.ErrUnexpectedEOF
  2368. }
  2369. m.Files = append(m.Files, FileInfo{})
  2370. if err := m.Files[len(m.Files)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2371. return err
  2372. }
  2373. iNdEx = postIndex
  2374. default:
  2375. iNdEx = preIndex
  2376. skippy, err := skipBep(data[iNdEx:])
  2377. if err != nil {
  2378. return err
  2379. }
  2380. if skippy < 0 {
  2381. return ErrInvalidLengthBep
  2382. }
  2383. if (iNdEx + skippy) > l {
  2384. return io.ErrUnexpectedEOF
  2385. }
  2386. iNdEx += skippy
  2387. }
  2388. }
  2389. if iNdEx > l {
  2390. return io.ErrUnexpectedEOF
  2391. }
  2392. return nil
  2393. }
  2394. func (m *FileInfo) Unmarshal(data []byte) error {
  2395. l := len(data)
  2396. iNdEx := 0
  2397. for iNdEx < l {
  2398. preIndex := iNdEx
  2399. var wire uint64
  2400. for shift := uint(0); ; shift += 7 {
  2401. if shift >= 64 {
  2402. return ErrIntOverflowBep
  2403. }
  2404. if iNdEx >= l {
  2405. return io.ErrUnexpectedEOF
  2406. }
  2407. b := data[iNdEx]
  2408. iNdEx++
  2409. wire |= (uint64(b) & 0x7F) << shift
  2410. if b < 0x80 {
  2411. break
  2412. }
  2413. }
  2414. fieldNum := int32(wire >> 3)
  2415. wireType := int(wire & 0x7)
  2416. if wireType == 4 {
  2417. return fmt.Errorf("proto: FileInfo: wiretype end group for non-group")
  2418. }
  2419. if fieldNum <= 0 {
  2420. return fmt.Errorf("proto: FileInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  2421. }
  2422. switch fieldNum {
  2423. case 1:
  2424. if wireType != 2 {
  2425. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2426. }
  2427. var stringLen uint64
  2428. for shift := uint(0); ; shift += 7 {
  2429. if shift >= 64 {
  2430. return ErrIntOverflowBep
  2431. }
  2432. if iNdEx >= l {
  2433. return io.ErrUnexpectedEOF
  2434. }
  2435. b := data[iNdEx]
  2436. iNdEx++
  2437. stringLen |= (uint64(b) & 0x7F) << shift
  2438. if b < 0x80 {
  2439. break
  2440. }
  2441. }
  2442. intStringLen := int(stringLen)
  2443. if intStringLen < 0 {
  2444. return ErrInvalidLengthBep
  2445. }
  2446. postIndex := iNdEx + intStringLen
  2447. if postIndex > l {
  2448. return io.ErrUnexpectedEOF
  2449. }
  2450. m.Name = string(data[iNdEx:postIndex])
  2451. iNdEx = postIndex
  2452. case 2:
  2453. if wireType != 0 {
  2454. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2455. }
  2456. m.Type = 0
  2457. for shift := uint(0); ; shift += 7 {
  2458. if shift >= 64 {
  2459. return ErrIntOverflowBep
  2460. }
  2461. if iNdEx >= l {
  2462. return io.ErrUnexpectedEOF
  2463. }
  2464. b := data[iNdEx]
  2465. iNdEx++
  2466. m.Type |= (FileInfoType(b) & 0x7F) << shift
  2467. if b < 0x80 {
  2468. break
  2469. }
  2470. }
  2471. case 3:
  2472. if wireType != 0 {
  2473. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  2474. }
  2475. m.Size = 0
  2476. for shift := uint(0); ; shift += 7 {
  2477. if shift >= 64 {
  2478. return ErrIntOverflowBep
  2479. }
  2480. if iNdEx >= l {
  2481. return io.ErrUnexpectedEOF
  2482. }
  2483. b := data[iNdEx]
  2484. iNdEx++
  2485. m.Size |= (int64(b) & 0x7F) << shift
  2486. if b < 0x80 {
  2487. break
  2488. }
  2489. }
  2490. case 4:
  2491. if wireType != 0 {
  2492. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  2493. }
  2494. m.Permissions = 0
  2495. for shift := uint(0); ; shift += 7 {
  2496. if shift >= 64 {
  2497. return ErrIntOverflowBep
  2498. }
  2499. if iNdEx >= l {
  2500. return io.ErrUnexpectedEOF
  2501. }
  2502. b := data[iNdEx]
  2503. iNdEx++
  2504. m.Permissions |= (uint32(b) & 0x7F) << shift
  2505. if b < 0x80 {
  2506. break
  2507. }
  2508. }
  2509. case 5:
  2510. if wireType != 0 {
  2511. return fmt.Errorf("proto: wrong wireType = %d for field Modified", wireType)
  2512. }
  2513. m.Modified = 0
  2514. for shift := uint(0); ; shift += 7 {
  2515. if shift >= 64 {
  2516. return ErrIntOverflowBep
  2517. }
  2518. if iNdEx >= l {
  2519. return io.ErrUnexpectedEOF
  2520. }
  2521. b := data[iNdEx]
  2522. iNdEx++
  2523. m.Modified |= (int64(b) & 0x7F) << shift
  2524. if b < 0x80 {
  2525. break
  2526. }
  2527. }
  2528. case 6:
  2529. if wireType != 0 {
  2530. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  2531. }
  2532. var v int
  2533. for shift := uint(0); ; shift += 7 {
  2534. if shift >= 64 {
  2535. return ErrIntOverflowBep
  2536. }
  2537. if iNdEx >= l {
  2538. return io.ErrUnexpectedEOF
  2539. }
  2540. b := data[iNdEx]
  2541. iNdEx++
  2542. v |= (int(b) & 0x7F) << shift
  2543. if b < 0x80 {
  2544. break
  2545. }
  2546. }
  2547. m.Deleted = bool(v != 0)
  2548. case 7:
  2549. if wireType != 0 {
  2550. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  2551. }
  2552. var v int
  2553. for shift := uint(0); ; shift += 7 {
  2554. if shift >= 64 {
  2555. return ErrIntOverflowBep
  2556. }
  2557. if iNdEx >= l {
  2558. return io.ErrUnexpectedEOF
  2559. }
  2560. b := data[iNdEx]
  2561. iNdEx++
  2562. v |= (int(b) & 0x7F) << shift
  2563. if b < 0x80 {
  2564. break
  2565. }
  2566. }
  2567. m.Invalid = bool(v != 0)
  2568. case 8:
  2569. if wireType != 0 {
  2570. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  2571. }
  2572. var v int
  2573. for shift := uint(0); ; shift += 7 {
  2574. if shift >= 64 {
  2575. return ErrIntOverflowBep
  2576. }
  2577. if iNdEx >= l {
  2578. return io.ErrUnexpectedEOF
  2579. }
  2580. b := data[iNdEx]
  2581. iNdEx++
  2582. v |= (int(b) & 0x7F) << shift
  2583. if b < 0x80 {
  2584. break
  2585. }
  2586. }
  2587. m.NoPermissions = bool(v != 0)
  2588. case 9:
  2589. if wireType != 2 {
  2590. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  2591. }
  2592. var msglen int
  2593. for shift := uint(0); ; shift += 7 {
  2594. if shift >= 64 {
  2595. return ErrIntOverflowBep
  2596. }
  2597. if iNdEx >= l {
  2598. return io.ErrUnexpectedEOF
  2599. }
  2600. b := data[iNdEx]
  2601. iNdEx++
  2602. msglen |= (int(b) & 0x7F) << shift
  2603. if b < 0x80 {
  2604. break
  2605. }
  2606. }
  2607. if msglen < 0 {
  2608. return ErrInvalidLengthBep
  2609. }
  2610. postIndex := iNdEx + msglen
  2611. if postIndex > l {
  2612. return io.ErrUnexpectedEOF
  2613. }
  2614. if err := m.Version.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2615. return err
  2616. }
  2617. iNdEx = postIndex
  2618. case 10:
  2619. if wireType != 0 {
  2620. return fmt.Errorf("proto: wrong wireType = %d for field LocalVersion", wireType)
  2621. }
  2622. m.LocalVersion = 0
  2623. for shift := uint(0); ; shift += 7 {
  2624. if shift >= 64 {
  2625. return ErrIntOverflowBep
  2626. }
  2627. if iNdEx >= l {
  2628. return io.ErrUnexpectedEOF
  2629. }
  2630. b := data[iNdEx]
  2631. iNdEx++
  2632. m.LocalVersion |= (int64(b) & 0x7F) << shift
  2633. if b < 0x80 {
  2634. break
  2635. }
  2636. }
  2637. case 16:
  2638. if wireType != 2 {
  2639. return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType)
  2640. }
  2641. var msglen int
  2642. for shift := uint(0); ; shift += 7 {
  2643. if shift >= 64 {
  2644. return ErrIntOverflowBep
  2645. }
  2646. if iNdEx >= l {
  2647. return io.ErrUnexpectedEOF
  2648. }
  2649. b := data[iNdEx]
  2650. iNdEx++
  2651. msglen |= (int(b) & 0x7F) << shift
  2652. if b < 0x80 {
  2653. break
  2654. }
  2655. }
  2656. if msglen < 0 {
  2657. return ErrInvalidLengthBep
  2658. }
  2659. postIndex := iNdEx + msglen
  2660. if postIndex > l {
  2661. return io.ErrUnexpectedEOF
  2662. }
  2663. m.Blocks = append(m.Blocks, BlockInfo{})
  2664. if err := m.Blocks[len(m.Blocks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2665. return err
  2666. }
  2667. iNdEx = postIndex
  2668. default:
  2669. iNdEx = preIndex
  2670. skippy, err := skipBep(data[iNdEx:])
  2671. if err != nil {
  2672. return err
  2673. }
  2674. if skippy < 0 {
  2675. return ErrInvalidLengthBep
  2676. }
  2677. if (iNdEx + skippy) > l {
  2678. return io.ErrUnexpectedEOF
  2679. }
  2680. iNdEx += skippy
  2681. }
  2682. }
  2683. if iNdEx > l {
  2684. return io.ErrUnexpectedEOF
  2685. }
  2686. return nil
  2687. }
  2688. func (m *BlockInfo) Unmarshal(data []byte) error {
  2689. l := len(data)
  2690. iNdEx := 0
  2691. for iNdEx < l {
  2692. preIndex := iNdEx
  2693. var wire uint64
  2694. for shift := uint(0); ; shift += 7 {
  2695. if shift >= 64 {
  2696. return ErrIntOverflowBep
  2697. }
  2698. if iNdEx >= l {
  2699. return io.ErrUnexpectedEOF
  2700. }
  2701. b := data[iNdEx]
  2702. iNdEx++
  2703. wire |= (uint64(b) & 0x7F) << shift
  2704. if b < 0x80 {
  2705. break
  2706. }
  2707. }
  2708. fieldNum := int32(wire >> 3)
  2709. wireType := int(wire & 0x7)
  2710. if wireType == 4 {
  2711. return fmt.Errorf("proto: BlockInfo: wiretype end group for non-group")
  2712. }
  2713. if fieldNum <= 0 {
  2714. return fmt.Errorf("proto: BlockInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  2715. }
  2716. switch fieldNum {
  2717. case 1:
  2718. if wireType != 0 {
  2719. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  2720. }
  2721. m.Offset = 0
  2722. for shift := uint(0); ; shift += 7 {
  2723. if shift >= 64 {
  2724. return ErrIntOverflowBep
  2725. }
  2726. if iNdEx >= l {
  2727. return io.ErrUnexpectedEOF
  2728. }
  2729. b := data[iNdEx]
  2730. iNdEx++
  2731. m.Offset |= (int64(b) & 0x7F) << shift
  2732. if b < 0x80 {
  2733. break
  2734. }
  2735. }
  2736. case 2:
  2737. if wireType != 0 {
  2738. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  2739. }
  2740. m.Size = 0
  2741. for shift := uint(0); ; shift += 7 {
  2742. if shift >= 64 {
  2743. return ErrIntOverflowBep
  2744. }
  2745. if iNdEx >= l {
  2746. return io.ErrUnexpectedEOF
  2747. }
  2748. b := data[iNdEx]
  2749. iNdEx++
  2750. m.Size |= (int32(b) & 0x7F) << shift
  2751. if b < 0x80 {
  2752. break
  2753. }
  2754. }
  2755. case 3:
  2756. if wireType != 2 {
  2757. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  2758. }
  2759. var byteLen int
  2760. for shift := uint(0); ; shift += 7 {
  2761. if shift >= 64 {
  2762. return ErrIntOverflowBep
  2763. }
  2764. if iNdEx >= l {
  2765. return io.ErrUnexpectedEOF
  2766. }
  2767. b := data[iNdEx]
  2768. iNdEx++
  2769. byteLen |= (int(b) & 0x7F) << shift
  2770. if b < 0x80 {
  2771. break
  2772. }
  2773. }
  2774. if byteLen < 0 {
  2775. return ErrInvalidLengthBep
  2776. }
  2777. postIndex := iNdEx + byteLen
  2778. if postIndex > l {
  2779. return io.ErrUnexpectedEOF
  2780. }
  2781. m.Hash = append(m.Hash[:0], data[iNdEx:postIndex]...)
  2782. if m.Hash == nil {
  2783. m.Hash = []byte{}
  2784. }
  2785. iNdEx = postIndex
  2786. default:
  2787. iNdEx = preIndex
  2788. skippy, err := skipBep(data[iNdEx:])
  2789. if err != nil {
  2790. return err
  2791. }
  2792. if skippy < 0 {
  2793. return ErrInvalidLengthBep
  2794. }
  2795. if (iNdEx + skippy) > l {
  2796. return io.ErrUnexpectedEOF
  2797. }
  2798. iNdEx += skippy
  2799. }
  2800. }
  2801. if iNdEx > l {
  2802. return io.ErrUnexpectedEOF
  2803. }
  2804. return nil
  2805. }
  2806. func (m *Vector) Unmarshal(data []byte) error {
  2807. l := len(data)
  2808. iNdEx := 0
  2809. for iNdEx < l {
  2810. preIndex := iNdEx
  2811. var wire uint64
  2812. for shift := uint(0); ; shift += 7 {
  2813. if shift >= 64 {
  2814. return ErrIntOverflowBep
  2815. }
  2816. if iNdEx >= l {
  2817. return io.ErrUnexpectedEOF
  2818. }
  2819. b := data[iNdEx]
  2820. iNdEx++
  2821. wire |= (uint64(b) & 0x7F) << shift
  2822. if b < 0x80 {
  2823. break
  2824. }
  2825. }
  2826. fieldNum := int32(wire >> 3)
  2827. wireType := int(wire & 0x7)
  2828. if wireType == 4 {
  2829. return fmt.Errorf("proto: Vector: wiretype end group for non-group")
  2830. }
  2831. if fieldNum <= 0 {
  2832. return fmt.Errorf("proto: Vector: illegal tag %d (wire type %d)", fieldNum, wire)
  2833. }
  2834. switch fieldNum {
  2835. case 1:
  2836. if wireType != 2 {
  2837. return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
  2838. }
  2839. var msglen int
  2840. for shift := uint(0); ; shift += 7 {
  2841. if shift >= 64 {
  2842. return ErrIntOverflowBep
  2843. }
  2844. if iNdEx >= l {
  2845. return io.ErrUnexpectedEOF
  2846. }
  2847. b := data[iNdEx]
  2848. iNdEx++
  2849. msglen |= (int(b) & 0x7F) << shift
  2850. if b < 0x80 {
  2851. break
  2852. }
  2853. }
  2854. if msglen < 0 {
  2855. return ErrInvalidLengthBep
  2856. }
  2857. postIndex := iNdEx + msglen
  2858. if postIndex > l {
  2859. return io.ErrUnexpectedEOF
  2860. }
  2861. m.Counters = append(m.Counters, Counter{})
  2862. if err := m.Counters[len(m.Counters)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2863. return err
  2864. }
  2865. iNdEx = postIndex
  2866. default:
  2867. iNdEx = preIndex
  2868. skippy, err := skipBep(data[iNdEx:])
  2869. if err != nil {
  2870. return err
  2871. }
  2872. if skippy < 0 {
  2873. return ErrInvalidLengthBep
  2874. }
  2875. if (iNdEx + skippy) > l {
  2876. return io.ErrUnexpectedEOF
  2877. }
  2878. iNdEx += skippy
  2879. }
  2880. }
  2881. if iNdEx > l {
  2882. return io.ErrUnexpectedEOF
  2883. }
  2884. return nil
  2885. }
  2886. func (m *Counter) Unmarshal(data []byte) error {
  2887. l := len(data)
  2888. iNdEx := 0
  2889. for iNdEx < l {
  2890. preIndex := iNdEx
  2891. var wire uint64
  2892. for shift := uint(0); ; shift += 7 {
  2893. if shift >= 64 {
  2894. return ErrIntOverflowBep
  2895. }
  2896. if iNdEx >= l {
  2897. return io.ErrUnexpectedEOF
  2898. }
  2899. b := data[iNdEx]
  2900. iNdEx++
  2901. wire |= (uint64(b) & 0x7F) << shift
  2902. if b < 0x80 {
  2903. break
  2904. }
  2905. }
  2906. fieldNum := int32(wire >> 3)
  2907. wireType := int(wire & 0x7)
  2908. if wireType == 4 {
  2909. return fmt.Errorf("proto: Counter: wiretype end group for non-group")
  2910. }
  2911. if fieldNum <= 0 {
  2912. return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire)
  2913. }
  2914. switch fieldNum {
  2915. case 1:
  2916. if wireType != 0 {
  2917. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2918. }
  2919. m.ID = 0
  2920. for shift := uint(0); ; shift += 7 {
  2921. if shift >= 64 {
  2922. return ErrIntOverflowBep
  2923. }
  2924. if iNdEx >= l {
  2925. return io.ErrUnexpectedEOF
  2926. }
  2927. b := data[iNdEx]
  2928. iNdEx++
  2929. m.ID |= (ShortID(b) & 0x7F) << shift
  2930. if b < 0x80 {
  2931. break
  2932. }
  2933. }
  2934. case 2:
  2935. if wireType != 0 {
  2936. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  2937. }
  2938. m.Value = 0
  2939. for shift := uint(0); ; shift += 7 {
  2940. if shift >= 64 {
  2941. return ErrIntOverflowBep
  2942. }
  2943. if iNdEx >= l {
  2944. return io.ErrUnexpectedEOF
  2945. }
  2946. b := data[iNdEx]
  2947. iNdEx++
  2948. m.Value |= (uint64(b) & 0x7F) << shift
  2949. if b < 0x80 {
  2950. break
  2951. }
  2952. }
  2953. default:
  2954. iNdEx = preIndex
  2955. skippy, err := skipBep(data[iNdEx:])
  2956. if err != nil {
  2957. return err
  2958. }
  2959. if skippy < 0 {
  2960. return ErrInvalidLengthBep
  2961. }
  2962. if (iNdEx + skippy) > l {
  2963. return io.ErrUnexpectedEOF
  2964. }
  2965. iNdEx += skippy
  2966. }
  2967. }
  2968. if iNdEx > l {
  2969. return io.ErrUnexpectedEOF
  2970. }
  2971. return nil
  2972. }
  2973. func (m *Request) Unmarshal(data []byte) error {
  2974. l := len(data)
  2975. iNdEx := 0
  2976. for iNdEx < l {
  2977. preIndex := iNdEx
  2978. var wire uint64
  2979. for shift := uint(0); ; shift += 7 {
  2980. if shift >= 64 {
  2981. return ErrIntOverflowBep
  2982. }
  2983. if iNdEx >= l {
  2984. return io.ErrUnexpectedEOF
  2985. }
  2986. b := data[iNdEx]
  2987. iNdEx++
  2988. wire |= (uint64(b) & 0x7F) << shift
  2989. if b < 0x80 {
  2990. break
  2991. }
  2992. }
  2993. fieldNum := int32(wire >> 3)
  2994. wireType := int(wire & 0x7)
  2995. if wireType == 4 {
  2996. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  2997. }
  2998. if fieldNum <= 0 {
  2999. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  3000. }
  3001. switch fieldNum {
  3002. case 1:
  3003. if wireType != 0 {
  3004. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3005. }
  3006. m.ID = 0
  3007. for shift := uint(0); ; shift += 7 {
  3008. if shift >= 64 {
  3009. return ErrIntOverflowBep
  3010. }
  3011. if iNdEx >= l {
  3012. return io.ErrUnexpectedEOF
  3013. }
  3014. b := data[iNdEx]
  3015. iNdEx++
  3016. m.ID |= (int32(b) & 0x7F) << shift
  3017. if b < 0x80 {
  3018. break
  3019. }
  3020. }
  3021. case 2:
  3022. if wireType != 2 {
  3023. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3024. }
  3025. var stringLen uint64
  3026. for shift := uint(0); ; shift += 7 {
  3027. if shift >= 64 {
  3028. return ErrIntOverflowBep
  3029. }
  3030. if iNdEx >= l {
  3031. return io.ErrUnexpectedEOF
  3032. }
  3033. b := data[iNdEx]
  3034. iNdEx++
  3035. stringLen |= (uint64(b) & 0x7F) << shift
  3036. if b < 0x80 {
  3037. break
  3038. }
  3039. }
  3040. intStringLen := int(stringLen)
  3041. if intStringLen < 0 {
  3042. return ErrInvalidLengthBep
  3043. }
  3044. postIndex := iNdEx + intStringLen
  3045. if postIndex > l {
  3046. return io.ErrUnexpectedEOF
  3047. }
  3048. m.Folder = string(data[iNdEx:postIndex])
  3049. iNdEx = postIndex
  3050. case 3:
  3051. if wireType != 2 {
  3052. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3053. }
  3054. var stringLen uint64
  3055. for shift := uint(0); ; shift += 7 {
  3056. if shift >= 64 {
  3057. return ErrIntOverflowBep
  3058. }
  3059. if iNdEx >= l {
  3060. return io.ErrUnexpectedEOF
  3061. }
  3062. b := data[iNdEx]
  3063. iNdEx++
  3064. stringLen |= (uint64(b) & 0x7F) << shift
  3065. if b < 0x80 {
  3066. break
  3067. }
  3068. }
  3069. intStringLen := int(stringLen)
  3070. if intStringLen < 0 {
  3071. return ErrInvalidLengthBep
  3072. }
  3073. postIndex := iNdEx + intStringLen
  3074. if postIndex > l {
  3075. return io.ErrUnexpectedEOF
  3076. }
  3077. m.Name = string(data[iNdEx:postIndex])
  3078. iNdEx = postIndex
  3079. case 4:
  3080. if wireType != 0 {
  3081. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  3082. }
  3083. m.Offset = 0
  3084. for shift := uint(0); ; shift += 7 {
  3085. if shift >= 64 {
  3086. return ErrIntOverflowBep
  3087. }
  3088. if iNdEx >= l {
  3089. return io.ErrUnexpectedEOF
  3090. }
  3091. b := data[iNdEx]
  3092. iNdEx++
  3093. m.Offset |= (int64(b) & 0x7F) << shift
  3094. if b < 0x80 {
  3095. break
  3096. }
  3097. }
  3098. case 5:
  3099. if wireType != 0 {
  3100. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  3101. }
  3102. m.Size = 0
  3103. for shift := uint(0); ; shift += 7 {
  3104. if shift >= 64 {
  3105. return ErrIntOverflowBep
  3106. }
  3107. if iNdEx >= l {
  3108. return io.ErrUnexpectedEOF
  3109. }
  3110. b := data[iNdEx]
  3111. iNdEx++
  3112. m.Size |= (int32(b) & 0x7F) << shift
  3113. if b < 0x80 {
  3114. break
  3115. }
  3116. }
  3117. case 6:
  3118. if wireType != 2 {
  3119. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  3120. }
  3121. var byteLen int
  3122. for shift := uint(0); ; shift += 7 {
  3123. if shift >= 64 {
  3124. return ErrIntOverflowBep
  3125. }
  3126. if iNdEx >= l {
  3127. return io.ErrUnexpectedEOF
  3128. }
  3129. b := data[iNdEx]
  3130. iNdEx++
  3131. byteLen |= (int(b) & 0x7F) << shift
  3132. if b < 0x80 {
  3133. break
  3134. }
  3135. }
  3136. if byteLen < 0 {
  3137. return ErrInvalidLengthBep
  3138. }
  3139. postIndex := iNdEx + byteLen
  3140. if postIndex > l {
  3141. return io.ErrUnexpectedEOF
  3142. }
  3143. m.Hash = append(m.Hash[:0], data[iNdEx:postIndex]...)
  3144. if m.Hash == nil {
  3145. m.Hash = []byte{}
  3146. }
  3147. iNdEx = postIndex
  3148. case 7:
  3149. if wireType != 0 {
  3150. return fmt.Errorf("proto: wrong wireType = %d for field FromTemporary", wireType)
  3151. }
  3152. var v int
  3153. for shift := uint(0); ; shift += 7 {
  3154. if shift >= 64 {
  3155. return ErrIntOverflowBep
  3156. }
  3157. if iNdEx >= l {
  3158. return io.ErrUnexpectedEOF
  3159. }
  3160. b := data[iNdEx]
  3161. iNdEx++
  3162. v |= (int(b) & 0x7F) << shift
  3163. if b < 0x80 {
  3164. break
  3165. }
  3166. }
  3167. m.FromTemporary = bool(v != 0)
  3168. default:
  3169. iNdEx = preIndex
  3170. skippy, err := skipBep(data[iNdEx:])
  3171. if err != nil {
  3172. return err
  3173. }
  3174. if skippy < 0 {
  3175. return ErrInvalidLengthBep
  3176. }
  3177. if (iNdEx + skippy) > l {
  3178. return io.ErrUnexpectedEOF
  3179. }
  3180. iNdEx += skippy
  3181. }
  3182. }
  3183. if iNdEx > l {
  3184. return io.ErrUnexpectedEOF
  3185. }
  3186. return nil
  3187. }
  3188. func (m *Response) Unmarshal(data []byte) error {
  3189. l := len(data)
  3190. iNdEx := 0
  3191. for iNdEx < l {
  3192. preIndex := iNdEx
  3193. var wire uint64
  3194. for shift := uint(0); ; shift += 7 {
  3195. if shift >= 64 {
  3196. return ErrIntOverflowBep
  3197. }
  3198. if iNdEx >= l {
  3199. return io.ErrUnexpectedEOF
  3200. }
  3201. b := data[iNdEx]
  3202. iNdEx++
  3203. wire |= (uint64(b) & 0x7F) << shift
  3204. if b < 0x80 {
  3205. break
  3206. }
  3207. }
  3208. fieldNum := int32(wire >> 3)
  3209. wireType := int(wire & 0x7)
  3210. if wireType == 4 {
  3211. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  3212. }
  3213. if fieldNum <= 0 {
  3214. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  3215. }
  3216. switch fieldNum {
  3217. case 1:
  3218. if wireType != 0 {
  3219. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3220. }
  3221. m.ID = 0
  3222. for shift := uint(0); ; shift += 7 {
  3223. if shift >= 64 {
  3224. return ErrIntOverflowBep
  3225. }
  3226. if iNdEx >= l {
  3227. return io.ErrUnexpectedEOF
  3228. }
  3229. b := data[iNdEx]
  3230. iNdEx++
  3231. m.ID |= (int32(b) & 0x7F) << shift
  3232. if b < 0x80 {
  3233. break
  3234. }
  3235. }
  3236. case 2:
  3237. if wireType != 2 {
  3238. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  3239. }
  3240. var byteLen int
  3241. for shift := uint(0); ; shift += 7 {
  3242. if shift >= 64 {
  3243. return ErrIntOverflowBep
  3244. }
  3245. if iNdEx >= l {
  3246. return io.ErrUnexpectedEOF
  3247. }
  3248. b := data[iNdEx]
  3249. iNdEx++
  3250. byteLen |= (int(b) & 0x7F) << shift
  3251. if b < 0x80 {
  3252. break
  3253. }
  3254. }
  3255. if byteLen < 0 {
  3256. return ErrInvalidLengthBep
  3257. }
  3258. postIndex := iNdEx + byteLen
  3259. if postIndex > l {
  3260. return io.ErrUnexpectedEOF
  3261. }
  3262. m.Data = append(m.Data[:0], data[iNdEx:postIndex]...)
  3263. if m.Data == nil {
  3264. m.Data = []byte{}
  3265. }
  3266. iNdEx = postIndex
  3267. case 3:
  3268. if wireType != 0 {
  3269. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  3270. }
  3271. m.Code = 0
  3272. for shift := uint(0); ; shift += 7 {
  3273. if shift >= 64 {
  3274. return ErrIntOverflowBep
  3275. }
  3276. if iNdEx >= l {
  3277. return io.ErrUnexpectedEOF
  3278. }
  3279. b := data[iNdEx]
  3280. iNdEx++
  3281. m.Code |= (ErrorCode(b) & 0x7F) << shift
  3282. if b < 0x80 {
  3283. break
  3284. }
  3285. }
  3286. default:
  3287. iNdEx = preIndex
  3288. skippy, err := skipBep(data[iNdEx:])
  3289. if err != nil {
  3290. return err
  3291. }
  3292. if skippy < 0 {
  3293. return ErrInvalidLengthBep
  3294. }
  3295. if (iNdEx + skippy) > l {
  3296. return io.ErrUnexpectedEOF
  3297. }
  3298. iNdEx += skippy
  3299. }
  3300. }
  3301. if iNdEx > l {
  3302. return io.ErrUnexpectedEOF
  3303. }
  3304. return nil
  3305. }
  3306. func (m *DownloadProgress) Unmarshal(data []byte) error {
  3307. l := len(data)
  3308. iNdEx := 0
  3309. for iNdEx < l {
  3310. preIndex := iNdEx
  3311. var wire uint64
  3312. for shift := uint(0); ; shift += 7 {
  3313. if shift >= 64 {
  3314. return ErrIntOverflowBep
  3315. }
  3316. if iNdEx >= l {
  3317. return io.ErrUnexpectedEOF
  3318. }
  3319. b := data[iNdEx]
  3320. iNdEx++
  3321. wire |= (uint64(b) & 0x7F) << shift
  3322. if b < 0x80 {
  3323. break
  3324. }
  3325. }
  3326. fieldNum := int32(wire >> 3)
  3327. wireType := int(wire & 0x7)
  3328. if wireType == 4 {
  3329. return fmt.Errorf("proto: DownloadProgress: wiretype end group for non-group")
  3330. }
  3331. if fieldNum <= 0 {
  3332. return fmt.Errorf("proto: DownloadProgress: illegal tag %d (wire type %d)", fieldNum, wire)
  3333. }
  3334. switch fieldNum {
  3335. case 1:
  3336. if wireType != 2 {
  3337. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3338. }
  3339. var stringLen uint64
  3340. for shift := uint(0); ; shift += 7 {
  3341. if shift >= 64 {
  3342. return ErrIntOverflowBep
  3343. }
  3344. if iNdEx >= l {
  3345. return io.ErrUnexpectedEOF
  3346. }
  3347. b := data[iNdEx]
  3348. iNdEx++
  3349. stringLen |= (uint64(b) & 0x7F) << shift
  3350. if b < 0x80 {
  3351. break
  3352. }
  3353. }
  3354. intStringLen := int(stringLen)
  3355. if intStringLen < 0 {
  3356. return ErrInvalidLengthBep
  3357. }
  3358. postIndex := iNdEx + intStringLen
  3359. if postIndex > l {
  3360. return io.ErrUnexpectedEOF
  3361. }
  3362. m.Folder = string(data[iNdEx:postIndex])
  3363. iNdEx = postIndex
  3364. case 2:
  3365. if wireType != 2 {
  3366. return fmt.Errorf("proto: wrong wireType = %d for field Updates", wireType)
  3367. }
  3368. var msglen int
  3369. for shift := uint(0); ; shift += 7 {
  3370. if shift >= 64 {
  3371. return ErrIntOverflowBep
  3372. }
  3373. if iNdEx >= l {
  3374. return io.ErrUnexpectedEOF
  3375. }
  3376. b := data[iNdEx]
  3377. iNdEx++
  3378. msglen |= (int(b) & 0x7F) << shift
  3379. if b < 0x80 {
  3380. break
  3381. }
  3382. }
  3383. if msglen < 0 {
  3384. return ErrInvalidLengthBep
  3385. }
  3386. postIndex := iNdEx + msglen
  3387. if postIndex > l {
  3388. return io.ErrUnexpectedEOF
  3389. }
  3390. m.Updates = append(m.Updates, FileDownloadProgressUpdate{})
  3391. if err := m.Updates[len(m.Updates)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  3392. return err
  3393. }
  3394. iNdEx = postIndex
  3395. default:
  3396. iNdEx = preIndex
  3397. skippy, err := skipBep(data[iNdEx:])
  3398. if err != nil {
  3399. return err
  3400. }
  3401. if skippy < 0 {
  3402. return ErrInvalidLengthBep
  3403. }
  3404. if (iNdEx + skippy) > l {
  3405. return io.ErrUnexpectedEOF
  3406. }
  3407. iNdEx += skippy
  3408. }
  3409. }
  3410. if iNdEx > l {
  3411. return io.ErrUnexpectedEOF
  3412. }
  3413. return nil
  3414. }
  3415. func (m *FileDownloadProgressUpdate) Unmarshal(data []byte) error {
  3416. l := len(data)
  3417. iNdEx := 0
  3418. for iNdEx < l {
  3419. preIndex := iNdEx
  3420. var wire uint64
  3421. for shift := uint(0); ; shift += 7 {
  3422. if shift >= 64 {
  3423. return ErrIntOverflowBep
  3424. }
  3425. if iNdEx >= l {
  3426. return io.ErrUnexpectedEOF
  3427. }
  3428. b := data[iNdEx]
  3429. iNdEx++
  3430. wire |= (uint64(b) & 0x7F) << shift
  3431. if b < 0x80 {
  3432. break
  3433. }
  3434. }
  3435. fieldNum := int32(wire >> 3)
  3436. wireType := int(wire & 0x7)
  3437. if wireType == 4 {
  3438. return fmt.Errorf("proto: FileDownloadProgressUpdate: wiretype end group for non-group")
  3439. }
  3440. if fieldNum <= 0 {
  3441. return fmt.Errorf("proto: FileDownloadProgressUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  3442. }
  3443. switch fieldNum {
  3444. case 1:
  3445. if wireType != 0 {
  3446. return fmt.Errorf("proto: wrong wireType = %d for field UpdateType", wireType)
  3447. }
  3448. m.UpdateType = 0
  3449. for shift := uint(0); ; shift += 7 {
  3450. if shift >= 64 {
  3451. return ErrIntOverflowBep
  3452. }
  3453. if iNdEx >= l {
  3454. return io.ErrUnexpectedEOF
  3455. }
  3456. b := data[iNdEx]
  3457. iNdEx++
  3458. m.UpdateType |= (FileDownloadProgressUpdateType(b) & 0x7F) << shift
  3459. if b < 0x80 {
  3460. break
  3461. }
  3462. }
  3463. case 2:
  3464. if wireType != 2 {
  3465. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3466. }
  3467. var stringLen uint64
  3468. for shift := uint(0); ; shift += 7 {
  3469. if shift >= 64 {
  3470. return ErrIntOverflowBep
  3471. }
  3472. if iNdEx >= l {
  3473. return io.ErrUnexpectedEOF
  3474. }
  3475. b := data[iNdEx]
  3476. iNdEx++
  3477. stringLen |= (uint64(b) & 0x7F) << shift
  3478. if b < 0x80 {
  3479. break
  3480. }
  3481. }
  3482. intStringLen := int(stringLen)
  3483. if intStringLen < 0 {
  3484. return ErrInvalidLengthBep
  3485. }
  3486. postIndex := iNdEx + intStringLen
  3487. if postIndex > l {
  3488. return io.ErrUnexpectedEOF
  3489. }
  3490. m.Name = string(data[iNdEx:postIndex])
  3491. iNdEx = postIndex
  3492. case 3:
  3493. if wireType != 2 {
  3494. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  3495. }
  3496. var msglen int
  3497. for shift := uint(0); ; shift += 7 {
  3498. if shift >= 64 {
  3499. return ErrIntOverflowBep
  3500. }
  3501. if iNdEx >= l {
  3502. return io.ErrUnexpectedEOF
  3503. }
  3504. b := data[iNdEx]
  3505. iNdEx++
  3506. msglen |= (int(b) & 0x7F) << shift
  3507. if b < 0x80 {
  3508. break
  3509. }
  3510. }
  3511. if msglen < 0 {
  3512. return ErrInvalidLengthBep
  3513. }
  3514. postIndex := iNdEx + msglen
  3515. if postIndex > l {
  3516. return io.ErrUnexpectedEOF
  3517. }
  3518. if err := m.Version.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3519. return err
  3520. }
  3521. iNdEx = postIndex
  3522. case 4:
  3523. if wireType != 0 {
  3524. return fmt.Errorf("proto: wrong wireType = %d for field BlockIndexes", wireType)
  3525. }
  3526. var v int32
  3527. for shift := uint(0); ; shift += 7 {
  3528. if shift >= 64 {
  3529. return ErrIntOverflowBep
  3530. }
  3531. if iNdEx >= l {
  3532. return io.ErrUnexpectedEOF
  3533. }
  3534. b := data[iNdEx]
  3535. iNdEx++
  3536. v |= (int32(b) & 0x7F) << shift
  3537. if b < 0x80 {
  3538. break
  3539. }
  3540. }
  3541. m.BlockIndexes = append(m.BlockIndexes, v)
  3542. default:
  3543. iNdEx = preIndex
  3544. skippy, err := skipBep(data[iNdEx:])
  3545. if err != nil {
  3546. return err
  3547. }
  3548. if skippy < 0 {
  3549. return ErrInvalidLengthBep
  3550. }
  3551. if (iNdEx + skippy) > l {
  3552. return io.ErrUnexpectedEOF
  3553. }
  3554. iNdEx += skippy
  3555. }
  3556. }
  3557. if iNdEx > l {
  3558. return io.ErrUnexpectedEOF
  3559. }
  3560. return nil
  3561. }
  3562. func (m *Ping) Unmarshal(data []byte) error {
  3563. l := len(data)
  3564. iNdEx := 0
  3565. for iNdEx < l {
  3566. preIndex := iNdEx
  3567. var wire uint64
  3568. for shift := uint(0); ; shift += 7 {
  3569. if shift >= 64 {
  3570. return ErrIntOverflowBep
  3571. }
  3572. if iNdEx >= l {
  3573. return io.ErrUnexpectedEOF
  3574. }
  3575. b := data[iNdEx]
  3576. iNdEx++
  3577. wire |= (uint64(b) & 0x7F) << shift
  3578. if b < 0x80 {
  3579. break
  3580. }
  3581. }
  3582. fieldNum := int32(wire >> 3)
  3583. wireType := int(wire & 0x7)
  3584. if wireType == 4 {
  3585. return fmt.Errorf("proto: Ping: wiretype end group for non-group")
  3586. }
  3587. if fieldNum <= 0 {
  3588. return fmt.Errorf("proto: Ping: illegal tag %d (wire type %d)", fieldNum, wire)
  3589. }
  3590. switch fieldNum {
  3591. default:
  3592. iNdEx = preIndex
  3593. skippy, err := skipBep(data[iNdEx:])
  3594. if err != nil {
  3595. return err
  3596. }
  3597. if skippy < 0 {
  3598. return ErrInvalidLengthBep
  3599. }
  3600. if (iNdEx + skippy) > l {
  3601. return io.ErrUnexpectedEOF
  3602. }
  3603. iNdEx += skippy
  3604. }
  3605. }
  3606. if iNdEx > l {
  3607. return io.ErrUnexpectedEOF
  3608. }
  3609. return nil
  3610. }
  3611. func (m *Close) Unmarshal(data []byte) error {
  3612. l := len(data)
  3613. iNdEx := 0
  3614. for iNdEx < l {
  3615. preIndex := iNdEx
  3616. var wire uint64
  3617. for shift := uint(0); ; shift += 7 {
  3618. if shift >= 64 {
  3619. return ErrIntOverflowBep
  3620. }
  3621. if iNdEx >= l {
  3622. return io.ErrUnexpectedEOF
  3623. }
  3624. b := data[iNdEx]
  3625. iNdEx++
  3626. wire |= (uint64(b) & 0x7F) << shift
  3627. if b < 0x80 {
  3628. break
  3629. }
  3630. }
  3631. fieldNum := int32(wire >> 3)
  3632. wireType := int(wire & 0x7)
  3633. if wireType == 4 {
  3634. return fmt.Errorf("proto: Close: wiretype end group for non-group")
  3635. }
  3636. if fieldNum <= 0 {
  3637. return fmt.Errorf("proto: Close: illegal tag %d (wire type %d)", fieldNum, wire)
  3638. }
  3639. switch fieldNum {
  3640. case 1:
  3641. if wireType != 2 {
  3642. return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
  3643. }
  3644. var stringLen uint64
  3645. for shift := uint(0); ; shift += 7 {
  3646. if shift >= 64 {
  3647. return ErrIntOverflowBep
  3648. }
  3649. if iNdEx >= l {
  3650. return io.ErrUnexpectedEOF
  3651. }
  3652. b := data[iNdEx]
  3653. iNdEx++
  3654. stringLen |= (uint64(b) & 0x7F) << shift
  3655. if b < 0x80 {
  3656. break
  3657. }
  3658. }
  3659. intStringLen := int(stringLen)
  3660. if intStringLen < 0 {
  3661. return ErrInvalidLengthBep
  3662. }
  3663. postIndex := iNdEx + intStringLen
  3664. if postIndex > l {
  3665. return io.ErrUnexpectedEOF
  3666. }
  3667. m.Reason = string(data[iNdEx:postIndex])
  3668. iNdEx = postIndex
  3669. default:
  3670. iNdEx = preIndex
  3671. skippy, err := skipBep(data[iNdEx:])
  3672. if err != nil {
  3673. return err
  3674. }
  3675. if skippy < 0 {
  3676. return ErrInvalidLengthBep
  3677. }
  3678. if (iNdEx + skippy) > l {
  3679. return io.ErrUnexpectedEOF
  3680. }
  3681. iNdEx += skippy
  3682. }
  3683. }
  3684. if iNdEx > l {
  3685. return io.ErrUnexpectedEOF
  3686. }
  3687. return nil
  3688. }
  3689. func skipBep(data []byte) (n int, err error) {
  3690. l := len(data)
  3691. iNdEx := 0
  3692. for iNdEx < l {
  3693. var wire uint64
  3694. for shift := uint(0); ; shift += 7 {
  3695. if shift >= 64 {
  3696. return 0, ErrIntOverflowBep
  3697. }
  3698. if iNdEx >= l {
  3699. return 0, io.ErrUnexpectedEOF
  3700. }
  3701. b := data[iNdEx]
  3702. iNdEx++
  3703. wire |= (uint64(b) & 0x7F) << shift
  3704. if b < 0x80 {
  3705. break
  3706. }
  3707. }
  3708. wireType := int(wire & 0x7)
  3709. switch wireType {
  3710. case 0:
  3711. for shift := uint(0); ; shift += 7 {
  3712. if shift >= 64 {
  3713. return 0, ErrIntOverflowBep
  3714. }
  3715. if iNdEx >= l {
  3716. return 0, io.ErrUnexpectedEOF
  3717. }
  3718. iNdEx++
  3719. if data[iNdEx-1] < 0x80 {
  3720. break
  3721. }
  3722. }
  3723. return iNdEx, nil
  3724. case 1:
  3725. iNdEx += 8
  3726. return iNdEx, nil
  3727. case 2:
  3728. var length int
  3729. for shift := uint(0); ; shift += 7 {
  3730. if shift >= 64 {
  3731. return 0, ErrIntOverflowBep
  3732. }
  3733. if iNdEx >= l {
  3734. return 0, io.ErrUnexpectedEOF
  3735. }
  3736. b := data[iNdEx]
  3737. iNdEx++
  3738. length |= (int(b) & 0x7F) << shift
  3739. if b < 0x80 {
  3740. break
  3741. }
  3742. }
  3743. iNdEx += length
  3744. if length < 0 {
  3745. return 0, ErrInvalidLengthBep
  3746. }
  3747. return iNdEx, nil
  3748. case 3:
  3749. for {
  3750. var innerWire uint64
  3751. var start int = iNdEx
  3752. for shift := uint(0); ; shift += 7 {
  3753. if shift >= 64 {
  3754. return 0, ErrIntOverflowBep
  3755. }
  3756. if iNdEx >= l {
  3757. return 0, io.ErrUnexpectedEOF
  3758. }
  3759. b := data[iNdEx]
  3760. iNdEx++
  3761. innerWire |= (uint64(b) & 0x7F) << shift
  3762. if b < 0x80 {
  3763. break
  3764. }
  3765. }
  3766. innerWireType := int(innerWire & 0x7)
  3767. if innerWireType == 4 {
  3768. break
  3769. }
  3770. next, err := skipBep(data[start:])
  3771. if err != nil {
  3772. return 0, err
  3773. }
  3774. iNdEx = start + next
  3775. }
  3776. return iNdEx, nil
  3777. case 4:
  3778. return iNdEx, nil
  3779. case 5:
  3780. iNdEx += 4
  3781. return iNdEx, nil
  3782. default:
  3783. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  3784. }
  3785. }
  3786. panic("unreachable")
  3787. }
  3788. var (
  3789. ErrInvalidLengthBep = fmt.Errorf("proto: negative length found during unmarshaling")
  3790. ErrIntOverflowBep = fmt.Errorf("proto: integer overflow")
  3791. )
  3792. var fileDescriptorBep = []byte{
  3793. // 1569 bytes of a gzipped FileDescriptorProto
  3794. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
  3795. 0x14, 0x8f, 0xed, 0xf5, 0xbf, 0x89, 0x93, 0x3a, 0xd3, 0x34, 0x35, 0xdb, 0x90, 0x84, 0x6d, 0x2b,
  3796. 0x82, 0x45, 0x53, 0x68, 0x81, 0x4a, 0x48, 0x20, 0x39, 0xf6, 0x26, 0xb5, 0xea, 0xac, 0xdd, 0xb5,
  3797. 0x9d, 0x52, 0x0e, 0x58, 0x6b, 0xef, 0xd8, 0x59, 0x75, 0xbd, 0x63, 0x76, 0xd7, 0x6d, 0xc3, 0x17,
  3798. 0x40, 0x82, 0x2f, 0xc0, 0x05, 0xa9, 0x57, 0xc4, 0x95, 0x0f, 0xd1, 0x63, 0xd5, 0x23, 0x87, 0x0a,
  3799. 0xc2, 0x85, 0x2f, 0xc0, 0x9d, 0x37, 0x33, 0xbb, 0xde, 0x75, 0xfe, 0xa0, 0x1e, 0x38, 0x58, 0x9e,
  3800. 0x79, 0xef, 0x37, 0x6f, 0x66, 0x7e, 0xef, 0xf7, 0xde, 0x2c, 0xca, 0xf7, 0xc9, 0x64, 0x67, 0xe2,
  3801. 0x52, 0x9f, 0xe2, 0x1c, 0xff, 0x1b, 0x50, 0x5b, 0xbe, 0x35, 0xb2, 0xfc, 0xa3, 0x69, 0x7f, 0x67,
  3802. 0x40, 0xc7, 0xb7, 0x47, 0x74, 0x44, 0x6f, 0x73, 0x4f, 0x7f, 0x3a, 0xe4, 0x33, 0x3e, 0xe1, 0x23,
  3803. 0xb1, 0x50, 0x99, 0xa0, 0xf4, 0x7d, 0x62, 0xdb, 0x14, 0x6f, 0xa2, 0x45, 0x93, 0x3c, 0xb5, 0x06,
  3804. 0xa4, 0xe7, 0x18, 0x63, 0x52, 0x4a, 0x6c, 0x25, 0xb6, 0xf3, 0x3a, 0x12, 0x26, 0x0d, 0x2c, 0x0c,
  3805. 0x30, 0xb0, 0x2d, 0xe2, 0xf8, 0x02, 0x90, 0x14, 0x00, 0x61, 0xe2, 0x80, 0x9b, 0x68, 0x39, 0x00,
  3806. 0x3c, 0x25, 0xae, 0x67, 0x51, 0xa7, 0x94, 0xe2, 0x98, 0x25, 0x61, 0x3d, 0x14, 0x46, 0xc5, 0x43,
  3807. 0x99, 0xfb, 0xc4, 0x30, 0x89, 0x8b, 0x3f, 0x40, 0x92, 0x7f, 0x3c, 0x11, 0x7b, 0x2d, 0xdf, 0xb9,
  3808. 0xb2, 0x13, 0xde, 0x61, 0xe7, 0x80, 0x78, 0x9e, 0x31, 0x22, 0x1d, 0x70, 0xea, 0x1c, 0x82, 0xbf,
  3809. 0x84, 0xcd, 0xe9, 0x78, 0xe2, 0x82, 0x83, 0x05, 0x4e, 0xf2, 0x15, 0xeb, 0x67, 0x56, 0x54, 0x23,
  3810. 0x8c, 0x1e, 0x5f, 0xa0, 0x54, 0xd0, 0x52, 0xd5, 0x9e, 0x7a, 0x3e, 0x71, 0xab, 0xd4, 0x19, 0x5a,
  3811. 0x23, 0xfc, 0x11, 0xca, 0x0e, 0xa9, 0x0d, 0xa7, 0xf0, 0x60, 0xfb, 0xd4, 0xf6, 0xe2, 0x9d, 0x62,
  3812. 0x14, 0x6c, 0x8f, 0x3b, 0x76, 0xa5, 0x97, 0x6f, 0x36, 0x17, 0xf4, 0x10, 0xa6, 0xfc, 0x98, 0x44,
  3813. 0x19, 0xe1, 0xc1, 0x6b, 0x28, 0x69, 0x99, 0x82, 0xa2, 0xdd, 0xcc, 0xc9, 0x9b, 0xcd, 0x64, 0xbd,
  3814. 0xa6, 0x83, 0x05, 0xaf, 0xa2, 0xb4, 0x6d, 0xf4, 0x89, 0x1d, 0x90, 0x23, 0x26, 0xf8, 0x1a, 0xca,
  3815. 0xbb, 0x70, 0xe1, 0x1e, 0x75, 0xec, 0x63, 0x4e, 0x49, 0x4e, 0xcf, 0x31, 0x43, 0x13, 0xe6, 0xf8,
  3816. 0x16, 0xc2, 0xd6, 0xc8, 0xa1, 0x2e, 0xe9, 0x4d, 0x88, 0x3b, 0xb6, 0xf8, 0x69, 0xbd, 0x92, 0xc4,
  3817. 0x51, 0x2b, 0xc2, 0xd3, 0x8a, 0x1c, 0xf8, 0x3a, 0x5a, 0x0a, 0xe0, 0x26, 0xb1, 0x89, 0x4f, 0x4a,
  3818. 0x69, 0x8e, 0x2c, 0x08, 0x63, 0x8d, 0xdb, 0xe0, 0x6e, 0xab, 0xa6, 0xe5, 0x19, 0x7d, 0x9b, 0xf4,
  3819. 0x7c, 0x32, 0x9e, 0xf4, 0x2c, 0xc7, 0x24, 0xcf, 0x89, 0x57, 0xca, 0x70, 0x2c, 0x0e, 0x7c, 0x1d,
  3820. 0x70, 0xd5, 0x85, 0x87, 0xb1, 0x21, 0x32, 0xed, 0x95, 0x8a, 0xa7, 0xd9, 0xa8, 0x71, 0x47, 0xc8,
  3821. 0x46, 0x00, 0x53, 0x7e, 0x05, 0x36, 0x84, 0x27, 0xc6, 0x46, 0x61, 0x8e, 0x0d, 0x8c, 0xa4, 0x98,
  3822. 0x52, 0xf8, 0x18, 0xaf, 0xa3, 0xbc, 0x61, 0x9a, 0x2c, 0x2b, 0xb0, 0x55, 0x0a, 0xb6, 0xca, 0xeb,
  3823. 0x91, 0x01, 0xdf, 0x9b, 0xcf, 0xb2, 0x74, 0x5a, 0x17, 0x17, 0xa5, 0x97, 0x51, 0x3c, 0x20, 0x6e,
  3824. 0xa0, 0xcc, 0x34, 0xdf, 0x2f, 0xc7, 0x0c, 0x5c, 0x97, 0x65, 0xb4, 0x32, 0x36, 0x9e, 0xf7, 0x6c,
  3825. 0x3a, 0x30, 0xec, 0x99, 0x34, 0x19, 0x17, 0x29, 0xfd, 0x12, 0x38, 0x1a, 0xcc, 0x1e, 0x88, 0x13,
  3826. 0x6f, 0x20, 0x64, 0x39, 0xbe, 0x4b, 0xcd, 0x29, 0x2c, 0x2f, 0x65, 0x39, 0x61, 0x31, 0x0b, 0xfe,
  3827. 0x14, 0xe5, 0x38, 0x9b, 0x3d, 0xb8, 0x71, 0x0e, 0xbc, 0xd2, 0xae, 0xcc, 0x78, 0xf9, 0xfd, 0xcd,
  3828. 0x66, 0x96, 0x73, 0x59, 0xaf, 0x9d, 0x44, 0x43, 0x3d, 0xcb, 0xb1, 0x75, 0x53, 0x69, 0xa2, 0x34,
  3829. 0xb7, 0x01, 0x57, 0x19, 0xa1, 0xa7, 0xa0, 0xc0, 0x82, 0x19, 0xde, 0x41, 0xe9, 0xa1, 0x65, 0x03,
  3830. 0x27, 0x49, 0x4e, 0x3f, 0x8e, 0x89, 0x11, 0xcc, 0x75, 0x67, 0x48, 0x83, 0x04, 0x08, 0x98, 0xd2,
  3831. 0x45, 0x8b, 0x3c, 0x60, 0x77, 0x62, 0x1a, 0x3e, 0xf9, 0xdf, 0xc2, 0x7e, 0x9f, 0x42, 0xb9, 0xd0,
  3832. 0x33, 0xcb, 0x5f, 0x22, 0x96, 0xbf, 0x72, 0x50, 0xb2, 0xa2, 0x00, 0xd7, 0xce, 0xc6, 0x8b, 0xd5,
  3833. 0x2c, 0xac, 0xf7, 0xac, 0xef, 0x08, 0x97, 0x7c, 0x4a, 0xe7, 0x63, 0xbc, 0x85, 0x16, 0x4f, 0xeb,
  3834. 0x7c, 0x49, 0x8f, 0x9b, 0xb0, 0x8c, 0x72, 0x63, 0x6a, 0x5a, 0x43, 0x8b, 0x98, 0x3c, 0x93, 0x29,
  3835. 0x7d, 0x36, 0xc7, 0x25, 0x26, 0x53, 0x26, 0x71, 0x33, 0xd0, 0x72, 0x38, 0x65, 0x1e, 0xcb, 0x79,
  3836. 0x6a, 0xd8, 0x90, 0x16, 0x91, 0xb4, 0x70, 0xca, 0xba, 0x92, 0x43, 0xe7, 0x8a, 0x2b, 0xc7, 0x01,
  3837. 0x4b, 0x0e, 0x8d, 0x17, 0x16, 0x54, 0x40, 0x28, 0x8d, 0x3c, 0xf8, 0xe7, 0x2a, 0xe0, 0x90, 0x0c,
  3838. 0x7c, 0x3a, 0xeb, 0x07, 0x01, 0x8c, 0x95, 0xe2, 0xbc, 0xa4, 0x10, 0x3f, 0x6d, 0xc1, 0x8e, 0xeb,
  3839. 0xe9, 0x63, 0x94, 0xd9, 0x05, 0xc3, 0x93, 0xb0, 0xae, 0x2e, 0x47, 0x51, 0xb9, 0x3d, 0x96, 0x82,
  3840. 0x4c, 0x9f, 0x03, 0x3f, 0x97, 0x7e, 0x7a, 0xb1, 0xb9, 0xa0, 0x3c, 0x44, 0xf9, 0x19, 0x80, 0xa5,
  3841. 0x97, 0x0e, 0x87, 0x1e, 0xf1, 0x79, 0x2e, 0x52, 0x7a, 0x30, 0x9b, 0x31, 0xcc, 0xb2, 0x91, 0x0e,
  3842. 0x18, 0x06, 0xdb, 0x91, 0xe1, 0x1d, 0x71, 0xd6, 0x0b, 0x3a, 0x1f, 0x07, 0x21, 0xbf, 0x40, 0x19,
  3843. 0x71, 0x13, 0x7c, 0x17, 0xe5, 0x06, 0x74, 0xea, 0xf8, 0x51, 0xf7, 0x5b, 0x89, 0x17, 0x19, 0xf7,
  3844. 0x04, 0xa7, 0x9a, 0x01, 0x95, 0x3d, 0x94, 0x0d, 0x5c, 0xc0, 0x69, 0x58, 0xf1, 0xd2, 0xee, 0x95,
  3845. 0x50, 0xff, 0xed, 0x23, 0xea, 0xfa, 0x5c, 0xff, 0xb1, 0x76, 0x08, 0x39, 0x98, 0x8a, 0xf3, 0x49,
  3846. 0xba, 0x98, 0x28, 0xbf, 0x25, 0x50, 0x56, 0x27, 0xdf, 0x4e, 0x89, 0xe7, 0xc7, 0x5a, 0x47, 0x7a,
  3847. 0xae, 0x75, 0x44, 0x7a, 0x4e, 0xce, 0xe9, 0x39, 0x94, 0x64, 0x2a, 0x26, 0xc9, 0x88, 0x1c, 0xe9,
  3848. 0x5c, 0x72, 0xd2, 0xe7, 0x90, 0x93, 0x89, 0xc8, 0x61, 0x02, 0x19, 0xba, 0x74, 0xcc, 0x5b, 0x25,
  3849. 0x75, 0x0d, 0xf7, 0x38, 0x50, 0xd0, 0x12, 0xb3, 0x76, 0x42, 0xa3, 0xd2, 0x43, 0x39, 0x9d, 0x78,
  3850. 0x13, 0xd0, 0x0a, 0xb9, 0xf0, 0xd8, 0x10, 0x1e, 0xca, 0xd1, 0xe0, 0x87, 0x86, 0xf0, 0x6c, 0x8c,
  3851. 0xdf, 0x47, 0xd2, 0x80, 0x9a, 0xe2, 0xc8, 0xcb, 0xf1, 0xfc, 0xab, 0xae, 0x4b, 0xe1, 0x35, 0x32,
  3852. 0xa1, 0x5c, 0x18, 0x00, 0x5e, 0xe2, 0x62, 0x8d, 0x3e, 0x73, 0x6c, 0x6a, 0x98, 0x2d, 0x97, 0x8e,
  3853. 0x58, 0x6b, 0xbb, 0xb0, 0xae, 0x6b, 0x28, 0x3b, 0xe5, 0x95, 0x1f, 0x56, 0xf6, 0x8d, 0xf9, 0x4a,
  3854. 0x3c, 0x1d, 0x48, 0xb4, 0x89, 0x50, 0xc1, 0xc1, 0x52, 0xe5, 0x75, 0x02, 0xc9, 0x17, 0xa3, 0x71,
  3855. 0x1d, 0x2d, 0x0a, 0x64, 0x2f, 0xf6, 0x4a, 0x6f, 0xbf, 0xcd, 0x46, 0xbc, 0x09, 0xa0, 0xe9, 0x6c,
  3856. 0x7c, 0xee, 0x53, 0x10, 0xab, 0xb8, 0xd4, 0x5b, 0x57, 0x1c, 0xaf, 0x91, 0xd9, 0x83, 0x26, 0xc1,
  3857. 0xdd, 0xd3, 0x7a, 0xa1, 0x2f, 0x0a, 0x85, 0xdb, 0x94, 0x0c, 0x92, 0x5a, 0x96, 0x33, 0x52, 0x36,
  3858. 0x51, 0xba, 0x6a, 0x53, 0x9e, 0xac, 0x0c, 0xbc, 0xb6, 0x1e, 0x6c, 0x13, 0x70, 0x28, 0x66, 0xe5,
  3859. 0xd7, 0x49, 0xb4, 0x18, 0xfb, 0xd0, 0x80, 0xf3, 0x2c, 0x57, 0x1b, 0xdd, 0x76, 0x47, 0xd5, 0x7b,
  3860. 0xd5, 0xa6, 0xb6, 0x57, 0xdf, 0x2f, 0x2e, 0xc8, 0xeb, 0x3f, 0xfc, 0xbc, 0x55, 0x1a, 0x47, 0xa0,
  3861. 0xf9, 0x6f, 0x08, 0xd8, 0xa2, 0xae, 0xd5, 0xd4, 0xaf, 0x8a, 0x09, 0x79, 0x15, 0x80, 0xc5, 0x18,
  3862. 0x50, 0x74, 0xfb, 0x0f, 0x51, 0x81, 0x03, 0x7a, 0xdd, 0x56, 0xad, 0xd2, 0x51, 0x8b, 0x49, 0x59,
  3863. 0x06, 0xdc, 0xda, 0x69, 0x5c, 0xc0, 0xf7, 0x75, 0xa8, 0x0b, 0xf5, 0x61, 0x57, 0x6d, 0x77, 0x8a,
  3864. 0x29, 0x79, 0x0d, 0x80, 0x38, 0x06, 0x0c, 0x2b, 0xe6, 0x26, 0xc8, 0x50, 0x6d, 0xb7, 0x9a, 0x5a,
  3865. 0x5b, 0x2d, 0x4a, 0xf2, 0x55, 0x40, 0x5d, 0x9e, 0x43, 0x05, 0x0a, 0xfd, 0x0c, 0xad, 0xd4, 0x9a,
  3866. 0x8f, 0xb4, 0x46, 0xb3, 0x52, 0xeb, 0xb5, 0xf4, 0xe6, 0x3e, 0xac, 0x69, 0x17, 0xd3, 0xf2, 0x26,
  3867. 0xe0, 0xaf, 0xc5, 0xf0, 0x67, 0x04, 0xf7, 0x2e, 0xb0, 0x57, 0xd7, 0xf6, 0x8b, 0x19, 0xf9, 0x32,
  3868. 0x40, 0x2f, 0xc5, 0xa0, 0x8c, 0x54, 0x76, 0xe3, 0x6a, 0xa3, 0x09, 0x5b, 0x67, 0xcf, 0xdc, 0x98,
  3869. 0x93, 0x5d, 0xfe, 0x06, 0xe1, 0xb3, 0x9f, 0x62, 0xf8, 0x06, 0x92, 0xb4, 0xa6, 0xa6, 0x02, 0xa1,
  3870. 0xfc, 0xfe, 0x67, 0x11, 0x1a, 0x75, 0x08, 0x56, 0x50, 0xaa, 0xf1, 0xf5, 0x27, 0x40, 0xe6, 0x3b,
  3871. 0x00, 0xba, 0x72, 0x16, 0x04, 0xce, 0x32, 0x45, 0x8b, 0xf1, 0xc0, 0x0a, 0xca, 0x1d, 0xa8, 0x9d,
  3872. 0x0a, 0x90, 0x5b, 0x81, 0xe0, 0xfc, 0x48, 0xa1, 0xfb, 0x80, 0xf8, 0x06, 0x2f, 0xc0, 0x75, 0x94,
  3873. 0xd6, 0xd4, 0x43, 0x55, 0x87, 0xc0, 0x2b, 0x00, 0x58, 0x0a, 0x01, 0x1a, 0x01, 0x5d, 0xc1, 0x83,
  3874. 0x9f, 0xa9, 0x34, 0x1e, 0x55, 0x1e, 0xb7, 0x21, 0x39, 0x18, 0xdc, 0xcb, 0xa1, 0xbb, 0x62, 0x3f,
  3875. 0x33, 0x8e, 0xbd, 0xf2, 0x3f, 0x09, 0x54, 0x88, 0xbf, 0x6d, 0xb0, 0x40, 0xda, 0xab, 0x37, 0xd4,
  3876. 0x70, 0xbb, 0xb8, 0x8f, 0x8d, 0xf1, 0x36, 0xca, 0xd7, 0xea, 0xba, 0x5a, 0xed, 0x34, 0xf5, 0xc7,
  3877. 0xe1, 0x5d, 0xe2, 0xa0, 0x9a, 0xe5, 0x72, 0x71, 0xb3, 0x4f, 0xbf, 0x42, 0xfb, 0xf1, 0x41, 0xa3,
  3878. 0xae, 0x3d, 0xe8, 0xf1, 0x88, 0x49, 0xf9, 0x1a, 0x80, 0xaf, 0xc6, 0xc1, 0xed, 0xe3, 0xb1, 0x6d,
  3879. 0x39, 0x4f, 0x78, 0xe0, 0x7b, 0x68, 0x25, 0x84, 0x47, 0x1b, 0xa4, 0xe4, 0x2d, 0x58, 0xb3, 0x7e,
  3880. 0xce, 0x9a, 0x68, 0x9f, 0xbb, 0xe8, 0x52, 0xb8, 0xb0, 0xab, 0x3d, 0xd0, 0x40, 0x16, 0xa0, 0x9c,
  3881. 0x0d, 0x58, 0x26, 0x9f, 0xb3, 0xac, 0xeb, 0x3c, 0x71, 0x40, 0x14, 0xe5, 0x5f, 0x12, 0x28, 0x3f,
  3882. 0xeb, 0x50, 0x8c, 0x67, 0xad, 0xd9, 0x53, 0x75, 0xbd, 0xa9, 0x87, 0x17, 0x9f, 0x39, 0x35, 0xca,
  3883. 0x87, 0xf8, 0x3d, 0x94, 0xdd, 0x57, 0x35, 0x55, 0xaf, 0x57, 0xc3, 0x7a, 0x98, 0x41, 0xf6, 0x89,
  3884. 0x43, 0x5c, 0x6b, 0x00, 0x1f, 0xfc, 0x05, 0x08, 0xd3, 0xee, 0x56, 0xef, 0x87, 0x37, 0xe6, 0x02,
  3885. 0x8e, 0x85, 0x6a, 0x4f, 0x07, 0x47, 0xfc, 0xb6, 0x65, 0x56, 0x3a, 0x87, 0x95, 0x46, 0xbd, 0x26,
  3886. 0xa0, 0x29, 0xb9, 0x04, 0xd0, 0xd5, 0x19, 0xb4, 0x2e, 0x9e, 0x77, 0x86, 0x2d, 0x9b, 0x68, 0xe3,
  3887. 0xbf, 0x7b, 0x11, 0x7c, 0x76, 0x64, 0x2a, 0xad, 0x96, 0xaa, 0xd5, 0xc2, 0xd3, 0x47, 0xbe, 0xca,
  3888. 0x64, 0x42, 0x1c, 0x93, 0x21, 0xf6, 0x9a, 0xfa, 0xbe, 0xda, 0x09, 0x0f, 0x1f, 0x21, 0xf6, 0xa8,
  3889. 0x3b, 0x22, 0xfe, 0xee, 0xfa, 0xcb, 0x3f, 0x37, 0x16, 0x5e, 0xc1, 0xef, 0xe5, 0xc9, 0x46, 0xe2,
  3890. 0x15, 0xfc, 0xfe, 0x38, 0xd9, 0x58, 0xf8, 0x1b, 0xfe, 0x5f, 0xfc, 0xb5, 0x91, 0xe8, 0x67, 0x78,
  3891. 0xef, 0xba, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x7a, 0x46, 0xf6, 0x94, 0x0d, 0x00,
  3892. 0x00,
  3893. }