content.pb.go 115 KB

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