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