1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: caps.proto 3 4package moby_buildkit_v1_apicaps 5 6import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13) 14 15// Reference imports to suppress errors if they are not otherwise used. 16var _ = proto.Marshal 17var _ = fmt.Errorf 18var _ = math.Inf 19 20// This is a compile-time assertion to ensure that this generated file 21// is compatible with the proto package it is being compiled against. 22// A compilation error at this line likely means your copy of the 23// proto package needs to be updated. 24const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26// APICap defines a capability supported by the service 27type APICap struct { 28 ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` 29 Enabled bool `protobuf:"varint,2,opt,name=Enabled,proto3" json:"Enabled,omitempty"` 30 Deprecated bool `protobuf:"varint,3,opt,name=Deprecated,proto3" json:"Deprecated,omitempty"` 31 DisabledReason string `protobuf:"bytes,4,opt,name=DisabledReason,proto3" json:"DisabledReason,omitempty"` 32 DisabledReasonMsg string `protobuf:"bytes,5,opt,name=DisabledReasonMsg,proto3" json:"DisabledReasonMsg,omitempty"` 33 DisabledAlternative string `protobuf:"bytes,6,opt,name=DisabledAlternative,proto3" json:"DisabledAlternative,omitempty"` 34 XXX_NoUnkeyedLiteral struct{} `json:"-"` 35 XXX_unrecognized []byte `json:"-"` 36 XXX_sizecache int32 `json:"-"` 37} 38 39func (m *APICap) Reset() { *m = APICap{} } 40func (m *APICap) String() string { return proto.CompactTextString(m) } 41func (*APICap) ProtoMessage() {} 42func (*APICap) Descriptor() ([]byte, []int) { 43 return fileDescriptor_e19c39d9fcb89b83, []int{0} 44} 45func (m *APICap) XXX_Unmarshal(b []byte) error { 46 return m.Unmarshal(b) 47} 48func (m *APICap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 49 if deterministic { 50 return xxx_messageInfo_APICap.Marshal(b, m, deterministic) 51 } else { 52 b = b[:cap(b)] 53 n, err := m.MarshalToSizedBuffer(b) 54 if err != nil { 55 return nil, err 56 } 57 return b[:n], nil 58 } 59} 60func (m *APICap) XXX_Merge(src proto.Message) { 61 xxx_messageInfo_APICap.Merge(m, src) 62} 63func (m *APICap) XXX_Size() int { 64 return m.Size() 65} 66func (m *APICap) XXX_DiscardUnknown() { 67 xxx_messageInfo_APICap.DiscardUnknown(m) 68} 69 70var xxx_messageInfo_APICap proto.InternalMessageInfo 71 72func (m *APICap) GetID() string { 73 if m != nil { 74 return m.ID 75 } 76 return "" 77} 78 79func (m *APICap) GetEnabled() bool { 80 if m != nil { 81 return m.Enabled 82 } 83 return false 84} 85 86func (m *APICap) GetDeprecated() bool { 87 if m != nil { 88 return m.Deprecated 89 } 90 return false 91} 92 93func (m *APICap) GetDisabledReason() string { 94 if m != nil { 95 return m.DisabledReason 96 } 97 return "" 98} 99 100func (m *APICap) GetDisabledReasonMsg() string { 101 if m != nil { 102 return m.DisabledReasonMsg 103 } 104 return "" 105} 106 107func (m *APICap) GetDisabledAlternative() string { 108 if m != nil { 109 return m.DisabledAlternative 110 } 111 return "" 112} 113 114func init() { 115 proto.RegisterType((*APICap)(nil), "moby.buildkit.v1.apicaps.APICap") 116} 117 118func init() { proto.RegisterFile("caps.proto", fileDescriptor_e19c39d9fcb89b83) } 119 120var fileDescriptor_e19c39d9fcb89b83 = []byte{ 121 // 236 bytes of a gzipped FileDescriptorProto 122 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x4e, 0x2c, 0x28, 123 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xc8, 0xcd, 0x4f, 0xaa, 0xd4, 0x4b, 0x2a, 0xcd, 124 0xcc, 0x49, 0xc9, 0xce, 0x2c, 0xd1, 0x2b, 0x33, 0xd4, 0x4b, 0x2c, 0xc8, 0x04, 0xc9, 0x4b, 0xe9, 125 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 126 0x83, 0x35, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0x31, 0x48, 0xe9, 0x16, 0x23, 127 0x17, 0x9b, 0x63, 0x80, 0xa7, 0x73, 0x62, 0x81, 0x10, 0x1f, 0x17, 0x93, 0xa7, 0x8b, 0x04, 0xa3, 128 0x02, 0xa3, 0x06, 0x67, 0x10, 0x93, 0xa7, 0x8b, 0x90, 0x04, 0x17, 0xbb, 0x6b, 0x5e, 0x62, 0x52, 129 0x4e, 0x6a, 0x8a, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x47, 0x10, 0x8c, 0x2b, 0x24, 0xc7, 0xc5, 0xe5, 130 0x92, 0x5a, 0x50, 0x94, 0x9a, 0x9c, 0x58, 0x92, 0x9a, 0x22, 0xc1, 0x0c, 0x96, 0x44, 0x12, 0x11, 131 0x52, 0xe3, 0xe2, 0x73, 0xc9, 0x2c, 0x06, 0xab, 0x0d, 0x4a, 0x4d, 0x2c, 0xce, 0xcf, 0x93, 0x60, 132 0x01, 0x9b, 0x8a, 0x26, 0x2a, 0xa4, 0xc3, 0x25, 0x88, 0x2a, 0xe2, 0x5b, 0x9c, 0x2e, 0xc1, 0x0a, 133 0x56, 0x8a, 0x29, 0x21, 0x64, 0xc0, 0x25, 0x0c, 0x13, 0x74, 0xcc, 0x29, 0x49, 0x2d, 0xca, 0x4b, 134 0x2c, 0xc9, 0x2c, 0x4b, 0x95, 0x60, 0x03, 0xab, 0xc7, 0x26, 0xe5, 0xc4, 0x73, 0xe2, 0x91, 0x1c, 135 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x26, 0xb1, 0x81, 0x7d, 0x6c, 0x0c, 0x08, 136 0x00, 0x00, 0xff, 0xff, 0x02, 0x2d, 0x9e, 0x91, 0x48, 0x01, 0x00, 0x00, 137} 138 139func (m *APICap) Marshal() (dAtA []byte, err error) { 140 size := m.Size() 141 dAtA = make([]byte, size) 142 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 143 if err != nil { 144 return nil, err 145 } 146 return dAtA[:n], nil 147} 148 149func (m *APICap) MarshalTo(dAtA []byte) (int, error) { 150 size := m.Size() 151 return m.MarshalToSizedBuffer(dAtA[:size]) 152} 153 154func (m *APICap) MarshalToSizedBuffer(dAtA []byte) (int, error) { 155 i := len(dAtA) 156 _ = i 157 var l int 158 _ = l 159 if m.XXX_unrecognized != nil { 160 i -= len(m.XXX_unrecognized) 161 copy(dAtA[i:], m.XXX_unrecognized) 162 } 163 if len(m.DisabledAlternative) > 0 { 164 i -= len(m.DisabledAlternative) 165 copy(dAtA[i:], m.DisabledAlternative) 166 i = encodeVarintCaps(dAtA, i, uint64(len(m.DisabledAlternative))) 167 i-- 168 dAtA[i] = 0x32 169 } 170 if len(m.DisabledReasonMsg) > 0 { 171 i -= len(m.DisabledReasonMsg) 172 copy(dAtA[i:], m.DisabledReasonMsg) 173 i = encodeVarintCaps(dAtA, i, uint64(len(m.DisabledReasonMsg))) 174 i-- 175 dAtA[i] = 0x2a 176 } 177 if len(m.DisabledReason) > 0 { 178 i -= len(m.DisabledReason) 179 copy(dAtA[i:], m.DisabledReason) 180 i = encodeVarintCaps(dAtA, i, uint64(len(m.DisabledReason))) 181 i-- 182 dAtA[i] = 0x22 183 } 184 if m.Deprecated { 185 i-- 186 if m.Deprecated { 187 dAtA[i] = 1 188 } else { 189 dAtA[i] = 0 190 } 191 i-- 192 dAtA[i] = 0x18 193 } 194 if m.Enabled { 195 i-- 196 if m.Enabled { 197 dAtA[i] = 1 198 } else { 199 dAtA[i] = 0 200 } 201 i-- 202 dAtA[i] = 0x10 203 } 204 if len(m.ID) > 0 { 205 i -= len(m.ID) 206 copy(dAtA[i:], m.ID) 207 i = encodeVarintCaps(dAtA, i, uint64(len(m.ID))) 208 i-- 209 dAtA[i] = 0xa 210 } 211 return len(dAtA) - i, nil 212} 213 214func encodeVarintCaps(dAtA []byte, offset int, v uint64) int { 215 offset -= sovCaps(v) 216 base := offset 217 for v >= 1<<7 { 218 dAtA[offset] = uint8(v&0x7f | 0x80) 219 v >>= 7 220 offset++ 221 } 222 dAtA[offset] = uint8(v) 223 return base 224} 225func (m *APICap) Size() (n int) { 226 if m == nil { 227 return 0 228 } 229 var l int 230 _ = l 231 l = len(m.ID) 232 if l > 0 { 233 n += 1 + l + sovCaps(uint64(l)) 234 } 235 if m.Enabled { 236 n += 2 237 } 238 if m.Deprecated { 239 n += 2 240 } 241 l = len(m.DisabledReason) 242 if l > 0 { 243 n += 1 + l + sovCaps(uint64(l)) 244 } 245 l = len(m.DisabledReasonMsg) 246 if l > 0 { 247 n += 1 + l + sovCaps(uint64(l)) 248 } 249 l = len(m.DisabledAlternative) 250 if l > 0 { 251 n += 1 + l + sovCaps(uint64(l)) 252 } 253 if m.XXX_unrecognized != nil { 254 n += len(m.XXX_unrecognized) 255 } 256 return n 257} 258 259func sovCaps(x uint64) (n int) { 260 return (math_bits.Len64(x|1) + 6) / 7 261} 262func sozCaps(x uint64) (n int) { 263 return sovCaps(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 264} 265func (m *APICap) Unmarshal(dAtA []byte) error { 266 l := len(dAtA) 267 iNdEx := 0 268 for iNdEx < l { 269 preIndex := iNdEx 270 var wire uint64 271 for shift := uint(0); ; shift += 7 { 272 if shift >= 64 { 273 return ErrIntOverflowCaps 274 } 275 if iNdEx >= l { 276 return io.ErrUnexpectedEOF 277 } 278 b := dAtA[iNdEx] 279 iNdEx++ 280 wire |= uint64(b&0x7F) << shift 281 if b < 0x80 { 282 break 283 } 284 } 285 fieldNum := int32(wire >> 3) 286 wireType := int(wire & 0x7) 287 if wireType == 4 { 288 return fmt.Errorf("proto: APICap: wiretype end group for non-group") 289 } 290 if fieldNum <= 0 { 291 return fmt.Errorf("proto: APICap: illegal tag %d (wire type %d)", fieldNum, wire) 292 } 293 switch fieldNum { 294 case 1: 295 if wireType != 2 { 296 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 297 } 298 var stringLen uint64 299 for shift := uint(0); ; shift += 7 { 300 if shift >= 64 { 301 return ErrIntOverflowCaps 302 } 303 if iNdEx >= l { 304 return io.ErrUnexpectedEOF 305 } 306 b := dAtA[iNdEx] 307 iNdEx++ 308 stringLen |= uint64(b&0x7F) << shift 309 if b < 0x80 { 310 break 311 } 312 } 313 intStringLen := int(stringLen) 314 if intStringLen < 0 { 315 return ErrInvalidLengthCaps 316 } 317 postIndex := iNdEx + intStringLen 318 if postIndex < 0 { 319 return ErrInvalidLengthCaps 320 } 321 if postIndex > l { 322 return io.ErrUnexpectedEOF 323 } 324 m.ID = string(dAtA[iNdEx:postIndex]) 325 iNdEx = postIndex 326 case 2: 327 if wireType != 0 { 328 return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) 329 } 330 var v int 331 for shift := uint(0); ; shift += 7 { 332 if shift >= 64 { 333 return ErrIntOverflowCaps 334 } 335 if iNdEx >= l { 336 return io.ErrUnexpectedEOF 337 } 338 b := dAtA[iNdEx] 339 iNdEx++ 340 v |= int(b&0x7F) << shift 341 if b < 0x80 { 342 break 343 } 344 } 345 m.Enabled = bool(v != 0) 346 case 3: 347 if wireType != 0 { 348 return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) 349 } 350 var v int 351 for shift := uint(0); ; shift += 7 { 352 if shift >= 64 { 353 return ErrIntOverflowCaps 354 } 355 if iNdEx >= l { 356 return io.ErrUnexpectedEOF 357 } 358 b := dAtA[iNdEx] 359 iNdEx++ 360 v |= int(b&0x7F) << shift 361 if b < 0x80 { 362 break 363 } 364 } 365 m.Deprecated = bool(v != 0) 366 case 4: 367 if wireType != 2 { 368 return fmt.Errorf("proto: wrong wireType = %d for field DisabledReason", wireType) 369 } 370 var stringLen uint64 371 for shift := uint(0); ; shift += 7 { 372 if shift >= 64 { 373 return ErrIntOverflowCaps 374 } 375 if iNdEx >= l { 376 return io.ErrUnexpectedEOF 377 } 378 b := dAtA[iNdEx] 379 iNdEx++ 380 stringLen |= uint64(b&0x7F) << shift 381 if b < 0x80 { 382 break 383 } 384 } 385 intStringLen := int(stringLen) 386 if intStringLen < 0 { 387 return ErrInvalidLengthCaps 388 } 389 postIndex := iNdEx + intStringLen 390 if postIndex < 0 { 391 return ErrInvalidLengthCaps 392 } 393 if postIndex > l { 394 return io.ErrUnexpectedEOF 395 } 396 m.DisabledReason = string(dAtA[iNdEx:postIndex]) 397 iNdEx = postIndex 398 case 5: 399 if wireType != 2 { 400 return fmt.Errorf("proto: wrong wireType = %d for field DisabledReasonMsg", wireType) 401 } 402 var stringLen uint64 403 for shift := uint(0); ; shift += 7 { 404 if shift >= 64 { 405 return ErrIntOverflowCaps 406 } 407 if iNdEx >= l { 408 return io.ErrUnexpectedEOF 409 } 410 b := dAtA[iNdEx] 411 iNdEx++ 412 stringLen |= uint64(b&0x7F) << shift 413 if b < 0x80 { 414 break 415 } 416 } 417 intStringLen := int(stringLen) 418 if intStringLen < 0 { 419 return ErrInvalidLengthCaps 420 } 421 postIndex := iNdEx + intStringLen 422 if postIndex < 0 { 423 return ErrInvalidLengthCaps 424 } 425 if postIndex > l { 426 return io.ErrUnexpectedEOF 427 } 428 m.DisabledReasonMsg = string(dAtA[iNdEx:postIndex]) 429 iNdEx = postIndex 430 case 6: 431 if wireType != 2 { 432 return fmt.Errorf("proto: wrong wireType = %d for field DisabledAlternative", wireType) 433 } 434 var stringLen uint64 435 for shift := uint(0); ; shift += 7 { 436 if shift >= 64 { 437 return ErrIntOverflowCaps 438 } 439 if iNdEx >= l { 440 return io.ErrUnexpectedEOF 441 } 442 b := dAtA[iNdEx] 443 iNdEx++ 444 stringLen |= uint64(b&0x7F) << shift 445 if b < 0x80 { 446 break 447 } 448 } 449 intStringLen := int(stringLen) 450 if intStringLen < 0 { 451 return ErrInvalidLengthCaps 452 } 453 postIndex := iNdEx + intStringLen 454 if postIndex < 0 { 455 return ErrInvalidLengthCaps 456 } 457 if postIndex > l { 458 return io.ErrUnexpectedEOF 459 } 460 m.DisabledAlternative = string(dAtA[iNdEx:postIndex]) 461 iNdEx = postIndex 462 default: 463 iNdEx = preIndex 464 skippy, err := skipCaps(dAtA[iNdEx:]) 465 if err != nil { 466 return err 467 } 468 if skippy < 0 { 469 return ErrInvalidLengthCaps 470 } 471 if (iNdEx + skippy) < 0 { 472 return ErrInvalidLengthCaps 473 } 474 if (iNdEx + skippy) > l { 475 return io.ErrUnexpectedEOF 476 } 477 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 478 iNdEx += skippy 479 } 480 } 481 482 if iNdEx > l { 483 return io.ErrUnexpectedEOF 484 } 485 return nil 486} 487func skipCaps(dAtA []byte) (n int, err error) { 488 l := len(dAtA) 489 iNdEx := 0 490 depth := 0 491 for iNdEx < l { 492 var wire uint64 493 for shift := uint(0); ; shift += 7 { 494 if shift >= 64 { 495 return 0, ErrIntOverflowCaps 496 } 497 if iNdEx >= l { 498 return 0, io.ErrUnexpectedEOF 499 } 500 b := dAtA[iNdEx] 501 iNdEx++ 502 wire |= (uint64(b) & 0x7F) << shift 503 if b < 0x80 { 504 break 505 } 506 } 507 wireType := int(wire & 0x7) 508 switch wireType { 509 case 0: 510 for shift := uint(0); ; shift += 7 { 511 if shift >= 64 { 512 return 0, ErrIntOverflowCaps 513 } 514 if iNdEx >= l { 515 return 0, io.ErrUnexpectedEOF 516 } 517 iNdEx++ 518 if dAtA[iNdEx-1] < 0x80 { 519 break 520 } 521 } 522 case 1: 523 iNdEx += 8 524 case 2: 525 var length int 526 for shift := uint(0); ; shift += 7 { 527 if shift >= 64 { 528 return 0, ErrIntOverflowCaps 529 } 530 if iNdEx >= l { 531 return 0, io.ErrUnexpectedEOF 532 } 533 b := dAtA[iNdEx] 534 iNdEx++ 535 length |= (int(b) & 0x7F) << shift 536 if b < 0x80 { 537 break 538 } 539 } 540 if length < 0 { 541 return 0, ErrInvalidLengthCaps 542 } 543 iNdEx += length 544 case 3: 545 depth++ 546 case 4: 547 if depth == 0 { 548 return 0, ErrUnexpectedEndOfGroupCaps 549 } 550 depth-- 551 case 5: 552 iNdEx += 4 553 default: 554 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 555 } 556 if iNdEx < 0 { 557 return 0, ErrInvalidLengthCaps 558 } 559 if depth == 0 { 560 return iNdEx, nil 561 } 562 } 563 return 0, io.ErrUnexpectedEOF 564} 565 566var ( 567 ErrInvalidLengthCaps = fmt.Errorf("proto: negative length found during unmarshaling") 568 ErrIntOverflowCaps = fmt.Errorf("proto: integer overflow") 569 ErrUnexpectedEndOfGroupCaps = fmt.Errorf("proto: unexpected end of group") 570) 571