github.com/demonoid81/containerd@v1.3.4/api/types/platform.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: github.com/containerd/containerd/api/types/platform.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  	reflect "reflect"
    12  	strings "strings"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = 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.
    24  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    25  
    26  // Platform follows the structure of the OCI platform specification, from
    27  // descriptors.
    28  type Platform struct {
    29  	OS                   string   `protobuf:"bytes,1,opt,name=os,proto3" json:"os,omitempty"`
    30  	Architecture         string   `protobuf:"bytes,2,opt,name=architecture,proto3" json:"architecture,omitempty"`
    31  	Variant              string   `protobuf:"bytes,3,opt,name=variant,proto3" json:"variant,omitempty"`
    32  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    33  	XXX_unrecognized     []byte   `json:"-"`
    34  	XXX_sizecache        int32    `json:"-"`
    35  }
    36  
    37  func (m *Platform) Reset()      { *m = Platform{} }
    38  func (*Platform) ProtoMessage() {}
    39  func (*Platform) Descriptor() ([]byte, []int) {
    40  	return fileDescriptor_24ba7a4b83e2367e, []int{0}
    41  }
    42  func (m *Platform) XXX_Unmarshal(b []byte) error {
    43  	return m.Unmarshal(b)
    44  }
    45  func (m *Platform) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    46  	if deterministic {
    47  		return xxx_messageInfo_Platform.Marshal(b, m, deterministic)
    48  	} else {
    49  		b = b[:cap(b)]
    50  		n, err := m.MarshalTo(b)
    51  		if err != nil {
    52  			return nil, err
    53  		}
    54  		return b[:n], nil
    55  	}
    56  }
    57  func (m *Platform) XXX_Merge(src proto.Message) {
    58  	xxx_messageInfo_Platform.Merge(m, src)
    59  }
    60  func (m *Platform) XXX_Size() int {
    61  	return m.Size()
    62  }
    63  func (m *Platform) XXX_DiscardUnknown() {
    64  	xxx_messageInfo_Platform.DiscardUnknown(m)
    65  }
    66  
    67  var xxx_messageInfo_Platform proto.InternalMessageInfo
    68  
    69  func init() {
    70  	proto.RegisterType((*Platform)(nil), "containerd.types.Platform")
    71  }
    72  
    73  func init() {
    74  	proto.RegisterFile("github.com/containerd/containerd/api/types/platform.proto", fileDescriptor_24ba7a4b83e2367e)
    75  }
    76  
    77  var fileDescriptor_24ba7a4b83e2367e = []byte{
    78  	// 205 bytes of a gzipped FileDescriptorProto
    79  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9,
    80  	0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
    81  	0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0x17, 0xe4, 0x24,
    82  	0x96, 0xa4, 0xe5, 0x17, 0xe5, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x14, 0xe9,
    83  	0x81, 0x15, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88, 0x3a, 0xa5,
    84  	0x04, 0x2e, 0x8e, 0x00, 0xa8, 0x4e, 0x21, 0x31, 0x2e, 0xa6, 0xfc, 0x62, 0x09, 0x46, 0x05, 0x46,
    85  	0x0d, 0x4e, 0x27, 0xb6, 0x47, 0xf7, 0xe4, 0x99, 0xfc, 0x83, 0x83, 0x98, 0xf2, 0x8b, 0x85, 0x94,
    86  	0xb8, 0x78, 0x12, 0x8b, 0x92, 0x33, 0x32, 0x4b, 0x52, 0x93, 0x4b, 0x4a, 0x8b, 0x52, 0x25, 0x98,
    87  	0x40, 0x2a, 0x82, 0x50, 0xc4, 0x84, 0x24, 0xb8, 0xd8, 0xcb, 0x12, 0x8b, 0x32, 0x13, 0xf3, 0x4a,
    88  	0x24, 0x98, 0xc1, 0xd2, 0x30, 0xae, 0x93, 0xd7, 0x89, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31,
    89  	0x34, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4,
    90  	0x18, 0xa3, 0x0c, 0x88, 0xf7, 0x9e, 0x35, 0x98, 0x8c, 0x60, 0x48, 0x62, 0x03, 0x3b, 0xdb, 0x18,
    91  	0x10, 0x00, 0x00, 0xff, 0xff, 0x05, 0xaa, 0xda, 0xa1, 0x1b, 0x01, 0x00, 0x00,
    92  }
    93  
    94  func (m *Platform) Marshal() (dAtA []byte, err error) {
    95  	size := m.Size()
    96  	dAtA = make([]byte, size)
    97  	n, err := m.MarshalTo(dAtA)
    98  	if err != nil {
    99  		return nil, err
   100  	}
   101  	return dAtA[:n], nil
   102  }
   103  
   104  func (m *Platform) MarshalTo(dAtA []byte) (int, error) {
   105  	var i int
   106  	_ = i
   107  	var l int
   108  	_ = l
   109  	if len(m.OS) > 0 {
   110  		dAtA[i] = 0xa
   111  		i++
   112  		i = encodeVarintPlatform(dAtA, i, uint64(len(m.OS)))
   113  		i += copy(dAtA[i:], m.OS)
   114  	}
   115  	if len(m.Architecture) > 0 {
   116  		dAtA[i] = 0x12
   117  		i++
   118  		i = encodeVarintPlatform(dAtA, i, uint64(len(m.Architecture)))
   119  		i += copy(dAtA[i:], m.Architecture)
   120  	}
   121  	if len(m.Variant) > 0 {
   122  		dAtA[i] = 0x1a
   123  		i++
   124  		i = encodeVarintPlatform(dAtA, i, uint64(len(m.Variant)))
   125  		i += copy(dAtA[i:], m.Variant)
   126  	}
   127  	if m.XXX_unrecognized != nil {
   128  		i += copy(dAtA[i:], m.XXX_unrecognized)
   129  	}
   130  	return i, nil
   131  }
   132  
   133  func encodeVarintPlatform(dAtA []byte, offset int, v uint64) int {
   134  	for v >= 1<<7 {
   135  		dAtA[offset] = uint8(v&0x7f | 0x80)
   136  		v >>= 7
   137  		offset++
   138  	}
   139  	dAtA[offset] = uint8(v)
   140  	return offset + 1
   141  }
   142  func (m *Platform) Size() (n int) {
   143  	if m == nil {
   144  		return 0
   145  	}
   146  	var l int
   147  	_ = l
   148  	l = len(m.OS)
   149  	if l > 0 {
   150  		n += 1 + l + sovPlatform(uint64(l))
   151  	}
   152  	l = len(m.Architecture)
   153  	if l > 0 {
   154  		n += 1 + l + sovPlatform(uint64(l))
   155  	}
   156  	l = len(m.Variant)
   157  	if l > 0 {
   158  		n += 1 + l + sovPlatform(uint64(l))
   159  	}
   160  	if m.XXX_unrecognized != nil {
   161  		n += len(m.XXX_unrecognized)
   162  	}
   163  	return n
   164  }
   165  
   166  func sovPlatform(x uint64) (n int) {
   167  	for {
   168  		n++
   169  		x >>= 7
   170  		if x == 0 {
   171  			break
   172  		}
   173  	}
   174  	return n
   175  }
   176  func sozPlatform(x uint64) (n int) {
   177  	return sovPlatform(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   178  }
   179  func (this *Platform) String() string {
   180  	if this == nil {
   181  		return "nil"
   182  	}
   183  	s := strings.Join([]string{`&Platform{`,
   184  		`OS:` + fmt.Sprintf("%v", this.OS) + `,`,
   185  		`Architecture:` + fmt.Sprintf("%v", this.Architecture) + `,`,
   186  		`Variant:` + fmt.Sprintf("%v", this.Variant) + `,`,
   187  		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
   188  		`}`,
   189  	}, "")
   190  	return s
   191  }
   192  func valueToStringPlatform(v interface{}) string {
   193  	rv := reflect.ValueOf(v)
   194  	if rv.IsNil() {
   195  		return "nil"
   196  	}
   197  	pv := reflect.Indirect(rv).Interface()
   198  	return fmt.Sprintf("*%v", pv)
   199  }
   200  func (m *Platform) Unmarshal(dAtA []byte) error {
   201  	l := len(dAtA)
   202  	iNdEx := 0
   203  	for iNdEx < l {
   204  		preIndex := iNdEx
   205  		var wire uint64
   206  		for shift := uint(0); ; shift += 7 {
   207  			if shift >= 64 {
   208  				return ErrIntOverflowPlatform
   209  			}
   210  			if iNdEx >= l {
   211  				return io.ErrUnexpectedEOF
   212  			}
   213  			b := dAtA[iNdEx]
   214  			iNdEx++
   215  			wire |= uint64(b&0x7F) << shift
   216  			if b < 0x80 {
   217  				break
   218  			}
   219  		}
   220  		fieldNum := int32(wire >> 3)
   221  		wireType := int(wire & 0x7)
   222  		if wireType == 4 {
   223  			return fmt.Errorf("proto: Platform: wiretype end group for non-group")
   224  		}
   225  		if fieldNum <= 0 {
   226  			return fmt.Errorf("proto: Platform: illegal tag %d (wire type %d)", fieldNum, wire)
   227  		}
   228  		switch fieldNum {
   229  		case 1:
   230  			if wireType != 2 {
   231  				return fmt.Errorf("proto: wrong wireType = %d for field OS", wireType)
   232  			}
   233  			var stringLen uint64
   234  			for shift := uint(0); ; shift += 7 {
   235  				if shift >= 64 {
   236  					return ErrIntOverflowPlatform
   237  				}
   238  				if iNdEx >= l {
   239  					return io.ErrUnexpectedEOF
   240  				}
   241  				b := dAtA[iNdEx]
   242  				iNdEx++
   243  				stringLen |= uint64(b&0x7F) << shift
   244  				if b < 0x80 {
   245  					break
   246  				}
   247  			}
   248  			intStringLen := int(stringLen)
   249  			if intStringLen < 0 {
   250  				return ErrInvalidLengthPlatform
   251  			}
   252  			postIndex := iNdEx + intStringLen
   253  			if postIndex < 0 {
   254  				return ErrInvalidLengthPlatform
   255  			}
   256  			if postIndex > l {
   257  				return io.ErrUnexpectedEOF
   258  			}
   259  			m.OS = string(dAtA[iNdEx:postIndex])
   260  			iNdEx = postIndex
   261  		case 2:
   262  			if wireType != 2 {
   263  				return fmt.Errorf("proto: wrong wireType = %d for field Architecture", wireType)
   264  			}
   265  			var stringLen uint64
   266  			for shift := uint(0); ; shift += 7 {
   267  				if shift >= 64 {
   268  					return ErrIntOverflowPlatform
   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 ErrInvalidLengthPlatform
   283  			}
   284  			postIndex := iNdEx + intStringLen
   285  			if postIndex < 0 {
   286  				return ErrInvalidLengthPlatform
   287  			}
   288  			if postIndex > l {
   289  				return io.ErrUnexpectedEOF
   290  			}
   291  			m.Architecture = string(dAtA[iNdEx:postIndex])
   292  			iNdEx = postIndex
   293  		case 3:
   294  			if wireType != 2 {
   295  				return fmt.Errorf("proto: wrong wireType = %d for field Variant", wireType)
   296  			}
   297  			var stringLen uint64
   298  			for shift := uint(0); ; shift += 7 {
   299  				if shift >= 64 {
   300  					return ErrIntOverflowPlatform
   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 ErrInvalidLengthPlatform
   315  			}
   316  			postIndex := iNdEx + intStringLen
   317  			if postIndex < 0 {
   318  				return ErrInvalidLengthPlatform
   319  			}
   320  			if postIndex > l {
   321  				return io.ErrUnexpectedEOF
   322  			}
   323  			m.Variant = string(dAtA[iNdEx:postIndex])
   324  			iNdEx = postIndex
   325  		default:
   326  			iNdEx = preIndex
   327  			skippy, err := skipPlatform(dAtA[iNdEx:])
   328  			if err != nil {
   329  				return err
   330  			}
   331  			if skippy < 0 {
   332  				return ErrInvalidLengthPlatform
   333  			}
   334  			if (iNdEx + skippy) < 0 {
   335  				return ErrInvalidLengthPlatform
   336  			}
   337  			if (iNdEx + skippy) > l {
   338  				return io.ErrUnexpectedEOF
   339  			}
   340  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   341  			iNdEx += skippy
   342  		}
   343  	}
   344  
   345  	if iNdEx > l {
   346  		return io.ErrUnexpectedEOF
   347  	}
   348  	return nil
   349  }
   350  func skipPlatform(dAtA []byte) (n int, err error) {
   351  	l := len(dAtA)
   352  	iNdEx := 0
   353  	for iNdEx < l {
   354  		var wire uint64
   355  		for shift := uint(0); ; shift += 7 {
   356  			if shift >= 64 {
   357  				return 0, ErrIntOverflowPlatform
   358  			}
   359  			if iNdEx >= l {
   360  				return 0, io.ErrUnexpectedEOF
   361  			}
   362  			b := dAtA[iNdEx]
   363  			iNdEx++
   364  			wire |= (uint64(b) & 0x7F) << shift
   365  			if b < 0x80 {
   366  				break
   367  			}
   368  		}
   369  		wireType := int(wire & 0x7)
   370  		switch wireType {
   371  		case 0:
   372  			for shift := uint(0); ; shift += 7 {
   373  				if shift >= 64 {
   374  					return 0, ErrIntOverflowPlatform
   375  				}
   376  				if iNdEx >= l {
   377  					return 0, io.ErrUnexpectedEOF
   378  				}
   379  				iNdEx++
   380  				if dAtA[iNdEx-1] < 0x80 {
   381  					break
   382  				}
   383  			}
   384  			return iNdEx, nil
   385  		case 1:
   386  			iNdEx += 8
   387  			return iNdEx, nil
   388  		case 2:
   389  			var length int
   390  			for shift := uint(0); ; shift += 7 {
   391  				if shift >= 64 {
   392  					return 0, ErrIntOverflowPlatform
   393  				}
   394  				if iNdEx >= l {
   395  					return 0, io.ErrUnexpectedEOF
   396  				}
   397  				b := dAtA[iNdEx]
   398  				iNdEx++
   399  				length |= (int(b) & 0x7F) << shift
   400  				if b < 0x80 {
   401  					break
   402  				}
   403  			}
   404  			if length < 0 {
   405  				return 0, ErrInvalidLengthPlatform
   406  			}
   407  			iNdEx += length
   408  			if iNdEx < 0 {
   409  				return 0, ErrInvalidLengthPlatform
   410  			}
   411  			return iNdEx, nil
   412  		case 3:
   413  			for {
   414  				var innerWire uint64
   415  				var start int = iNdEx
   416  				for shift := uint(0); ; shift += 7 {
   417  					if shift >= 64 {
   418  						return 0, ErrIntOverflowPlatform
   419  					}
   420  					if iNdEx >= l {
   421  						return 0, io.ErrUnexpectedEOF
   422  					}
   423  					b := dAtA[iNdEx]
   424  					iNdEx++
   425  					innerWire |= (uint64(b) & 0x7F) << shift
   426  					if b < 0x80 {
   427  						break
   428  					}
   429  				}
   430  				innerWireType := int(innerWire & 0x7)
   431  				if innerWireType == 4 {
   432  					break
   433  				}
   434  				next, err := skipPlatform(dAtA[start:])
   435  				if err != nil {
   436  					return 0, err
   437  				}
   438  				iNdEx = start + next
   439  				if iNdEx < 0 {
   440  					return 0, ErrInvalidLengthPlatform
   441  				}
   442  			}
   443  			return iNdEx, nil
   444  		case 4:
   445  			return iNdEx, nil
   446  		case 5:
   447  			iNdEx += 4
   448  			return iNdEx, nil
   449  		default:
   450  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   451  		}
   452  	}
   453  	panic("unreachable")
   454  }
   455  
   456  var (
   457  	ErrInvalidLengthPlatform = fmt.Errorf("proto: negative length found during unmarshaling")
   458  	ErrIntOverflowPlatform   = fmt.Errorf("proto: integer overflow")
   459  )