github.com/containerd/containerd@v22.0.0-20200918172823-438c87b8e050+incompatible/api/services/version/v1/version.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: github.com/containerd/containerd/api/services/version/v1/version.proto
     3  
     4  package version
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	types "github.com/gogo/protobuf/types"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	io "io"
    15  	math "math"
    16  	math_bits "math/bits"
    17  	reflect "reflect"
    18  	strings "strings"
    19  )
    20  
    21  // Reference imports to suppress errors if they are not otherwise used.
    22  var _ = proto.Marshal
    23  var _ = fmt.Errorf
    24  var _ = math.Inf
    25  
    26  // This is a compile-time assertion to ensure that this generated file
    27  // is compatible with the proto package it is being compiled against.
    28  // A compilation error at this line likely means your copy of the
    29  // proto package needs to be updated.
    30  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    31  
    32  type VersionResponse struct {
    33  	Version              string   `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
    34  	Revision             string   `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
    35  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    36  	XXX_unrecognized     []byte   `json:"-"`
    37  	XXX_sizecache        int32    `json:"-"`
    38  }
    39  
    40  func (m *VersionResponse) Reset()      { *m = VersionResponse{} }
    41  func (*VersionResponse) ProtoMessage() {}
    42  func (*VersionResponse) Descriptor() ([]byte, []int) {
    43  	return fileDescriptor_128109001e578ffe, []int{0}
    44  }
    45  func (m *VersionResponse) XXX_Unmarshal(b []byte) error {
    46  	return m.Unmarshal(b)
    47  }
    48  func (m *VersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    49  	if deterministic {
    50  		return xxx_messageInfo_VersionResponse.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  }
    60  func (m *VersionResponse) XXX_Merge(src proto.Message) {
    61  	xxx_messageInfo_VersionResponse.Merge(m, src)
    62  }
    63  func (m *VersionResponse) XXX_Size() int {
    64  	return m.Size()
    65  }
    66  func (m *VersionResponse) XXX_DiscardUnknown() {
    67  	xxx_messageInfo_VersionResponse.DiscardUnknown(m)
    68  }
    69  
    70  var xxx_messageInfo_VersionResponse proto.InternalMessageInfo
    71  
    72  func init() {
    73  	proto.RegisterType((*VersionResponse)(nil), "containerd.services.version.v1.VersionResponse")
    74  }
    75  
    76  func init() {
    77  	proto.RegisterFile("github.com/containerd/containerd/api/services/version/v1/version.proto", fileDescriptor_128109001e578ffe)
    78  }
    79  
    80  var fileDescriptor_128109001e578ffe = []byte{
    81  	// 243 bytes of a gzipped FileDescriptorProto
    82  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4b, 0xcf, 0x2c, 0xc9,
    83  	0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
    84  	0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x17, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x16, 0xeb,
    85  	0x97, 0xa5, 0x16, 0x15, 0x67, 0xe6, 0xe7, 0xe9, 0x97, 0x19, 0xc2, 0x98, 0x7a, 0x05, 0x45, 0xf9,
    86  	0x25, 0xf9, 0x42, 0x72, 0x08, 0x1d, 0x7a, 0x30, 0xd5, 0x7a, 0x30, 0x25, 0x65, 0x86, 0x52, 0xd2,
    87  	0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x60, 0xd5, 0x49, 0xa5, 0x69, 0xfa, 0xa9, 0xb9, 0x05,
    88  	0x25, 0x95, 0x10, 0xcd, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x11,
    89  	0x55, 0x72, 0xe7, 0xe2, 0x0f, 0x83, 0x18, 0x10, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a,
    90  	0x24, 0xc1, 0xc5, 0x0e, 0x35, 0x53, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x15, 0x92,
    91  	0xe2, 0xe2, 0x28, 0x4a, 0x2d, 0xcb, 0x04, 0x4b, 0x31, 0x81, 0xa5, 0xe0, 0x7c, 0xa3, 0x58, 0x2e,
    92  	0x76, 0xa8, 0x41, 0x42, 0x41, 0x08, 0xa6, 0x98, 0x1e, 0xc4, 0x49, 0x7a, 0x30, 0x27, 0xe9, 0xb9,
    93  	0x82, 0x9c, 0x24, 0xa5, 0xaf, 0x87, 0xdf, 0x2b, 0x7a, 0x68, 0x8e, 0x72, 0x8a, 0x3a, 0xf1, 0x50,
    94  	0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78,
    95  	0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x03, 0xb9, 0x81, 0x6b, 0x0d, 0x65, 0x46, 0x30,
    96  	0x26, 0xb1, 0x81, 0x9d, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x95, 0x0d, 0x52, 0x23, 0xa9,
    97  	0x01, 0x00, 0x00,
    98  }
    99  
   100  // Reference imports to suppress errors if they are not otherwise used.
   101  var _ context.Context
   102  var _ grpc.ClientConn
   103  
   104  // This is a compile-time assertion to ensure that this generated file
   105  // is compatible with the grpc package it is being compiled against.
   106  const _ = grpc.SupportPackageIsVersion4
   107  
   108  // VersionClient is the client API for Version service.
   109  //
   110  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   111  type VersionClient interface {
   112  	Version(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*VersionResponse, error)
   113  }
   114  
   115  type versionClient struct {
   116  	cc *grpc.ClientConn
   117  }
   118  
   119  func NewVersionClient(cc *grpc.ClientConn) VersionClient {
   120  	return &versionClient{cc}
   121  }
   122  
   123  func (c *versionClient) Version(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*VersionResponse, error) {
   124  	out := new(VersionResponse)
   125  	err := c.cc.Invoke(ctx, "/containerd.services.version.v1.Version/Version", in, out, opts...)
   126  	if err != nil {
   127  		return nil, err
   128  	}
   129  	return out, nil
   130  }
   131  
   132  // VersionServer is the server API for Version service.
   133  type VersionServer interface {
   134  	Version(context.Context, *types.Empty) (*VersionResponse, error)
   135  }
   136  
   137  // UnimplementedVersionServer can be embedded to have forward compatible implementations.
   138  type UnimplementedVersionServer struct {
   139  }
   140  
   141  func (*UnimplementedVersionServer) Version(ctx context.Context, req *types.Empty) (*VersionResponse, error) {
   142  	return nil, status.Errorf(codes.Unimplemented, "method Version not implemented")
   143  }
   144  
   145  func RegisterVersionServer(s *grpc.Server, srv VersionServer) {
   146  	s.RegisterService(&_Version_serviceDesc, srv)
   147  }
   148  
   149  func _Version_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   150  	in := new(types.Empty)
   151  	if err := dec(in); err != nil {
   152  		return nil, err
   153  	}
   154  	if interceptor == nil {
   155  		return srv.(VersionServer).Version(ctx, in)
   156  	}
   157  	info := &grpc.UnaryServerInfo{
   158  		Server:     srv,
   159  		FullMethod: "/containerd.services.version.v1.Version/Version",
   160  	}
   161  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   162  		return srv.(VersionServer).Version(ctx, req.(*types.Empty))
   163  	}
   164  	return interceptor(ctx, in, info, handler)
   165  }
   166  
   167  var _Version_serviceDesc = grpc.ServiceDesc{
   168  	ServiceName: "containerd.services.version.v1.Version",
   169  	HandlerType: (*VersionServer)(nil),
   170  	Methods: []grpc.MethodDesc{
   171  		{
   172  			MethodName: "Version",
   173  			Handler:    _Version_Version_Handler,
   174  		},
   175  	},
   176  	Streams:  []grpc.StreamDesc{},
   177  	Metadata: "github.com/containerd/containerd/api/services/version/v1/version.proto",
   178  }
   179  
   180  func (m *VersionResponse) Marshal() (dAtA []byte, err error) {
   181  	size := m.Size()
   182  	dAtA = make([]byte, size)
   183  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   184  	if err != nil {
   185  		return nil, err
   186  	}
   187  	return dAtA[:n], nil
   188  }
   189  
   190  func (m *VersionResponse) MarshalTo(dAtA []byte) (int, error) {
   191  	size := m.Size()
   192  	return m.MarshalToSizedBuffer(dAtA[:size])
   193  }
   194  
   195  func (m *VersionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   196  	i := len(dAtA)
   197  	_ = i
   198  	var l int
   199  	_ = l
   200  	if m.XXX_unrecognized != nil {
   201  		i -= len(m.XXX_unrecognized)
   202  		copy(dAtA[i:], m.XXX_unrecognized)
   203  	}
   204  	if len(m.Revision) > 0 {
   205  		i -= len(m.Revision)
   206  		copy(dAtA[i:], m.Revision)
   207  		i = encodeVarintVersion(dAtA, i, uint64(len(m.Revision)))
   208  		i--
   209  		dAtA[i] = 0x12
   210  	}
   211  	if len(m.Version) > 0 {
   212  		i -= len(m.Version)
   213  		copy(dAtA[i:], m.Version)
   214  		i = encodeVarintVersion(dAtA, i, uint64(len(m.Version)))
   215  		i--
   216  		dAtA[i] = 0xa
   217  	}
   218  	return len(dAtA) - i, nil
   219  }
   220  
   221  func encodeVarintVersion(dAtA []byte, offset int, v uint64) int {
   222  	offset -= sovVersion(v)
   223  	base := offset
   224  	for v >= 1<<7 {
   225  		dAtA[offset] = uint8(v&0x7f | 0x80)
   226  		v >>= 7
   227  		offset++
   228  	}
   229  	dAtA[offset] = uint8(v)
   230  	return base
   231  }
   232  func (m *VersionResponse) Size() (n int) {
   233  	if m == nil {
   234  		return 0
   235  	}
   236  	var l int
   237  	_ = l
   238  	l = len(m.Version)
   239  	if l > 0 {
   240  		n += 1 + l + sovVersion(uint64(l))
   241  	}
   242  	l = len(m.Revision)
   243  	if l > 0 {
   244  		n += 1 + l + sovVersion(uint64(l))
   245  	}
   246  	if m.XXX_unrecognized != nil {
   247  		n += len(m.XXX_unrecognized)
   248  	}
   249  	return n
   250  }
   251  
   252  func sovVersion(x uint64) (n int) {
   253  	return (math_bits.Len64(x|1) + 6) / 7
   254  }
   255  func sozVersion(x uint64) (n int) {
   256  	return sovVersion(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   257  }
   258  func (this *VersionResponse) String() string {
   259  	if this == nil {
   260  		return "nil"
   261  	}
   262  	s := strings.Join([]string{`&VersionResponse{`,
   263  		`Version:` + fmt.Sprintf("%v", this.Version) + `,`,
   264  		`Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
   265  		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
   266  		`}`,
   267  	}, "")
   268  	return s
   269  }
   270  func valueToStringVersion(v interface{}) string {
   271  	rv := reflect.ValueOf(v)
   272  	if rv.IsNil() {
   273  		return "nil"
   274  	}
   275  	pv := reflect.Indirect(rv).Interface()
   276  	return fmt.Sprintf("*%v", pv)
   277  }
   278  func (m *VersionResponse) Unmarshal(dAtA []byte) error {
   279  	l := len(dAtA)
   280  	iNdEx := 0
   281  	for iNdEx < l {
   282  		preIndex := iNdEx
   283  		var wire uint64
   284  		for shift := uint(0); ; shift += 7 {
   285  			if shift >= 64 {
   286  				return ErrIntOverflowVersion
   287  			}
   288  			if iNdEx >= l {
   289  				return io.ErrUnexpectedEOF
   290  			}
   291  			b := dAtA[iNdEx]
   292  			iNdEx++
   293  			wire |= uint64(b&0x7F) << shift
   294  			if b < 0x80 {
   295  				break
   296  			}
   297  		}
   298  		fieldNum := int32(wire >> 3)
   299  		wireType := int(wire & 0x7)
   300  		if wireType == 4 {
   301  			return fmt.Errorf("proto: VersionResponse: wiretype end group for non-group")
   302  		}
   303  		if fieldNum <= 0 {
   304  			return fmt.Errorf("proto: VersionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
   305  		}
   306  		switch fieldNum {
   307  		case 1:
   308  			if wireType != 2 {
   309  				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
   310  			}
   311  			var stringLen uint64
   312  			for shift := uint(0); ; shift += 7 {
   313  				if shift >= 64 {
   314  					return ErrIntOverflowVersion
   315  				}
   316  				if iNdEx >= l {
   317  					return io.ErrUnexpectedEOF
   318  				}
   319  				b := dAtA[iNdEx]
   320  				iNdEx++
   321  				stringLen |= uint64(b&0x7F) << shift
   322  				if b < 0x80 {
   323  					break
   324  				}
   325  			}
   326  			intStringLen := int(stringLen)
   327  			if intStringLen < 0 {
   328  				return ErrInvalidLengthVersion
   329  			}
   330  			postIndex := iNdEx + intStringLen
   331  			if postIndex < 0 {
   332  				return ErrInvalidLengthVersion
   333  			}
   334  			if postIndex > l {
   335  				return io.ErrUnexpectedEOF
   336  			}
   337  			m.Version = string(dAtA[iNdEx:postIndex])
   338  			iNdEx = postIndex
   339  		case 2:
   340  			if wireType != 2 {
   341  				return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
   342  			}
   343  			var stringLen uint64
   344  			for shift := uint(0); ; shift += 7 {
   345  				if shift >= 64 {
   346  					return ErrIntOverflowVersion
   347  				}
   348  				if iNdEx >= l {
   349  					return io.ErrUnexpectedEOF
   350  				}
   351  				b := dAtA[iNdEx]
   352  				iNdEx++
   353  				stringLen |= uint64(b&0x7F) << shift
   354  				if b < 0x80 {
   355  					break
   356  				}
   357  			}
   358  			intStringLen := int(stringLen)
   359  			if intStringLen < 0 {
   360  				return ErrInvalidLengthVersion
   361  			}
   362  			postIndex := iNdEx + intStringLen
   363  			if postIndex < 0 {
   364  				return ErrInvalidLengthVersion
   365  			}
   366  			if postIndex > l {
   367  				return io.ErrUnexpectedEOF
   368  			}
   369  			m.Revision = string(dAtA[iNdEx:postIndex])
   370  			iNdEx = postIndex
   371  		default:
   372  			iNdEx = preIndex
   373  			skippy, err := skipVersion(dAtA[iNdEx:])
   374  			if err != nil {
   375  				return err
   376  			}
   377  			if skippy < 0 {
   378  				return ErrInvalidLengthVersion
   379  			}
   380  			if (iNdEx + skippy) < 0 {
   381  				return ErrInvalidLengthVersion
   382  			}
   383  			if (iNdEx + skippy) > l {
   384  				return io.ErrUnexpectedEOF
   385  			}
   386  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   387  			iNdEx += skippy
   388  		}
   389  	}
   390  
   391  	if iNdEx > l {
   392  		return io.ErrUnexpectedEOF
   393  	}
   394  	return nil
   395  }
   396  func skipVersion(dAtA []byte) (n int, err error) {
   397  	l := len(dAtA)
   398  	iNdEx := 0
   399  	depth := 0
   400  	for iNdEx < l {
   401  		var wire uint64
   402  		for shift := uint(0); ; shift += 7 {
   403  			if shift >= 64 {
   404  				return 0, ErrIntOverflowVersion
   405  			}
   406  			if iNdEx >= l {
   407  				return 0, io.ErrUnexpectedEOF
   408  			}
   409  			b := dAtA[iNdEx]
   410  			iNdEx++
   411  			wire |= (uint64(b) & 0x7F) << shift
   412  			if b < 0x80 {
   413  				break
   414  			}
   415  		}
   416  		wireType := int(wire & 0x7)
   417  		switch wireType {
   418  		case 0:
   419  			for shift := uint(0); ; shift += 7 {
   420  				if shift >= 64 {
   421  					return 0, ErrIntOverflowVersion
   422  				}
   423  				if iNdEx >= l {
   424  					return 0, io.ErrUnexpectedEOF
   425  				}
   426  				iNdEx++
   427  				if dAtA[iNdEx-1] < 0x80 {
   428  					break
   429  				}
   430  			}
   431  		case 1:
   432  			iNdEx += 8
   433  		case 2:
   434  			var length int
   435  			for shift := uint(0); ; shift += 7 {
   436  				if shift >= 64 {
   437  					return 0, ErrIntOverflowVersion
   438  				}
   439  				if iNdEx >= l {
   440  					return 0, io.ErrUnexpectedEOF
   441  				}
   442  				b := dAtA[iNdEx]
   443  				iNdEx++
   444  				length |= (int(b) & 0x7F) << shift
   445  				if b < 0x80 {
   446  					break
   447  				}
   448  			}
   449  			if length < 0 {
   450  				return 0, ErrInvalidLengthVersion
   451  			}
   452  			iNdEx += length
   453  		case 3:
   454  			depth++
   455  		case 4:
   456  			if depth == 0 {
   457  				return 0, ErrUnexpectedEndOfGroupVersion
   458  			}
   459  			depth--
   460  		case 5:
   461  			iNdEx += 4
   462  		default:
   463  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   464  		}
   465  		if iNdEx < 0 {
   466  			return 0, ErrInvalidLengthVersion
   467  		}
   468  		if depth == 0 {
   469  			return iNdEx, nil
   470  		}
   471  	}
   472  	return 0, io.ErrUnexpectedEOF
   473  }
   474  
   475  var (
   476  	ErrInvalidLengthVersion        = fmt.Errorf("proto: negative length found during unmarshaling")
   477  	ErrIntOverflowVersion          = fmt.Errorf("proto: integer overflow")
   478  	ErrUnexpectedEndOfGroupVersion = fmt.Errorf("proto: unexpected end of group")
   479  )