etcdserver.pb.go 25 KB

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