objects.pb.go 113 KB

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