bep.pb.go 95 KB

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