github.com/m3db/m3@v1.5.0/src/cluster/generated/proto/kvtest/kvtest.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: github.com/m3db/m3/src/cluster/generated/proto/kvtest/kvtest.proto
     3  
     4  // Copyright (c) 2018 Uber Technologies, Inc.
     5  //
     6  // Permission is hereby granted, free of charge, to any person obtaining a copy
     7  // of this software and associated documentation files (the "Software"), to deal
     8  // in the Software without restriction, including without limitation the rights
     9  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    10  // copies of the Software, and to permit persons to whom the Software is
    11  // furnished to do so, subject to the following conditions:
    12  //
    13  // The above copyright notice and this permission notice shall be included in
    14  // all copies or substantial portions of the Software.
    15  //
    16  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    17  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    18  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    19  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    20  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    21  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    22  // THE SOFTWARE.
    23  
    24  /*
    25  Package kvtest is a generated protocol buffer package.
    26  
    27  It is generated from these files:
    28  	github.com/m3db/m3/src/cluster/generated/proto/kvtest/kvtest.proto
    29  
    30  It has these top-level messages:
    31  	Foo
    32  */
    33  package kvtest
    34  
    35  import proto "github.com/gogo/protobuf/proto"
    36  import fmt "fmt"
    37  import math "math"
    38  
    39  import io "io"
    40  
    41  // Reference imports to suppress errors if they are not otherwise used.
    42  var _ = proto.Marshal
    43  var _ = fmt.Errorf
    44  var _ = math.Inf
    45  
    46  // This is a compile-time assertion to ensure that this generated file
    47  // is compatible with the proto package it is being compiled against.
    48  // A compilation error at this line likely means your copy of the
    49  // proto package needs to be updated.
    50  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    51  
    52  type Foo struct {
    53  	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
    54  }
    55  
    56  func (m *Foo) Reset()                    { *m = Foo{} }
    57  func (m *Foo) String() string            { return proto.CompactTextString(m) }
    58  func (*Foo) ProtoMessage()               {}
    59  func (*Foo) Descriptor() ([]byte, []int) { return fileDescriptorKvtest, []int{0} }
    60  
    61  func (m *Foo) GetMsg() string {
    62  	if m != nil {
    63  		return m.Msg
    64  	}
    65  	return ""
    66  }
    67  
    68  func init() {
    69  	proto.RegisterType((*Foo)(nil), "kvtest.Foo")
    70  }
    71  func (m *Foo) Marshal() (dAtA []byte, err error) {
    72  	size := m.Size()
    73  	dAtA = make([]byte, size)
    74  	n, err := m.MarshalTo(dAtA)
    75  	if err != nil {
    76  		return nil, err
    77  	}
    78  	return dAtA[:n], nil
    79  }
    80  
    81  func (m *Foo) MarshalTo(dAtA []byte) (int, error) {
    82  	var i int
    83  	_ = i
    84  	var l int
    85  	_ = l
    86  	if len(m.Msg) > 0 {
    87  		dAtA[i] = 0xa
    88  		i++
    89  		i = encodeVarintKvtest(dAtA, i, uint64(len(m.Msg)))
    90  		i += copy(dAtA[i:], m.Msg)
    91  	}
    92  	return i, nil
    93  }
    94  
    95  func encodeVarintKvtest(dAtA []byte, offset int, v uint64) int {
    96  	for v >= 1<<7 {
    97  		dAtA[offset] = uint8(v&0x7f | 0x80)
    98  		v >>= 7
    99  		offset++
   100  	}
   101  	dAtA[offset] = uint8(v)
   102  	return offset + 1
   103  }
   104  func (m *Foo) Size() (n int) {
   105  	var l int
   106  	_ = l
   107  	l = len(m.Msg)
   108  	if l > 0 {
   109  		n += 1 + l + sovKvtest(uint64(l))
   110  	}
   111  	return n
   112  }
   113  
   114  func sovKvtest(x uint64) (n int) {
   115  	for {
   116  		n++
   117  		x >>= 7
   118  		if x == 0 {
   119  			break
   120  		}
   121  	}
   122  	return n
   123  }
   124  func sozKvtest(x uint64) (n int) {
   125  	return sovKvtest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   126  }
   127  func (m *Foo) Unmarshal(dAtA []byte) error {
   128  	l := len(dAtA)
   129  	iNdEx := 0
   130  	for iNdEx < l {
   131  		preIndex := iNdEx
   132  		var wire uint64
   133  		for shift := uint(0); ; shift += 7 {
   134  			if shift >= 64 {
   135  				return ErrIntOverflowKvtest
   136  			}
   137  			if iNdEx >= l {
   138  				return io.ErrUnexpectedEOF
   139  			}
   140  			b := dAtA[iNdEx]
   141  			iNdEx++
   142  			wire |= (uint64(b) & 0x7F) << shift
   143  			if b < 0x80 {
   144  				break
   145  			}
   146  		}
   147  		fieldNum := int32(wire >> 3)
   148  		wireType := int(wire & 0x7)
   149  		if wireType == 4 {
   150  			return fmt.Errorf("proto: Foo: wiretype end group for non-group")
   151  		}
   152  		if fieldNum <= 0 {
   153  			return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire)
   154  		}
   155  		switch fieldNum {
   156  		case 1:
   157  			if wireType != 2 {
   158  				return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType)
   159  			}
   160  			var stringLen uint64
   161  			for shift := uint(0); ; shift += 7 {
   162  				if shift >= 64 {
   163  					return ErrIntOverflowKvtest
   164  				}
   165  				if iNdEx >= l {
   166  					return io.ErrUnexpectedEOF
   167  				}
   168  				b := dAtA[iNdEx]
   169  				iNdEx++
   170  				stringLen |= (uint64(b) & 0x7F) << shift
   171  				if b < 0x80 {
   172  					break
   173  				}
   174  			}
   175  			intStringLen := int(stringLen)
   176  			if intStringLen < 0 {
   177  				return ErrInvalidLengthKvtest
   178  			}
   179  			postIndex := iNdEx + intStringLen
   180  			if postIndex > l {
   181  				return io.ErrUnexpectedEOF
   182  			}
   183  			m.Msg = string(dAtA[iNdEx:postIndex])
   184  			iNdEx = postIndex
   185  		default:
   186  			iNdEx = preIndex
   187  			skippy, err := skipKvtest(dAtA[iNdEx:])
   188  			if err != nil {
   189  				return err
   190  			}
   191  			if skippy < 0 {
   192  				return ErrInvalidLengthKvtest
   193  			}
   194  			if (iNdEx + skippy) > l {
   195  				return io.ErrUnexpectedEOF
   196  			}
   197  			iNdEx += skippy
   198  		}
   199  	}
   200  
   201  	if iNdEx > l {
   202  		return io.ErrUnexpectedEOF
   203  	}
   204  	return nil
   205  }
   206  func skipKvtest(dAtA []byte) (n int, err error) {
   207  	l := len(dAtA)
   208  	iNdEx := 0
   209  	for iNdEx < l {
   210  		var wire uint64
   211  		for shift := uint(0); ; shift += 7 {
   212  			if shift >= 64 {
   213  				return 0, ErrIntOverflowKvtest
   214  			}
   215  			if iNdEx >= l {
   216  				return 0, io.ErrUnexpectedEOF
   217  			}
   218  			b := dAtA[iNdEx]
   219  			iNdEx++
   220  			wire |= (uint64(b) & 0x7F) << shift
   221  			if b < 0x80 {
   222  				break
   223  			}
   224  		}
   225  		wireType := int(wire & 0x7)
   226  		switch wireType {
   227  		case 0:
   228  			for shift := uint(0); ; shift += 7 {
   229  				if shift >= 64 {
   230  					return 0, ErrIntOverflowKvtest
   231  				}
   232  				if iNdEx >= l {
   233  					return 0, io.ErrUnexpectedEOF
   234  				}
   235  				iNdEx++
   236  				if dAtA[iNdEx-1] < 0x80 {
   237  					break
   238  				}
   239  			}
   240  			return iNdEx, nil
   241  		case 1:
   242  			iNdEx += 8
   243  			return iNdEx, nil
   244  		case 2:
   245  			var length int
   246  			for shift := uint(0); ; shift += 7 {
   247  				if shift >= 64 {
   248  					return 0, ErrIntOverflowKvtest
   249  				}
   250  				if iNdEx >= l {
   251  					return 0, io.ErrUnexpectedEOF
   252  				}
   253  				b := dAtA[iNdEx]
   254  				iNdEx++
   255  				length |= (int(b) & 0x7F) << shift
   256  				if b < 0x80 {
   257  					break
   258  				}
   259  			}
   260  			iNdEx += length
   261  			if length < 0 {
   262  				return 0, ErrInvalidLengthKvtest
   263  			}
   264  			return iNdEx, nil
   265  		case 3:
   266  			for {
   267  				var innerWire uint64
   268  				var start int = iNdEx
   269  				for shift := uint(0); ; shift += 7 {
   270  					if shift >= 64 {
   271  						return 0, ErrIntOverflowKvtest
   272  					}
   273  					if iNdEx >= l {
   274  						return 0, io.ErrUnexpectedEOF
   275  					}
   276  					b := dAtA[iNdEx]
   277  					iNdEx++
   278  					innerWire |= (uint64(b) & 0x7F) << shift
   279  					if b < 0x80 {
   280  						break
   281  					}
   282  				}
   283  				innerWireType := int(innerWire & 0x7)
   284  				if innerWireType == 4 {
   285  					break
   286  				}
   287  				next, err := skipKvtest(dAtA[start:])
   288  				if err != nil {
   289  					return 0, err
   290  				}
   291  				iNdEx = start + next
   292  			}
   293  			return iNdEx, nil
   294  		case 4:
   295  			return iNdEx, nil
   296  		case 5:
   297  			iNdEx += 4
   298  			return iNdEx, nil
   299  		default:
   300  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   301  		}
   302  	}
   303  	panic("unreachable")
   304  }
   305  
   306  var (
   307  	ErrInvalidLengthKvtest = fmt.Errorf("proto: negative length found during unmarshaling")
   308  	ErrIntOverflowKvtest   = fmt.Errorf("proto: integer overflow")
   309  )
   310  
   311  func init() {
   312  	proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/kvtest/kvtest.proto", fileDescriptorKvtest)
   313  }
   314  
   315  var fileDescriptorKvtest = []byte{
   316  	// 134 bytes of a gzipped FileDescriptorProto
   317  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4a, 0xcf, 0x2c, 0xc9,
   318  	0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f,
   319  	0x2e, 0x4a, 0xd6, 0x4f, 0xce, 0x29, 0x2d, 0x2e, 0x49, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d,
   320  	0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xcf, 0x2e, 0x2b, 0x49, 0x2d,
   321  	0x2e, 0x81, 0x52, 0x7a, 0x60, 0x31, 0x21, 0x36, 0x08, 0x4f, 0x49, 0x9c, 0x8b, 0xd9, 0x2d, 0x3f,
   322  	0x5f, 0x48, 0x80, 0x8b, 0x39, 0xb7, 0x38, 0x5d, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc4,
   323  	0x74, 0x12, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27,
   324  	0x3c, 0x96, 0x63, 0x48, 0x62, 0x03, 0xeb, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x63,
   325  	0xbf, 0x2b, 0x7f, 0x00, 0x00, 0x00,
   326  }