github.com/Finschia/finschia-sdk@v0.48.1/x/authz/event.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cosmos/authz/v1beta1/event.proto
     3  
     4  package authz
     5  
     6  import (
     7  	fmt "fmt"
     8  	proto "github.com/gogo/protobuf/proto"
     9  	io "io"
    10  	math "math"
    11  	math_bits "math/bits"
    12  )
    13  
    14  // Reference imports to suppress errors if they are not otherwise used.
    15  var _ = proto.Marshal
    16  var _ = fmt.Errorf
    17  var _ = math.Inf
    18  
    19  // This is a compile-time assertion to ensure that this generated file
    20  // is compatible with the proto package it is being compiled against.
    21  // A compilation error at this line likely means your copy of the
    22  // proto package needs to be updated.
    23  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    24  
    25  // EventGrant is emitted on Msg/Grant
    26  type EventGrant struct {
    27  	// Msg type URL for which an autorization is granted
    28  	MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
    29  	// Granter account address
    30  	Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"`
    31  	// Grantee account address
    32  	Grantee string `protobuf:"bytes,4,opt,name=grantee,proto3" json:"grantee,omitempty"`
    33  }
    34  
    35  func (m *EventGrant) Reset()         { *m = EventGrant{} }
    36  func (m *EventGrant) String() string { return proto.CompactTextString(m) }
    37  func (*EventGrant) ProtoMessage()    {}
    38  func (*EventGrant) Descriptor() ([]byte, []int) {
    39  	return fileDescriptor_1f88cbc71a8baf1f, []int{0}
    40  }
    41  func (m *EventGrant) XXX_Unmarshal(b []byte) error {
    42  	return m.Unmarshal(b)
    43  }
    44  func (m *EventGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    45  	if deterministic {
    46  		return xxx_messageInfo_EventGrant.Marshal(b, m, deterministic)
    47  	} else {
    48  		b = b[:cap(b)]
    49  		n, err := m.MarshalToSizedBuffer(b)
    50  		if err != nil {
    51  			return nil, err
    52  		}
    53  		return b[:n], nil
    54  	}
    55  }
    56  func (m *EventGrant) XXX_Merge(src proto.Message) {
    57  	xxx_messageInfo_EventGrant.Merge(m, src)
    58  }
    59  func (m *EventGrant) XXX_Size() int {
    60  	return m.Size()
    61  }
    62  func (m *EventGrant) XXX_DiscardUnknown() {
    63  	xxx_messageInfo_EventGrant.DiscardUnknown(m)
    64  }
    65  
    66  var xxx_messageInfo_EventGrant proto.InternalMessageInfo
    67  
    68  func (m *EventGrant) GetMsgTypeUrl() string {
    69  	if m != nil {
    70  		return m.MsgTypeUrl
    71  	}
    72  	return ""
    73  }
    74  
    75  func (m *EventGrant) GetGranter() string {
    76  	if m != nil {
    77  		return m.Granter
    78  	}
    79  	return ""
    80  }
    81  
    82  func (m *EventGrant) GetGrantee() string {
    83  	if m != nil {
    84  		return m.Grantee
    85  	}
    86  	return ""
    87  }
    88  
    89  // EventRevoke is emitted on Msg/Revoke
    90  type EventRevoke struct {
    91  	// Msg type URL for which an autorization is revoked
    92  	MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
    93  	// Granter account address
    94  	Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"`
    95  	// Grantee account address
    96  	Grantee string `protobuf:"bytes,4,opt,name=grantee,proto3" json:"grantee,omitempty"`
    97  }
    98  
    99  func (m *EventRevoke) Reset()         { *m = EventRevoke{} }
   100  func (m *EventRevoke) String() string { return proto.CompactTextString(m) }
   101  func (*EventRevoke) ProtoMessage()    {}
   102  func (*EventRevoke) Descriptor() ([]byte, []int) {
   103  	return fileDescriptor_1f88cbc71a8baf1f, []int{1}
   104  }
   105  func (m *EventRevoke) XXX_Unmarshal(b []byte) error {
   106  	return m.Unmarshal(b)
   107  }
   108  func (m *EventRevoke) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   109  	if deterministic {
   110  		return xxx_messageInfo_EventRevoke.Marshal(b, m, deterministic)
   111  	} else {
   112  		b = b[:cap(b)]
   113  		n, err := m.MarshalToSizedBuffer(b)
   114  		if err != nil {
   115  			return nil, err
   116  		}
   117  		return b[:n], nil
   118  	}
   119  }
   120  func (m *EventRevoke) XXX_Merge(src proto.Message) {
   121  	xxx_messageInfo_EventRevoke.Merge(m, src)
   122  }
   123  func (m *EventRevoke) XXX_Size() int {
   124  	return m.Size()
   125  }
   126  func (m *EventRevoke) XXX_DiscardUnknown() {
   127  	xxx_messageInfo_EventRevoke.DiscardUnknown(m)
   128  }
   129  
   130  var xxx_messageInfo_EventRevoke proto.InternalMessageInfo
   131  
   132  func (m *EventRevoke) GetMsgTypeUrl() string {
   133  	if m != nil {
   134  		return m.MsgTypeUrl
   135  	}
   136  	return ""
   137  }
   138  
   139  func (m *EventRevoke) GetGranter() string {
   140  	if m != nil {
   141  		return m.Granter
   142  	}
   143  	return ""
   144  }
   145  
   146  func (m *EventRevoke) GetGrantee() string {
   147  	if m != nil {
   148  		return m.Grantee
   149  	}
   150  	return ""
   151  }
   152  
   153  func init() {
   154  	proto.RegisterType((*EventGrant)(nil), "cosmos.authz.v1beta1.EventGrant")
   155  	proto.RegisterType((*EventRevoke)(nil), "cosmos.authz.v1beta1.EventRevoke")
   156  }
   157  
   158  func init() { proto.RegisterFile("cosmos/authz/v1beta1/event.proto", fileDescriptor_1f88cbc71a8baf1f) }
   159  
   160  var fileDescriptor_1f88cbc71a8baf1f = []byte{
   161  	// 217 bytes of a gzipped FileDescriptorProto
   162  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce,
   163  	0xcd, 0x2f, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34,
   164  	0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81, 0xa8,
   165  	0xd0, 0x03, 0xab, 0xd0, 0x83, 0xaa, 0x50, 0x4a, 0xe2, 0xe2, 0x72, 0x05, 0x29, 0x72, 0x2f, 0x4a,
   166  	0xcc, 0x2b, 0x11, 0x52, 0xe0, 0xe2, 0xc9, 0x2d, 0x4e, 0x8f, 0x2f, 0xa9, 0x2c, 0x48, 0x8d, 0x2f,
   167  	0x2d, 0xca, 0x91, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, 0xca, 0x2d, 0x4e, 0x0f, 0xa9, 0x2c,
   168  	0x48, 0x0d, 0x2d, 0xca, 0x11, 0x92, 0xe0, 0x62, 0x4f, 0x07, 0x29, 0x4d, 0x2d, 0x92, 0x60, 0x06,
   169  	0x4b, 0xc2, 0xb8, 0x08, 0x99, 0x54, 0x09, 0x16, 0x64, 0x99, 0x54, 0xa5, 0x64, 0x2e, 0x6e, 0xb0,
   170  	0x1d, 0x41, 0xa9, 0x65, 0xf9, 0xd9, 0xa9, 0xb4, 0xb1, 0xc4, 0xc9, 0xe9, 0xc4, 0x23, 0x39, 0xc6,
   171  	0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39,
   172  	0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x34, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3,
   173  	0x73, 0xf5, 0xdd, 0x32, 0xf3, 0x8a, 0x93, 0x33, 0x32, 0x13, 0xf5, 0xd3, 0xa0, 0x0c, 0xdd, 0xe2,
   174  	0x94, 0x6c, 0xfd, 0x0a, 0x48, 0xb0, 0x25, 0xb1, 0x81, 0x43, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff,
   175  	0xff, 0xa1, 0xdd, 0xc7, 0x31, 0x4d, 0x01, 0x00, 0x00,
   176  }
   177  
   178  func (m *EventGrant) Marshal() (dAtA []byte, err error) {
   179  	size := m.Size()
   180  	dAtA = make([]byte, size)
   181  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   182  	if err != nil {
   183  		return nil, err
   184  	}
   185  	return dAtA[:n], nil
   186  }
   187  
   188  func (m *EventGrant) MarshalTo(dAtA []byte) (int, error) {
   189  	size := m.Size()
   190  	return m.MarshalToSizedBuffer(dAtA[:size])
   191  }
   192  
   193  func (m *EventGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   194  	i := len(dAtA)
   195  	_ = i
   196  	var l int
   197  	_ = l
   198  	if len(m.Grantee) > 0 {
   199  		i -= len(m.Grantee)
   200  		copy(dAtA[i:], m.Grantee)
   201  		i = encodeVarintEvent(dAtA, i, uint64(len(m.Grantee)))
   202  		i--
   203  		dAtA[i] = 0x22
   204  	}
   205  	if len(m.Granter) > 0 {
   206  		i -= len(m.Granter)
   207  		copy(dAtA[i:], m.Granter)
   208  		i = encodeVarintEvent(dAtA, i, uint64(len(m.Granter)))
   209  		i--
   210  		dAtA[i] = 0x1a
   211  	}
   212  	if len(m.MsgTypeUrl) > 0 {
   213  		i -= len(m.MsgTypeUrl)
   214  		copy(dAtA[i:], m.MsgTypeUrl)
   215  		i = encodeVarintEvent(dAtA, i, uint64(len(m.MsgTypeUrl)))
   216  		i--
   217  		dAtA[i] = 0x12
   218  	}
   219  	return len(dAtA) - i, nil
   220  }
   221  
   222  func (m *EventRevoke) Marshal() (dAtA []byte, err error) {
   223  	size := m.Size()
   224  	dAtA = make([]byte, size)
   225  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   226  	if err != nil {
   227  		return nil, err
   228  	}
   229  	return dAtA[:n], nil
   230  }
   231  
   232  func (m *EventRevoke) MarshalTo(dAtA []byte) (int, error) {
   233  	size := m.Size()
   234  	return m.MarshalToSizedBuffer(dAtA[:size])
   235  }
   236  
   237  func (m *EventRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   238  	i := len(dAtA)
   239  	_ = i
   240  	var l int
   241  	_ = l
   242  	if len(m.Grantee) > 0 {
   243  		i -= len(m.Grantee)
   244  		copy(dAtA[i:], m.Grantee)
   245  		i = encodeVarintEvent(dAtA, i, uint64(len(m.Grantee)))
   246  		i--
   247  		dAtA[i] = 0x22
   248  	}
   249  	if len(m.Granter) > 0 {
   250  		i -= len(m.Granter)
   251  		copy(dAtA[i:], m.Granter)
   252  		i = encodeVarintEvent(dAtA, i, uint64(len(m.Granter)))
   253  		i--
   254  		dAtA[i] = 0x1a
   255  	}
   256  	if len(m.MsgTypeUrl) > 0 {
   257  		i -= len(m.MsgTypeUrl)
   258  		copy(dAtA[i:], m.MsgTypeUrl)
   259  		i = encodeVarintEvent(dAtA, i, uint64(len(m.MsgTypeUrl)))
   260  		i--
   261  		dAtA[i] = 0x12
   262  	}
   263  	return len(dAtA) - i, nil
   264  }
   265  
   266  func encodeVarintEvent(dAtA []byte, offset int, v uint64) int {
   267  	offset -= sovEvent(v)
   268  	base := offset
   269  	for v >= 1<<7 {
   270  		dAtA[offset] = uint8(v&0x7f | 0x80)
   271  		v >>= 7
   272  		offset++
   273  	}
   274  	dAtA[offset] = uint8(v)
   275  	return base
   276  }
   277  func (m *EventGrant) Size() (n int) {
   278  	if m == nil {
   279  		return 0
   280  	}
   281  	var l int
   282  	_ = l
   283  	l = len(m.MsgTypeUrl)
   284  	if l > 0 {
   285  		n += 1 + l + sovEvent(uint64(l))
   286  	}
   287  	l = len(m.Granter)
   288  	if l > 0 {
   289  		n += 1 + l + sovEvent(uint64(l))
   290  	}
   291  	l = len(m.Grantee)
   292  	if l > 0 {
   293  		n += 1 + l + sovEvent(uint64(l))
   294  	}
   295  	return n
   296  }
   297  
   298  func (m *EventRevoke) Size() (n int) {
   299  	if m == nil {
   300  		return 0
   301  	}
   302  	var l int
   303  	_ = l
   304  	l = len(m.MsgTypeUrl)
   305  	if l > 0 {
   306  		n += 1 + l + sovEvent(uint64(l))
   307  	}
   308  	l = len(m.Granter)
   309  	if l > 0 {
   310  		n += 1 + l + sovEvent(uint64(l))
   311  	}
   312  	l = len(m.Grantee)
   313  	if l > 0 {
   314  		n += 1 + l + sovEvent(uint64(l))
   315  	}
   316  	return n
   317  }
   318  
   319  func sovEvent(x uint64) (n int) {
   320  	return (math_bits.Len64(x|1) + 6) / 7
   321  }
   322  func sozEvent(x uint64) (n int) {
   323  	return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   324  }
   325  func (m *EventGrant) Unmarshal(dAtA []byte) error {
   326  	l := len(dAtA)
   327  	iNdEx := 0
   328  	for iNdEx < l {
   329  		preIndex := iNdEx
   330  		var wire uint64
   331  		for shift := uint(0); ; shift += 7 {
   332  			if shift >= 64 {
   333  				return ErrIntOverflowEvent
   334  			}
   335  			if iNdEx >= l {
   336  				return io.ErrUnexpectedEOF
   337  			}
   338  			b := dAtA[iNdEx]
   339  			iNdEx++
   340  			wire |= uint64(b&0x7F) << shift
   341  			if b < 0x80 {
   342  				break
   343  			}
   344  		}
   345  		fieldNum := int32(wire >> 3)
   346  		wireType := int(wire & 0x7)
   347  		if wireType == 4 {
   348  			return fmt.Errorf("proto: EventGrant: wiretype end group for non-group")
   349  		}
   350  		if fieldNum <= 0 {
   351  			return fmt.Errorf("proto: EventGrant: illegal tag %d (wire type %d)", fieldNum, wire)
   352  		}
   353  		switch fieldNum {
   354  		case 2:
   355  			if wireType != 2 {
   356  				return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType)
   357  			}
   358  			var stringLen uint64
   359  			for shift := uint(0); ; shift += 7 {
   360  				if shift >= 64 {
   361  					return ErrIntOverflowEvent
   362  				}
   363  				if iNdEx >= l {
   364  					return io.ErrUnexpectedEOF
   365  				}
   366  				b := dAtA[iNdEx]
   367  				iNdEx++
   368  				stringLen |= uint64(b&0x7F) << shift
   369  				if b < 0x80 {
   370  					break
   371  				}
   372  			}
   373  			intStringLen := int(stringLen)
   374  			if intStringLen < 0 {
   375  				return ErrInvalidLengthEvent
   376  			}
   377  			postIndex := iNdEx + intStringLen
   378  			if postIndex < 0 {
   379  				return ErrInvalidLengthEvent
   380  			}
   381  			if postIndex > l {
   382  				return io.ErrUnexpectedEOF
   383  			}
   384  			m.MsgTypeUrl = string(dAtA[iNdEx:postIndex])
   385  			iNdEx = postIndex
   386  		case 3:
   387  			if wireType != 2 {
   388  				return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType)
   389  			}
   390  			var stringLen uint64
   391  			for shift := uint(0); ; shift += 7 {
   392  				if shift >= 64 {
   393  					return ErrIntOverflowEvent
   394  				}
   395  				if iNdEx >= l {
   396  					return io.ErrUnexpectedEOF
   397  				}
   398  				b := dAtA[iNdEx]
   399  				iNdEx++
   400  				stringLen |= uint64(b&0x7F) << shift
   401  				if b < 0x80 {
   402  					break
   403  				}
   404  			}
   405  			intStringLen := int(stringLen)
   406  			if intStringLen < 0 {
   407  				return ErrInvalidLengthEvent
   408  			}
   409  			postIndex := iNdEx + intStringLen
   410  			if postIndex < 0 {
   411  				return ErrInvalidLengthEvent
   412  			}
   413  			if postIndex > l {
   414  				return io.ErrUnexpectedEOF
   415  			}
   416  			m.Granter = string(dAtA[iNdEx:postIndex])
   417  			iNdEx = postIndex
   418  		case 4:
   419  			if wireType != 2 {
   420  				return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType)
   421  			}
   422  			var stringLen uint64
   423  			for shift := uint(0); ; shift += 7 {
   424  				if shift >= 64 {
   425  					return ErrIntOverflowEvent
   426  				}
   427  				if iNdEx >= l {
   428  					return io.ErrUnexpectedEOF
   429  				}
   430  				b := dAtA[iNdEx]
   431  				iNdEx++
   432  				stringLen |= uint64(b&0x7F) << shift
   433  				if b < 0x80 {
   434  					break
   435  				}
   436  			}
   437  			intStringLen := int(stringLen)
   438  			if intStringLen < 0 {
   439  				return ErrInvalidLengthEvent
   440  			}
   441  			postIndex := iNdEx + intStringLen
   442  			if postIndex < 0 {
   443  				return ErrInvalidLengthEvent
   444  			}
   445  			if postIndex > l {
   446  				return io.ErrUnexpectedEOF
   447  			}
   448  			m.Grantee = string(dAtA[iNdEx:postIndex])
   449  			iNdEx = postIndex
   450  		default:
   451  			iNdEx = preIndex
   452  			skippy, err := skipEvent(dAtA[iNdEx:])
   453  			if err != nil {
   454  				return err
   455  			}
   456  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   457  				return ErrInvalidLengthEvent
   458  			}
   459  			if (iNdEx + skippy) > l {
   460  				return io.ErrUnexpectedEOF
   461  			}
   462  			iNdEx += skippy
   463  		}
   464  	}
   465  
   466  	if iNdEx > l {
   467  		return io.ErrUnexpectedEOF
   468  	}
   469  	return nil
   470  }
   471  func (m *EventRevoke) Unmarshal(dAtA []byte) error {
   472  	l := len(dAtA)
   473  	iNdEx := 0
   474  	for iNdEx < l {
   475  		preIndex := iNdEx
   476  		var wire uint64
   477  		for shift := uint(0); ; shift += 7 {
   478  			if shift >= 64 {
   479  				return ErrIntOverflowEvent
   480  			}
   481  			if iNdEx >= l {
   482  				return io.ErrUnexpectedEOF
   483  			}
   484  			b := dAtA[iNdEx]
   485  			iNdEx++
   486  			wire |= uint64(b&0x7F) << shift
   487  			if b < 0x80 {
   488  				break
   489  			}
   490  		}
   491  		fieldNum := int32(wire >> 3)
   492  		wireType := int(wire & 0x7)
   493  		if wireType == 4 {
   494  			return fmt.Errorf("proto: EventRevoke: wiretype end group for non-group")
   495  		}
   496  		if fieldNum <= 0 {
   497  			return fmt.Errorf("proto: EventRevoke: illegal tag %d (wire type %d)", fieldNum, wire)
   498  		}
   499  		switch fieldNum {
   500  		case 2:
   501  			if wireType != 2 {
   502  				return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType)
   503  			}
   504  			var stringLen uint64
   505  			for shift := uint(0); ; shift += 7 {
   506  				if shift >= 64 {
   507  					return ErrIntOverflowEvent
   508  				}
   509  				if iNdEx >= l {
   510  					return io.ErrUnexpectedEOF
   511  				}
   512  				b := dAtA[iNdEx]
   513  				iNdEx++
   514  				stringLen |= uint64(b&0x7F) << shift
   515  				if b < 0x80 {
   516  					break
   517  				}
   518  			}
   519  			intStringLen := int(stringLen)
   520  			if intStringLen < 0 {
   521  				return ErrInvalidLengthEvent
   522  			}
   523  			postIndex := iNdEx + intStringLen
   524  			if postIndex < 0 {
   525  				return ErrInvalidLengthEvent
   526  			}
   527  			if postIndex > l {
   528  				return io.ErrUnexpectedEOF
   529  			}
   530  			m.MsgTypeUrl = string(dAtA[iNdEx:postIndex])
   531  			iNdEx = postIndex
   532  		case 3:
   533  			if wireType != 2 {
   534  				return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType)
   535  			}
   536  			var stringLen uint64
   537  			for shift := uint(0); ; shift += 7 {
   538  				if shift >= 64 {
   539  					return ErrIntOverflowEvent
   540  				}
   541  				if iNdEx >= l {
   542  					return io.ErrUnexpectedEOF
   543  				}
   544  				b := dAtA[iNdEx]
   545  				iNdEx++
   546  				stringLen |= uint64(b&0x7F) << shift
   547  				if b < 0x80 {
   548  					break
   549  				}
   550  			}
   551  			intStringLen := int(stringLen)
   552  			if intStringLen < 0 {
   553  				return ErrInvalidLengthEvent
   554  			}
   555  			postIndex := iNdEx + intStringLen
   556  			if postIndex < 0 {
   557  				return ErrInvalidLengthEvent
   558  			}
   559  			if postIndex > l {
   560  				return io.ErrUnexpectedEOF
   561  			}
   562  			m.Granter = string(dAtA[iNdEx:postIndex])
   563  			iNdEx = postIndex
   564  		case 4:
   565  			if wireType != 2 {
   566  				return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType)
   567  			}
   568  			var stringLen uint64
   569  			for shift := uint(0); ; shift += 7 {
   570  				if shift >= 64 {
   571  					return ErrIntOverflowEvent
   572  				}
   573  				if iNdEx >= l {
   574  					return io.ErrUnexpectedEOF
   575  				}
   576  				b := dAtA[iNdEx]
   577  				iNdEx++
   578  				stringLen |= uint64(b&0x7F) << shift
   579  				if b < 0x80 {
   580  					break
   581  				}
   582  			}
   583  			intStringLen := int(stringLen)
   584  			if intStringLen < 0 {
   585  				return ErrInvalidLengthEvent
   586  			}
   587  			postIndex := iNdEx + intStringLen
   588  			if postIndex < 0 {
   589  				return ErrInvalidLengthEvent
   590  			}
   591  			if postIndex > l {
   592  				return io.ErrUnexpectedEOF
   593  			}
   594  			m.Grantee = string(dAtA[iNdEx:postIndex])
   595  			iNdEx = postIndex
   596  		default:
   597  			iNdEx = preIndex
   598  			skippy, err := skipEvent(dAtA[iNdEx:])
   599  			if err != nil {
   600  				return err
   601  			}
   602  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   603  				return ErrInvalidLengthEvent
   604  			}
   605  			if (iNdEx + skippy) > l {
   606  				return io.ErrUnexpectedEOF
   607  			}
   608  			iNdEx += skippy
   609  		}
   610  	}
   611  
   612  	if iNdEx > l {
   613  		return io.ErrUnexpectedEOF
   614  	}
   615  	return nil
   616  }
   617  func skipEvent(dAtA []byte) (n int, err error) {
   618  	l := len(dAtA)
   619  	iNdEx := 0
   620  	depth := 0
   621  	for iNdEx < l {
   622  		var wire uint64
   623  		for shift := uint(0); ; shift += 7 {
   624  			if shift >= 64 {
   625  				return 0, ErrIntOverflowEvent
   626  			}
   627  			if iNdEx >= l {
   628  				return 0, io.ErrUnexpectedEOF
   629  			}
   630  			b := dAtA[iNdEx]
   631  			iNdEx++
   632  			wire |= (uint64(b) & 0x7F) << shift
   633  			if b < 0x80 {
   634  				break
   635  			}
   636  		}
   637  		wireType := int(wire & 0x7)
   638  		switch wireType {
   639  		case 0:
   640  			for shift := uint(0); ; shift += 7 {
   641  				if shift >= 64 {
   642  					return 0, ErrIntOverflowEvent
   643  				}
   644  				if iNdEx >= l {
   645  					return 0, io.ErrUnexpectedEOF
   646  				}
   647  				iNdEx++
   648  				if dAtA[iNdEx-1] < 0x80 {
   649  					break
   650  				}
   651  			}
   652  		case 1:
   653  			iNdEx += 8
   654  		case 2:
   655  			var length int
   656  			for shift := uint(0); ; shift += 7 {
   657  				if shift >= 64 {
   658  					return 0, ErrIntOverflowEvent
   659  				}
   660  				if iNdEx >= l {
   661  					return 0, io.ErrUnexpectedEOF
   662  				}
   663  				b := dAtA[iNdEx]
   664  				iNdEx++
   665  				length |= (int(b) & 0x7F) << shift
   666  				if b < 0x80 {
   667  					break
   668  				}
   669  			}
   670  			if length < 0 {
   671  				return 0, ErrInvalidLengthEvent
   672  			}
   673  			iNdEx += length
   674  		case 3:
   675  			depth++
   676  		case 4:
   677  			if depth == 0 {
   678  				return 0, ErrUnexpectedEndOfGroupEvent
   679  			}
   680  			depth--
   681  		case 5:
   682  			iNdEx += 4
   683  		default:
   684  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   685  		}
   686  		if iNdEx < 0 {
   687  			return 0, ErrInvalidLengthEvent
   688  		}
   689  		if depth == 0 {
   690  			return iNdEx, nil
   691  		}
   692  	}
   693  	return 0, io.ErrUnexpectedEOF
   694  }
   695  
   696  var (
   697  	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
   698  	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
   699  	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
   700  )