You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

389 lines
9.2 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: libs/kv/types.proto
  3. package kv
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. golang_proto "github.com/golang/protobuf/proto"
  9. io "io"
  10. math "math"
  11. math_bits "math/bits"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = golang_proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  23. type Pair struct {
  24. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  25. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  26. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  27. XXX_unrecognized []byte `json:"-"`
  28. XXX_sizecache int32 `json:"-"`
  29. }
  30. func (m *Pair) Reset() { *m = Pair{} }
  31. func (m *Pair) String() string { return proto.CompactTextString(m) }
  32. func (*Pair) ProtoMessage() {}
  33. func (*Pair) Descriptor() ([]byte, []int) {
  34. return fileDescriptor_31432671d164f444, []int{0}
  35. }
  36. func (m *Pair) XXX_Unmarshal(b []byte) error {
  37. return m.Unmarshal(b)
  38. }
  39. func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  40. if deterministic {
  41. return xxx_messageInfo_Pair.Marshal(b, m, deterministic)
  42. } else {
  43. b = b[:cap(b)]
  44. n, err := m.MarshalToSizedBuffer(b)
  45. if err != nil {
  46. return nil, err
  47. }
  48. return b[:n], nil
  49. }
  50. }
  51. func (m *Pair) XXX_Merge(src proto.Message) {
  52. xxx_messageInfo_Pair.Merge(m, src)
  53. }
  54. func (m *Pair) XXX_Size() int {
  55. return m.Size()
  56. }
  57. func (m *Pair) XXX_DiscardUnknown() {
  58. xxx_messageInfo_Pair.DiscardUnknown(m)
  59. }
  60. var xxx_messageInfo_Pair proto.InternalMessageInfo
  61. func (m *Pair) GetKey() []byte {
  62. if m != nil {
  63. return m.Key
  64. }
  65. return nil
  66. }
  67. func (m *Pair) GetValue() []byte {
  68. if m != nil {
  69. return m.Value
  70. }
  71. return nil
  72. }
  73. func init() {
  74. proto.RegisterType((*Pair)(nil), "tendermint.libs.kv.Pair")
  75. golang_proto.RegisterType((*Pair)(nil), "tendermint.libs.kv.Pair")
  76. }
  77. func init() { proto.RegisterFile("libs/kv/types.proto", fileDescriptor_31432671d164f444) }
  78. func init() { golang_proto.RegisterFile("libs/kv/types.proto", fileDescriptor_31432671d164f444) }
  79. var fileDescriptor_31432671d164f444 = []byte{
  80. // 170 bytes of a gzipped FileDescriptorProto
  81. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0xc9, 0x4c, 0x2a,
  82. 0xd6, 0xcf, 0x2e, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17,
  83. 0x12, 0x2a, 0x49, 0xcd, 0x4b, 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x03, 0xc9, 0xeb, 0x65,
  84. 0x97, 0x49, 0xa9, 0x95, 0x64, 0x64, 0x16, 0xa5, 0xc4, 0x17, 0x24, 0x16, 0x95, 0x54, 0xea, 0x83,
  85. 0x95, 0xe9, 0xa7, 0xe7, 0xa7, 0xe7, 0x23, 0x58, 0x10, 0xbd, 0x4a, 0x7a, 0x5c, 0x2c, 0x01, 0x89,
  86. 0x99, 0x45, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41,
  87. 0x20, 0xa6, 0x90, 0x08, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x13, 0x58, 0x0c, 0xc2,
  88. 0x71, 0xb2, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x0f,
  89. 0x3c, 0x96, 0x63, 0x8c, 0xd2, 0x48, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5,
  90. 0x47, 0x38, 0x04, 0x99, 0x09, 0x75, 0x73, 0x12, 0x1b, 0xd8, 0x4a, 0x63, 0x40, 0x00, 0x00, 0x00,
  91. 0xff, 0xff, 0x44, 0x0a, 0x7f, 0x75, 0xc5, 0x00, 0x00, 0x00,
  92. }
  93. func (m *Pair) Marshal() (dAtA []byte, err error) {
  94. size := m.Size()
  95. dAtA = make([]byte, size)
  96. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  97. if err != nil {
  98. return nil, err
  99. }
  100. return dAtA[:n], nil
  101. }
  102. func (m *Pair) MarshalTo(dAtA []byte) (int, error) {
  103. size := m.Size()
  104. return m.MarshalToSizedBuffer(dAtA[:size])
  105. }
  106. func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  107. i := len(dAtA)
  108. _ = i
  109. var l int
  110. _ = l
  111. if m.XXX_unrecognized != nil {
  112. i -= len(m.XXX_unrecognized)
  113. copy(dAtA[i:], m.XXX_unrecognized)
  114. }
  115. if len(m.Value) > 0 {
  116. i -= len(m.Value)
  117. copy(dAtA[i:], m.Value)
  118. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  119. i--
  120. dAtA[i] = 0x12
  121. }
  122. if len(m.Key) > 0 {
  123. i -= len(m.Key)
  124. copy(dAtA[i:], m.Key)
  125. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  126. i--
  127. dAtA[i] = 0xa
  128. }
  129. return len(dAtA) - i, nil
  130. }
  131. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  132. offset -= sovTypes(v)
  133. base := offset
  134. for v >= 1<<7 {
  135. dAtA[offset] = uint8(v&0x7f | 0x80)
  136. v >>= 7
  137. offset++
  138. }
  139. dAtA[offset] = uint8(v)
  140. return base
  141. }
  142. func (m *Pair) Size() (n int) {
  143. if m == nil {
  144. return 0
  145. }
  146. var l int
  147. _ = l
  148. l = len(m.Key)
  149. if l > 0 {
  150. n += 1 + l + sovTypes(uint64(l))
  151. }
  152. l = len(m.Value)
  153. if l > 0 {
  154. n += 1 + l + sovTypes(uint64(l))
  155. }
  156. if m.XXX_unrecognized != nil {
  157. n += len(m.XXX_unrecognized)
  158. }
  159. return n
  160. }
  161. func sovTypes(x uint64) (n int) {
  162. return (math_bits.Len64(x|1) + 6) / 7
  163. }
  164. func sozTypes(x uint64) (n int) {
  165. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  166. }
  167. func (m *Pair) Unmarshal(dAtA []byte) error {
  168. l := len(dAtA)
  169. iNdEx := 0
  170. for iNdEx < l {
  171. preIndex := iNdEx
  172. var wire uint64
  173. for shift := uint(0); ; shift += 7 {
  174. if shift >= 64 {
  175. return ErrIntOverflowTypes
  176. }
  177. if iNdEx >= l {
  178. return io.ErrUnexpectedEOF
  179. }
  180. b := dAtA[iNdEx]
  181. iNdEx++
  182. wire |= uint64(b&0x7F) << shift
  183. if b < 0x80 {
  184. break
  185. }
  186. }
  187. fieldNum := int32(wire >> 3)
  188. wireType := int(wire & 0x7)
  189. if wireType == 4 {
  190. return fmt.Errorf("proto: Pair: wiretype end group for non-group")
  191. }
  192. if fieldNum <= 0 {
  193. return fmt.Errorf("proto: Pair: illegal tag %d (wire type %d)", fieldNum, wire)
  194. }
  195. switch fieldNum {
  196. case 1:
  197. if wireType != 2 {
  198. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  199. }
  200. var byteLen int
  201. for shift := uint(0); ; shift += 7 {
  202. if shift >= 64 {
  203. return ErrIntOverflowTypes
  204. }
  205. if iNdEx >= l {
  206. return io.ErrUnexpectedEOF
  207. }
  208. b := dAtA[iNdEx]
  209. iNdEx++
  210. byteLen |= int(b&0x7F) << shift
  211. if b < 0x80 {
  212. break
  213. }
  214. }
  215. if byteLen < 0 {
  216. return ErrInvalidLengthTypes
  217. }
  218. postIndex := iNdEx + byteLen
  219. if postIndex < 0 {
  220. return ErrInvalidLengthTypes
  221. }
  222. if postIndex > l {
  223. return io.ErrUnexpectedEOF
  224. }
  225. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  226. if m.Key == nil {
  227. m.Key = []byte{}
  228. }
  229. iNdEx = postIndex
  230. case 2:
  231. if wireType != 2 {
  232. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  233. }
  234. var byteLen int
  235. for shift := uint(0); ; shift += 7 {
  236. if shift >= 64 {
  237. return ErrIntOverflowTypes
  238. }
  239. if iNdEx >= l {
  240. return io.ErrUnexpectedEOF
  241. }
  242. b := dAtA[iNdEx]
  243. iNdEx++
  244. byteLen |= int(b&0x7F) << shift
  245. if b < 0x80 {
  246. break
  247. }
  248. }
  249. if byteLen < 0 {
  250. return ErrInvalidLengthTypes
  251. }
  252. postIndex := iNdEx + byteLen
  253. if postIndex < 0 {
  254. return ErrInvalidLengthTypes
  255. }
  256. if postIndex > l {
  257. return io.ErrUnexpectedEOF
  258. }
  259. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  260. if m.Value == nil {
  261. m.Value = []byte{}
  262. }
  263. iNdEx = postIndex
  264. default:
  265. iNdEx = preIndex
  266. skippy, err := skipTypes(dAtA[iNdEx:])
  267. if err != nil {
  268. return err
  269. }
  270. if skippy < 0 {
  271. return ErrInvalidLengthTypes
  272. }
  273. if (iNdEx + skippy) < 0 {
  274. return ErrInvalidLengthTypes
  275. }
  276. if (iNdEx + skippy) > l {
  277. return io.ErrUnexpectedEOF
  278. }
  279. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  280. iNdEx += skippy
  281. }
  282. }
  283. if iNdEx > l {
  284. return io.ErrUnexpectedEOF
  285. }
  286. return nil
  287. }
  288. func skipTypes(dAtA []byte) (n int, err error) {
  289. l := len(dAtA)
  290. iNdEx := 0
  291. depth := 0
  292. for iNdEx < l {
  293. var wire uint64
  294. for shift := uint(0); ; shift += 7 {
  295. if shift >= 64 {
  296. return 0, ErrIntOverflowTypes
  297. }
  298. if iNdEx >= l {
  299. return 0, io.ErrUnexpectedEOF
  300. }
  301. b := dAtA[iNdEx]
  302. iNdEx++
  303. wire |= (uint64(b) & 0x7F) << shift
  304. if b < 0x80 {
  305. break
  306. }
  307. }
  308. wireType := int(wire & 0x7)
  309. switch wireType {
  310. case 0:
  311. for shift := uint(0); ; shift += 7 {
  312. if shift >= 64 {
  313. return 0, ErrIntOverflowTypes
  314. }
  315. if iNdEx >= l {
  316. return 0, io.ErrUnexpectedEOF
  317. }
  318. iNdEx++
  319. if dAtA[iNdEx-1] < 0x80 {
  320. break
  321. }
  322. }
  323. case 1:
  324. iNdEx += 8
  325. case 2:
  326. var length int
  327. for shift := uint(0); ; shift += 7 {
  328. if shift >= 64 {
  329. return 0, ErrIntOverflowTypes
  330. }
  331. if iNdEx >= l {
  332. return 0, io.ErrUnexpectedEOF
  333. }
  334. b := dAtA[iNdEx]
  335. iNdEx++
  336. length |= (int(b) & 0x7F) << shift
  337. if b < 0x80 {
  338. break
  339. }
  340. }
  341. if length < 0 {
  342. return 0, ErrInvalidLengthTypes
  343. }
  344. iNdEx += length
  345. case 3:
  346. depth++
  347. case 4:
  348. if depth == 0 {
  349. return 0, ErrUnexpectedEndOfGroupTypes
  350. }
  351. depth--
  352. case 5:
  353. iNdEx += 4
  354. default:
  355. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  356. }
  357. if iNdEx < 0 {
  358. return 0, ErrInvalidLengthTypes
  359. }
  360. if depth == 0 {
  361. return iNdEx, nil
  362. }
  363. }
  364. return 0, io.ErrUnexpectedEOF
  365. }
  366. var (
  367. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  368. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  369. ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  370. )