github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/execution/names/names.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: names.proto
     3  
     4  package names
     5  
     6  import (
     7  	fmt "fmt"
     8  	io "io"
     9  	math "math"
    10  	math_bits "math/bits"
    11  
    12  	_ "github.com/gogo/protobuf/gogoproto"
    13  	proto "github.com/gogo/protobuf/proto"
    14  	golang_proto "github.com/golang/protobuf/proto"
    15  	github_com_hyperledger_burrow_crypto "github.com/hyperledger/burrow/crypto"
    16  )
    17  
    18  // Reference imports to suppress errors if they are not otherwise used.
    19  var _ = proto.Marshal
    20  var _ = golang_proto.Marshal
    21  var _ = fmt.Errorf
    22  var _ = math.Inf
    23  
    24  // This is a compile-time assertion to ensure that this generated file
    25  // is compatible with the proto package it is being compiled against.
    26  // A compilation error at this line likely means your copy of the
    27  // proto package needs to be updated.
    28  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    29  
    30  // NameReg provides a global key value store based on Name, Data pairs that are subject to expiry and ownership by an
    31  // account.
    32  type Entry struct {
    33  	// registered name for the entry
    34  	Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
    35  	// address that created the entry
    36  	Owner github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,2,opt,name=Owner,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"Owner"`
    37  	// data to store under this name
    38  	Data string `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`
    39  	// block at which this entry expires
    40  	Expires              uint64   `protobuf:"varint,4,opt,name=Expires,proto3" json:"Expires,omitempty"`
    41  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    42  	XXX_unrecognized     []byte   `json:"-"`
    43  	XXX_sizecache        int32    `json:"-"`
    44  }
    45  
    46  func (m *Entry) Reset()      { *m = Entry{} }
    47  func (*Entry) ProtoMessage() {}
    48  func (*Entry) Descriptor() ([]byte, []int) {
    49  	return fileDescriptor_f4268625867c617c, []int{0}
    50  }
    51  func (m *Entry) XXX_Unmarshal(b []byte) error {
    52  	return m.Unmarshal(b)
    53  }
    54  func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    55  	b = b[:cap(b)]
    56  	n, err := m.MarshalToSizedBuffer(b)
    57  	if err != nil {
    58  		return nil, err
    59  	}
    60  	return b[:n], nil
    61  }
    62  func (m *Entry) XXX_Merge(src proto.Message) {
    63  	xxx_messageInfo_Entry.Merge(m, src)
    64  }
    65  func (m *Entry) XXX_Size() int {
    66  	return m.Size()
    67  }
    68  func (m *Entry) XXX_DiscardUnknown() {
    69  	xxx_messageInfo_Entry.DiscardUnknown(m)
    70  }
    71  
    72  var xxx_messageInfo_Entry proto.InternalMessageInfo
    73  
    74  func (m *Entry) GetName() string {
    75  	if m != nil {
    76  		return m.Name
    77  	}
    78  	return ""
    79  }
    80  
    81  func (m *Entry) GetData() string {
    82  	if m != nil {
    83  		return m.Data
    84  	}
    85  	return ""
    86  }
    87  
    88  func (m *Entry) GetExpires() uint64 {
    89  	if m != nil {
    90  		return m.Expires
    91  	}
    92  	return 0
    93  }
    94  
    95  func (*Entry) XXX_MessageName() string {
    96  	return "names.Entry"
    97  }
    98  func init() {
    99  	proto.RegisterType((*Entry)(nil), "names.Entry")
   100  	golang_proto.RegisterType((*Entry)(nil), "names.Entry")
   101  }
   102  
   103  func init() { proto.RegisterFile("names.proto", fileDescriptor_f4268625867c617c) }
   104  func init() { golang_proto.RegisterFile("names.proto", fileDescriptor_f4268625867c617c) }
   105  
   106  var fileDescriptor_f4268625867c617c = []byte{
   107  	// 240 bytes of a gzipped FileDescriptorProto
   108  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x4b, 0xcc, 0x4d,
   109  	0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x44, 0xd2, 0xf3, 0xd3,
   110  	0xf3, 0xc1, 0x22, 0xfa, 0x20, 0x16, 0x44, 0x52, 0x69, 0x36, 0x23, 0x17, 0xab, 0x6b, 0x5e, 0x49,
   111  	0x51, 0xa5, 0x90, 0x10, 0x17, 0x8b, 0x5f, 0x62, 0x6e, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67,
   112  	0x10, 0x98, 0x2d, 0xe4, 0xc5, 0xc5, 0xea, 0x5f, 0x9e, 0x97, 0x5a, 0x24, 0xc1, 0xa4, 0xc0, 0xa8,
   113  	0xc1, 0xe3, 0x64, 0x72, 0xe2, 0x9e, 0x3c, 0xc3, 0xad, 0x7b, 0xf2, 0x3a, 0xe9, 0x99, 0x25, 0x19,
   114  	0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x19, 0x95, 0x05, 0xa9, 0x45, 0x39, 0xa9, 0x29, 0xe9,
   115  	0xa9, 0x45, 0xfa, 0x49, 0xa5, 0x45, 0x45, 0xf9, 0xe5, 0xfa, 0xc9, 0x45, 0x95, 0x05, 0x25, 0xf9,
   116  	0x7a, 0x8e, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0xc5, 0x41, 0x10, 0x23, 0x40, 0xe6, 0xbb, 0x24, 0x96,
   117  	0x24, 0x4a, 0x30, 0x43, 0xcc, 0x07, 0xb1, 0x85, 0x24, 0xb8, 0xd8, 0x5d, 0x2b, 0x0a, 0x32, 0x8b,
   118  	0x52, 0x8b, 0x25, 0x58, 0x14, 0x18, 0x35, 0x58, 0x82, 0x60, 0x5c, 0x2b, 0x96, 0x19, 0x0b, 0xe4,
   119  	0x19, 0x9c, 0xdc, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc6, 0x23, 0x39, 0xc6,
   120  	0x07, 0x8f, 0xe4, 0x18, 0x0f, 0x3c, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x31, 0x4a, 0x17, 0xbf,
   121  	0x13, 0x52, 0x2b, 0x52, 0x93, 0x4b, 0x4b, 0x32, 0xf3, 0xf3, 0xf4, 0xc1, 0x9e, 0x4f, 0x62, 0x03,
   122  	0xfb, 0xd6, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x78, 0xc9, 0x3e, 0x19, 0x01, 0x00, 0x00,
   123  }
   124  
   125  func (m *Entry) Marshal() (dAtA []byte, err error) {
   126  	size := m.Size()
   127  	dAtA = make([]byte, size)
   128  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   129  	if err != nil {
   130  		return nil, err
   131  	}
   132  	return dAtA[:n], nil
   133  }
   134  
   135  func (m *Entry) MarshalTo(dAtA []byte) (int, error) {
   136  	size := m.Size()
   137  	return m.MarshalToSizedBuffer(dAtA[:size])
   138  }
   139  
   140  func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   141  	i := len(dAtA)
   142  	_ = i
   143  	var l int
   144  	_ = l
   145  	if m.XXX_unrecognized != nil {
   146  		i -= len(m.XXX_unrecognized)
   147  		copy(dAtA[i:], m.XXX_unrecognized)
   148  	}
   149  	if m.Expires != 0 {
   150  		i = encodeVarintNames(dAtA, i, uint64(m.Expires))
   151  		i--
   152  		dAtA[i] = 0x20
   153  	}
   154  	if len(m.Data) > 0 {
   155  		i -= len(m.Data)
   156  		copy(dAtA[i:], m.Data)
   157  		i = encodeVarintNames(dAtA, i, uint64(len(m.Data)))
   158  		i--
   159  		dAtA[i] = 0x1a
   160  	}
   161  	{
   162  		size := m.Owner.Size()
   163  		i -= size
   164  		if _, err := m.Owner.MarshalTo(dAtA[i:]); err != nil {
   165  			return 0, err
   166  		}
   167  		i = encodeVarintNames(dAtA, i, uint64(size))
   168  	}
   169  	i--
   170  	dAtA[i] = 0x12
   171  	if len(m.Name) > 0 {
   172  		i -= len(m.Name)
   173  		copy(dAtA[i:], m.Name)
   174  		i = encodeVarintNames(dAtA, i, uint64(len(m.Name)))
   175  		i--
   176  		dAtA[i] = 0xa
   177  	}
   178  	return len(dAtA) - i, nil
   179  }
   180  
   181  func encodeVarintNames(dAtA []byte, offset int, v uint64) int {
   182  	offset -= sovNames(v)
   183  	base := offset
   184  	for v >= 1<<7 {
   185  		dAtA[offset] = uint8(v&0x7f | 0x80)
   186  		v >>= 7
   187  		offset++
   188  	}
   189  	dAtA[offset] = uint8(v)
   190  	return base
   191  }
   192  func (m *Entry) Size() (n int) {
   193  	if m == nil {
   194  		return 0
   195  	}
   196  	var l int
   197  	_ = l
   198  	l = len(m.Name)
   199  	if l > 0 {
   200  		n += 1 + l + sovNames(uint64(l))
   201  	}
   202  	l = m.Owner.Size()
   203  	n += 1 + l + sovNames(uint64(l))
   204  	l = len(m.Data)
   205  	if l > 0 {
   206  		n += 1 + l + sovNames(uint64(l))
   207  	}
   208  	if m.Expires != 0 {
   209  		n += 1 + sovNames(uint64(m.Expires))
   210  	}
   211  	if m.XXX_unrecognized != nil {
   212  		n += len(m.XXX_unrecognized)
   213  	}
   214  	return n
   215  }
   216  
   217  func sovNames(x uint64) (n int) {
   218  	return (math_bits.Len64(x|1) + 6) / 7
   219  }
   220  func sozNames(x uint64) (n int) {
   221  	return sovNames(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   222  }
   223  func (m *Entry) Unmarshal(dAtA []byte) error {
   224  	l := len(dAtA)
   225  	iNdEx := 0
   226  	for iNdEx < l {
   227  		preIndex := iNdEx
   228  		var wire uint64
   229  		for shift := uint(0); ; shift += 7 {
   230  			if shift >= 64 {
   231  				return ErrIntOverflowNames
   232  			}
   233  			if iNdEx >= l {
   234  				return io.ErrUnexpectedEOF
   235  			}
   236  			b := dAtA[iNdEx]
   237  			iNdEx++
   238  			wire |= uint64(b&0x7F) << shift
   239  			if b < 0x80 {
   240  				break
   241  			}
   242  		}
   243  		fieldNum := int32(wire >> 3)
   244  		wireType := int(wire & 0x7)
   245  		if wireType == 4 {
   246  			return fmt.Errorf("proto: Entry: wiretype end group for non-group")
   247  		}
   248  		if fieldNum <= 0 {
   249  			return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire)
   250  		}
   251  		switch fieldNum {
   252  		case 1:
   253  			if wireType != 2 {
   254  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
   255  			}
   256  			var stringLen uint64
   257  			for shift := uint(0); ; shift += 7 {
   258  				if shift >= 64 {
   259  					return ErrIntOverflowNames
   260  				}
   261  				if iNdEx >= l {
   262  					return io.ErrUnexpectedEOF
   263  				}
   264  				b := dAtA[iNdEx]
   265  				iNdEx++
   266  				stringLen |= uint64(b&0x7F) << shift
   267  				if b < 0x80 {
   268  					break
   269  				}
   270  			}
   271  			intStringLen := int(stringLen)
   272  			if intStringLen < 0 {
   273  				return ErrInvalidLengthNames
   274  			}
   275  			postIndex := iNdEx + intStringLen
   276  			if postIndex < 0 {
   277  				return ErrInvalidLengthNames
   278  			}
   279  			if postIndex > l {
   280  				return io.ErrUnexpectedEOF
   281  			}
   282  			m.Name = string(dAtA[iNdEx:postIndex])
   283  			iNdEx = postIndex
   284  		case 2:
   285  			if wireType != 2 {
   286  				return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType)
   287  			}
   288  			var byteLen int
   289  			for shift := uint(0); ; shift += 7 {
   290  				if shift >= 64 {
   291  					return ErrIntOverflowNames
   292  				}
   293  				if iNdEx >= l {
   294  					return io.ErrUnexpectedEOF
   295  				}
   296  				b := dAtA[iNdEx]
   297  				iNdEx++
   298  				byteLen |= int(b&0x7F) << shift
   299  				if b < 0x80 {
   300  					break
   301  				}
   302  			}
   303  			if byteLen < 0 {
   304  				return ErrInvalidLengthNames
   305  			}
   306  			postIndex := iNdEx + byteLen
   307  			if postIndex < 0 {
   308  				return ErrInvalidLengthNames
   309  			}
   310  			if postIndex > l {
   311  				return io.ErrUnexpectedEOF
   312  			}
   313  			if err := m.Owner.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   314  				return err
   315  			}
   316  			iNdEx = postIndex
   317  		case 3:
   318  			if wireType != 2 {
   319  				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
   320  			}
   321  			var stringLen uint64
   322  			for shift := uint(0); ; shift += 7 {
   323  				if shift >= 64 {
   324  					return ErrIntOverflowNames
   325  				}
   326  				if iNdEx >= l {
   327  					return io.ErrUnexpectedEOF
   328  				}
   329  				b := dAtA[iNdEx]
   330  				iNdEx++
   331  				stringLen |= uint64(b&0x7F) << shift
   332  				if b < 0x80 {
   333  					break
   334  				}
   335  			}
   336  			intStringLen := int(stringLen)
   337  			if intStringLen < 0 {
   338  				return ErrInvalidLengthNames
   339  			}
   340  			postIndex := iNdEx + intStringLen
   341  			if postIndex < 0 {
   342  				return ErrInvalidLengthNames
   343  			}
   344  			if postIndex > l {
   345  				return io.ErrUnexpectedEOF
   346  			}
   347  			m.Data = string(dAtA[iNdEx:postIndex])
   348  			iNdEx = postIndex
   349  		case 4:
   350  			if wireType != 0 {
   351  				return fmt.Errorf("proto: wrong wireType = %d for field Expires", wireType)
   352  			}
   353  			m.Expires = 0
   354  			for shift := uint(0); ; shift += 7 {
   355  				if shift >= 64 {
   356  					return ErrIntOverflowNames
   357  				}
   358  				if iNdEx >= l {
   359  					return io.ErrUnexpectedEOF
   360  				}
   361  				b := dAtA[iNdEx]
   362  				iNdEx++
   363  				m.Expires |= uint64(b&0x7F) << shift
   364  				if b < 0x80 {
   365  					break
   366  				}
   367  			}
   368  		default:
   369  			iNdEx = preIndex
   370  			skippy, err := skipNames(dAtA[iNdEx:])
   371  			if err != nil {
   372  				return err
   373  			}
   374  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   375  				return ErrInvalidLengthNames
   376  			}
   377  			if (iNdEx + skippy) > l {
   378  				return io.ErrUnexpectedEOF
   379  			}
   380  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   381  			iNdEx += skippy
   382  		}
   383  	}
   384  
   385  	if iNdEx > l {
   386  		return io.ErrUnexpectedEOF
   387  	}
   388  	return nil
   389  }
   390  func skipNames(dAtA []byte) (n int, err error) {
   391  	l := len(dAtA)
   392  	iNdEx := 0
   393  	depth := 0
   394  	for iNdEx < l {
   395  		var wire uint64
   396  		for shift := uint(0); ; shift += 7 {
   397  			if shift >= 64 {
   398  				return 0, ErrIntOverflowNames
   399  			}
   400  			if iNdEx >= l {
   401  				return 0, io.ErrUnexpectedEOF
   402  			}
   403  			b := dAtA[iNdEx]
   404  			iNdEx++
   405  			wire |= (uint64(b) & 0x7F) << shift
   406  			if b < 0x80 {
   407  				break
   408  			}
   409  		}
   410  		wireType := int(wire & 0x7)
   411  		switch wireType {
   412  		case 0:
   413  			for shift := uint(0); ; shift += 7 {
   414  				if shift >= 64 {
   415  					return 0, ErrIntOverflowNames
   416  				}
   417  				if iNdEx >= l {
   418  					return 0, io.ErrUnexpectedEOF
   419  				}
   420  				iNdEx++
   421  				if dAtA[iNdEx-1] < 0x80 {
   422  					break
   423  				}
   424  			}
   425  		case 1:
   426  			iNdEx += 8
   427  		case 2:
   428  			var length int
   429  			for shift := uint(0); ; shift += 7 {
   430  				if shift >= 64 {
   431  					return 0, ErrIntOverflowNames
   432  				}
   433  				if iNdEx >= l {
   434  					return 0, io.ErrUnexpectedEOF
   435  				}
   436  				b := dAtA[iNdEx]
   437  				iNdEx++
   438  				length |= (int(b) & 0x7F) << shift
   439  				if b < 0x80 {
   440  					break
   441  				}
   442  			}
   443  			if length < 0 {
   444  				return 0, ErrInvalidLengthNames
   445  			}
   446  			iNdEx += length
   447  		case 3:
   448  			depth++
   449  		case 4:
   450  			if depth == 0 {
   451  				return 0, ErrUnexpectedEndOfGroupNames
   452  			}
   453  			depth--
   454  		case 5:
   455  			iNdEx += 4
   456  		default:
   457  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   458  		}
   459  		if iNdEx < 0 {
   460  			return 0, ErrInvalidLengthNames
   461  		}
   462  		if depth == 0 {
   463  			return iNdEx, nil
   464  		}
   465  	}
   466  	return 0, io.ErrUnexpectedEOF
   467  }
   468  
   469  var (
   470  	ErrInvalidLengthNames        = fmt.Errorf("proto: negative length found during unmarshaling")
   471  	ErrIntOverflowNames          = fmt.Errorf("proto: integer overflow")
   472  	ErrUnexpectedEndOfGroupNames = fmt.Errorf("proto: unexpected end of group")
   473  )