github.com/containerd/Containerd@v1.4.13/api/types/mount.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/containerd/containerd/api/types/mount.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 reflect "reflect" 13 strings "strings" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27 // Mount describes mounts for a container. 28 // 29 // This type is the lingua franca of ContainerD. All services provide mounts 30 // to be used with the container at creation time. 31 // 32 // The Mount type follows the structure of the mount syscall, including a type, 33 // source, target and options. 34 type Mount struct { 35 // Type defines the nature of the mount. 36 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 37 // Source specifies the name of the mount. Depending on mount type, this 38 // may be a volume name or a host path, or even ignored. 39 Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` 40 // Target path in container 41 Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` 42 // Options specifies zero or more fstab style mount options. 43 Options []string `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` 44 XXX_NoUnkeyedLiteral struct{} `json:"-"` 45 XXX_unrecognized []byte `json:"-"` 46 XXX_sizecache int32 `json:"-"` 47 } 48 49 func (m *Mount) Reset() { *m = Mount{} } 50 func (*Mount) ProtoMessage() {} 51 func (*Mount) Descriptor() ([]byte, []int) { 52 return fileDescriptor_920196890d4a7b9f, []int{0} 53 } 54 func (m *Mount) XXX_Unmarshal(b []byte) error { 55 return m.Unmarshal(b) 56 } 57 func (m *Mount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 58 if deterministic { 59 return xxx_messageInfo_Mount.Marshal(b, m, deterministic) 60 } else { 61 b = b[:cap(b)] 62 n, err := m.MarshalToSizedBuffer(b) 63 if err != nil { 64 return nil, err 65 } 66 return b[:n], nil 67 } 68 } 69 func (m *Mount) XXX_Merge(src proto.Message) { 70 xxx_messageInfo_Mount.Merge(m, src) 71 } 72 func (m *Mount) XXX_Size() int { 73 return m.Size() 74 } 75 func (m *Mount) XXX_DiscardUnknown() { 76 xxx_messageInfo_Mount.DiscardUnknown(m) 77 } 78 79 var xxx_messageInfo_Mount proto.InternalMessageInfo 80 81 func init() { 82 proto.RegisterType((*Mount)(nil), "containerd.types.Mount") 83 } 84 85 func init() { 86 proto.RegisterFile("github.com/containerd/containerd/api/types/mount.proto", fileDescriptor_920196890d4a7b9f) 87 } 88 89 var fileDescriptor_920196890d4a7b9f = []byte{ 90 // 202 bytes of a gzipped FileDescriptorProto 91 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4b, 0xcf, 0x2c, 0xc9, 92 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 93 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xe7, 0xe6, 0x97, 94 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x54, 0xe8, 0x81, 0x65, 0xa5, 95 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x52, 0x2a, 0x17, 0xab, 96 0x2f, 0x48, 0x9b, 0x90, 0x10, 0x17, 0x0b, 0x48, 0x9d, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 97 0x98, 0x2d, 0x24, 0xc6, 0xc5, 0x56, 0x9c, 0x5f, 0x5a, 0x94, 0x9c, 0x2a, 0xc1, 0x04, 0x16, 0x85, 98 0xf2, 0x40, 0xe2, 0x25, 0x89, 0x45, 0xe9, 0xa9, 0x25, 0x12, 0xcc, 0x10, 0x71, 0x08, 0x4f, 0x48, 99 0x82, 0x8b, 0x3d, 0xbf, 0xa0, 0x24, 0x33, 0x3f, 0xaf, 0x58, 0x82, 0x45, 0x81, 0x59, 0x83, 0x33, 100 0x08, 0xc6, 0x75, 0xf2, 0x3a, 0xf1, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 101 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x01, 102 0xf1, 0x1e, 0xb4, 0x06, 0x93, 0x11, 0x0c, 0x49, 0x6c, 0x60, 0xb7, 0x1b, 0x03, 0x02, 0x00, 0x00, 103 0xff, 0xff, 0x82, 0x1c, 0x02, 0x18, 0x1d, 0x01, 0x00, 0x00, 104 } 105 106 func (m *Mount) Marshal() (dAtA []byte, err error) { 107 size := m.Size() 108 dAtA = make([]byte, size) 109 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 110 if err != nil { 111 return nil, err 112 } 113 return dAtA[:n], nil 114 } 115 116 func (m *Mount) MarshalTo(dAtA []byte) (int, error) { 117 size := m.Size() 118 return m.MarshalToSizedBuffer(dAtA[:size]) 119 } 120 121 func (m *Mount) MarshalToSizedBuffer(dAtA []byte) (int, error) { 122 i := len(dAtA) 123 _ = i 124 var l int 125 _ = l 126 if m.XXX_unrecognized != nil { 127 i -= len(m.XXX_unrecognized) 128 copy(dAtA[i:], m.XXX_unrecognized) 129 } 130 if len(m.Options) > 0 { 131 for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { 132 i -= len(m.Options[iNdEx]) 133 copy(dAtA[i:], m.Options[iNdEx]) 134 i = encodeVarintMount(dAtA, i, uint64(len(m.Options[iNdEx]))) 135 i-- 136 dAtA[i] = 0x22 137 } 138 } 139 if len(m.Target) > 0 { 140 i -= len(m.Target) 141 copy(dAtA[i:], m.Target) 142 i = encodeVarintMount(dAtA, i, uint64(len(m.Target))) 143 i-- 144 dAtA[i] = 0x1a 145 } 146 if len(m.Source) > 0 { 147 i -= len(m.Source) 148 copy(dAtA[i:], m.Source) 149 i = encodeVarintMount(dAtA, i, uint64(len(m.Source))) 150 i-- 151 dAtA[i] = 0x12 152 } 153 if len(m.Type) > 0 { 154 i -= len(m.Type) 155 copy(dAtA[i:], m.Type) 156 i = encodeVarintMount(dAtA, i, uint64(len(m.Type))) 157 i-- 158 dAtA[i] = 0xa 159 } 160 return len(dAtA) - i, nil 161 } 162 163 func encodeVarintMount(dAtA []byte, offset int, v uint64) int { 164 offset -= sovMount(v) 165 base := offset 166 for v >= 1<<7 { 167 dAtA[offset] = uint8(v&0x7f | 0x80) 168 v >>= 7 169 offset++ 170 } 171 dAtA[offset] = uint8(v) 172 return base 173 } 174 func (m *Mount) Size() (n int) { 175 if m == nil { 176 return 0 177 } 178 var l int 179 _ = l 180 l = len(m.Type) 181 if l > 0 { 182 n += 1 + l + sovMount(uint64(l)) 183 } 184 l = len(m.Source) 185 if l > 0 { 186 n += 1 + l + sovMount(uint64(l)) 187 } 188 l = len(m.Target) 189 if l > 0 { 190 n += 1 + l + sovMount(uint64(l)) 191 } 192 if len(m.Options) > 0 { 193 for _, s := range m.Options { 194 l = len(s) 195 n += 1 + l + sovMount(uint64(l)) 196 } 197 } 198 if m.XXX_unrecognized != nil { 199 n += len(m.XXX_unrecognized) 200 } 201 return n 202 } 203 204 func sovMount(x uint64) (n int) { 205 return (math_bits.Len64(x|1) + 6) / 7 206 } 207 func sozMount(x uint64) (n int) { 208 return sovMount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 209 } 210 func (this *Mount) String() string { 211 if this == nil { 212 return "nil" 213 } 214 s := strings.Join([]string{`&Mount{`, 215 `Type:` + fmt.Sprintf("%v", this.Type) + `,`, 216 `Source:` + fmt.Sprintf("%v", this.Source) + `,`, 217 `Target:` + fmt.Sprintf("%v", this.Target) + `,`, 218 `Options:` + fmt.Sprintf("%v", this.Options) + `,`, 219 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, 220 `}`, 221 }, "") 222 return s 223 } 224 func valueToStringMount(v interface{}) string { 225 rv := reflect.ValueOf(v) 226 if rv.IsNil() { 227 return "nil" 228 } 229 pv := reflect.Indirect(rv).Interface() 230 return fmt.Sprintf("*%v", pv) 231 } 232 func (m *Mount) Unmarshal(dAtA []byte) error { 233 l := len(dAtA) 234 iNdEx := 0 235 for iNdEx < l { 236 preIndex := iNdEx 237 var wire uint64 238 for shift := uint(0); ; shift += 7 { 239 if shift >= 64 { 240 return ErrIntOverflowMount 241 } 242 if iNdEx >= l { 243 return io.ErrUnexpectedEOF 244 } 245 b := dAtA[iNdEx] 246 iNdEx++ 247 wire |= uint64(b&0x7F) << shift 248 if b < 0x80 { 249 break 250 } 251 } 252 fieldNum := int32(wire >> 3) 253 wireType := int(wire & 0x7) 254 if wireType == 4 { 255 return fmt.Errorf("proto: Mount: wiretype end group for non-group") 256 } 257 if fieldNum <= 0 { 258 return fmt.Errorf("proto: Mount: illegal tag %d (wire type %d)", fieldNum, wire) 259 } 260 switch fieldNum { 261 case 1: 262 if wireType != 2 { 263 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 264 } 265 var stringLen uint64 266 for shift := uint(0); ; shift += 7 { 267 if shift >= 64 { 268 return ErrIntOverflowMount 269 } 270 if iNdEx >= l { 271 return io.ErrUnexpectedEOF 272 } 273 b := dAtA[iNdEx] 274 iNdEx++ 275 stringLen |= uint64(b&0x7F) << shift 276 if b < 0x80 { 277 break 278 } 279 } 280 intStringLen := int(stringLen) 281 if intStringLen < 0 { 282 return ErrInvalidLengthMount 283 } 284 postIndex := iNdEx + intStringLen 285 if postIndex < 0 { 286 return ErrInvalidLengthMount 287 } 288 if postIndex > l { 289 return io.ErrUnexpectedEOF 290 } 291 m.Type = string(dAtA[iNdEx:postIndex]) 292 iNdEx = postIndex 293 case 2: 294 if wireType != 2 { 295 return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) 296 } 297 var stringLen uint64 298 for shift := uint(0); ; shift += 7 { 299 if shift >= 64 { 300 return ErrIntOverflowMount 301 } 302 if iNdEx >= l { 303 return io.ErrUnexpectedEOF 304 } 305 b := dAtA[iNdEx] 306 iNdEx++ 307 stringLen |= uint64(b&0x7F) << shift 308 if b < 0x80 { 309 break 310 } 311 } 312 intStringLen := int(stringLen) 313 if intStringLen < 0 { 314 return ErrInvalidLengthMount 315 } 316 postIndex := iNdEx + intStringLen 317 if postIndex < 0 { 318 return ErrInvalidLengthMount 319 } 320 if postIndex > l { 321 return io.ErrUnexpectedEOF 322 } 323 m.Source = string(dAtA[iNdEx:postIndex]) 324 iNdEx = postIndex 325 case 3: 326 if wireType != 2 { 327 return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) 328 } 329 var stringLen uint64 330 for shift := uint(0); ; shift += 7 { 331 if shift >= 64 { 332 return ErrIntOverflowMount 333 } 334 if iNdEx >= l { 335 return io.ErrUnexpectedEOF 336 } 337 b := dAtA[iNdEx] 338 iNdEx++ 339 stringLen |= uint64(b&0x7F) << shift 340 if b < 0x80 { 341 break 342 } 343 } 344 intStringLen := int(stringLen) 345 if intStringLen < 0 { 346 return ErrInvalidLengthMount 347 } 348 postIndex := iNdEx + intStringLen 349 if postIndex < 0 { 350 return ErrInvalidLengthMount 351 } 352 if postIndex > l { 353 return io.ErrUnexpectedEOF 354 } 355 m.Target = string(dAtA[iNdEx:postIndex]) 356 iNdEx = postIndex 357 case 4: 358 if wireType != 2 { 359 return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) 360 } 361 var stringLen uint64 362 for shift := uint(0); ; shift += 7 { 363 if shift >= 64 { 364 return ErrIntOverflowMount 365 } 366 if iNdEx >= l { 367 return io.ErrUnexpectedEOF 368 } 369 b := dAtA[iNdEx] 370 iNdEx++ 371 stringLen |= uint64(b&0x7F) << shift 372 if b < 0x80 { 373 break 374 } 375 } 376 intStringLen := int(stringLen) 377 if intStringLen < 0 { 378 return ErrInvalidLengthMount 379 } 380 postIndex := iNdEx + intStringLen 381 if postIndex < 0 { 382 return ErrInvalidLengthMount 383 } 384 if postIndex > l { 385 return io.ErrUnexpectedEOF 386 } 387 m.Options = append(m.Options, string(dAtA[iNdEx:postIndex])) 388 iNdEx = postIndex 389 default: 390 iNdEx = preIndex 391 skippy, err := skipMount(dAtA[iNdEx:]) 392 if err != nil { 393 return err 394 } 395 if (skippy < 0) || (iNdEx+skippy) < 0 { 396 return ErrInvalidLengthMount 397 } 398 if (iNdEx + skippy) > l { 399 return io.ErrUnexpectedEOF 400 } 401 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 402 iNdEx += skippy 403 } 404 } 405 406 if iNdEx > l { 407 return io.ErrUnexpectedEOF 408 } 409 return nil 410 } 411 func skipMount(dAtA []byte) (n int, err error) { 412 l := len(dAtA) 413 iNdEx := 0 414 depth := 0 415 for iNdEx < l { 416 var wire uint64 417 for shift := uint(0); ; shift += 7 { 418 if shift >= 64 { 419 return 0, ErrIntOverflowMount 420 } 421 if iNdEx >= l { 422 return 0, io.ErrUnexpectedEOF 423 } 424 b := dAtA[iNdEx] 425 iNdEx++ 426 wire |= (uint64(b) & 0x7F) << shift 427 if b < 0x80 { 428 break 429 } 430 } 431 wireType := int(wire & 0x7) 432 switch wireType { 433 case 0: 434 for shift := uint(0); ; shift += 7 { 435 if shift >= 64 { 436 return 0, ErrIntOverflowMount 437 } 438 if iNdEx >= l { 439 return 0, io.ErrUnexpectedEOF 440 } 441 iNdEx++ 442 if dAtA[iNdEx-1] < 0x80 { 443 break 444 } 445 } 446 case 1: 447 iNdEx += 8 448 case 2: 449 var length int 450 for shift := uint(0); ; shift += 7 { 451 if shift >= 64 { 452 return 0, ErrIntOverflowMount 453 } 454 if iNdEx >= l { 455 return 0, io.ErrUnexpectedEOF 456 } 457 b := dAtA[iNdEx] 458 iNdEx++ 459 length |= (int(b) & 0x7F) << shift 460 if b < 0x80 { 461 break 462 } 463 } 464 if length < 0 { 465 return 0, ErrInvalidLengthMount 466 } 467 iNdEx += length 468 case 3: 469 depth++ 470 case 4: 471 if depth == 0 { 472 return 0, ErrUnexpectedEndOfGroupMount 473 } 474 depth-- 475 case 5: 476 iNdEx += 4 477 default: 478 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 479 } 480 if iNdEx < 0 { 481 return 0, ErrInvalidLengthMount 482 } 483 if depth == 0 { 484 return iNdEx, nil 485 } 486 } 487 return 0, io.ErrUnexpectedEOF 488 } 489 490 var ( 491 ErrInvalidLengthMount = fmt.Errorf("proto: negative length found during unmarshaling") 492 ErrIntOverflowMount = fmt.Errorf("proto: integer overflow") 493 ErrUnexpectedEndOfGroupMount = fmt.Errorf("proto: unexpected end of group") 494 )