github.com/Finschia/finschia-sdk@v0.48.1/types/kv/kv.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cosmos/base/kv/v1beta1/kv.proto
     3  
     4  package kv
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    25  
    26  // Pairs defines a repeated slice of Pair objects.
    27  type Pairs struct {
    28  	Pairs []Pair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"`
    29  }
    30  
    31  func (m *Pairs) Reset()         { *m = Pairs{} }
    32  func (m *Pairs) String() string { return proto.CompactTextString(m) }
    33  func (*Pairs) ProtoMessage()    {}
    34  func (*Pairs) Descriptor() ([]byte, []int) {
    35  	return fileDescriptor_a44e87fe7182bb73, []int{0}
    36  }
    37  func (m *Pairs) XXX_Unmarshal(b []byte) error {
    38  	return m.Unmarshal(b)
    39  }
    40  func (m *Pairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    41  	if deterministic {
    42  		return xxx_messageInfo_Pairs.Marshal(b, m, deterministic)
    43  	} else {
    44  		b = b[:cap(b)]
    45  		n, err := m.MarshalToSizedBuffer(b)
    46  		if err != nil {
    47  			return nil, err
    48  		}
    49  		return b[:n], nil
    50  	}
    51  }
    52  func (m *Pairs) XXX_Merge(src proto.Message) {
    53  	xxx_messageInfo_Pairs.Merge(m, src)
    54  }
    55  func (m *Pairs) XXX_Size() int {
    56  	return m.Size()
    57  }
    58  func (m *Pairs) XXX_DiscardUnknown() {
    59  	xxx_messageInfo_Pairs.DiscardUnknown(m)
    60  }
    61  
    62  var xxx_messageInfo_Pairs proto.InternalMessageInfo
    63  
    64  func (m *Pairs) GetPairs() []Pair {
    65  	if m != nil {
    66  		return m.Pairs
    67  	}
    68  	return nil
    69  }
    70  
    71  // Pair defines a key/value bytes tuple.
    72  type Pair struct {
    73  	Key   []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    74  	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
    75  }
    76  
    77  func (m *Pair) Reset()         { *m = Pair{} }
    78  func (m *Pair) String() string { return proto.CompactTextString(m) }
    79  func (*Pair) ProtoMessage()    {}
    80  func (*Pair) Descriptor() ([]byte, []int) {
    81  	return fileDescriptor_a44e87fe7182bb73, []int{1}
    82  }
    83  func (m *Pair) XXX_Unmarshal(b []byte) error {
    84  	return m.Unmarshal(b)
    85  }
    86  func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    87  	if deterministic {
    88  		return xxx_messageInfo_Pair.Marshal(b, m, deterministic)
    89  	} else {
    90  		b = b[:cap(b)]
    91  		n, err := m.MarshalToSizedBuffer(b)
    92  		if err != nil {
    93  			return nil, err
    94  		}
    95  		return b[:n], nil
    96  	}
    97  }
    98  func (m *Pair) XXX_Merge(src proto.Message) {
    99  	xxx_messageInfo_Pair.Merge(m, src)
   100  }
   101  func (m *Pair) XXX_Size() int {
   102  	return m.Size()
   103  }
   104  func (m *Pair) XXX_DiscardUnknown() {
   105  	xxx_messageInfo_Pair.DiscardUnknown(m)
   106  }
   107  
   108  var xxx_messageInfo_Pair proto.InternalMessageInfo
   109  
   110  func (m *Pair) GetKey() []byte {
   111  	if m != nil {
   112  		return m.Key
   113  	}
   114  	return nil
   115  }
   116  
   117  func (m *Pair) GetValue() []byte {
   118  	if m != nil {
   119  		return m.Value
   120  	}
   121  	return nil
   122  }
   123  
   124  func init() {
   125  	proto.RegisterType((*Pairs)(nil), "cosmos.base.kv.v1beta1.Pairs")
   126  	proto.RegisterType((*Pair)(nil), "cosmos.base.kv.v1beta1.Pair")
   127  }
   128  
   129  func init() { proto.RegisterFile("cosmos/base/kv/v1beta1/kv.proto", fileDescriptor_a44e87fe7182bb73) }
   130  
   131  var fileDescriptor_a44e87fe7182bb73 = []byte{
   132  	// 229 bytes of a gzipped FileDescriptorProto
   133  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce,
   134  	0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0xcf, 0x2e, 0xd3, 0x2f, 0x33, 0x4c, 0x4a, 0x2d,
   135  	0x49, 0x34, 0xd4, 0xcf, 0x2e, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x83, 0x28, 0xd0,
   136  	0x03, 0x29, 0xd0, 0xcb, 0x2e, 0xd3, 0x83, 0x2a, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b,
   137  	0xd1, 0x07, 0xb1, 0x20, 0xaa, 0x95, 0x1c, 0xb9, 0x58, 0x03, 0x12, 0x33, 0x8b, 0x8a, 0x85, 0x2c,
   138  	0xb8, 0x58, 0x0b, 0x40, 0x0c, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x19, 0x3d, 0xec, 0xc6,
   139  	0xe8, 0x81, 0x54, 0x3b, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0xd1, 0xa0, 0xa4, 0xc7, 0xc5,
   140  	0x02, 0x12, 0x14, 0x12, 0xe0, 0x62, 0xce, 0x4e, 0xad, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09,
   141  	0x02, 0x31, 0x85, 0x44, 0xb8, 0x58, 0xcb, 0x12, 0x73, 0x4a, 0x53, 0x25, 0x98, 0xc0, 0x62, 0x10,
   142  	0x8e, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38,
   143  	0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa6, 0x67,
   144  	0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xbb, 0x65, 0xe6, 0x15, 0x27, 0x67, 0x64,
   145  	0x26, 0xea, 0xa7, 0x41, 0x19, 0xba, 0xc5, 0x29, 0xd9, 0xfa, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0xfa,
   146  	0xd9, 0x65, 0x49, 0x6c, 0x60, 0xe7, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc4, 0xae, 0xe1,
   147  	0xec, 0x0f, 0x01, 0x00, 0x00,
   148  }
   149  
   150  func (m *Pairs) Marshal() (dAtA []byte, err error) {
   151  	size := m.Size()
   152  	dAtA = make([]byte, size)
   153  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   154  	if err != nil {
   155  		return nil, err
   156  	}
   157  	return dAtA[:n], nil
   158  }
   159  
   160  func (m *Pairs) MarshalTo(dAtA []byte) (int, error) {
   161  	size := m.Size()
   162  	return m.MarshalToSizedBuffer(dAtA[:size])
   163  }
   164  
   165  func (m *Pairs) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   166  	i := len(dAtA)
   167  	_ = i
   168  	var l int
   169  	_ = l
   170  	if len(m.Pairs) > 0 {
   171  		for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- {
   172  			{
   173  				size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   174  				if err != nil {
   175  					return 0, err
   176  				}
   177  				i -= size
   178  				i = encodeVarintKv(dAtA, i, uint64(size))
   179  			}
   180  			i--
   181  			dAtA[i] = 0xa
   182  		}
   183  	}
   184  	return len(dAtA) - i, nil
   185  }
   186  
   187  func (m *Pair) Marshal() (dAtA []byte, err error) {
   188  	size := m.Size()
   189  	dAtA = make([]byte, size)
   190  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   191  	if err != nil {
   192  		return nil, err
   193  	}
   194  	return dAtA[:n], nil
   195  }
   196  
   197  func (m *Pair) MarshalTo(dAtA []byte) (int, error) {
   198  	size := m.Size()
   199  	return m.MarshalToSizedBuffer(dAtA[:size])
   200  }
   201  
   202  func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   203  	i := len(dAtA)
   204  	_ = i
   205  	var l int
   206  	_ = l
   207  	if len(m.Value) > 0 {
   208  		i -= len(m.Value)
   209  		copy(dAtA[i:], m.Value)
   210  		i = encodeVarintKv(dAtA, i, uint64(len(m.Value)))
   211  		i--
   212  		dAtA[i] = 0x12
   213  	}
   214  	if len(m.Key) > 0 {
   215  		i -= len(m.Key)
   216  		copy(dAtA[i:], m.Key)
   217  		i = encodeVarintKv(dAtA, i, uint64(len(m.Key)))
   218  		i--
   219  		dAtA[i] = 0xa
   220  	}
   221  	return len(dAtA) - i, nil
   222  }
   223  
   224  func encodeVarintKv(dAtA []byte, offset int, v uint64) int {
   225  	offset -= sovKv(v)
   226  	base := offset
   227  	for v >= 1<<7 {
   228  		dAtA[offset] = uint8(v&0x7f | 0x80)
   229  		v >>= 7
   230  		offset++
   231  	}
   232  	dAtA[offset] = uint8(v)
   233  	return base
   234  }
   235  func (m *Pairs) Size() (n int) {
   236  	if m == nil {
   237  		return 0
   238  	}
   239  	var l int
   240  	_ = l
   241  	if len(m.Pairs) > 0 {
   242  		for _, e := range m.Pairs {
   243  			l = e.Size()
   244  			n += 1 + l + sovKv(uint64(l))
   245  		}
   246  	}
   247  	return n
   248  }
   249  
   250  func (m *Pair) Size() (n int) {
   251  	if m == nil {
   252  		return 0
   253  	}
   254  	var l int
   255  	_ = l
   256  	l = len(m.Key)
   257  	if l > 0 {
   258  		n += 1 + l + sovKv(uint64(l))
   259  	}
   260  	l = len(m.Value)
   261  	if l > 0 {
   262  		n += 1 + l + sovKv(uint64(l))
   263  	}
   264  	return n
   265  }
   266  
   267  func sovKv(x uint64) (n int) {
   268  	return (math_bits.Len64(x|1) + 6) / 7
   269  }
   270  func sozKv(x uint64) (n int) {
   271  	return sovKv(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   272  }
   273  func (m *Pairs) Unmarshal(dAtA []byte) error {
   274  	l := len(dAtA)
   275  	iNdEx := 0
   276  	for iNdEx < l {
   277  		preIndex := iNdEx
   278  		var wire uint64
   279  		for shift := uint(0); ; shift += 7 {
   280  			if shift >= 64 {
   281  				return ErrIntOverflowKv
   282  			}
   283  			if iNdEx >= l {
   284  				return io.ErrUnexpectedEOF
   285  			}
   286  			b := dAtA[iNdEx]
   287  			iNdEx++
   288  			wire |= uint64(b&0x7F) << shift
   289  			if b < 0x80 {
   290  				break
   291  			}
   292  		}
   293  		fieldNum := int32(wire >> 3)
   294  		wireType := int(wire & 0x7)
   295  		if wireType == 4 {
   296  			return fmt.Errorf("proto: Pairs: wiretype end group for non-group")
   297  		}
   298  		if fieldNum <= 0 {
   299  			return fmt.Errorf("proto: Pairs: illegal tag %d (wire type %d)", fieldNum, wire)
   300  		}
   301  		switch fieldNum {
   302  		case 1:
   303  			if wireType != 2 {
   304  				return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType)
   305  			}
   306  			var msglen int
   307  			for shift := uint(0); ; shift += 7 {
   308  				if shift >= 64 {
   309  					return ErrIntOverflowKv
   310  				}
   311  				if iNdEx >= l {
   312  					return io.ErrUnexpectedEOF
   313  				}
   314  				b := dAtA[iNdEx]
   315  				iNdEx++
   316  				msglen |= int(b&0x7F) << shift
   317  				if b < 0x80 {
   318  					break
   319  				}
   320  			}
   321  			if msglen < 0 {
   322  				return ErrInvalidLengthKv
   323  			}
   324  			postIndex := iNdEx + msglen
   325  			if postIndex < 0 {
   326  				return ErrInvalidLengthKv
   327  			}
   328  			if postIndex > l {
   329  				return io.ErrUnexpectedEOF
   330  			}
   331  			m.Pairs = append(m.Pairs, Pair{})
   332  			if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   333  				return err
   334  			}
   335  			iNdEx = postIndex
   336  		default:
   337  			iNdEx = preIndex
   338  			skippy, err := skipKv(dAtA[iNdEx:])
   339  			if err != nil {
   340  				return err
   341  			}
   342  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   343  				return ErrInvalidLengthKv
   344  			}
   345  			if (iNdEx + skippy) > l {
   346  				return io.ErrUnexpectedEOF
   347  			}
   348  			iNdEx += skippy
   349  		}
   350  	}
   351  
   352  	if iNdEx > l {
   353  		return io.ErrUnexpectedEOF
   354  	}
   355  	return nil
   356  }
   357  func (m *Pair) Unmarshal(dAtA []byte) error {
   358  	l := len(dAtA)
   359  	iNdEx := 0
   360  	for iNdEx < l {
   361  		preIndex := iNdEx
   362  		var wire uint64
   363  		for shift := uint(0); ; shift += 7 {
   364  			if shift >= 64 {
   365  				return ErrIntOverflowKv
   366  			}
   367  			if iNdEx >= l {
   368  				return io.ErrUnexpectedEOF
   369  			}
   370  			b := dAtA[iNdEx]
   371  			iNdEx++
   372  			wire |= uint64(b&0x7F) << shift
   373  			if b < 0x80 {
   374  				break
   375  			}
   376  		}
   377  		fieldNum := int32(wire >> 3)
   378  		wireType := int(wire & 0x7)
   379  		if wireType == 4 {
   380  			return fmt.Errorf("proto: Pair: wiretype end group for non-group")
   381  		}
   382  		if fieldNum <= 0 {
   383  			return fmt.Errorf("proto: Pair: illegal tag %d (wire type %d)", fieldNum, wire)
   384  		}
   385  		switch fieldNum {
   386  		case 1:
   387  			if wireType != 2 {
   388  				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
   389  			}
   390  			var byteLen int
   391  			for shift := uint(0); ; shift += 7 {
   392  				if shift >= 64 {
   393  					return ErrIntOverflowKv
   394  				}
   395  				if iNdEx >= l {
   396  					return io.ErrUnexpectedEOF
   397  				}
   398  				b := dAtA[iNdEx]
   399  				iNdEx++
   400  				byteLen |= int(b&0x7F) << shift
   401  				if b < 0x80 {
   402  					break
   403  				}
   404  			}
   405  			if byteLen < 0 {
   406  				return ErrInvalidLengthKv
   407  			}
   408  			postIndex := iNdEx + byteLen
   409  			if postIndex < 0 {
   410  				return ErrInvalidLengthKv
   411  			}
   412  			if postIndex > l {
   413  				return io.ErrUnexpectedEOF
   414  			}
   415  			m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
   416  			if m.Key == nil {
   417  				m.Key = []byte{}
   418  			}
   419  			iNdEx = postIndex
   420  		case 2:
   421  			if wireType != 2 {
   422  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
   423  			}
   424  			var byteLen int
   425  			for shift := uint(0); ; shift += 7 {
   426  				if shift >= 64 {
   427  					return ErrIntOverflowKv
   428  				}
   429  				if iNdEx >= l {
   430  					return io.ErrUnexpectedEOF
   431  				}
   432  				b := dAtA[iNdEx]
   433  				iNdEx++
   434  				byteLen |= int(b&0x7F) << shift
   435  				if b < 0x80 {
   436  					break
   437  				}
   438  			}
   439  			if byteLen < 0 {
   440  				return ErrInvalidLengthKv
   441  			}
   442  			postIndex := iNdEx + byteLen
   443  			if postIndex < 0 {
   444  				return ErrInvalidLengthKv
   445  			}
   446  			if postIndex > l {
   447  				return io.ErrUnexpectedEOF
   448  			}
   449  			m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
   450  			if m.Value == nil {
   451  				m.Value = []byte{}
   452  			}
   453  			iNdEx = postIndex
   454  		default:
   455  			iNdEx = preIndex
   456  			skippy, err := skipKv(dAtA[iNdEx:])
   457  			if err != nil {
   458  				return err
   459  			}
   460  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   461  				return ErrInvalidLengthKv
   462  			}
   463  			if (iNdEx + skippy) > l {
   464  				return io.ErrUnexpectedEOF
   465  			}
   466  			iNdEx += skippy
   467  		}
   468  	}
   469  
   470  	if iNdEx > l {
   471  		return io.ErrUnexpectedEOF
   472  	}
   473  	return nil
   474  }
   475  func skipKv(dAtA []byte) (n int, err error) {
   476  	l := len(dAtA)
   477  	iNdEx := 0
   478  	depth := 0
   479  	for iNdEx < l {
   480  		var wire uint64
   481  		for shift := uint(0); ; shift += 7 {
   482  			if shift >= 64 {
   483  				return 0, ErrIntOverflowKv
   484  			}
   485  			if iNdEx >= l {
   486  				return 0, io.ErrUnexpectedEOF
   487  			}
   488  			b := dAtA[iNdEx]
   489  			iNdEx++
   490  			wire |= (uint64(b) & 0x7F) << shift
   491  			if b < 0x80 {
   492  				break
   493  			}
   494  		}
   495  		wireType := int(wire & 0x7)
   496  		switch wireType {
   497  		case 0:
   498  			for shift := uint(0); ; shift += 7 {
   499  				if shift >= 64 {
   500  					return 0, ErrIntOverflowKv
   501  				}
   502  				if iNdEx >= l {
   503  					return 0, io.ErrUnexpectedEOF
   504  				}
   505  				iNdEx++
   506  				if dAtA[iNdEx-1] < 0x80 {
   507  					break
   508  				}
   509  			}
   510  		case 1:
   511  			iNdEx += 8
   512  		case 2:
   513  			var length int
   514  			for shift := uint(0); ; shift += 7 {
   515  				if shift >= 64 {
   516  					return 0, ErrIntOverflowKv
   517  				}
   518  				if iNdEx >= l {
   519  					return 0, io.ErrUnexpectedEOF
   520  				}
   521  				b := dAtA[iNdEx]
   522  				iNdEx++
   523  				length |= (int(b) & 0x7F) << shift
   524  				if b < 0x80 {
   525  					break
   526  				}
   527  			}
   528  			if length < 0 {
   529  				return 0, ErrInvalidLengthKv
   530  			}
   531  			iNdEx += length
   532  		case 3:
   533  			depth++
   534  		case 4:
   535  			if depth == 0 {
   536  				return 0, ErrUnexpectedEndOfGroupKv
   537  			}
   538  			depth--
   539  		case 5:
   540  			iNdEx += 4
   541  		default:
   542  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   543  		}
   544  		if iNdEx < 0 {
   545  			return 0, ErrInvalidLengthKv
   546  		}
   547  		if depth == 0 {
   548  			return iNdEx, nil
   549  		}
   550  	}
   551  	return 0, io.ErrUnexpectedEOF
   552  }
   553  
   554  var (
   555  	ErrInvalidLengthKv        = fmt.Errorf("proto: negative length found during unmarshaling")
   556  	ErrIntOverflowKv          = fmt.Errorf("proto: integer overflow")
   557  	ErrUnexpectedEndOfGroupKv = fmt.Errorf("proto: unexpected end of group")
   558  )