PageRenderTime 61ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/github.com/containerd/containerd/api/types/descriptor.pb.go

https://gitlab.com/unofficial-mirrors/kubernetes
Go | 428 lines | 382 code | 17 blank | 29 comment | 77 complexity | d03bf8b2de6d1430aa8a8da7eed36e22 MD5 | raw file
  1. // Code generated by protoc-gen-gogo.
  2. // source: github.com/containerd/containerd/api/types/descriptor.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package types is a generated protocol buffer package.
  6. It is generated from these files:
  7. github.com/containerd/containerd/api/types/descriptor.proto
  8. github.com/containerd/containerd/api/types/metrics.proto
  9. github.com/containerd/containerd/api/types/mount.proto
  10. github.com/containerd/containerd/api/types/platform.proto
  11. It has these top-level messages:
  12. Descriptor
  13. Metric
  14. Mount
  15. Platform
  16. */
  17. package types
  18. import proto "github.com/gogo/protobuf/proto"
  19. import fmt "fmt"
  20. import math "math"
  21. import _ "github.com/gogo/protobuf/gogoproto"
  22. import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
  23. import strings "strings"
  24. import reflect "reflect"
  25. import io "io"
  26. // Reference imports to suppress errors if they are not otherwise used.
  27. var _ = proto.Marshal
  28. var _ = fmt.Errorf
  29. var _ = math.Inf
  30. // This is a compile-time assertion to ensure that this generated file
  31. // is compatible with the proto package it is being compiled against.
  32. // A compilation error at this line likely means your copy of the
  33. // proto package needs to be updated.
  34. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  35. // Descriptor describes a blob in a content store.
  36. //
  37. // This descriptor can be used to reference content from an
  38. // oci descriptor found in a manifest.
  39. // See https://godoc.org/github.com/opencontainers/image-spec/specs-go/v1#Descriptor
  40. type Descriptor struct {
  41. MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
  42. Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
  43. Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  44. }
  45. func (m *Descriptor) Reset() { *m = Descriptor{} }
  46. func (*Descriptor) ProtoMessage() {}
  47. func (*Descriptor) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{0} }
  48. func init() {
  49. proto.RegisterType((*Descriptor)(nil), "containerd.types.Descriptor")
  50. }
  51. func (m *Descriptor) Marshal() (dAtA []byte, err error) {
  52. size := m.Size()
  53. dAtA = make([]byte, size)
  54. n, err := m.MarshalTo(dAtA)
  55. if err != nil {
  56. return nil, err
  57. }
  58. return dAtA[:n], nil
  59. }
  60. func (m *Descriptor) MarshalTo(dAtA []byte) (int, error) {
  61. var i int
  62. _ = i
  63. var l int
  64. _ = l
  65. if len(m.MediaType) > 0 {
  66. dAtA[i] = 0xa
  67. i++
  68. i = encodeVarintDescriptor(dAtA, i, uint64(len(m.MediaType)))
  69. i += copy(dAtA[i:], m.MediaType)
  70. }
  71. if len(m.Digest) > 0 {
  72. dAtA[i] = 0x12
  73. i++
  74. i = encodeVarintDescriptor(dAtA, i, uint64(len(m.Digest)))
  75. i += copy(dAtA[i:], m.Digest)
  76. }
  77. if m.Size_ != 0 {
  78. dAtA[i] = 0x18
  79. i++
  80. i = encodeVarintDescriptor(dAtA, i, uint64(m.Size_))
  81. }
  82. return i, nil
  83. }
  84. func encodeFixed64Descriptor(dAtA []byte, offset int, v uint64) int {
  85. dAtA[offset] = uint8(v)
  86. dAtA[offset+1] = uint8(v >> 8)
  87. dAtA[offset+2] = uint8(v >> 16)
  88. dAtA[offset+3] = uint8(v >> 24)
  89. dAtA[offset+4] = uint8(v >> 32)
  90. dAtA[offset+5] = uint8(v >> 40)
  91. dAtA[offset+6] = uint8(v >> 48)
  92. dAtA[offset+7] = uint8(v >> 56)
  93. return offset + 8
  94. }
  95. func encodeFixed32Descriptor(dAtA []byte, offset int, v uint32) int {
  96. dAtA[offset] = uint8(v)
  97. dAtA[offset+1] = uint8(v >> 8)
  98. dAtA[offset+2] = uint8(v >> 16)
  99. dAtA[offset+3] = uint8(v >> 24)
  100. return offset + 4
  101. }
  102. func encodeVarintDescriptor(dAtA []byte, offset int, v uint64) int {
  103. for v >= 1<<7 {
  104. dAtA[offset] = uint8(v&0x7f | 0x80)
  105. v >>= 7
  106. offset++
  107. }
  108. dAtA[offset] = uint8(v)
  109. return offset + 1
  110. }
  111. func (m *Descriptor) Size() (n int) {
  112. var l int
  113. _ = l
  114. l = len(m.MediaType)
  115. if l > 0 {
  116. n += 1 + l + sovDescriptor(uint64(l))
  117. }
  118. l = len(m.Digest)
  119. if l > 0 {
  120. n += 1 + l + sovDescriptor(uint64(l))
  121. }
  122. if m.Size_ != 0 {
  123. n += 1 + sovDescriptor(uint64(m.Size_))
  124. }
  125. return n
  126. }
  127. func sovDescriptor(x uint64) (n int) {
  128. for {
  129. n++
  130. x >>= 7
  131. if x == 0 {
  132. break
  133. }
  134. }
  135. return n
  136. }
  137. func sozDescriptor(x uint64) (n int) {
  138. return sovDescriptor(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  139. }
  140. func (this *Descriptor) String() string {
  141. if this == nil {
  142. return "nil"
  143. }
  144. s := strings.Join([]string{`&Descriptor{`,
  145. `MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`,
  146. `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
  147. `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
  148. `}`,
  149. }, "")
  150. return s
  151. }
  152. func valueToStringDescriptor(v interface{}) string {
  153. rv := reflect.ValueOf(v)
  154. if rv.IsNil() {
  155. return "nil"
  156. }
  157. pv := reflect.Indirect(rv).Interface()
  158. return fmt.Sprintf("*%v", pv)
  159. }
  160. func (m *Descriptor) Unmarshal(dAtA []byte) error {
  161. l := len(dAtA)
  162. iNdEx := 0
  163. for iNdEx < l {
  164. preIndex := iNdEx
  165. var wire uint64
  166. for shift := uint(0); ; shift += 7 {
  167. if shift >= 64 {
  168. return ErrIntOverflowDescriptor
  169. }
  170. if iNdEx >= l {
  171. return io.ErrUnexpectedEOF
  172. }
  173. b := dAtA[iNdEx]
  174. iNdEx++
  175. wire |= (uint64(b) & 0x7F) << shift
  176. if b < 0x80 {
  177. break
  178. }
  179. }
  180. fieldNum := int32(wire >> 3)
  181. wireType := int(wire & 0x7)
  182. if wireType == 4 {
  183. return fmt.Errorf("proto: Descriptor: wiretype end group for non-group")
  184. }
  185. if fieldNum <= 0 {
  186. return fmt.Errorf("proto: Descriptor: illegal tag %d (wire type %d)", fieldNum, wire)
  187. }
  188. switch fieldNum {
  189. case 1:
  190. if wireType != 2 {
  191. return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType)
  192. }
  193. var stringLen uint64
  194. for shift := uint(0); ; shift += 7 {
  195. if shift >= 64 {
  196. return ErrIntOverflowDescriptor
  197. }
  198. if iNdEx >= l {
  199. return io.ErrUnexpectedEOF
  200. }
  201. b := dAtA[iNdEx]
  202. iNdEx++
  203. stringLen |= (uint64(b) & 0x7F) << shift
  204. if b < 0x80 {
  205. break
  206. }
  207. }
  208. intStringLen := int(stringLen)
  209. if intStringLen < 0 {
  210. return ErrInvalidLengthDescriptor
  211. }
  212. postIndex := iNdEx + intStringLen
  213. if postIndex > l {
  214. return io.ErrUnexpectedEOF
  215. }
  216. m.MediaType = string(dAtA[iNdEx:postIndex])
  217. iNdEx = postIndex
  218. case 2:
  219. if wireType != 2 {
  220. return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType)
  221. }
  222. var stringLen uint64
  223. for shift := uint(0); ; shift += 7 {
  224. if shift >= 64 {
  225. return ErrIntOverflowDescriptor
  226. }
  227. if iNdEx >= l {
  228. return io.ErrUnexpectedEOF
  229. }
  230. b := dAtA[iNdEx]
  231. iNdEx++
  232. stringLen |= (uint64(b) & 0x7F) << shift
  233. if b < 0x80 {
  234. break
  235. }
  236. }
  237. intStringLen := int(stringLen)
  238. if intStringLen < 0 {
  239. return ErrInvalidLengthDescriptor
  240. }
  241. postIndex := iNdEx + intStringLen
  242. if postIndex > l {
  243. return io.ErrUnexpectedEOF
  244. }
  245. m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex])
  246. iNdEx = postIndex
  247. case 3:
  248. if wireType != 0 {
  249. return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
  250. }
  251. m.Size_ = 0
  252. for shift := uint(0); ; shift += 7 {
  253. if shift >= 64 {
  254. return ErrIntOverflowDescriptor
  255. }
  256. if iNdEx >= l {
  257. return io.ErrUnexpectedEOF
  258. }
  259. b := dAtA[iNdEx]
  260. iNdEx++
  261. m.Size_ |= (int64(b) & 0x7F) << shift
  262. if b < 0x80 {
  263. break
  264. }
  265. }
  266. default:
  267. iNdEx = preIndex
  268. skippy, err := skipDescriptor(dAtA[iNdEx:])
  269. if err != nil {
  270. return err
  271. }
  272. if skippy < 0 {
  273. return ErrInvalidLengthDescriptor
  274. }
  275. if (iNdEx + skippy) > l {
  276. return io.ErrUnexpectedEOF
  277. }
  278. iNdEx += skippy
  279. }
  280. }
  281. if iNdEx > l {
  282. return io.ErrUnexpectedEOF
  283. }
  284. return nil
  285. }
  286. func skipDescriptor(dAtA []byte) (n int, err error) {
  287. l := len(dAtA)
  288. iNdEx := 0
  289. for iNdEx < l {
  290. var wire uint64
  291. for shift := uint(0); ; shift += 7 {
  292. if shift >= 64 {
  293. return 0, ErrIntOverflowDescriptor
  294. }
  295. if iNdEx >= l {
  296. return 0, io.ErrUnexpectedEOF
  297. }
  298. b := dAtA[iNdEx]
  299. iNdEx++
  300. wire |= (uint64(b) & 0x7F) << shift
  301. if b < 0x80 {
  302. break
  303. }
  304. }
  305. wireType := int(wire & 0x7)
  306. switch wireType {
  307. case 0:
  308. for shift := uint(0); ; shift += 7 {
  309. if shift >= 64 {
  310. return 0, ErrIntOverflowDescriptor
  311. }
  312. if iNdEx >= l {
  313. return 0, io.ErrUnexpectedEOF
  314. }
  315. iNdEx++
  316. if dAtA[iNdEx-1] < 0x80 {
  317. break
  318. }
  319. }
  320. return iNdEx, nil
  321. case 1:
  322. iNdEx += 8
  323. return iNdEx, nil
  324. case 2:
  325. var length int
  326. for shift := uint(0); ; shift += 7 {
  327. if shift >= 64 {
  328. return 0, ErrIntOverflowDescriptor
  329. }
  330. if iNdEx >= l {
  331. return 0, io.ErrUnexpectedEOF
  332. }
  333. b := dAtA[iNdEx]
  334. iNdEx++
  335. length |= (int(b) & 0x7F) << shift
  336. if b < 0x80 {
  337. break
  338. }
  339. }
  340. iNdEx += length
  341. if length < 0 {
  342. return 0, ErrInvalidLengthDescriptor
  343. }
  344. return iNdEx, nil
  345. case 3:
  346. for {
  347. var innerWire uint64
  348. var start int = iNdEx
  349. for shift := uint(0); ; shift += 7 {
  350. if shift >= 64 {
  351. return 0, ErrIntOverflowDescriptor
  352. }
  353. if iNdEx >= l {
  354. return 0, io.ErrUnexpectedEOF
  355. }
  356. b := dAtA[iNdEx]
  357. iNdEx++
  358. innerWire |= (uint64(b) & 0x7F) << shift
  359. if b < 0x80 {
  360. break
  361. }
  362. }
  363. innerWireType := int(innerWire & 0x7)
  364. if innerWireType == 4 {
  365. break
  366. }
  367. next, err := skipDescriptor(dAtA[start:])
  368. if err != nil {
  369. return 0, err
  370. }
  371. iNdEx = start + next
  372. }
  373. return iNdEx, nil
  374. case 4:
  375. return iNdEx, nil
  376. case 5:
  377. iNdEx += 4
  378. return iNdEx, nil
  379. default:
  380. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  381. }
  382. }
  383. panic("unreachable")
  384. }
  385. var (
  386. ErrInvalidLengthDescriptor = fmt.Errorf("proto: negative length found during unmarshaling")
  387. ErrIntOverflowDescriptor = fmt.Errorf("proto: integer overflow")
  388. )
  389. func init() {
  390. proto.RegisterFile("github.com/containerd/containerd/api/types/descriptor.proto", fileDescriptorDescriptor)
  391. }
  392. var fileDescriptorDescriptor = []byte{
  393. // 232 bytes of a gzipped FileDescriptorProto
  394. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9,
  395. 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
  396. 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xa7, 0xa4, 0x16,
  397. 0x27, 0x17, 0x65, 0x16, 0x94, 0xe4, 0x17, 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20,
  398. 0x94, 0xe9, 0x81, 0x95, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88,
  399. 0x3a, 0xa5, 0x6e, 0x46, 0x2e, 0x2e, 0x17, 0xb8, 0x66, 0x21, 0x59, 0x2e, 0xae, 0xdc, 0xd4, 0x94,
  400. 0xcc, 0xc4, 0x78, 0x90, 0x1e, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x4e, 0xb0, 0x48, 0x48,
  401. 0x65, 0x41, 0xaa, 0x90, 0x17, 0x17, 0x5b, 0x4a, 0x66, 0x7a, 0x6a, 0x71, 0x89, 0x04, 0x13, 0x48,
  402. 0xca, 0xc9, 0xe8, 0xc4, 0x3d, 0x79, 0x86, 0x5b, 0xf7, 0xe4, 0xb5, 0x90, 0x9c, 0x9a, 0x5f, 0x90,
  403. 0x9a, 0x07, 0xb7, 0xbc, 0x58, 0x3f, 0x3d, 0x5f, 0x17, 0xa2, 0x45, 0xcf, 0x05, 0x4c, 0x05, 0x41,
  404. 0x4d, 0x10, 0x12, 0xe2, 0x62, 0x29, 0xce, 0xac, 0x4a, 0x95, 0x60, 0x56, 0x60, 0xd4, 0x60, 0x0e,
  405. 0x02, 0xb3, 0x9d, 0xbc, 0x4e, 0x3c, 0x94, 0x63, 0xb8, 0xf1, 0x50, 0x8e, 0xa1, 0xe1, 0x91, 0x1c,
  406. 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x18, 0x65, 0x40,
  407. 0x7c, 0x60, 0x58, 0x83, 0xc9, 0x24, 0x36, 0xb0, 0x07, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff,
  408. 0x23, 0x14, 0xc9, 0x7c, 0x47, 0x01, 0x00, 0x00,
  409. }