123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344 |
- // Code generated by protoc-gen-gogo.
- // source: objects.proto
- // DO NOT EDIT!
- package api
- import proto "github.com/gogo/protobuf/proto"
- import fmt "fmt"
- import math "math"
- import docker_swarmkit_v1 "github.com/docker/swarmkit/api/timestamp"
- import _ "github.com/gogo/protobuf/gogoproto"
- import strings "strings"
- import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
- import sort "sort"
- import strconv "strconv"
- import reflect "reflect"
- import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
- import io "io"
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // Meta contains metadata about objects. Every object contains a meta field.
- type Meta struct {
- // Version tracks the current version of the object.
- Version Version `protobuf:"bytes,1,opt,name=version" json:"version"`
- // Object timestamps.
- CreatedAt *docker_swarmkit_v1.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
- UpdatedAt *docker_swarmkit_v1.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"`
- }
- func (m *Meta) Reset() { *m = Meta{} }
- func (*Meta) ProtoMessage() {}
- func (*Meta) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{0} }
- // Node provides the internal node state as seen by the cluster.
- type Node struct {
- // ID specifies the identity of the node.
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
- // Spec defines the desired state of the node as specified by the user.
- // The system will honor this and will *never* modify it.
- Spec NodeSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
- // Description encapsulated the properties of the Node as reported by the
- // agent.
- Description *NodeDescription `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
- // Status provides the current status of the node, as seen by the manager.
- Status NodeStatus `protobuf:"bytes,5,opt,name=status" json:"status"`
- // ManagerStatus provides the current status of the node's manager
- // component, if the node is a manager.
- ManagerStatus *ManagerStatus `protobuf:"bytes,6,opt,name=manager_status,json=managerStatus" json:"manager_status,omitempty"`
- // The node attachment to the ingress network.
- Attachment *NetworkAttachment `protobuf:"bytes,7,opt,name=attachment" json:"attachment,omitempty"`
- // Certificate is the TLS certificate issued for the node, if any.
- Certificate Certificate `protobuf:"bytes,8,opt,name=certificate" json:"certificate"`
- }
- func (m *Node) Reset() { *m = Node{} }
- func (*Node) ProtoMessage() {}
- func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{1} }
- type Service struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
- Spec ServiceSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
- // PreviousSpec is the previous service spec that was in place before
- // "Spec".
- PreviousSpec *ServiceSpec `protobuf:"bytes,6,opt,name=previous_spec,json=previousSpec" json:"previous_spec,omitempty"`
- // Runtime state of service endpoint. This may be different
- // from the spec version because the user may not have entered
- // the optional fields like node_port or virtual_ip and it
- // could be auto allocated by the system.
- Endpoint *Endpoint `protobuf:"bytes,4,opt,name=endpoint" json:"endpoint,omitempty"`
- // UpdateStatus contains the status of an update, if one is in
- // progress.
- UpdateStatus *UpdateStatus `protobuf:"bytes,5,opt,name=update_status,json=updateStatus" json:"update_status,omitempty"`
- }
- func (m *Service) Reset() { *m = Service{} }
- func (*Service) ProtoMessage() {}
- func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{2} }
- // Endpoint specified all the network parameters required to
- // correctly discover and load balance a service
- type Endpoint struct {
- Spec *EndpointSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"`
- // Runtime state of the exposed ports which may carry
- // auto-allocated swarm ports in addition to the user
- // configured information.
- Ports []*PortConfig `protobuf:"bytes,2,rep,name=ports" json:"ports,omitempty"`
- // VirtualIPs specifies the IP addresses under which this endpoint will be
- // made available.
- VirtualIPs []*Endpoint_VirtualIP `protobuf:"bytes,3,rep,name=virtual_ips,json=virtualIps" json:"virtual_ips,omitempty"`
- }
- func (m *Endpoint) Reset() { *m = Endpoint{} }
- func (*Endpoint) ProtoMessage() {}
- func (*Endpoint) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{3} }
- // VirtualIP specifies a set of networks this endpoint will be attached to
- // and the IP addresses the target service will be made available under.
- type Endpoint_VirtualIP struct {
- // NetworkID for which this endpoint attachment was created.
- NetworkID string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
- // A virtual IP is used to address this service in IP
- // layer that the client can use to send requests to
- // this service. A DNS A/AAAA query on the service
- // name might return this IP to the client. This is
- // strictly a logical IP and there may not be any
- // interfaces assigned this IP address or any route
- // created for this address. More than one to
- // accomodate for both IPv4 and IPv6
- Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
- }
- func (m *Endpoint_VirtualIP) Reset() { *m = Endpoint_VirtualIP{} }
- func (*Endpoint_VirtualIP) ProtoMessage() {}
- func (*Endpoint_VirtualIP) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{3, 0} }
- // Task specifies the parameters for implementing a Spec. A task is effectively
- // immutable and idempotent. Once it is dispatched to a node, it will not be
- // dispatched to another node.
- type Task struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
- // Spec defines the desired state of the task as specified by the user.
- // The system will honor this and will *never* modify it.
- Spec TaskSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
- // ServiceID indicates the service under which this task is orchestrated. This
- // should almost always be set.
- ServiceID string `protobuf:"bytes,4,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
- // Slot is the service slot number for a task.
- // For example, if a replicated service has replicas = 2, there will be a
- // task with slot = 1, and another with slot = 2.
- Slot uint64 `protobuf:"varint,5,opt,name=slot,proto3" json:"slot,omitempty"`
- // NodeID indicates the node to which the task is assigned. If this field
- // is empty or not set, the task is unassigned.
- NodeID string `protobuf:"bytes,6,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
- // Annotations defines the names and labels for the runtime, as set by
- // the cluster manager.
- //
- // As backup, if this field has an empty name, the runtime will
- // allocate a unique name for the actual container.
- //
- // NOTE(stevvooe): The preserves the ability for us to making naming
- // decisions for tasks in orchestrator, albeit, this is left empty for now.
- Annotations Annotations `protobuf:"bytes,7,opt,name=annotations" json:"annotations"`
- // ServiceAnnotations is a direct copy of the service name and labels when
- // this task is created.
- //
- // Labels set here will *not* be propagated to the runtime target, such as a
- // container. Use labels on the runtime target for that purpose.
- ServiceAnnotations Annotations `protobuf:"bytes,8,opt,name=service_annotations,json=serviceAnnotations" json:"service_annotations"`
- Status TaskStatus `protobuf:"bytes,9,opt,name=status" json:"status"`
- // DesiredState is the target state for the task. It is set to
- // TaskStateRunning when a task is first created, and changed to
- // TaskStateShutdown if the manager wants to terminate the task. This field
- // is only written by the manager.
- DesiredState TaskState `protobuf:"varint,10,opt,name=desired_state,json=desiredState,proto3,enum=docker.swarmkit.v1.TaskState" json:"desired_state,omitempty"`
- // List of network attachments by the task.
- Networks []*NetworkAttachment `protobuf:"bytes,11,rep,name=networks" json:"networks,omitempty"`
- // A copy of runtime state of service endpoint from Service
- // object to be distributed to agents as part of the task.
- Endpoint *Endpoint `protobuf:"bytes,12,opt,name=endpoint" json:"endpoint,omitempty"`
- // LogDriver specifies the selected log driver to use for the task. Agent
- // processes should always favor the value in this field.
- //
- // If present in the TaskSpec, this will be a copy of that value. The
- // orchestrator may choose to insert a value here, which should be honored,
- // such a cluster default or policy-based value.
- //
- // If not present, the daemon's default will be used.
- LogDriver *Driver `protobuf:"bytes,13,opt,name=log_driver,json=logDriver" json:"log_driver,omitempty"`
- }
- func (m *Task) Reset() { *m = Task{} }
- func (*Task) ProtoMessage() {}
- func (*Task) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{4} }
- // NetworkAttachment specifies the network parameters of attachment to
- // a single network by an object such as task or node.
- type NetworkAttachment struct {
- // Network state as a whole becomes part of the object so that
- // it always is available for use in agents so that agents
- // don't have any other dependency during execution.
- Network *Network `protobuf:"bytes,1,opt,name=network" json:"network,omitempty"`
- // List of IPv4/IPv6 addresses that are assigned to the object
- // as part of getting attached to this network.
- Addresses []string `protobuf:"bytes,2,rep,name=addresses" json:"addresses,omitempty"`
- // List of aliases by which a task is resolved in a network
- Aliases []string `protobuf:"bytes,3,rep,name=aliases" json:"aliases,omitempty"`
- }
- func (m *NetworkAttachment) Reset() { *m = NetworkAttachment{} }
- func (*NetworkAttachment) ProtoMessage() {}
- func (*NetworkAttachment) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{5} }
- type Network struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
- Spec NetworkSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
- // Driver specific operational state provided by the network driver.
- DriverState *Driver `protobuf:"bytes,4,opt,name=driver_state,json=driverState" json:"driver_state,omitempty"`
- // Runtime state of IPAM options. This may not reflect the
- // ipam options from NetworkSpec.
- IPAM *IPAMOptions `protobuf:"bytes,5,opt,name=ipam" json:"ipam,omitempty"`
- }
- func (m *Network) Reset() { *m = Network{} }
- func (*Network) ProtoMessage() {}
- func (*Network) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{6} }
- // Cluster provides global cluster settings.
- type Cluster struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
- Spec ClusterSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
- // RootCA contains key material for the root CA.
- RootCA RootCA `protobuf:"bytes,4,opt,name=root_ca,json=rootCa" json:"root_ca"`
- // Symmetric encryption key distributed by the lead manager. Used by agents
- // for securing network bootstrapping and communication.
- NetworkBootstrapKeys []*EncryptionKey `protobuf:"bytes,5,rep,name=network_bootstrap_keys,json=networkBootstrapKeys" json:"network_bootstrap_keys,omitempty"`
- // Logical clock used to timestamp every key. It allows other managers
- // and agents to unambiguously identify the older key to be deleted when
- // a new key is allocated on key rotation.
- EncryptionKeyLamportClock uint64 `protobuf:"varint,6,opt,name=encryption_key_lamport_clock,json=encryptionKeyLamportClock,proto3" json:"encryption_key_lamport_clock,omitempty"`
- // BlacklistedCertificates tracks certificates that should no longer
- // be honored. It's a mapping from CN -> BlacklistedCertificate.
- // swarm. Their certificates should effectively be blacklisted.
- 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"`
- // UnlockKeys defines the keys that lock node data at rest. For example,
- // this would contain the key encrypting key (KEK) that will encrypt the
- // manager TLS keys at rest and the raft encryption keys at rest.
- // If the key is empty, the node will be unlocked (will not require a key
- // to start up from a shut down state).
- UnlockKeys []*EncryptionKey `protobuf:"bytes,9,rep,name=unlock_keys,json=unlockKeys" json:"unlock_keys,omitempty"`
- }
- func (m *Cluster) Reset() { *m = Cluster{} }
- func (*Cluster) ProtoMessage() {}
- func (*Cluster) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{7} }
- // Secret represents a secret that should be passed to a container or a node,
- // and is immutable. It wraps the `spec` provided by the user with useful
- // information that is generated from the secret data in the `spec`, such as
- // the digest and size of the secret data.
- type Secret struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
- // Spec contains the actual secret data, as well as any context around the
- // secret data that the user provides.
- Spec SecretSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
- // Digest represents the cryptographic digest of the secret data, and follows
- // the form "<algorithm>:<digest>": for example "sha256:DEADBEEF...". It
- // is calculated from the data contained in `Secret.Spec.data`.
- Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"`
- // SecretSize represents the size (number of bytes) of the secret data, and is
- // calculated from the data contained in `Secret.Spec.data`.
- SecretSize int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
- // Whether the secret is an internal secret (not set by a user) or not.
- Internal bool `protobuf:"varint,6,opt,name=internal,proto3" json:"internal,omitempty"`
- }
- func (m *Secret) Reset() { *m = Secret{} }
- func (*Secret) ProtoMessage() {}
- func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{8} }
- func init() {
- proto.RegisterType((*Meta)(nil), "docker.swarmkit.v1.Meta")
- proto.RegisterType((*Node)(nil), "docker.swarmkit.v1.Node")
- proto.RegisterType((*Service)(nil), "docker.swarmkit.v1.Service")
- proto.RegisterType((*Endpoint)(nil), "docker.swarmkit.v1.Endpoint")
- proto.RegisterType((*Endpoint_VirtualIP)(nil), "docker.swarmkit.v1.Endpoint.VirtualIP")
- proto.RegisterType((*Task)(nil), "docker.swarmkit.v1.Task")
- proto.RegisterType((*NetworkAttachment)(nil), "docker.swarmkit.v1.NetworkAttachment")
- proto.RegisterType((*Network)(nil), "docker.swarmkit.v1.Network")
- proto.RegisterType((*Cluster)(nil), "docker.swarmkit.v1.Cluster")
- proto.RegisterType((*Secret)(nil), "docker.swarmkit.v1.Secret")
- }
- func (m *Meta) Copy() *Meta {
- if m == nil {
- return nil
- }
- o := &Meta{
- Version: *m.Version.Copy(),
- CreatedAt: m.CreatedAt.Copy(),
- UpdatedAt: m.UpdatedAt.Copy(),
- }
- return o
- }
- func (m *Node) Copy() *Node {
- if m == nil {
- return nil
- }
- o := &Node{
- ID: m.ID,
- Meta: *m.Meta.Copy(),
- Spec: *m.Spec.Copy(),
- Description: m.Description.Copy(),
- Status: *m.Status.Copy(),
- ManagerStatus: m.ManagerStatus.Copy(),
- Attachment: m.Attachment.Copy(),
- Certificate: *m.Certificate.Copy(),
- }
- return o
- }
- func (m *Service) Copy() *Service {
- if m == nil {
- return nil
- }
- o := &Service{
- ID: m.ID,
- Meta: *m.Meta.Copy(),
- Spec: *m.Spec.Copy(),
- PreviousSpec: m.PreviousSpec.Copy(),
- Endpoint: m.Endpoint.Copy(),
- UpdateStatus: m.UpdateStatus.Copy(),
- }
- return o
- }
- func (m *Endpoint) Copy() *Endpoint {
- if m == nil {
- return nil
- }
- o := &Endpoint{
- Spec: m.Spec.Copy(),
- }
- if m.Ports != nil {
- o.Ports = make([]*PortConfig, 0, len(m.Ports))
- for _, v := range m.Ports {
- o.Ports = append(o.Ports, v.Copy())
- }
- }
- if m.VirtualIPs != nil {
- o.VirtualIPs = make([]*Endpoint_VirtualIP, 0, len(m.VirtualIPs))
- for _, v := range m.VirtualIPs {
- o.VirtualIPs = append(o.VirtualIPs, v.Copy())
- }
- }
- return o
- }
- func (m *Endpoint_VirtualIP) Copy() *Endpoint_VirtualIP {
- if m == nil {
- return nil
- }
- o := &Endpoint_VirtualIP{
- NetworkID: m.NetworkID,
- Addr: m.Addr,
- }
- return o
- }
- func (m *Task) Copy() *Task {
- if m == nil {
- return nil
- }
- o := &Task{
- ID: m.ID,
- Meta: *m.Meta.Copy(),
- Spec: *m.Spec.Copy(),
- ServiceID: m.ServiceID,
- Slot: m.Slot,
- NodeID: m.NodeID,
- Annotations: *m.Annotations.Copy(),
- ServiceAnnotations: *m.ServiceAnnotations.Copy(),
- Status: *m.Status.Copy(),
- DesiredState: m.DesiredState,
- Endpoint: m.Endpoint.Copy(),
- LogDriver: m.LogDriver.Copy(),
- }
- if m.Networks != nil {
- o.Networks = make([]*NetworkAttachment, 0, len(m.Networks))
- for _, v := range m.Networks {
- o.Networks = append(o.Networks, v.Copy())
- }
- }
- return o
- }
- func (m *NetworkAttachment) Copy() *NetworkAttachment {
- if m == nil {
- return nil
- }
- o := &NetworkAttachment{
- Network: m.Network.Copy(),
- }
- if m.Addresses != nil {
- o.Addresses = make([]string, 0, len(m.Addresses))
- o.Addresses = append(o.Addresses, m.Addresses...)
- }
- if m.Aliases != nil {
- o.Aliases = make([]string, 0, len(m.Aliases))
- o.Aliases = append(o.Aliases, m.Aliases...)
- }
- return o
- }
- func (m *Network) Copy() *Network {
- if m == nil {
- return nil
- }
- o := &Network{
- ID: m.ID,
- Meta: *m.Meta.Copy(),
- Spec: *m.Spec.Copy(),
- DriverState: m.DriverState.Copy(),
- IPAM: m.IPAM.Copy(),
- }
- return o
- }
- func (m *Cluster) Copy() *Cluster {
- if m == nil {
- return nil
- }
- o := &Cluster{
- ID: m.ID,
- Meta: *m.Meta.Copy(),
- Spec: *m.Spec.Copy(),
- RootCA: *m.RootCA.Copy(),
- EncryptionKeyLamportClock: m.EncryptionKeyLamportClock,
- }
- if m.NetworkBootstrapKeys != nil {
- o.NetworkBootstrapKeys = make([]*EncryptionKey, 0, len(m.NetworkBootstrapKeys))
- for _, v := range m.NetworkBootstrapKeys {
- o.NetworkBootstrapKeys = append(o.NetworkBootstrapKeys, v.Copy())
- }
- }
- if m.BlacklistedCertificates != nil {
- o.BlacklistedCertificates = make(map[string]*BlacklistedCertificate)
- for k, v := range m.BlacklistedCertificates {
- o.BlacklistedCertificates[k] = v.Copy()
- }
- }
- if m.UnlockKeys != nil {
- o.UnlockKeys = make([]*EncryptionKey, 0, len(m.UnlockKeys))
- for _, v := range m.UnlockKeys {
- o.UnlockKeys = append(o.UnlockKeys, v.Copy())
- }
- }
- return o
- }
- func (m *Secret) Copy() *Secret {
- if m == nil {
- return nil
- }
- o := &Secret{
- ID: m.ID,
- Meta: *m.Meta.Copy(),
- Spec: *m.Spec.Copy(),
- Digest: m.Digest,
- SecretSize: m.SecretSize,
- Internal: m.Internal,
- }
- return o
- }
- func (this *Meta) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 7)
- s = append(s, "&api.Meta{")
- s = append(s, "Version: "+strings.Replace(this.Version.GoString(), `&`, ``, 1)+",\n")
- if this.CreatedAt != nil {
- s = append(s, "CreatedAt: "+fmt.Sprintf("%#v", this.CreatedAt)+",\n")
- }
- if this.UpdatedAt != nil {
- s = append(s, "UpdatedAt: "+fmt.Sprintf("%#v", this.UpdatedAt)+",\n")
- }
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func (this *Node) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 12)
- s = append(s, "&api.Node{")
- s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
- s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
- if this.Description != nil {
- s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n")
- }
- s = append(s, "Status: "+strings.Replace(this.Status.GoString(), `&`, ``, 1)+",\n")
- if this.ManagerStatus != nil {
- s = append(s, "ManagerStatus: "+fmt.Sprintf("%#v", this.ManagerStatus)+",\n")
- }
- if this.Attachment != nil {
- s = append(s, "Attachment: "+fmt.Sprintf("%#v", this.Attachment)+",\n")
- }
- s = append(s, "Certificate: "+strings.Replace(this.Certificate.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func (this *Service) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 10)
- s = append(s, "&api.Service{")
- s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
- s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
- if this.PreviousSpec != nil {
- s = append(s, "PreviousSpec: "+fmt.Sprintf("%#v", this.PreviousSpec)+",\n")
- }
- if this.Endpoint != nil {
- s = append(s, "Endpoint: "+fmt.Sprintf("%#v", this.Endpoint)+",\n")
- }
- if this.UpdateStatus != nil {
- s = append(s, "UpdateStatus: "+fmt.Sprintf("%#v", this.UpdateStatus)+",\n")
- }
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func (this *Endpoint) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 7)
- s = append(s, "&api.Endpoint{")
- if this.Spec != nil {
- s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n")
- }
- if this.Ports != nil {
- s = append(s, "Ports: "+fmt.Sprintf("%#v", this.Ports)+",\n")
- }
- if this.VirtualIPs != nil {
- s = append(s, "VirtualIPs: "+fmt.Sprintf("%#v", this.VirtualIPs)+",\n")
- }
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func (this *Endpoint_VirtualIP) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 6)
- s = append(s, "&api.Endpoint_VirtualIP{")
- s = append(s, "NetworkID: "+fmt.Sprintf("%#v", this.NetworkID)+",\n")
- s = append(s, "Addr: "+fmt.Sprintf("%#v", this.Addr)+",\n")
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func (this *Task) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 17)
- s = append(s, "&api.Task{")
- s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
- s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "ServiceID: "+fmt.Sprintf("%#v", this.ServiceID)+",\n")
- s = append(s, "Slot: "+fmt.Sprintf("%#v", this.Slot)+",\n")
- s = append(s, "NodeID: "+fmt.Sprintf("%#v", this.NodeID)+",\n")
- s = append(s, "Annotations: "+strings.Replace(this.Annotations.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "ServiceAnnotations: "+strings.Replace(this.ServiceAnnotations.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "Status: "+strings.Replace(this.Status.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "DesiredState: "+fmt.Sprintf("%#v", this.DesiredState)+",\n")
- if this.Networks != nil {
- s = append(s, "Networks: "+fmt.Sprintf("%#v", this.Networks)+",\n")
- }
- if this.Endpoint != nil {
- s = append(s, "Endpoint: "+fmt.Sprintf("%#v", this.Endpoint)+",\n")
- }
- if this.LogDriver != nil {
- s = append(s, "LogDriver: "+fmt.Sprintf("%#v", this.LogDriver)+",\n")
- }
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func (this *NetworkAttachment) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 7)
- s = append(s, "&api.NetworkAttachment{")
- if this.Network != nil {
- s = append(s, "Network: "+fmt.Sprintf("%#v", this.Network)+",\n")
- }
- s = append(s, "Addresses: "+fmt.Sprintf("%#v", this.Addresses)+",\n")
- s = append(s, "Aliases: "+fmt.Sprintf("%#v", this.Aliases)+",\n")
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func (this *Network) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 9)
- s = append(s, "&api.Network{")
- s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
- s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
- if this.DriverState != nil {
- s = append(s, "DriverState: "+fmt.Sprintf("%#v", this.DriverState)+",\n")
- }
- if this.IPAM != nil {
- s = append(s, "IPAM: "+fmt.Sprintf("%#v", this.IPAM)+",\n")
- }
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func (this *Cluster) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 12)
- s = append(s, "&api.Cluster{")
- s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
- s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "RootCA: "+strings.Replace(this.RootCA.GoString(), `&`, ``, 1)+",\n")
- if this.NetworkBootstrapKeys != nil {
- s = append(s, "NetworkBootstrapKeys: "+fmt.Sprintf("%#v", this.NetworkBootstrapKeys)+",\n")
- }
- s = append(s, "EncryptionKeyLamportClock: "+fmt.Sprintf("%#v", this.EncryptionKeyLamportClock)+",\n")
- keysForBlacklistedCertificates := make([]string, 0, len(this.BlacklistedCertificates))
- for k, _ := range this.BlacklistedCertificates {
- keysForBlacklistedCertificates = append(keysForBlacklistedCertificates, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForBlacklistedCertificates)
- mapStringForBlacklistedCertificates := "map[string]*BlacklistedCertificate{"
- for _, k := range keysForBlacklistedCertificates {
- mapStringForBlacklistedCertificates += fmt.Sprintf("%#v: %#v,", k, this.BlacklistedCertificates[k])
- }
- mapStringForBlacklistedCertificates += "}"
- if this.BlacklistedCertificates != nil {
- s = append(s, "BlacklistedCertificates: "+mapStringForBlacklistedCertificates+",\n")
- }
- if this.UnlockKeys != nil {
- s = append(s, "UnlockKeys: "+fmt.Sprintf("%#v", this.UnlockKeys)+",\n")
- }
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func (this *Secret) GoString() string {
- if this == nil {
- return "nil"
- }
- s := make([]string, 0, 10)
- s = append(s, "&api.Secret{")
- s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
- s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
- s = append(s, "Digest: "+fmt.Sprintf("%#v", this.Digest)+",\n")
- s = append(s, "SecretSize: "+fmt.Sprintf("%#v", this.SecretSize)+",\n")
- s = append(s, "Internal: "+fmt.Sprintf("%#v", this.Internal)+",\n")
- s = append(s, "}")
- return strings.Join(s, "")
- }
- func valueToGoStringObjects(v interface{}, typ string) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
- }
- func extensionToGoStringObjects(m github_com_gogo_protobuf_proto.Message) string {
- e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m)
- if e == nil {
- return "nil"
- }
- s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{"
- keys := make([]int, 0, len(e))
- for k := range e {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
- ss := []string{}
- for _, k := range keys {
- ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
- }
- s += strings.Join(ss, ",") + "})"
- return s
- }
- func (m *Meta) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *Meta) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(m.Version.Size()))
- n1, err := m.Version.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- if m.CreatedAt != nil {
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(m.CreatedAt.Size()))
- n2, err := m.CreatedAt.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- }
- if m.UpdatedAt != nil {
- data[i] = 0x1a
- i++
- i = encodeVarintObjects(data, i, uint64(m.UpdatedAt.Size()))
- n3, err := m.UpdatedAt.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- }
- return i, nil
- }
- func (m *Node) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *Node) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ID) > 0 {
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.ID)))
- i += copy(data[i:], m.ID)
- }
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
- n4, err := m.Meta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- data[i] = 0x1a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
- n5, err := m.Spec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- if m.Description != nil {
- data[i] = 0x22
- i++
- i = encodeVarintObjects(data, i, uint64(m.Description.Size()))
- n6, err := m.Description.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- }
- data[i] = 0x2a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Status.Size()))
- n7, err := m.Status.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- if m.ManagerStatus != nil {
- data[i] = 0x32
- i++
- i = encodeVarintObjects(data, i, uint64(m.ManagerStatus.Size()))
- n8, err := m.ManagerStatus.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- }
- if m.Attachment != nil {
- data[i] = 0x3a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Attachment.Size()))
- n9, err := m.Attachment.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- }
- data[i] = 0x42
- i++
- i = encodeVarintObjects(data, i, uint64(m.Certificate.Size()))
- n10, err := m.Certificate.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- return i, nil
- }
- func (m *Service) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *Service) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ID) > 0 {
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.ID)))
- i += copy(data[i:], m.ID)
- }
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
- n11, err := m.Meta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- data[i] = 0x1a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
- n12, err := m.Spec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- if m.Endpoint != nil {
- data[i] = 0x22
- i++
- i = encodeVarintObjects(data, i, uint64(m.Endpoint.Size()))
- n13, err := m.Endpoint.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- }
- if m.UpdateStatus != nil {
- data[i] = 0x2a
- i++
- i = encodeVarintObjects(data, i, uint64(m.UpdateStatus.Size()))
- n14, err := m.UpdateStatus.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n14
- }
- if m.PreviousSpec != nil {
- data[i] = 0x32
- i++
- i = encodeVarintObjects(data, i, uint64(m.PreviousSpec.Size()))
- n15, err := m.PreviousSpec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n15
- }
- return i, nil
- }
- func (m *Endpoint) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *Endpoint) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Spec != nil {
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
- n16, err := m.Spec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n16
- }
- if len(m.Ports) > 0 {
- for _, msg := range m.Ports {
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.VirtualIPs) > 0 {
- for _, msg := range m.VirtualIPs {
- data[i] = 0x1a
- i++
- i = encodeVarintObjects(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
- }
- func (m *Endpoint_VirtualIP) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *Endpoint_VirtualIP) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.NetworkID) > 0 {
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.NetworkID)))
- i += copy(data[i:], m.NetworkID)
- }
- if len(m.Addr) > 0 {
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.Addr)))
- i += copy(data[i:], m.Addr)
- }
- return i, nil
- }
- func (m *Task) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *Task) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ID) > 0 {
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.ID)))
- i += copy(data[i:], m.ID)
- }
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
- n17, err := m.Meta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n17
- data[i] = 0x1a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
- n18, err := m.Spec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n18
- if len(m.ServiceID) > 0 {
- data[i] = 0x22
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.ServiceID)))
- i += copy(data[i:], m.ServiceID)
- }
- if m.Slot != 0 {
- data[i] = 0x28
- i++
- i = encodeVarintObjects(data, i, uint64(m.Slot))
- }
- if len(m.NodeID) > 0 {
- data[i] = 0x32
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.NodeID)))
- i += copy(data[i:], m.NodeID)
- }
- data[i] = 0x3a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Annotations.Size()))
- n19, err := m.Annotations.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n19
- data[i] = 0x42
- i++
- i = encodeVarintObjects(data, i, uint64(m.ServiceAnnotations.Size()))
- n20, err := m.ServiceAnnotations.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n20
- data[i] = 0x4a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Status.Size()))
- n21, err := m.Status.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n21
- if m.DesiredState != 0 {
- data[i] = 0x50
- i++
- i = encodeVarintObjects(data, i, uint64(m.DesiredState))
- }
- if len(m.Networks) > 0 {
- for _, msg := range m.Networks {
- data[i] = 0x5a
- i++
- i = encodeVarintObjects(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.Endpoint != nil {
- data[i] = 0x62
- i++
- i = encodeVarintObjects(data, i, uint64(m.Endpoint.Size()))
- n22, err := m.Endpoint.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n22
- }
- if m.LogDriver != nil {
- data[i] = 0x6a
- i++
- i = encodeVarintObjects(data, i, uint64(m.LogDriver.Size()))
- n23, err := m.LogDriver.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n23
- }
- return i, nil
- }
- func (m *NetworkAttachment) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *NetworkAttachment) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Network != nil {
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(m.Network.Size()))
- n24, err := m.Network.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n24
- }
- if len(m.Addresses) > 0 {
- for _, s := range m.Addresses {
- data[i] = 0x12
- i++
- l = len(s)
- for l >= 1<<7 {
- data[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- data[i] = uint8(l)
- i++
- i += copy(data[i:], s)
- }
- }
- if len(m.Aliases) > 0 {
- for _, s := range m.Aliases {
- data[i] = 0x1a
- i++
- l = len(s)
- for l >= 1<<7 {
- data[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- data[i] = uint8(l)
- i++
- i += copy(data[i:], s)
- }
- }
- return i, nil
- }
- func (m *Network) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *Network) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ID) > 0 {
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.ID)))
- i += copy(data[i:], m.ID)
- }
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
- n25, err := m.Meta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n25
- data[i] = 0x1a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
- n26, err := m.Spec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n26
- if m.DriverState != nil {
- data[i] = 0x22
- i++
- i = encodeVarintObjects(data, i, uint64(m.DriverState.Size()))
- n27, err := m.DriverState.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n27
- }
- if m.IPAM != nil {
- data[i] = 0x2a
- i++
- i = encodeVarintObjects(data, i, uint64(m.IPAM.Size()))
- n28, err := m.IPAM.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n28
- }
- return i, nil
- }
- func (m *Cluster) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *Cluster) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ID) > 0 {
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.ID)))
- i += copy(data[i:], m.ID)
- }
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
- n29, err := m.Meta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n29
- data[i] = 0x1a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
- n30, err := m.Spec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n30
- data[i] = 0x22
- i++
- i = encodeVarintObjects(data, i, uint64(m.RootCA.Size()))
- n31, err := m.RootCA.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n31
- if len(m.NetworkBootstrapKeys) > 0 {
- for _, msg := range m.NetworkBootstrapKeys {
- data[i] = 0x2a
- i++
- i = encodeVarintObjects(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if m.EncryptionKeyLamportClock != 0 {
- data[i] = 0x30
- i++
- i = encodeVarintObjects(data, i, uint64(m.EncryptionKeyLamportClock))
- }
- if len(m.BlacklistedCertificates) > 0 {
- for k, _ := range m.BlacklistedCertificates {
- data[i] = 0x42
- i++
- v := m.BlacklistedCertificates[k]
- msgSize := 0
- if v != nil {
- msgSize = v.Size()
- msgSize += 1 + sovObjects(uint64(msgSize))
- }
- mapSize := 1 + len(k) + sovObjects(uint64(len(k))) + msgSize
- i = encodeVarintObjects(data, i, uint64(mapSize))
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(len(k)))
- i += copy(data[i:], k)
- if v != nil {
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(v.Size()))
- n32, err := v.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n32
- }
- }
- }
- if len(m.UnlockKeys) > 0 {
- for _, msg := range m.UnlockKeys {
- data[i] = 0x4a
- i++
- i = encodeVarintObjects(data, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
- }
- func (m *Secret) Marshal() (data []byte, err error) {
- size := m.Size()
- data = make([]byte, size)
- n, err := m.MarshalTo(data)
- if err != nil {
- return nil, err
- }
- return data[:n], nil
- }
- func (m *Secret) MarshalTo(data []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.ID) > 0 {
- data[i] = 0xa
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.ID)))
- i += copy(data[i:], m.ID)
- }
- data[i] = 0x12
- i++
- i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
- n33, err := m.Meta.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n33
- data[i] = 0x1a
- i++
- i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
- n34, err := m.Spec.MarshalTo(data[i:])
- if err != nil {
- return 0, err
- }
- i += n34
- if len(m.Digest) > 0 {
- data[i] = 0x22
- i++
- i = encodeVarintObjects(data, i, uint64(len(m.Digest)))
- i += copy(data[i:], m.Digest)
- }
- if m.SecretSize != 0 {
- data[i] = 0x28
- i++
- i = encodeVarintObjects(data, i, uint64(m.SecretSize))
- }
- if m.Internal {
- data[i] = 0x30
- i++
- if m.Internal {
- data[i] = 1
- } else {
- data[i] = 0
- }
- i++
- }
- return i, nil
- }
- func encodeFixed64Objects(data []byte, offset int, v uint64) int {
- data[offset] = uint8(v)
- data[offset+1] = uint8(v >> 8)
- data[offset+2] = uint8(v >> 16)
- data[offset+3] = uint8(v >> 24)
- data[offset+4] = uint8(v >> 32)
- data[offset+5] = uint8(v >> 40)
- data[offset+6] = uint8(v >> 48)
- data[offset+7] = uint8(v >> 56)
- return offset + 8
- }
- func encodeFixed32Objects(data []byte, offset int, v uint32) int {
- data[offset] = uint8(v)
- data[offset+1] = uint8(v >> 8)
- data[offset+2] = uint8(v >> 16)
- data[offset+3] = uint8(v >> 24)
- return offset + 4
- }
- func encodeVarintObjects(data []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- data[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- data[offset] = uint8(v)
- return offset + 1
- }
- func (m *Meta) Size() (n int) {
- var l int
- _ = l
- l = m.Version.Size()
- n += 1 + l + sovObjects(uint64(l))
- if m.CreatedAt != nil {
- l = m.CreatedAt.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- if m.UpdatedAt != nil {
- l = m.UpdatedAt.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- return n
- }
- func (m *Node) Size() (n int) {
- var l int
- _ = l
- l = len(m.ID)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- l = m.Meta.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovObjects(uint64(l))
- if m.Description != nil {
- l = m.Description.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- l = m.Status.Size()
- n += 1 + l + sovObjects(uint64(l))
- if m.ManagerStatus != nil {
- l = m.ManagerStatus.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- if m.Attachment != nil {
- l = m.Attachment.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- l = m.Certificate.Size()
- n += 1 + l + sovObjects(uint64(l))
- return n
- }
- func (m *Service) Size() (n int) {
- var l int
- _ = l
- l = len(m.ID)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- l = m.Meta.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovObjects(uint64(l))
- if m.Endpoint != nil {
- l = m.Endpoint.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- if m.UpdateStatus != nil {
- l = m.UpdateStatus.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- if m.PreviousSpec != nil {
- l = m.PreviousSpec.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- return n
- }
- func (m *Endpoint) Size() (n int) {
- var l int
- _ = l
- if m.Spec != nil {
- l = m.Spec.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- if len(m.Ports) > 0 {
- for _, e := range m.Ports {
- l = e.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- }
- if len(m.VirtualIPs) > 0 {
- for _, e := range m.VirtualIPs {
- l = e.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- }
- return n
- }
- func (m *Endpoint_VirtualIP) Size() (n int) {
- var l int
- _ = l
- l = len(m.NetworkID)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- l = len(m.Addr)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- return n
- }
- func (m *Task) Size() (n int) {
- var l int
- _ = l
- l = len(m.ID)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- l = m.Meta.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = len(m.ServiceID)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- if m.Slot != 0 {
- n += 1 + sovObjects(uint64(m.Slot))
- }
- l = len(m.NodeID)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- l = m.Annotations.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = m.ServiceAnnotations.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = m.Status.Size()
- n += 1 + l + sovObjects(uint64(l))
- if m.DesiredState != 0 {
- n += 1 + sovObjects(uint64(m.DesiredState))
- }
- if len(m.Networks) > 0 {
- for _, e := range m.Networks {
- l = e.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- }
- if m.Endpoint != nil {
- l = m.Endpoint.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- if m.LogDriver != nil {
- l = m.LogDriver.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- return n
- }
- func (m *NetworkAttachment) Size() (n int) {
- var l int
- _ = l
- if m.Network != nil {
- l = m.Network.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- if len(m.Addresses) > 0 {
- for _, s := range m.Addresses {
- l = len(s)
- n += 1 + l + sovObjects(uint64(l))
- }
- }
- if len(m.Aliases) > 0 {
- for _, s := range m.Aliases {
- l = len(s)
- n += 1 + l + sovObjects(uint64(l))
- }
- }
- return n
- }
- func (m *Network) Size() (n int) {
- var l int
- _ = l
- l = len(m.ID)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- l = m.Meta.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovObjects(uint64(l))
- if m.DriverState != nil {
- l = m.DriverState.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- if m.IPAM != nil {
- l = m.IPAM.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- return n
- }
- func (m *Cluster) Size() (n int) {
- var l int
- _ = l
- l = len(m.ID)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- l = m.Meta.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = m.RootCA.Size()
- n += 1 + l + sovObjects(uint64(l))
- if len(m.NetworkBootstrapKeys) > 0 {
- for _, e := range m.NetworkBootstrapKeys {
- l = e.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- }
- if m.EncryptionKeyLamportClock != 0 {
- n += 1 + sovObjects(uint64(m.EncryptionKeyLamportClock))
- }
- if len(m.BlacklistedCertificates) > 0 {
- for k, v := range m.BlacklistedCertificates {
- _ = k
- _ = v
- l = 0
- if v != nil {
- l = v.Size()
- l += 1 + sovObjects(uint64(l))
- }
- mapEntrySize := 1 + len(k) + sovObjects(uint64(len(k))) + l
- n += mapEntrySize + 1 + sovObjects(uint64(mapEntrySize))
- }
- }
- if len(m.UnlockKeys) > 0 {
- for _, e := range m.UnlockKeys {
- l = e.Size()
- n += 1 + l + sovObjects(uint64(l))
- }
- }
- return n
- }
- func (m *Secret) Size() (n int) {
- var l int
- _ = l
- l = len(m.ID)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- l = m.Meta.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = m.Spec.Size()
- n += 1 + l + sovObjects(uint64(l))
- l = len(m.Digest)
- if l > 0 {
- n += 1 + l + sovObjects(uint64(l))
- }
- if m.SecretSize != 0 {
- n += 1 + sovObjects(uint64(m.SecretSize))
- }
- if m.Internal {
- n += 2
- }
- return n
- }
- func sovObjects(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
- }
- func sozObjects(x uint64) (n int) {
- return sovObjects(uint64((x << 1) ^ uint64((int64(x) >> 63))))
- }
- func (this *Meta) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Meta{`,
- `Version:` + strings.Replace(strings.Replace(this.Version.String(), "Version", "Version", 1), `&`, ``, 1) + `,`,
- `CreatedAt:` + strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "docker_swarmkit_v1.Timestamp", 1) + `,`,
- `UpdatedAt:` + strings.Replace(fmt.Sprintf("%v", this.UpdatedAt), "Timestamp", "docker_swarmkit_v1.Timestamp", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *Node) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Node{`,
- `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NodeSpec", "NodeSpec", 1), `&`, ``, 1) + `,`,
- `Description:` + strings.Replace(fmt.Sprintf("%v", this.Description), "NodeDescription", "NodeDescription", 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NodeStatus", "NodeStatus", 1), `&`, ``, 1) + `,`,
- `ManagerStatus:` + strings.Replace(fmt.Sprintf("%v", this.ManagerStatus), "ManagerStatus", "ManagerStatus", 1) + `,`,
- `Attachment:` + strings.Replace(fmt.Sprintf("%v", this.Attachment), "NetworkAttachment", "NetworkAttachment", 1) + `,`,
- `Certificate:` + strings.Replace(strings.Replace(this.Certificate.String(), "Certificate", "Certificate", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *Service) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Service{`,
- `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "ServiceSpec", 1), `&`, ``, 1) + `,`,
- `Endpoint:` + strings.Replace(fmt.Sprintf("%v", this.Endpoint), "Endpoint", "Endpoint", 1) + `,`,
- `UpdateStatus:` + strings.Replace(fmt.Sprintf("%v", this.UpdateStatus), "UpdateStatus", "UpdateStatus", 1) + `,`,
- `PreviousSpec:` + strings.Replace(fmt.Sprintf("%v", this.PreviousSpec), "ServiceSpec", "ServiceSpec", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *Endpoint) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Endpoint{`,
- `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "EndpointSpec", "EndpointSpec", 1) + `,`,
- `Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "PortConfig", "PortConfig", 1) + `,`,
- `VirtualIPs:` + strings.Replace(fmt.Sprintf("%v", this.VirtualIPs), "Endpoint_VirtualIP", "Endpoint_VirtualIP", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *Endpoint_VirtualIP) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Endpoint_VirtualIP{`,
- `NetworkID:` + fmt.Sprintf("%v", this.NetworkID) + `,`,
- `Addr:` + fmt.Sprintf("%v", this.Addr) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *Task) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Task{`,
- `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TaskSpec", "TaskSpec", 1), `&`, ``, 1) + `,`,
- `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`,
- `Slot:` + fmt.Sprintf("%v", this.Slot) + `,`,
- `NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`,
- `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
- `ServiceAnnotations:` + strings.Replace(strings.Replace(this.ServiceAnnotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TaskStatus", "TaskStatus", 1), `&`, ``, 1) + `,`,
- `DesiredState:` + fmt.Sprintf("%v", this.DesiredState) + `,`,
- `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "NetworkAttachment", "NetworkAttachment", 1) + `,`,
- `Endpoint:` + strings.Replace(fmt.Sprintf("%v", this.Endpoint), "Endpoint", "Endpoint", 1) + `,`,
- `LogDriver:` + strings.Replace(fmt.Sprintf("%v", this.LogDriver), "Driver", "Driver", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *NetworkAttachment) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&NetworkAttachment{`,
- `Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "Network", "Network", 1) + `,`,
- `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`,
- `Aliases:` + fmt.Sprintf("%v", this.Aliases) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *Network) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Network{`,
- `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkSpec", "NetworkSpec", 1), `&`, ``, 1) + `,`,
- `DriverState:` + strings.Replace(fmt.Sprintf("%v", this.DriverState), "Driver", "Driver", 1) + `,`,
- `IPAM:` + strings.Replace(fmt.Sprintf("%v", this.IPAM), "IPAMOptions", "IPAMOptions", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *Cluster) String() string {
- if this == nil {
- return "nil"
- }
- keysForBlacklistedCertificates := make([]string, 0, len(this.BlacklistedCertificates))
- for k, _ := range this.BlacklistedCertificates {
- keysForBlacklistedCertificates = append(keysForBlacklistedCertificates, k)
- }
- github_com_gogo_protobuf_sortkeys.Strings(keysForBlacklistedCertificates)
- mapStringForBlacklistedCertificates := "map[string]*BlacklistedCertificate{"
- for _, k := range keysForBlacklistedCertificates {
- mapStringForBlacklistedCertificates += fmt.Sprintf("%v: %v,", k, this.BlacklistedCertificates[k])
- }
- mapStringForBlacklistedCertificates += "}"
- s := strings.Join([]string{`&Cluster{`,
- `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterSpec", "ClusterSpec", 1), `&`, ``, 1) + `,`,
- `RootCA:` + strings.Replace(strings.Replace(this.RootCA.String(), "RootCA", "RootCA", 1), `&`, ``, 1) + `,`,
- `NetworkBootstrapKeys:` + strings.Replace(fmt.Sprintf("%v", this.NetworkBootstrapKeys), "EncryptionKey", "EncryptionKey", 1) + `,`,
- `EncryptionKeyLamportClock:` + fmt.Sprintf("%v", this.EncryptionKeyLamportClock) + `,`,
- `BlacklistedCertificates:` + mapStringForBlacklistedCertificates + `,`,
- `UnlockKeys:` + strings.Replace(fmt.Sprintf("%v", this.UnlockKeys), "EncryptionKey", "EncryptionKey", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *Secret) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&Secret{`,
- `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
- `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SecretSpec", "SecretSpec", 1), `&`, ``, 1) + `,`,
- `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
- `SecretSize:` + fmt.Sprintf("%v", this.SecretSize) + `,`,
- `Internal:` + fmt.Sprintf("%v", this.Internal) + `,`,
- `}`,
- }, "")
- return s
- }
- func valueToStringObjects(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
- }
- func (m *Meta) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Meta: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Meta: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Version.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.CreatedAt == nil {
- m.CreatedAt = &docker_swarmkit_v1.Timestamp{}
- }
- if err := m.CreatedAt.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.UpdatedAt == nil {
- m.UpdatedAt = &docker_swarmkit_v1.Timestamp{}
- }
- if err := m.UpdatedAt.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Node) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Node: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ID = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Description == nil {
- m.Description = &NodeDescription{}
- }
- if err := m.Description.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ManagerStatus", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.ManagerStatus == nil {
- m.ManagerStatus = &ManagerStatus{}
- }
- if err := m.ManagerStatus.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Attachment", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Attachment == nil {
- m.Attachment = &NetworkAttachment{}
- }
- if err := m.Attachment.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 8:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Certificate.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Service) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Service: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ID = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Endpoint == nil {
- m.Endpoint = &Endpoint{}
- }
- if err := m.Endpoint.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UpdateStatus", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.UpdateStatus == nil {
- m.UpdateStatus = &UpdateStatus{}
- }
- if err := m.UpdateStatus.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PreviousSpec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.PreviousSpec == nil {
- m.PreviousSpec = &ServiceSpec{}
- }
- if err := m.PreviousSpec.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Endpoint) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Endpoint: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Spec == nil {
- m.Spec = &EndpointSpec{}
- }
- if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ports = append(m.Ports, &PortConfig{})
- if err := m.Ports[len(m.Ports)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field VirtualIPs", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.VirtualIPs = append(m.VirtualIPs, &Endpoint_VirtualIP{})
- if err := m.VirtualIPs[len(m.VirtualIPs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Endpoint_VirtualIP) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: VirtualIP: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: VirtualIP: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NetworkID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NetworkID = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Addr = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Task) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Task: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Task: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ID = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ServiceID = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
- }
- m.Slot = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- m.Slot |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NodeID = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Annotations.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 8:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ServiceAnnotations", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ServiceAnnotations.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 9:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 10:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field DesiredState", wireType)
- }
- m.DesiredState = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- m.DesiredState |= (TaskState(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 11:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Networks = append(m.Networks, &NetworkAttachment{})
- if err := m.Networks[len(m.Networks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 12:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Endpoint == nil {
- m.Endpoint = &Endpoint{}
- }
- if err := m.Endpoint.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 13:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LogDriver", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.LogDriver == nil {
- m.LogDriver = &Driver{}
- }
- if err := m.LogDriver.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *NetworkAttachment) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NetworkAttachment: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NetworkAttachment: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Network == nil {
- m.Network = &Network{}
- }
- if err := m.Network.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Addresses = append(m.Addresses, string(data[iNdEx:postIndex]))
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Aliases = append(m.Aliases, string(data[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Network) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Network: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Network: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ID = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field DriverState", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.DriverState == nil {
- m.DriverState = &Driver{}
- }
- if err := m.DriverState.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field IPAM", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.IPAM == nil {
- m.IPAM = &IPAMOptions{}
- }
- if err := m.IPAM.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Cluster) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Cluster: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Cluster: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ID = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RootCA", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.RootCA.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NetworkBootstrapKeys", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NetworkBootstrapKeys = append(m.NetworkBootstrapKeys, &EncryptionKey{})
- if err := m.NetworkBootstrapKeys[len(m.NetworkBootstrapKeys)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKeyLamportClock", wireType)
- }
- m.EncryptionKeyLamportClock = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- m.EncryptionKeyLamportClock |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 8:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field BlacklistedCertificates", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- var keykey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- keykey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var stringLenmapkey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLenmapkey := int(stringLenmapkey)
- if intStringLenmapkey < 0 {
- return ErrInvalidLengthObjects
- }
- postStringIndexmapkey := iNdEx + intStringLenmapkey
- if postStringIndexmapkey > l {
- return io.ErrUnexpectedEOF
- }
- mapkey := string(data[iNdEx:postStringIndexmapkey])
- iNdEx = postStringIndexmapkey
- if m.BlacklistedCertificates == nil {
- m.BlacklistedCertificates = make(map[string]*BlacklistedCertificate)
- }
- if iNdEx < postIndex {
- var valuekey uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- valuekey |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- var mapmsglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- mapmsglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if mapmsglen < 0 {
- return ErrInvalidLengthObjects
- }
- postmsgIndex := iNdEx + mapmsglen
- if mapmsglen < 0 {
- return ErrInvalidLengthObjects
- }
- if postmsgIndex > l {
- return io.ErrUnexpectedEOF
- }
- mapvalue := &BlacklistedCertificate{}
- if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
- return err
- }
- iNdEx = postmsgIndex
- m.BlacklistedCertificates[mapkey] = mapvalue
- } else {
- var mapvalue *BlacklistedCertificate
- m.BlacklistedCertificates[mapkey] = mapvalue
- }
- iNdEx = postIndex
- case 9:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field UnlockKeys", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.UnlockKeys = append(m.UnlockKeys, &EncryptionKey{})
- if err := m.UnlockKeys[len(m.UnlockKeys)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Secret) Unmarshal(data []byte) error {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: Secret: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Secret: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.ID = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthObjects
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Digest = string(data[iNdEx:postIndex])
- iNdEx = postIndex
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field SecretSize", wireType)
- }
- m.SecretSize = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- m.SecretSize |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 6:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Internal", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- v |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Internal = bool(v != 0)
- default:
- iNdEx = preIndex
- skippy, err := skipObjects(data[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthObjects
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func skipObjects(data []byte) (n int, err error) {
- l := len(data)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if data[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthObjects
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowObjects
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := data[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipObjects(data[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
- }
- var (
- ErrInvalidLengthObjects = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowObjects = fmt.Errorf("proto: integer overflow")
- )
- func init() { proto.RegisterFile("objects.proto", fileDescriptorObjects) }
- var fileDescriptorObjects = []byte{
- // 1192 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45,
- 0x14, 0xef, 0xda, 0x1b, 0xdb, 0xfb, 0x1c, 0x47, 0x30, 0x54, 0x65, 0x1b, 0x82, 0x1d, 0x5c, 0x81,
- 0x2a, 0x54, 0xb9, 0xa2, 0x14, 0x94, 0x42, 0x2b, 0xb0, 0x9d, 0x08, 0xac, 0x52, 0xa8, 0xa6, 0xa5,
- 0x3d, 0x5a, 0x93, 0xdd, 0xa9, 0x59, 0xbc, 0xde, 0x59, 0xcd, 0x8c, 0x5d, 0xb9, 0x27, 0xc4, 0x07,
- 0xe0, 0x23, 0x20, 0xbe, 0x09, 0xd7, 0x1e, 0x38, 0x70, 0x83, 0x53, 0x44, 0x7d, 0x40, 0xe2, 0xc6,
- 0x47, 0x40, 0xf3, 0x67, 0x9d, 0x8d, 0xbc, 0x0e, 0xa9, 0x54, 0xe5, 0x36, 0xe3, 0xf9, 0xfd, 0x7e,
- 0xef, 0xcd, 0x9b, 0xdf, 0xbc, 0x1d, 0x43, 0x83, 0x1d, 0x7e, 0x4f, 0x03, 0x29, 0x3a, 0x29, 0x67,
- 0x92, 0x21, 0x14, 0xb2, 0x60, 0x4c, 0x79, 0x47, 0x3c, 0x25, 0x7c, 0x32, 0x8e, 0x64, 0x67, 0xf6,
- 0xc1, 0x76, 0x5d, 0xce, 0x53, 0x6a, 0x01, 0xdb, 0x75, 0x91, 0xd2, 0x20, 0x9b, 0x5c, 0x96, 0xd1,
- 0x84, 0x0a, 0x49, 0x26, 0xe9, 0xf5, 0xe5, 0xc8, 0x2e, 0x5d, 0x1c, 0xb1, 0x11, 0xd3, 0xc3, 0xeb,
- 0x6a, 0x64, 0x7e, 0x6d, 0xff, 0xea, 0x80, 0x7b, 0x8f, 0x4a, 0x82, 0x3e, 0x85, 0xea, 0x8c, 0x72,
- 0x11, 0xb1, 0xc4, 0x77, 0x76, 0x9d, 0xab, 0xf5, 0x1b, 0x6f, 0x75, 0x56, 0x23, 0x77, 0x1e, 0x19,
- 0x48, 0xcf, 0x7d, 0x7e, 0xd4, 0xba, 0x80, 0x33, 0x06, 0xba, 0x0d, 0x10, 0x70, 0x4a, 0x24, 0x0d,
- 0x87, 0x44, 0xfa, 0x25, 0xcd, 0x7f, 0xbb, 0x88, 0xff, 0x30, 0x4b, 0x0a, 0x7b, 0x96, 0xd0, 0x95,
- 0x8a, 0x3d, 0x4d, 0xc3, 0x8c, 0x5d, 0x3e, 0x13, 0xdb, 0x12, 0xba, 0xb2, 0xfd, 0x4f, 0x19, 0xdc,
- 0xaf, 0x59, 0x48, 0xd1, 0x25, 0x28, 0x45, 0xa1, 0x4e, 0xde, 0xeb, 0x55, 0x16, 0x47, 0xad, 0xd2,
- 0x60, 0x1f, 0x97, 0xa2, 0x10, 0xdd, 0x00, 0x77, 0x42, 0x25, 0xb1, 0x69, 0xf9, 0x45, 0xc2, 0xaa,
- 0x02, 0x76, 0x4f, 0x1a, 0x8b, 0x3e, 0x06, 0x57, 0x95, 0xd5, 0x26, 0xb3, 0x53, 0xc4, 0x51, 0x31,
- 0x1f, 0xa4, 0x34, 0xc8, 0x78, 0x0a, 0x8f, 0x0e, 0xa0, 0x1e, 0x52, 0x11, 0xf0, 0x28, 0x95, 0xaa,
- 0x92, 0xae, 0xa6, 0x5f, 0x59, 0x47, 0xdf, 0x3f, 0x86, 0xe2, 0x3c, 0x0f, 0xdd, 0x86, 0x8a, 0x90,
- 0x44, 0x4e, 0x85, 0xbf, 0xa1, 0x15, 0x9a, 0x6b, 0x13, 0xd0, 0x28, 0x9b, 0x82, 0xe5, 0xa0, 0x2f,
- 0x61, 0x6b, 0x42, 0x12, 0x32, 0xa2, 0x7c, 0x68, 0x55, 0x2a, 0x5a, 0xe5, 0x9d, 0xc2, 0xad, 0x1b,
- 0xa4, 0x11, 0xc2, 0x8d, 0x49, 0x7e, 0x8a, 0x0e, 0x00, 0x88, 0x94, 0x24, 0xf8, 0x6e, 0x42, 0x13,
- 0xe9, 0x57, 0xb5, 0xca, 0xbb, 0x85, 0xb9, 0x50, 0xf9, 0x94, 0xf1, 0x71, 0x77, 0x09, 0xc6, 0x39,
- 0x22, 0xfa, 0x02, 0xea, 0x01, 0xe5, 0x32, 0x7a, 0x12, 0x05, 0x44, 0x52, 0xbf, 0xa6, 0x75, 0x5a,
- 0x45, 0x3a, 0xfd, 0x63, 0x98, 0xdd, 0x54, 0x9e, 0xd9, 0xfe, 0xa3, 0x04, 0xd5, 0x07, 0x94, 0xcf,
- 0xa2, 0xe0, 0xd5, 0x1e, 0xf7, 0xad, 0x13, 0xc7, 0x5d, 0x98, 0x99, 0x0d, 0xbb, 0x72, 0xe2, 0x7b,
- 0x50, 0xa3, 0x49, 0x98, 0xb2, 0x28, 0x91, 0xf6, 0xb8, 0x0b, 0xdd, 0x72, 0x60, 0x31, 0x78, 0x89,
- 0x46, 0x07, 0xd0, 0x30, 0x2e, 0x1e, 0x9e, 0x38, 0xeb, 0xdd, 0x22, 0xfa, 0xb7, 0x1a, 0x68, 0x0f,
- 0x69, 0x73, 0x9a, 0x9b, 0xa1, 0x7d, 0x68, 0xa4, 0x9c, 0xce, 0x22, 0x36, 0x15, 0x43, 0xbd, 0x89,
- 0xca, 0x99, 0x36, 0x81, 0x37, 0x33, 0x96, 0x9a, 0xb5, 0x7f, 0x2e, 0x41, 0x2d, 0xcb, 0x11, 0xdd,
- 0xb4, 0xe5, 0x70, 0xd6, 0x27, 0x94, 0x61, 0xb5, 0x94, 0xa9, 0xc4, 0x4d, 0xd8, 0x48, 0x19, 0x97,
- 0xc2, 0x2f, 0xed, 0x96, 0xd7, 0x79, 0xf6, 0x3e, 0xe3, 0xb2, 0xcf, 0x92, 0x27, 0xd1, 0x08, 0x1b,
- 0x30, 0x7a, 0x0c, 0xf5, 0x59, 0xc4, 0xe5, 0x94, 0xc4, 0xc3, 0x28, 0x15, 0x7e, 0x59, 0x73, 0xdf,
- 0x3b, 0x2d, 0x64, 0xe7, 0x91, 0xc1, 0x0f, 0xee, 0xf7, 0xb6, 0x16, 0x47, 0x2d, 0x58, 0x4e, 0x05,
- 0x06, 0x2b, 0x35, 0x48, 0xc5, 0xf6, 0x3d, 0xf0, 0x96, 0x2b, 0xe8, 0x1a, 0x40, 0x62, 0x2c, 0x3a,
- 0x5c, 0x9a, 0xa6, 0xb1, 0x38, 0x6a, 0x79, 0xd6, 0xb8, 0x83, 0x7d, 0xec, 0x59, 0xc0, 0x20, 0x44,
- 0x08, 0x5c, 0x12, 0x86, 0x5c, 0x5b, 0xc8, 0xc3, 0x7a, 0xdc, 0xfe, 0x6d, 0x03, 0xdc, 0x87, 0x44,
- 0x8c, 0xcf, 0xbb, 0xcd, 0xa8, 0x98, 0x2b, 0xa6, 0xbb, 0x06, 0x20, 0xcc, 0x51, 0xaa, 0xed, 0xb8,
- 0xc7, 0xdb, 0xb1, 0x07, 0xac, 0xb6, 0x63, 0x01, 0x66, 0x3b, 0x22, 0x66, 0x52, 0xfb, 0xcb, 0xc5,
- 0x7a, 0x8c, 0xae, 0x40, 0x35, 0x61, 0xa1, 0xa6, 0x57, 0x34, 0x1d, 0x16, 0x47, 0xad, 0x8a, 0x6a,
- 0x29, 0x83, 0x7d, 0x5c, 0x51, 0x4b, 0x83, 0x50, 0xdd, 0x5b, 0x92, 0x24, 0x4c, 0x12, 0xd5, 0x94,
- 0x84, 0xbd, 0xff, 0x85, 0xc6, 0xea, 0x1e, 0xc3, 0xb2, 0x7b, 0x9b, 0x63, 0xa2, 0x47, 0xf0, 0x46,
- 0x96, 0x6f, 0x5e, 0xb0, 0xf6, 0x32, 0x82, 0xc8, 0x2a, 0xe4, 0x56, 0x72, 0x7d, 0xd2, 0x5b, 0xdf,
- 0x27, 0x75, 0x05, 0x8b, 0xfa, 0x64, 0x0f, 0x1a, 0x21, 0x15, 0x11, 0xa7, 0xa1, 0xbe, 0x81, 0xd4,
- 0x87, 0x5d, 0xe7, 0xea, 0xd6, 0x9a, 0x4f, 0x8f, 0x15, 0xa1, 0x78, 0xd3, 0x72, 0xf4, 0x0c, 0x75,
- 0xa1, 0x66, 0x7d, 0x23, 0xfc, 0xba, 0xf6, 0xee, 0x19, 0xfb, 0xe3, 0x92, 0x76, 0xa2, 0x83, 0x6c,
- 0xbe, 0x54, 0x07, 0xb9, 0x05, 0x10, 0xb3, 0xd1, 0x30, 0xe4, 0xd1, 0x8c, 0x72, 0xbf, 0xa1, 0xb9,
- 0xdb, 0x45, 0xdc, 0x7d, 0x8d, 0xc0, 0x5e, 0xcc, 0x46, 0x66, 0xd8, 0xfe, 0xd1, 0x81, 0xd7, 0x57,
- 0x92, 0x42, 0x1f, 0x41, 0xd5, 0xa6, 0x75, 0xda, 0x23, 0xc0, 0xf2, 0x70, 0x86, 0x45, 0x3b, 0xe0,
- 0xa9, 0x3b, 0x42, 0x85, 0xa0, 0xe6, 0xf6, 0x7b, 0xf8, 0xf8, 0x07, 0xe4, 0x43, 0x95, 0xc4, 0x11,
- 0x51, 0x6b, 0x65, 0xbd, 0x96, 0x4d, 0xdb, 0x3f, 0x95, 0xa0, 0x6a, 0xc5, 0xce, 0xbb, 0x9d, 0xdb,
- 0xb0, 0x2b, 0x37, 0xeb, 0x0e, 0x6c, 0x9a, 0x72, 0x5a, 0x4b, 0xb8, 0xff, 0x5b, 0xd4, 0xba, 0xc1,
- 0x1b, 0x3b, 0xdc, 0x01, 0x37, 0x4a, 0xc9, 0xc4, 0xb6, 0xf2, 0xc2, 0xc8, 0x83, 0xfb, 0xdd, 0x7b,
- 0xdf, 0xa4, 0xc6, 0xd9, 0xb5, 0xc5, 0x51, 0xcb, 0x55, 0x3f, 0x60, 0x4d, 0x6b, 0xff, 0xb2, 0x01,
- 0xd5, 0x7e, 0x3c, 0x15, 0x92, 0xf2, 0xf3, 0x2e, 0x88, 0x0d, 0xbb, 0x52, 0x90, 0x3e, 0x54, 0x39,
- 0x63, 0x72, 0x18, 0x90, 0xd3, 0x6a, 0x81, 0x19, 0x93, 0xfd, 0x6e, 0x6f, 0x4b, 0x11, 0x55, 0x23,
- 0x31, 0x73, 0x5c, 0x51, 0xd4, 0x3e, 0x41, 0x8f, 0xe1, 0x52, 0xd6, 0x7e, 0x0f, 0x19, 0x93, 0x42,
- 0x72, 0x92, 0x0e, 0xc7, 0x74, 0xae, 0xbe, 0x79, 0xe5, 0x75, 0x2f, 0x93, 0x83, 0x24, 0xe0, 0x73,
- 0x5d, 0xa8, 0xbb, 0x74, 0x8e, 0x2f, 0x5a, 0x81, 0x5e, 0xc6, 0xbf, 0x4b, 0xe7, 0x02, 0x7d, 0x06,
- 0x3b, 0x74, 0x09, 0x53, 0x8a, 0xc3, 0x98, 0x4c, 0xd4, 0x87, 0x65, 0x18, 0xc4, 0x2c, 0x18, 0xeb,
- 0xde, 0xe6, 0xe2, 0xcb, 0x34, 0x2f, 0xf5, 0x95, 0x41, 0xf4, 0x15, 0x00, 0x09, 0xf0, 0x0f, 0x63,
- 0x12, 0x8c, 0xe3, 0x48, 0xa8, 0xf7, 0x67, 0xee, 0xb1, 0xa1, 0xda, 0x93, 0xca, 0x6d, 0xef, 0x94,
- 0x6a, 0x75, 0x7a, 0xc7, 0xdc, 0xdc, 0xd3, 0x45, 0x1c, 0x24, 0x92, 0xcf, 0xf1, 0x9b, 0x87, 0xc5,
- 0xab, 0xa8, 0x07, 0xf5, 0x69, 0xa2, 0xc2, 0x9b, 0x1a, 0x78, 0x67, 0xad, 0x01, 0x18, 0x96, 0xda,
- 0xf9, 0xf6, 0x0c, 0x76, 0x4e, 0x0b, 0x8e, 0x5e, 0x83, 0xf2, 0x98, 0xce, 0x8d, 0x7f, 0xb0, 0x1a,
- 0xa2, 0xcf, 0x61, 0x63, 0x46, 0xe2, 0x29, 0xb5, 0xce, 0x79, 0xbf, 0x28, 0x5e, 0xb1, 0x24, 0x36,
- 0xc4, 0x4f, 0x4a, 0x7b, 0x4e, 0xfb, 0x6f, 0x07, 0x2a, 0x0f, 0x68, 0xc0, 0xa9, 0x7c, 0xa5, 0x0e,
- 0xdd, 0x3b, 0xe1, 0xd0, 0x66, 0xf1, 0xe3, 0x45, 0x45, 0x5d, 0x31, 0xe8, 0x25, 0xa8, 0x84, 0xd1,
- 0x88, 0x0a, 0xf3, 0xfc, 0xf2, 0xb0, 0x9d, 0xa1, 0x36, 0xb8, 0x22, 0x7a, 0x46, 0xf5, 0x55, 0x2c,
- 0x9b, 0x97, 0x82, 0x55, 0x88, 0x9e, 0x51, 0xac, 0xd7, 0xd0, 0x36, 0xd4, 0xa2, 0x44, 0x52, 0x9e,
- 0x90, 0x58, 0x5b, 0xa5, 0x86, 0x97, 0xf3, 0xde, 0xce, 0xf3, 0x17, 0xcd, 0x0b, 0x7f, 0xbe, 0x68,
- 0x5e, 0xf8, 0xf7, 0x45, 0xd3, 0xf9, 0x61, 0xd1, 0x74, 0x9e, 0x2f, 0x9a, 0xce, 0xef, 0x8b, 0xa6,
- 0xf3, 0xd7, 0xa2, 0xe9, 0x1c, 0x56, 0xf4, 0xdf, 0xa7, 0x0f, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff,
- 0x49, 0x8f, 0xcd, 0x22, 0xae, 0x0d, 0x00, 0x00,
- }
|