...

Source file src/go.etcd.io/etcd/api/v3/etcdserverpb/etcdserver.pb.go

Documentation: go.etcd.io/etcd/api/v3/etcdserverpb

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: etcdserver.proto
     3  
     4  package etcdserverpb
     5  
     6  import (
     7  	fmt "fmt"
     8  	io "io"
     9  	math "math"
    10  	math_bits "math/bits"
    11  
    12  	_ "github.com/gogo/protobuf/gogoproto"
    13  	proto "github.com/golang/protobuf/proto"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  type Request struct {
    28  	ID                   uint64   `protobuf:"varint,1,opt,name=ID" json:"ID"`
    29  	Method               string   `protobuf:"bytes,2,opt,name=Method" json:"Method"`
    30  	Path                 string   `protobuf:"bytes,3,opt,name=Path" json:"Path"`
    31  	Val                  string   `protobuf:"bytes,4,opt,name=Val" json:"Val"`
    32  	Dir                  bool     `protobuf:"varint,5,opt,name=Dir" json:"Dir"`
    33  	PrevValue            string   `protobuf:"bytes,6,opt,name=PrevValue" json:"PrevValue"`
    34  	PrevIndex            uint64   `protobuf:"varint,7,opt,name=PrevIndex" json:"PrevIndex"`
    35  	PrevExist            *bool    `protobuf:"varint,8,opt,name=PrevExist" json:"PrevExist,omitempty"`
    36  	Expiration           int64    `protobuf:"varint,9,opt,name=Expiration" json:"Expiration"`
    37  	Wait                 bool     `protobuf:"varint,10,opt,name=Wait" json:"Wait"`
    38  	Since                uint64   `protobuf:"varint,11,opt,name=Since" json:"Since"`
    39  	Recursive            bool     `protobuf:"varint,12,opt,name=Recursive" json:"Recursive"`
    40  	Sorted               bool     `protobuf:"varint,13,opt,name=Sorted" json:"Sorted"`
    41  	Quorum               bool     `protobuf:"varint,14,opt,name=Quorum" json:"Quorum"`
    42  	Time                 int64    `protobuf:"varint,15,opt,name=Time" json:"Time"`
    43  	Stream               bool     `protobuf:"varint,16,opt,name=Stream" json:"Stream"`
    44  	Refresh              *bool    `protobuf:"varint,17,opt,name=Refresh" json:"Refresh,omitempty"`
    45  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    46  	XXX_unrecognized     []byte   `json:"-"`
    47  	XXX_sizecache        int32    `json:"-"`
    48  }
    49  
    50  func (m *Request) Reset()         { *m = Request{} }
    51  func (m *Request) String() string { return proto.CompactTextString(m) }
    52  func (*Request) ProtoMessage()    {}
    53  func (*Request) Descriptor() ([]byte, []int) {
    54  	return fileDescriptor_09ffbeb3bebbce7e, []int{0}
    55  }
    56  func (m *Request) XXX_Unmarshal(b []byte) error {
    57  	return m.Unmarshal(b)
    58  }
    59  func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    60  	if deterministic {
    61  		return xxx_messageInfo_Request.Marshal(b, m, deterministic)
    62  	} else {
    63  		b = b[:cap(b)]
    64  		n, err := m.MarshalToSizedBuffer(b)
    65  		if err != nil {
    66  			return nil, err
    67  		}
    68  		return b[:n], nil
    69  	}
    70  }
    71  func (m *Request) XXX_Merge(src proto.Message) {
    72  	xxx_messageInfo_Request.Merge(m, src)
    73  }
    74  func (m *Request) XXX_Size() int {
    75  	return m.Size()
    76  }
    77  func (m *Request) XXX_DiscardUnknown() {
    78  	xxx_messageInfo_Request.DiscardUnknown(m)
    79  }
    80  
    81  var xxx_messageInfo_Request proto.InternalMessageInfo
    82  
    83  type Metadata struct {
    84  	NodeID               uint64   `protobuf:"varint,1,opt,name=NodeID" json:"NodeID"`
    85  	ClusterID            uint64   `protobuf:"varint,2,opt,name=ClusterID" json:"ClusterID"`
    86  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    87  	XXX_unrecognized     []byte   `json:"-"`
    88  	XXX_sizecache        int32    `json:"-"`
    89  }
    90  
    91  func (m *Metadata) Reset()         { *m = Metadata{} }
    92  func (m *Metadata) String() string { return proto.CompactTextString(m) }
    93  func (*Metadata) ProtoMessage()    {}
    94  func (*Metadata) Descriptor() ([]byte, []int) {
    95  	return fileDescriptor_09ffbeb3bebbce7e, []int{1}
    96  }
    97  func (m *Metadata) XXX_Unmarshal(b []byte) error {
    98  	return m.Unmarshal(b)
    99  }
   100  func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   101  	if deterministic {
   102  		return xxx_messageInfo_Metadata.Marshal(b, m, deterministic)
   103  	} else {
   104  		b = b[:cap(b)]
   105  		n, err := m.MarshalToSizedBuffer(b)
   106  		if err != nil {
   107  			return nil, err
   108  		}
   109  		return b[:n], nil
   110  	}
   111  }
   112  func (m *Metadata) XXX_Merge(src proto.Message) {
   113  	xxx_messageInfo_Metadata.Merge(m, src)
   114  }
   115  func (m *Metadata) XXX_Size() int {
   116  	return m.Size()
   117  }
   118  func (m *Metadata) XXX_DiscardUnknown() {
   119  	xxx_messageInfo_Metadata.DiscardUnknown(m)
   120  }
   121  
   122  var xxx_messageInfo_Metadata proto.InternalMessageInfo
   123  
   124  func init() {
   125  	proto.RegisterType((*Request)(nil), "etcdserverpb.Request")
   126  	proto.RegisterType((*Metadata)(nil), "etcdserverpb.Metadata")
   127  }
   128  
   129  func init() { proto.RegisterFile("etcdserver.proto", fileDescriptor_09ffbeb3bebbce7e) }
   130  
   131  var fileDescriptor_09ffbeb3bebbce7e = []byte{
   132  	// 380 bytes of a gzipped FileDescriptorProto
   133  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd2, 0xdd, 0x6e, 0xda, 0x30,
   134  	0x14, 0x07, 0x70, 0x0c, 0xe1, 0xcb, 0x63, 0x1b, 0xb3, 0xd0, 0x74, 0x84, 0xa6, 0x2c, 0x42, 0xbb,
   135  	0xc8, 0xd5, 0xf6, 0x0e, 0x2c, 0x5c, 0x44, 0x2a, 0x15, 0x0d, 0x15, 0xbd, 0x76, 0xc9, 0x29, 0x58,
   136  	0x02, 0x4c, 0x1d, 0x07, 0xf1, 0x06, 0x7d, 0x85, 0x3e, 0x12, 0x97, 0x7d, 0x82, 0xaa, 0xa5, 0x2f,
   137  	0x52, 0x39, 0x24, 0xc4, 0xed, 0x5d, 0xf4, 0xfb, 0x9f, 0x1c, 0x1f, 0x7f, 0xd0, 0x2e, 0xea, 0x79,
   138  	0x9c, 0xa0, 0xda, 0xa1, 0xfa, 0xbb, 0x55, 0x52, 0x4b, 0xd6, 0x29, 0x65, 0x7b, 0xdb, 0xef, 0x2d,
   139  	0xe4, 0x42, 0x66, 0xc1, 0x3f, 0xf3, 0x75, 0xaa, 0x19, 0x3c, 0x38, 0xb4, 0x19, 0xe1, 0x7d, 0x8a,
   140  	0x89, 0x66, 0x3d, 0x5a, 0x0d, 0x03, 0x20, 0x1e, 0xf1, 0x9d, 0xa1, 0x73, 0x78, 0xfe, 0x5d, 0x89,
   141  	0xaa, 0x61, 0xc0, 0x7e, 0xd1, 0xc6, 0x18, 0xf5, 0x52, 0xc6, 0x50, 0xf5, 0x88, 0xdf, 0xce, 0x93,
   142  	0xdc, 0x18, 0x50, 0x67, 0xc2, 0xf5, 0x12, 0x6a, 0x56, 0x96, 0x09, 0xfb, 0x49, 0x6b, 0x33, 0xbe,
   143  	0x02, 0xc7, 0x0a, 0x0c, 0x18, 0x0f, 0x84, 0x82, 0xba, 0x47, 0xfc, 0x56, 0xe1, 0x81, 0x50, 0x6c,
   144  	0x40, 0xdb, 0x13, 0x85, 0xbb, 0x19, 0x5f, 0xa5, 0x08, 0x0d, 0xeb, 0xaf, 0x92, 0x8b, 0x9a, 0x70,
   145  	0x13, 0xe3, 0x1e, 0x9a, 0xd6, 0xa0, 0x25, 0x17, 0x35, 0xa3, 0xbd, 0x48, 0x34, 0xb4, 0xce, 0xab,
   146  	0x90, 0xa8, 0x64, 0xf6, 0x87, 0xd2, 0xd1, 0x7e, 0x2b, 0x14, 0xd7, 0x42, 0x6e, 0xa0, 0xed, 0x11,
   147  	0xbf, 0x96, 0x37, 0xb2, 0xdc, 0xec, 0xed, 0x86, 0x0b, 0x0d, 0xd4, 0x1a, 0x35, 0x13, 0xd6, 0xa7,
   148  	0xf5, 0xa9, 0xd8, 0xcc, 0x11, 0xbe, 0x58, 0x33, 0x9c, 0xc8, 0xac, 0x1f, 0xe1, 0x3c, 0x55, 0x89,
   149  	0xd8, 0x21, 0x74, 0xac, 0x5f, 0x4b, 0x36, 0x67, 0x3a, 0x95, 0x4a, 0x63, 0x0c, 0x5f, 0xad, 0x82,
   150  	0xdc, 0x4c, 0x7a, 0x95, 0x4a, 0x95, 0xae, 0xe1, 0x9b, 0x9d, 0x9e, 0xcc, 0x4c, 0x75, 0x2d, 0xd6,
   151  	0x08, 0xdf, 0xad, 0xa9, 0x33, 0xc9, 0xba, 0x6a, 0x85, 0x7c, 0x0d, 0xdd, 0x0f, 0x5d, 0x33, 0x63,
   152  	0xae, 0xb9, 0xe8, 0x3b, 0x85, 0xc9, 0x12, 0x7e, 0x58, 0xa7, 0x52, 0xe0, 0xe0, 0x82, 0xb6, 0xc6,
   153  	0xa8, 0x79, 0xcc, 0x35, 0x37, 0x9d, 0x2e, 0x65, 0x8c, 0x9f, 0x5e, 0x43, 0x6e, 0x66, 0x87, 0xff,
   154  	0x57, 0x69, 0xa2, 0x51, 0x85, 0x41, 0xf6, 0x28, 0xce, 0xb7, 0x70, 0xe6, 0x61, 0xef, 0xf0, 0xea,
   155  	0x56, 0x0e, 0x47, 0x97, 0x3c, 0x1d, 0x5d, 0xf2, 0x72, 0x74, 0xc9, 0xe3, 0x9b, 0x5b, 0x79, 0x0f,
   156  	0x00, 0x00, 0xff, 0xff, 0xee, 0x40, 0xba, 0xd6, 0xa4, 0x02, 0x00, 0x00,
   157  }
   158  
   159  func (m *Request) Marshal() (dAtA []byte, err error) {
   160  	size := m.Size()
   161  	dAtA = make([]byte, size)
   162  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   163  	if err != nil {
   164  		return nil, err
   165  	}
   166  	return dAtA[:n], nil
   167  }
   168  
   169  func (m *Request) MarshalTo(dAtA []byte) (int, error) {
   170  	size := m.Size()
   171  	return m.MarshalToSizedBuffer(dAtA[:size])
   172  }
   173  
   174  func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   175  	i := len(dAtA)
   176  	_ = i
   177  	var l int
   178  	_ = l
   179  	if m.XXX_unrecognized != nil {
   180  		i -= len(m.XXX_unrecognized)
   181  		copy(dAtA[i:], m.XXX_unrecognized)
   182  	}
   183  	if m.Refresh != nil {
   184  		i--
   185  		if *m.Refresh {
   186  			dAtA[i] = 1
   187  		} else {
   188  			dAtA[i] = 0
   189  		}
   190  		i--
   191  		dAtA[i] = 0x1
   192  		i--
   193  		dAtA[i] = 0x88
   194  	}
   195  	i--
   196  	if m.Stream {
   197  		dAtA[i] = 1
   198  	} else {
   199  		dAtA[i] = 0
   200  	}
   201  	i--
   202  	dAtA[i] = 0x1
   203  	i--
   204  	dAtA[i] = 0x80
   205  	i = encodeVarintEtcdserver(dAtA, i, uint64(m.Time))
   206  	i--
   207  	dAtA[i] = 0x78
   208  	i--
   209  	if m.Quorum {
   210  		dAtA[i] = 1
   211  	} else {
   212  		dAtA[i] = 0
   213  	}
   214  	i--
   215  	dAtA[i] = 0x70
   216  	i--
   217  	if m.Sorted {
   218  		dAtA[i] = 1
   219  	} else {
   220  		dAtA[i] = 0
   221  	}
   222  	i--
   223  	dAtA[i] = 0x68
   224  	i--
   225  	if m.Recursive {
   226  		dAtA[i] = 1
   227  	} else {
   228  		dAtA[i] = 0
   229  	}
   230  	i--
   231  	dAtA[i] = 0x60
   232  	i = encodeVarintEtcdserver(dAtA, i, uint64(m.Since))
   233  	i--
   234  	dAtA[i] = 0x58
   235  	i--
   236  	if m.Wait {
   237  		dAtA[i] = 1
   238  	} else {
   239  		dAtA[i] = 0
   240  	}
   241  	i--
   242  	dAtA[i] = 0x50
   243  	i = encodeVarintEtcdserver(dAtA, i, uint64(m.Expiration))
   244  	i--
   245  	dAtA[i] = 0x48
   246  	if m.PrevExist != nil {
   247  		i--
   248  		if *m.PrevExist {
   249  			dAtA[i] = 1
   250  		} else {
   251  			dAtA[i] = 0
   252  		}
   253  		i--
   254  		dAtA[i] = 0x40
   255  	}
   256  	i = encodeVarintEtcdserver(dAtA, i, uint64(m.PrevIndex))
   257  	i--
   258  	dAtA[i] = 0x38
   259  	i -= len(m.PrevValue)
   260  	copy(dAtA[i:], m.PrevValue)
   261  	i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.PrevValue)))
   262  	i--
   263  	dAtA[i] = 0x32
   264  	i--
   265  	if m.Dir {
   266  		dAtA[i] = 1
   267  	} else {
   268  		dAtA[i] = 0
   269  	}
   270  	i--
   271  	dAtA[i] = 0x28
   272  	i -= len(m.Val)
   273  	copy(dAtA[i:], m.Val)
   274  	i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Val)))
   275  	i--
   276  	dAtA[i] = 0x22
   277  	i -= len(m.Path)
   278  	copy(dAtA[i:], m.Path)
   279  	i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Path)))
   280  	i--
   281  	dAtA[i] = 0x1a
   282  	i -= len(m.Method)
   283  	copy(dAtA[i:], m.Method)
   284  	i = encodeVarintEtcdserver(dAtA, i, uint64(len(m.Method)))
   285  	i--
   286  	dAtA[i] = 0x12
   287  	i = encodeVarintEtcdserver(dAtA, i, uint64(m.ID))
   288  	i--
   289  	dAtA[i] = 0x8
   290  	return len(dAtA) - i, nil
   291  }
   292  
   293  func (m *Metadata) Marshal() (dAtA []byte, err error) {
   294  	size := m.Size()
   295  	dAtA = make([]byte, size)
   296  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   297  	if err != nil {
   298  		return nil, err
   299  	}
   300  	return dAtA[:n], nil
   301  }
   302  
   303  func (m *Metadata) MarshalTo(dAtA []byte) (int, error) {
   304  	size := m.Size()
   305  	return m.MarshalToSizedBuffer(dAtA[:size])
   306  }
   307  
   308  func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   309  	i := len(dAtA)
   310  	_ = i
   311  	var l int
   312  	_ = l
   313  	if m.XXX_unrecognized != nil {
   314  		i -= len(m.XXX_unrecognized)
   315  		copy(dAtA[i:], m.XXX_unrecognized)
   316  	}
   317  	i = encodeVarintEtcdserver(dAtA, i, uint64(m.ClusterID))
   318  	i--
   319  	dAtA[i] = 0x10
   320  	i = encodeVarintEtcdserver(dAtA, i, uint64(m.NodeID))
   321  	i--
   322  	dAtA[i] = 0x8
   323  	return len(dAtA) - i, nil
   324  }
   325  
   326  func encodeVarintEtcdserver(dAtA []byte, offset int, v uint64) int {
   327  	offset -= sovEtcdserver(v)
   328  	base := offset
   329  	for v >= 1<<7 {
   330  		dAtA[offset] = uint8(v&0x7f | 0x80)
   331  		v >>= 7
   332  		offset++
   333  	}
   334  	dAtA[offset] = uint8(v)
   335  	return base
   336  }
   337  func (m *Request) Size() (n int) {
   338  	if m == nil {
   339  		return 0
   340  	}
   341  	var l int
   342  	_ = l
   343  	n += 1 + sovEtcdserver(uint64(m.ID))
   344  	l = len(m.Method)
   345  	n += 1 + l + sovEtcdserver(uint64(l))
   346  	l = len(m.Path)
   347  	n += 1 + l + sovEtcdserver(uint64(l))
   348  	l = len(m.Val)
   349  	n += 1 + l + sovEtcdserver(uint64(l))
   350  	n += 2
   351  	l = len(m.PrevValue)
   352  	n += 1 + l + sovEtcdserver(uint64(l))
   353  	n += 1 + sovEtcdserver(uint64(m.PrevIndex))
   354  	if m.PrevExist != nil {
   355  		n += 2
   356  	}
   357  	n += 1 + sovEtcdserver(uint64(m.Expiration))
   358  	n += 2
   359  	n += 1 + sovEtcdserver(uint64(m.Since))
   360  	n += 2
   361  	n += 2
   362  	n += 2
   363  	n += 1 + sovEtcdserver(uint64(m.Time))
   364  	n += 3
   365  	if m.Refresh != nil {
   366  		n += 3
   367  	}
   368  	if m.XXX_unrecognized != nil {
   369  		n += len(m.XXX_unrecognized)
   370  	}
   371  	return n
   372  }
   373  
   374  func (m *Metadata) Size() (n int) {
   375  	if m == nil {
   376  		return 0
   377  	}
   378  	var l int
   379  	_ = l
   380  	n += 1 + sovEtcdserver(uint64(m.NodeID))
   381  	n += 1 + sovEtcdserver(uint64(m.ClusterID))
   382  	if m.XXX_unrecognized != nil {
   383  		n += len(m.XXX_unrecognized)
   384  	}
   385  	return n
   386  }
   387  
   388  func sovEtcdserver(x uint64) (n int) {
   389  	return (math_bits.Len64(x|1) + 6) / 7
   390  }
   391  func sozEtcdserver(x uint64) (n int) {
   392  	return sovEtcdserver(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   393  }
   394  func (m *Request) Unmarshal(dAtA []byte) error {
   395  	l := len(dAtA)
   396  	iNdEx := 0
   397  	for iNdEx < l {
   398  		preIndex := iNdEx
   399  		var wire uint64
   400  		for shift := uint(0); ; shift += 7 {
   401  			if shift >= 64 {
   402  				return ErrIntOverflowEtcdserver
   403  			}
   404  			if iNdEx >= l {
   405  				return io.ErrUnexpectedEOF
   406  			}
   407  			b := dAtA[iNdEx]
   408  			iNdEx++
   409  			wire |= uint64(b&0x7F) << shift
   410  			if b < 0x80 {
   411  				break
   412  			}
   413  		}
   414  		fieldNum := int32(wire >> 3)
   415  		wireType := int(wire & 0x7)
   416  		if wireType == 4 {
   417  			return fmt.Errorf("proto: Request: wiretype end group for non-group")
   418  		}
   419  		if fieldNum <= 0 {
   420  			return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
   421  		}
   422  		switch fieldNum {
   423  		case 1:
   424  			if wireType != 0 {
   425  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
   426  			}
   427  			m.ID = 0
   428  			for shift := uint(0); ; shift += 7 {
   429  				if shift >= 64 {
   430  					return ErrIntOverflowEtcdserver
   431  				}
   432  				if iNdEx >= l {
   433  					return io.ErrUnexpectedEOF
   434  				}
   435  				b := dAtA[iNdEx]
   436  				iNdEx++
   437  				m.ID |= uint64(b&0x7F) << shift
   438  				if b < 0x80 {
   439  					break
   440  				}
   441  			}
   442  		case 2:
   443  			if wireType != 2 {
   444  				return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType)
   445  			}
   446  			var stringLen uint64
   447  			for shift := uint(0); ; shift += 7 {
   448  				if shift >= 64 {
   449  					return ErrIntOverflowEtcdserver
   450  				}
   451  				if iNdEx >= l {
   452  					return io.ErrUnexpectedEOF
   453  				}
   454  				b := dAtA[iNdEx]
   455  				iNdEx++
   456  				stringLen |= uint64(b&0x7F) << shift
   457  				if b < 0x80 {
   458  					break
   459  				}
   460  			}
   461  			intStringLen := int(stringLen)
   462  			if intStringLen < 0 {
   463  				return ErrInvalidLengthEtcdserver
   464  			}
   465  			postIndex := iNdEx + intStringLen
   466  			if postIndex < 0 {
   467  				return ErrInvalidLengthEtcdserver
   468  			}
   469  			if postIndex > l {
   470  				return io.ErrUnexpectedEOF
   471  			}
   472  			m.Method = string(dAtA[iNdEx:postIndex])
   473  			iNdEx = postIndex
   474  		case 3:
   475  			if wireType != 2 {
   476  				return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
   477  			}
   478  			var stringLen uint64
   479  			for shift := uint(0); ; shift += 7 {
   480  				if shift >= 64 {
   481  					return ErrIntOverflowEtcdserver
   482  				}
   483  				if iNdEx >= l {
   484  					return io.ErrUnexpectedEOF
   485  				}
   486  				b := dAtA[iNdEx]
   487  				iNdEx++
   488  				stringLen |= uint64(b&0x7F) << shift
   489  				if b < 0x80 {
   490  					break
   491  				}
   492  			}
   493  			intStringLen := int(stringLen)
   494  			if intStringLen < 0 {
   495  				return ErrInvalidLengthEtcdserver
   496  			}
   497  			postIndex := iNdEx + intStringLen
   498  			if postIndex < 0 {
   499  				return ErrInvalidLengthEtcdserver
   500  			}
   501  			if postIndex > l {
   502  				return io.ErrUnexpectedEOF
   503  			}
   504  			m.Path = string(dAtA[iNdEx:postIndex])
   505  			iNdEx = postIndex
   506  		case 4:
   507  			if wireType != 2 {
   508  				return fmt.Errorf("proto: wrong wireType = %d for field Val", wireType)
   509  			}
   510  			var stringLen uint64
   511  			for shift := uint(0); ; shift += 7 {
   512  				if shift >= 64 {
   513  					return ErrIntOverflowEtcdserver
   514  				}
   515  				if iNdEx >= l {
   516  					return io.ErrUnexpectedEOF
   517  				}
   518  				b := dAtA[iNdEx]
   519  				iNdEx++
   520  				stringLen |= uint64(b&0x7F) << shift
   521  				if b < 0x80 {
   522  					break
   523  				}
   524  			}
   525  			intStringLen := int(stringLen)
   526  			if intStringLen < 0 {
   527  				return ErrInvalidLengthEtcdserver
   528  			}
   529  			postIndex := iNdEx + intStringLen
   530  			if postIndex < 0 {
   531  				return ErrInvalidLengthEtcdserver
   532  			}
   533  			if postIndex > l {
   534  				return io.ErrUnexpectedEOF
   535  			}
   536  			m.Val = string(dAtA[iNdEx:postIndex])
   537  			iNdEx = postIndex
   538  		case 5:
   539  			if wireType != 0 {
   540  				return fmt.Errorf("proto: wrong wireType = %d for field Dir", wireType)
   541  			}
   542  			var v int
   543  			for shift := uint(0); ; shift += 7 {
   544  				if shift >= 64 {
   545  					return ErrIntOverflowEtcdserver
   546  				}
   547  				if iNdEx >= l {
   548  					return io.ErrUnexpectedEOF
   549  				}
   550  				b := dAtA[iNdEx]
   551  				iNdEx++
   552  				v |= int(b&0x7F) << shift
   553  				if b < 0x80 {
   554  					break
   555  				}
   556  			}
   557  			m.Dir = bool(v != 0)
   558  		case 6:
   559  			if wireType != 2 {
   560  				return fmt.Errorf("proto: wrong wireType = %d for field PrevValue", wireType)
   561  			}
   562  			var stringLen uint64
   563  			for shift := uint(0); ; shift += 7 {
   564  				if shift >= 64 {
   565  					return ErrIntOverflowEtcdserver
   566  				}
   567  				if iNdEx >= l {
   568  					return io.ErrUnexpectedEOF
   569  				}
   570  				b := dAtA[iNdEx]
   571  				iNdEx++
   572  				stringLen |= uint64(b&0x7F) << shift
   573  				if b < 0x80 {
   574  					break
   575  				}
   576  			}
   577  			intStringLen := int(stringLen)
   578  			if intStringLen < 0 {
   579  				return ErrInvalidLengthEtcdserver
   580  			}
   581  			postIndex := iNdEx + intStringLen
   582  			if postIndex < 0 {
   583  				return ErrInvalidLengthEtcdserver
   584  			}
   585  			if postIndex > l {
   586  				return io.ErrUnexpectedEOF
   587  			}
   588  			m.PrevValue = string(dAtA[iNdEx:postIndex])
   589  			iNdEx = postIndex
   590  		case 7:
   591  			if wireType != 0 {
   592  				return fmt.Errorf("proto: wrong wireType = %d for field PrevIndex", wireType)
   593  			}
   594  			m.PrevIndex = 0
   595  			for shift := uint(0); ; shift += 7 {
   596  				if shift >= 64 {
   597  					return ErrIntOverflowEtcdserver
   598  				}
   599  				if iNdEx >= l {
   600  					return io.ErrUnexpectedEOF
   601  				}
   602  				b := dAtA[iNdEx]
   603  				iNdEx++
   604  				m.PrevIndex |= uint64(b&0x7F) << shift
   605  				if b < 0x80 {
   606  					break
   607  				}
   608  			}
   609  		case 8:
   610  			if wireType != 0 {
   611  				return fmt.Errorf("proto: wrong wireType = %d for field PrevExist", wireType)
   612  			}
   613  			var v int
   614  			for shift := uint(0); ; shift += 7 {
   615  				if shift >= 64 {
   616  					return ErrIntOverflowEtcdserver
   617  				}
   618  				if iNdEx >= l {
   619  					return io.ErrUnexpectedEOF
   620  				}
   621  				b := dAtA[iNdEx]
   622  				iNdEx++
   623  				v |= int(b&0x7F) << shift
   624  				if b < 0x80 {
   625  					break
   626  				}
   627  			}
   628  			b := bool(v != 0)
   629  			m.PrevExist = &b
   630  		case 9:
   631  			if wireType != 0 {
   632  				return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType)
   633  			}
   634  			m.Expiration = 0
   635  			for shift := uint(0); ; shift += 7 {
   636  				if shift >= 64 {
   637  					return ErrIntOverflowEtcdserver
   638  				}
   639  				if iNdEx >= l {
   640  					return io.ErrUnexpectedEOF
   641  				}
   642  				b := dAtA[iNdEx]
   643  				iNdEx++
   644  				m.Expiration |= int64(b&0x7F) << shift
   645  				if b < 0x80 {
   646  					break
   647  				}
   648  			}
   649  		case 10:
   650  			if wireType != 0 {
   651  				return fmt.Errorf("proto: wrong wireType = %d for field Wait", wireType)
   652  			}
   653  			var v int
   654  			for shift := uint(0); ; shift += 7 {
   655  				if shift >= 64 {
   656  					return ErrIntOverflowEtcdserver
   657  				}
   658  				if iNdEx >= l {
   659  					return io.ErrUnexpectedEOF
   660  				}
   661  				b := dAtA[iNdEx]
   662  				iNdEx++
   663  				v |= int(b&0x7F) << shift
   664  				if b < 0x80 {
   665  					break
   666  				}
   667  			}
   668  			m.Wait = bool(v != 0)
   669  		case 11:
   670  			if wireType != 0 {
   671  				return fmt.Errorf("proto: wrong wireType = %d for field Since", wireType)
   672  			}
   673  			m.Since = 0
   674  			for shift := uint(0); ; shift += 7 {
   675  				if shift >= 64 {
   676  					return ErrIntOverflowEtcdserver
   677  				}
   678  				if iNdEx >= l {
   679  					return io.ErrUnexpectedEOF
   680  				}
   681  				b := dAtA[iNdEx]
   682  				iNdEx++
   683  				m.Since |= uint64(b&0x7F) << shift
   684  				if b < 0x80 {
   685  					break
   686  				}
   687  			}
   688  		case 12:
   689  			if wireType != 0 {
   690  				return fmt.Errorf("proto: wrong wireType = %d for field Recursive", wireType)
   691  			}
   692  			var v int
   693  			for shift := uint(0); ; shift += 7 {
   694  				if shift >= 64 {
   695  					return ErrIntOverflowEtcdserver
   696  				}
   697  				if iNdEx >= l {
   698  					return io.ErrUnexpectedEOF
   699  				}
   700  				b := dAtA[iNdEx]
   701  				iNdEx++
   702  				v |= int(b&0x7F) << shift
   703  				if b < 0x80 {
   704  					break
   705  				}
   706  			}
   707  			m.Recursive = bool(v != 0)
   708  		case 13:
   709  			if wireType != 0 {
   710  				return fmt.Errorf("proto: wrong wireType = %d for field Sorted", wireType)
   711  			}
   712  			var v int
   713  			for shift := uint(0); ; shift += 7 {
   714  				if shift >= 64 {
   715  					return ErrIntOverflowEtcdserver
   716  				}
   717  				if iNdEx >= l {
   718  					return io.ErrUnexpectedEOF
   719  				}
   720  				b := dAtA[iNdEx]
   721  				iNdEx++
   722  				v |= int(b&0x7F) << shift
   723  				if b < 0x80 {
   724  					break
   725  				}
   726  			}
   727  			m.Sorted = bool(v != 0)
   728  		case 14:
   729  			if wireType != 0 {
   730  				return fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType)
   731  			}
   732  			var v int
   733  			for shift := uint(0); ; shift += 7 {
   734  				if shift >= 64 {
   735  					return ErrIntOverflowEtcdserver
   736  				}
   737  				if iNdEx >= l {
   738  					return io.ErrUnexpectedEOF
   739  				}
   740  				b := dAtA[iNdEx]
   741  				iNdEx++
   742  				v |= int(b&0x7F) << shift
   743  				if b < 0x80 {
   744  					break
   745  				}
   746  			}
   747  			m.Quorum = bool(v != 0)
   748  		case 15:
   749  			if wireType != 0 {
   750  				return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
   751  			}
   752  			m.Time = 0
   753  			for shift := uint(0); ; shift += 7 {
   754  				if shift >= 64 {
   755  					return ErrIntOverflowEtcdserver
   756  				}
   757  				if iNdEx >= l {
   758  					return io.ErrUnexpectedEOF
   759  				}
   760  				b := dAtA[iNdEx]
   761  				iNdEx++
   762  				m.Time |= int64(b&0x7F) << shift
   763  				if b < 0x80 {
   764  					break
   765  				}
   766  			}
   767  		case 16:
   768  			if wireType != 0 {
   769  				return fmt.Errorf("proto: wrong wireType = %d for field Stream", wireType)
   770  			}
   771  			var v int
   772  			for shift := uint(0); ; shift += 7 {
   773  				if shift >= 64 {
   774  					return ErrIntOverflowEtcdserver
   775  				}
   776  				if iNdEx >= l {
   777  					return io.ErrUnexpectedEOF
   778  				}
   779  				b := dAtA[iNdEx]
   780  				iNdEx++
   781  				v |= int(b&0x7F) << shift
   782  				if b < 0x80 {
   783  					break
   784  				}
   785  			}
   786  			m.Stream = bool(v != 0)
   787  		case 17:
   788  			if wireType != 0 {
   789  				return fmt.Errorf("proto: wrong wireType = %d for field Refresh", wireType)
   790  			}
   791  			var v int
   792  			for shift := uint(0); ; shift += 7 {
   793  				if shift >= 64 {
   794  					return ErrIntOverflowEtcdserver
   795  				}
   796  				if iNdEx >= l {
   797  					return io.ErrUnexpectedEOF
   798  				}
   799  				b := dAtA[iNdEx]
   800  				iNdEx++
   801  				v |= int(b&0x7F) << shift
   802  				if b < 0x80 {
   803  					break
   804  				}
   805  			}
   806  			b := bool(v != 0)
   807  			m.Refresh = &b
   808  		default:
   809  			iNdEx = preIndex
   810  			skippy, err := skipEtcdserver(dAtA[iNdEx:])
   811  			if err != nil {
   812  				return err
   813  			}
   814  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   815  				return ErrInvalidLengthEtcdserver
   816  			}
   817  			if (iNdEx + skippy) > l {
   818  				return io.ErrUnexpectedEOF
   819  			}
   820  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   821  			iNdEx += skippy
   822  		}
   823  	}
   824  
   825  	if iNdEx > l {
   826  		return io.ErrUnexpectedEOF
   827  	}
   828  	return nil
   829  }
   830  func (m *Metadata) Unmarshal(dAtA []byte) error {
   831  	l := len(dAtA)
   832  	iNdEx := 0
   833  	for iNdEx < l {
   834  		preIndex := iNdEx
   835  		var wire uint64
   836  		for shift := uint(0); ; shift += 7 {
   837  			if shift >= 64 {
   838  				return ErrIntOverflowEtcdserver
   839  			}
   840  			if iNdEx >= l {
   841  				return io.ErrUnexpectedEOF
   842  			}
   843  			b := dAtA[iNdEx]
   844  			iNdEx++
   845  			wire |= uint64(b&0x7F) << shift
   846  			if b < 0x80 {
   847  				break
   848  			}
   849  		}
   850  		fieldNum := int32(wire >> 3)
   851  		wireType := int(wire & 0x7)
   852  		if wireType == 4 {
   853  			return fmt.Errorf("proto: Metadata: wiretype end group for non-group")
   854  		}
   855  		if fieldNum <= 0 {
   856  			return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire)
   857  		}
   858  		switch fieldNum {
   859  		case 1:
   860  			if wireType != 0 {
   861  				return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
   862  			}
   863  			m.NodeID = 0
   864  			for shift := uint(0); ; shift += 7 {
   865  				if shift >= 64 {
   866  					return ErrIntOverflowEtcdserver
   867  				}
   868  				if iNdEx >= l {
   869  					return io.ErrUnexpectedEOF
   870  				}
   871  				b := dAtA[iNdEx]
   872  				iNdEx++
   873  				m.NodeID |= uint64(b&0x7F) << shift
   874  				if b < 0x80 {
   875  					break
   876  				}
   877  			}
   878  		case 2:
   879  			if wireType != 0 {
   880  				return fmt.Errorf("proto: wrong wireType = %d for field ClusterID", wireType)
   881  			}
   882  			m.ClusterID = 0
   883  			for shift := uint(0); ; shift += 7 {
   884  				if shift >= 64 {
   885  					return ErrIntOverflowEtcdserver
   886  				}
   887  				if iNdEx >= l {
   888  					return io.ErrUnexpectedEOF
   889  				}
   890  				b := dAtA[iNdEx]
   891  				iNdEx++
   892  				m.ClusterID |= uint64(b&0x7F) << shift
   893  				if b < 0x80 {
   894  					break
   895  				}
   896  			}
   897  		default:
   898  			iNdEx = preIndex
   899  			skippy, err := skipEtcdserver(dAtA[iNdEx:])
   900  			if err != nil {
   901  				return err
   902  			}
   903  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   904  				return ErrInvalidLengthEtcdserver
   905  			}
   906  			if (iNdEx + skippy) > l {
   907  				return io.ErrUnexpectedEOF
   908  			}
   909  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   910  			iNdEx += skippy
   911  		}
   912  	}
   913  
   914  	if iNdEx > l {
   915  		return io.ErrUnexpectedEOF
   916  	}
   917  	return nil
   918  }
   919  func skipEtcdserver(dAtA []byte) (n int, err error) {
   920  	l := len(dAtA)
   921  	iNdEx := 0
   922  	depth := 0
   923  	for iNdEx < l {
   924  		var wire uint64
   925  		for shift := uint(0); ; shift += 7 {
   926  			if shift >= 64 {
   927  				return 0, ErrIntOverflowEtcdserver
   928  			}
   929  			if iNdEx >= l {
   930  				return 0, io.ErrUnexpectedEOF
   931  			}
   932  			b := dAtA[iNdEx]
   933  			iNdEx++
   934  			wire |= (uint64(b) & 0x7F) << shift
   935  			if b < 0x80 {
   936  				break
   937  			}
   938  		}
   939  		wireType := int(wire & 0x7)
   940  		switch wireType {
   941  		case 0:
   942  			for shift := uint(0); ; shift += 7 {
   943  				if shift >= 64 {
   944  					return 0, ErrIntOverflowEtcdserver
   945  				}
   946  				if iNdEx >= l {
   947  					return 0, io.ErrUnexpectedEOF
   948  				}
   949  				iNdEx++
   950  				if dAtA[iNdEx-1] < 0x80 {
   951  					break
   952  				}
   953  			}
   954  		case 1:
   955  			iNdEx += 8
   956  		case 2:
   957  			var length int
   958  			for shift := uint(0); ; shift += 7 {
   959  				if shift >= 64 {
   960  					return 0, ErrIntOverflowEtcdserver
   961  				}
   962  				if iNdEx >= l {
   963  					return 0, io.ErrUnexpectedEOF
   964  				}
   965  				b := dAtA[iNdEx]
   966  				iNdEx++
   967  				length |= (int(b) & 0x7F) << shift
   968  				if b < 0x80 {
   969  					break
   970  				}
   971  			}
   972  			if length < 0 {
   973  				return 0, ErrInvalidLengthEtcdserver
   974  			}
   975  			iNdEx += length
   976  		case 3:
   977  			depth++
   978  		case 4:
   979  			if depth == 0 {
   980  				return 0, ErrUnexpectedEndOfGroupEtcdserver
   981  			}
   982  			depth--
   983  		case 5:
   984  			iNdEx += 4
   985  		default:
   986  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   987  		}
   988  		if iNdEx < 0 {
   989  			return 0, ErrInvalidLengthEtcdserver
   990  		}
   991  		if depth == 0 {
   992  			return iNdEx, nil
   993  		}
   994  	}
   995  	return 0, io.ErrUnexpectedEOF
   996  }
   997  
   998  var (
   999  	ErrInvalidLengthEtcdserver        = fmt.Errorf("proto: negative length found during unmarshaling")
  1000  	ErrIntOverflowEtcdserver          = fmt.Errorf("proto: integer overflow")
  1001  	ErrUnexpectedEndOfGroupEtcdserver = fmt.Errorf("proto: unexpected end of group")
  1002  )
  1003  

View as plain text