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