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