github.com/lalkh/containerd@v1.4.3/api/services/ttrpc/events/v1/events.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto
     3  
     4  package events
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	github_com_containerd_ttrpc "github.com/containerd/ttrpc"
    10  	github_com_containerd_typeurl "github.com/containerd/typeurl"
    11  	proto "github.com/gogo/protobuf/proto"
    12  	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
    13  	types "github.com/gogo/protobuf/types"
    14  	io "io"
    15  	math "math"
    16  	math_bits "math/bits"
    17  	reflect "reflect"
    18  	strings "strings"
    19  	time "time"
    20  )
    21  
    22  // Reference imports to suppress errors if they are not otherwise used.
    23  var _ = proto.Marshal
    24  var _ = fmt.Errorf
    25  var _ = math.Inf
    26  var _ = time.Kitchen
    27  
    28  // This is a compile-time assertion to ensure that this generated file
    29  // is compatible with the proto package it is being compiled against.
    30  // A compilation error at this line likely means your copy of the
    31  // proto package needs to be updated.
    32  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    33  
    34  type ForwardRequest struct {
    35  	Envelope             *Envelope `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"`
    36  	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
    37  	XXX_unrecognized     []byte    `json:"-"`
    38  	XXX_sizecache        int32     `json:"-"`
    39  }
    40  
    41  func (m *ForwardRequest) Reset()      { *m = ForwardRequest{} }
    42  func (*ForwardRequest) ProtoMessage() {}
    43  func (*ForwardRequest) Descriptor() ([]byte, []int) {
    44  	return fileDescriptor_19f98672016720b5, []int{0}
    45  }
    46  func (m *ForwardRequest) XXX_Unmarshal(b []byte) error {
    47  	return m.Unmarshal(b)
    48  }
    49  func (m *ForwardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    50  	if deterministic {
    51  		return xxx_messageInfo_ForwardRequest.Marshal(b, m, deterministic)
    52  	} else {
    53  		b = b[:cap(b)]
    54  		n, err := m.MarshalToSizedBuffer(b)
    55  		if err != nil {
    56  			return nil, err
    57  		}
    58  		return b[:n], nil
    59  	}
    60  }
    61  func (m *ForwardRequest) XXX_Merge(src proto.Message) {
    62  	xxx_messageInfo_ForwardRequest.Merge(m, src)
    63  }
    64  func (m *ForwardRequest) XXX_Size() int {
    65  	return m.Size()
    66  }
    67  func (m *ForwardRequest) XXX_DiscardUnknown() {
    68  	xxx_messageInfo_ForwardRequest.DiscardUnknown(m)
    69  }
    70  
    71  var xxx_messageInfo_ForwardRequest proto.InternalMessageInfo
    72  
    73  type Envelope struct {
    74  	Timestamp            time.Time  `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
    75  	Namespace            string     `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
    76  	Topic                string     `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
    77  	Event                *types.Any `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"`
    78  	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
    79  	XXX_unrecognized     []byte     `json:"-"`
    80  	XXX_sizecache        int32      `json:"-"`
    81  }
    82  
    83  func (m *Envelope) Reset()      { *m = Envelope{} }
    84  func (*Envelope) ProtoMessage() {}
    85  func (*Envelope) Descriptor() ([]byte, []int) {
    86  	return fileDescriptor_19f98672016720b5, []int{1}
    87  }
    88  func (m *Envelope) XXX_Unmarshal(b []byte) error {
    89  	return m.Unmarshal(b)
    90  }
    91  func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    92  	if deterministic {
    93  		return xxx_messageInfo_Envelope.Marshal(b, m, deterministic)
    94  	} else {
    95  		b = b[:cap(b)]
    96  		n, err := m.MarshalToSizedBuffer(b)
    97  		if err != nil {
    98  			return nil, err
    99  		}
   100  		return b[:n], nil
   101  	}
   102  }
   103  func (m *Envelope) XXX_Merge(src proto.Message) {
   104  	xxx_messageInfo_Envelope.Merge(m, src)
   105  }
   106  func (m *Envelope) XXX_Size() int {
   107  	return m.Size()
   108  }
   109  func (m *Envelope) XXX_DiscardUnknown() {
   110  	xxx_messageInfo_Envelope.DiscardUnknown(m)
   111  }
   112  
   113  var xxx_messageInfo_Envelope proto.InternalMessageInfo
   114  
   115  func init() {
   116  	proto.RegisterType((*ForwardRequest)(nil), "containerd.services.events.ttrpc.v1.ForwardRequest")
   117  	proto.RegisterType((*Envelope)(nil), "containerd.services.events.ttrpc.v1.Envelope")
   118  }
   119  
   120  func init() {
   121  	proto.RegisterFile("github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto", fileDescriptor_19f98672016720b5)
   122  }
   123  
   124  var fileDescriptor_19f98672016720b5 = []byte{
   125  	// 396 bytes of a gzipped FileDescriptorProto
   126  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0xc1, 0x8e, 0xd3, 0x30,
   127  	0x10, 0x8d, 0x61, 0x77, 0x69, 0x8d, 0xc4, 0xc1, 0xaa, 0x50, 0x08, 0x28, 0x59, 0x2d, 0x97, 0x15,
   128  	0x12, 0xb6, 0x76, 0xf7, 0x06, 0x17, 0xa8, 0x28, 0x12, 0x1c, 0x23, 0x84, 0x2a, 0x90, 0x10, 0x6e,
   129  	0x3a, 0x4d, 0x2d, 0x25, 0xb6, 0x49, 0x9c, 0xa0, 0xde, 0xfa, 0x09, 0x7c, 0x0c, 0x17, 0xfe, 0xa0,
   130  	0x47, 0x8e, 0x9c, 0x80, 0xe6, 0x4b, 0x50, 0x9d, 0xa4, 0x81, 0xf6, 0x40, 0xa5, 0xbd, 0xbd, 0xcc,
   131  	0x7b, 0x6f, 0xde, 0xcc, 0xc4, 0xf8, 0x75, 0x2c, 0xcc, 0xbc, 0x98, 0xd0, 0x48, 0xa5, 0x2c, 0x52,
   132  	0xd2, 0x70, 0x21, 0x21, 0x9b, 0xfe, 0x0d, 0xb9, 0x16, 0x2c, 0x87, 0xac, 0x14, 0x11, 0xe4, 0xcc,
   133  	0x98, 0x4c, 0x47, 0x0c, 0x4a, 0x90, 0x26, 0x67, 0xe5, 0x45, 0x83, 0xa8, 0xce, 0x94, 0x51, 0xe4,
   134  	0x61, 0xe7, 0xa2, 0xad, 0x83, 0x36, 0x0a, 0x6b, 0xa4, 0xe5, 0x85, 0xf7, 0xec, 0xbf, 0x81, 0xb6,
   135  	0xd9, 0xa4, 0x98, 0x31, 0x9d, 0x14, 0xb1, 0x90, 0x6c, 0x26, 0x20, 0x99, 0x6a, 0x6e, 0xe6, 0x75,
   136  	0x8c, 0x37, 0x88, 0x55, 0xac, 0x2c, 0x64, 0x1b, 0xd4, 0x54, 0xef, 0xc5, 0x4a, 0xc5, 0x09, 0x74,
   137  	0x6e, 0x2e, 0x17, 0x0d, 0x75, 0x7f, 0x97, 0x82, 0x54, 0x9b, 0x96, 0x0c, 0x76, 0x49, 0x23, 0x52,
   138  	0xc8, 0x0d, 0x4f, 0x75, 0x2d, 0x38, 0x7b, 0x8f, 0xef, 0xbc, 0x54, 0xd9, 0x67, 0x9e, 0x4d, 0x43,
   139  	0xf8, 0x54, 0x40, 0x6e, 0xc8, 0x2b, 0xdc, 0x03, 0x59, 0x42, 0xa2, 0x34, 0xb8, 0xe8, 0x14, 0x9d,
   140  	0xdf, 0xbe, 0x7c, 0x4c, 0x0f, 0x58, 0x9d, 0x8e, 0x1a, 0x53, 0xb8, 0xb5, 0x9f, 0x7d, 0x45, 0xb8,
   141  	0xd7, 0x96, 0xc9, 0x10, 0xf7, 0xb7, 0xe1, 0x4d, 0x63, 0x8f, 0xd6, 0xe3, 0xd1, 0x76, 0x3c, 0xfa,
   142  	0xa6, 0x55, 0x0c, 0x7b, 0xab, 0x9f, 0x81, 0xf3, 0xe5, 0x57, 0x80, 0xc2, 0xce, 0x46, 0x1e, 0xe0,
   143  	0xbe, 0xe4, 0x29, 0xe4, 0x9a, 0x47, 0xe0, 0xde, 0x38, 0x45, 0xe7, 0xfd, 0xb0, 0x2b, 0x90, 0x01,
   144  	0x3e, 0x36, 0x4a, 0x8b, 0xc8, 0xbd, 0x69, 0x99, 0xfa, 0x83, 0x3c, 0xc2, 0xc7, 0x76, 0x54, 0xf7,
   145  	0xc8, 0x66, 0x0e, 0xf6, 0x32, 0x9f, 0xcb, 0x45, 0x58, 0x4b, 0x9e, 0x1c, 0x2d, 0xbf, 0x05, 0xe8,
   146  	0xf2, 0x23, 0x3e, 0x19, 0xd9, 0xe5, 0xc8, 0x5b, 0x7c, 0xab, 0xb9, 0x0e, 0xb9, 0x3a, 0xe8, 0x08,
   147  	0xff, 0xde, 0xd2, 0xbb, 0xbb, 0x17, 0x36, 0xda, 0xfc, 0x9c, 0xe1, 0x87, 0xd5, 0xda, 0x77, 0x7e,
   148  	0xac, 0x7d, 0x67, 0x59, 0xf9, 0x68, 0x55, 0xf9, 0xe8, 0x7b, 0xe5, 0xa3, 0xdf, 0x95, 0x8f, 0xde,
   149  	0xbd, 0xb8, 0xd6, 0x8b, 0x7d, 0x5a, 0xa3, 0xb1, 0x33, 0x46, 0x93, 0x13, 0x9b, 0x79, 0xf5, 0x27,
   150  	0x00, 0x00, 0xff, 0xff, 0xd4, 0x90, 0xbd, 0x09, 0x04, 0x03, 0x00, 0x00,
   151  }
   152  
   153  // Field returns the value for the given fieldpath as a string, if defined.
   154  // If the value is not defined, the second value will be false.
   155  func (m *Envelope) Field(fieldpath []string) (string, bool) {
   156  	if len(fieldpath) == 0 {
   157  		return "", false
   158  	}
   159  
   160  	switch fieldpath[0] {
   161  	// unhandled: timestamp
   162  	case "namespace":
   163  		return string(m.Namespace), len(m.Namespace) > 0
   164  	case "topic":
   165  		return string(m.Topic), len(m.Topic) > 0
   166  	case "event":
   167  		decoded, err := github_com_containerd_typeurl.UnmarshalAny(m.Event)
   168  		if err != nil {
   169  			return "", false
   170  		}
   171  
   172  		adaptor, ok := decoded.(interface{ Field([]string) (string, bool) })
   173  		if !ok {
   174  			return "", false
   175  		}
   176  		return adaptor.Field(fieldpath[1:])
   177  	}
   178  	return "", false
   179  }
   180  func (m *ForwardRequest) Marshal() (dAtA []byte, err error) {
   181  	size := m.Size()
   182  	dAtA = make([]byte, size)
   183  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   184  	if err != nil {
   185  		return nil, err
   186  	}
   187  	return dAtA[:n], nil
   188  }
   189  
   190  func (m *ForwardRequest) MarshalTo(dAtA []byte) (int, error) {
   191  	size := m.Size()
   192  	return m.MarshalToSizedBuffer(dAtA[:size])
   193  }
   194  
   195  func (m *ForwardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   196  	i := len(dAtA)
   197  	_ = i
   198  	var l int
   199  	_ = l
   200  	if m.XXX_unrecognized != nil {
   201  		i -= len(m.XXX_unrecognized)
   202  		copy(dAtA[i:], m.XXX_unrecognized)
   203  	}
   204  	if m.Envelope != nil {
   205  		{
   206  			size, err := m.Envelope.MarshalToSizedBuffer(dAtA[:i])
   207  			if err != nil {
   208  				return 0, err
   209  			}
   210  			i -= size
   211  			i = encodeVarintEvents(dAtA, i, uint64(size))
   212  		}
   213  		i--
   214  		dAtA[i] = 0xa
   215  	}
   216  	return len(dAtA) - i, nil
   217  }
   218  
   219  func (m *Envelope) Marshal() (dAtA []byte, err error) {
   220  	size := m.Size()
   221  	dAtA = make([]byte, size)
   222  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   223  	if err != nil {
   224  		return nil, err
   225  	}
   226  	return dAtA[:n], nil
   227  }
   228  
   229  func (m *Envelope) MarshalTo(dAtA []byte) (int, error) {
   230  	size := m.Size()
   231  	return m.MarshalToSizedBuffer(dAtA[:size])
   232  }
   233  
   234  func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   235  	i := len(dAtA)
   236  	_ = i
   237  	var l int
   238  	_ = l
   239  	if m.XXX_unrecognized != nil {
   240  		i -= len(m.XXX_unrecognized)
   241  		copy(dAtA[i:], m.XXX_unrecognized)
   242  	}
   243  	if m.Event != nil {
   244  		{
   245  			size, err := m.Event.MarshalToSizedBuffer(dAtA[:i])
   246  			if err != nil {
   247  				return 0, err
   248  			}
   249  			i -= size
   250  			i = encodeVarintEvents(dAtA, i, uint64(size))
   251  		}
   252  		i--
   253  		dAtA[i] = 0x22
   254  	}
   255  	if len(m.Topic) > 0 {
   256  		i -= len(m.Topic)
   257  		copy(dAtA[i:], m.Topic)
   258  		i = encodeVarintEvents(dAtA, i, uint64(len(m.Topic)))
   259  		i--
   260  		dAtA[i] = 0x1a
   261  	}
   262  	if len(m.Namespace) > 0 {
   263  		i -= len(m.Namespace)
   264  		copy(dAtA[i:], m.Namespace)
   265  		i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace)))
   266  		i--
   267  		dAtA[i] = 0x12
   268  	}
   269  	n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
   270  	if err3 != nil {
   271  		return 0, err3
   272  	}
   273  	i -= n3
   274  	i = encodeVarintEvents(dAtA, i, uint64(n3))
   275  	i--
   276  	dAtA[i] = 0xa
   277  	return len(dAtA) - i, nil
   278  }
   279  
   280  func encodeVarintEvents(dAtA []byte, offset int, v uint64) int {
   281  	offset -= sovEvents(v)
   282  	base := offset
   283  	for v >= 1<<7 {
   284  		dAtA[offset] = uint8(v&0x7f | 0x80)
   285  		v >>= 7
   286  		offset++
   287  	}
   288  	dAtA[offset] = uint8(v)
   289  	return base
   290  }
   291  func (m *ForwardRequest) Size() (n int) {
   292  	if m == nil {
   293  		return 0
   294  	}
   295  	var l int
   296  	_ = l
   297  	if m.Envelope != nil {
   298  		l = m.Envelope.Size()
   299  		n += 1 + l + sovEvents(uint64(l))
   300  	}
   301  	if m.XXX_unrecognized != nil {
   302  		n += len(m.XXX_unrecognized)
   303  	}
   304  	return n
   305  }
   306  
   307  func (m *Envelope) Size() (n int) {
   308  	if m == nil {
   309  		return 0
   310  	}
   311  	var l int
   312  	_ = l
   313  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
   314  	n += 1 + l + sovEvents(uint64(l))
   315  	l = len(m.Namespace)
   316  	if l > 0 {
   317  		n += 1 + l + sovEvents(uint64(l))
   318  	}
   319  	l = len(m.Topic)
   320  	if l > 0 {
   321  		n += 1 + l + sovEvents(uint64(l))
   322  	}
   323  	if m.Event != nil {
   324  		l = m.Event.Size()
   325  		n += 1 + l + sovEvents(uint64(l))
   326  	}
   327  	if m.XXX_unrecognized != nil {
   328  		n += len(m.XXX_unrecognized)
   329  	}
   330  	return n
   331  }
   332  
   333  func sovEvents(x uint64) (n int) {
   334  	return (math_bits.Len64(x|1) + 6) / 7
   335  }
   336  func sozEvents(x uint64) (n int) {
   337  	return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   338  }
   339  func (this *ForwardRequest) String() string {
   340  	if this == nil {
   341  		return "nil"
   342  	}
   343  	s := strings.Join([]string{`&ForwardRequest{`,
   344  		`Envelope:` + strings.Replace(this.Envelope.String(), "Envelope", "Envelope", 1) + `,`,
   345  		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
   346  		`}`,
   347  	}, "")
   348  	return s
   349  }
   350  func (this *Envelope) String() string {
   351  	if this == nil {
   352  		return "nil"
   353  	}
   354  	s := strings.Join([]string{`&Envelope{`,
   355  		`Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
   356  		`Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
   357  		`Topic:` + fmt.Sprintf("%v", this.Topic) + `,`,
   358  		`Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "types.Any", 1) + `,`,
   359  		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
   360  		`}`,
   361  	}, "")
   362  	return s
   363  }
   364  func valueToStringEvents(v interface{}) string {
   365  	rv := reflect.ValueOf(v)
   366  	if rv.IsNil() {
   367  		return "nil"
   368  	}
   369  	pv := reflect.Indirect(rv).Interface()
   370  	return fmt.Sprintf("*%v", pv)
   371  }
   372  
   373  type EventsService interface {
   374  	Forward(ctx context.Context, req *ForwardRequest) (*types.Empty, error)
   375  }
   376  
   377  func RegisterEventsService(srv *github_com_containerd_ttrpc.Server, svc EventsService) {
   378  	srv.Register("containerd.services.events.ttrpc.v1.Events", map[string]github_com_containerd_ttrpc.Method{
   379  		"Forward": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
   380  			var req ForwardRequest
   381  			if err := unmarshal(&req); err != nil {
   382  				return nil, err
   383  			}
   384  			return svc.Forward(ctx, &req)
   385  		},
   386  	})
   387  }
   388  
   389  type eventsClient struct {
   390  	client *github_com_containerd_ttrpc.Client
   391  }
   392  
   393  func NewEventsClient(client *github_com_containerd_ttrpc.Client) EventsService {
   394  	return &eventsClient{
   395  		client: client,
   396  	}
   397  }
   398  
   399  func (c *eventsClient) Forward(ctx context.Context, req *ForwardRequest) (*types.Empty, error) {
   400  	var resp types.Empty
   401  	if err := c.client.Call(ctx, "containerd.services.events.ttrpc.v1.Events", "Forward", req, &resp); err != nil {
   402  		return nil, err
   403  	}
   404  	return &resp, nil
   405  }
   406  func (m *ForwardRequest) Unmarshal(dAtA []byte) error {
   407  	l := len(dAtA)
   408  	iNdEx := 0
   409  	for iNdEx < l {
   410  		preIndex := iNdEx
   411  		var wire uint64
   412  		for shift := uint(0); ; shift += 7 {
   413  			if shift >= 64 {
   414  				return ErrIntOverflowEvents
   415  			}
   416  			if iNdEx >= l {
   417  				return io.ErrUnexpectedEOF
   418  			}
   419  			b := dAtA[iNdEx]
   420  			iNdEx++
   421  			wire |= uint64(b&0x7F) << shift
   422  			if b < 0x80 {
   423  				break
   424  			}
   425  		}
   426  		fieldNum := int32(wire >> 3)
   427  		wireType := int(wire & 0x7)
   428  		if wireType == 4 {
   429  			return fmt.Errorf("proto: ForwardRequest: wiretype end group for non-group")
   430  		}
   431  		if fieldNum <= 0 {
   432  			return fmt.Errorf("proto: ForwardRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   433  		}
   434  		switch fieldNum {
   435  		case 1:
   436  			if wireType != 2 {
   437  				return fmt.Errorf("proto: wrong wireType = %d for field Envelope", wireType)
   438  			}
   439  			var msglen int
   440  			for shift := uint(0); ; shift += 7 {
   441  				if shift >= 64 {
   442  					return ErrIntOverflowEvents
   443  				}
   444  				if iNdEx >= l {
   445  					return io.ErrUnexpectedEOF
   446  				}
   447  				b := dAtA[iNdEx]
   448  				iNdEx++
   449  				msglen |= int(b&0x7F) << shift
   450  				if b < 0x80 {
   451  					break
   452  				}
   453  			}
   454  			if msglen < 0 {
   455  				return ErrInvalidLengthEvents
   456  			}
   457  			postIndex := iNdEx + msglen
   458  			if postIndex < 0 {
   459  				return ErrInvalidLengthEvents
   460  			}
   461  			if postIndex > l {
   462  				return io.ErrUnexpectedEOF
   463  			}
   464  			if m.Envelope == nil {
   465  				m.Envelope = &Envelope{}
   466  			}
   467  			if err := m.Envelope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   468  				return err
   469  			}
   470  			iNdEx = postIndex
   471  		default:
   472  			iNdEx = preIndex
   473  			skippy, err := skipEvents(dAtA[iNdEx:])
   474  			if err != nil {
   475  				return err
   476  			}
   477  			if skippy < 0 {
   478  				return ErrInvalidLengthEvents
   479  			}
   480  			if (iNdEx + skippy) < 0 {
   481  				return ErrInvalidLengthEvents
   482  			}
   483  			if (iNdEx + skippy) > l {
   484  				return io.ErrUnexpectedEOF
   485  			}
   486  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   487  			iNdEx += skippy
   488  		}
   489  	}
   490  
   491  	if iNdEx > l {
   492  		return io.ErrUnexpectedEOF
   493  	}
   494  	return nil
   495  }
   496  func (m *Envelope) Unmarshal(dAtA []byte) error {
   497  	l := len(dAtA)
   498  	iNdEx := 0
   499  	for iNdEx < l {
   500  		preIndex := iNdEx
   501  		var wire uint64
   502  		for shift := uint(0); ; shift += 7 {
   503  			if shift >= 64 {
   504  				return ErrIntOverflowEvents
   505  			}
   506  			if iNdEx >= l {
   507  				return io.ErrUnexpectedEOF
   508  			}
   509  			b := dAtA[iNdEx]
   510  			iNdEx++
   511  			wire |= uint64(b&0x7F) << shift
   512  			if b < 0x80 {
   513  				break
   514  			}
   515  		}
   516  		fieldNum := int32(wire >> 3)
   517  		wireType := int(wire & 0x7)
   518  		if wireType == 4 {
   519  			return fmt.Errorf("proto: Envelope: wiretype end group for non-group")
   520  		}
   521  		if fieldNum <= 0 {
   522  			return fmt.Errorf("proto: Envelope: illegal tag %d (wire type %d)", fieldNum, wire)
   523  		}
   524  		switch fieldNum {
   525  		case 1:
   526  			if wireType != 2 {
   527  				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
   528  			}
   529  			var msglen int
   530  			for shift := uint(0); ; shift += 7 {
   531  				if shift >= 64 {
   532  					return ErrIntOverflowEvents
   533  				}
   534  				if iNdEx >= l {
   535  					return io.ErrUnexpectedEOF
   536  				}
   537  				b := dAtA[iNdEx]
   538  				iNdEx++
   539  				msglen |= int(b&0x7F) << shift
   540  				if b < 0x80 {
   541  					break
   542  				}
   543  			}
   544  			if msglen < 0 {
   545  				return ErrInvalidLengthEvents
   546  			}
   547  			postIndex := iNdEx + msglen
   548  			if postIndex < 0 {
   549  				return ErrInvalidLengthEvents
   550  			}
   551  			if postIndex > l {
   552  				return io.ErrUnexpectedEOF
   553  			}
   554  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
   555  				return err
   556  			}
   557  			iNdEx = postIndex
   558  		case 2:
   559  			if wireType != 2 {
   560  				return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
   561  			}
   562  			var stringLen uint64
   563  			for shift := uint(0); ; shift += 7 {
   564  				if shift >= 64 {
   565  					return ErrIntOverflowEvents
   566  				}
   567  				if iNdEx >= l {
   568  					return io.ErrUnexpectedEOF
   569  				}
   570  				b := dAtA[iNdEx]
   571  				iNdEx++
   572  				stringLen |= uint64(b&0x7F) << shift
   573  				if b < 0x80 {
   574  					break
   575  				}
   576  			}
   577  			intStringLen := int(stringLen)
   578  			if intStringLen < 0 {
   579  				return ErrInvalidLengthEvents
   580  			}
   581  			postIndex := iNdEx + intStringLen
   582  			if postIndex < 0 {
   583  				return ErrInvalidLengthEvents
   584  			}
   585  			if postIndex > l {
   586  				return io.ErrUnexpectedEOF
   587  			}
   588  			m.Namespace = string(dAtA[iNdEx:postIndex])
   589  			iNdEx = postIndex
   590  		case 3:
   591  			if wireType != 2 {
   592  				return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType)
   593  			}
   594  			var stringLen uint64
   595  			for shift := uint(0); ; shift += 7 {
   596  				if shift >= 64 {
   597  					return ErrIntOverflowEvents
   598  				}
   599  				if iNdEx >= l {
   600  					return io.ErrUnexpectedEOF
   601  				}
   602  				b := dAtA[iNdEx]
   603  				iNdEx++
   604  				stringLen |= uint64(b&0x7F) << shift
   605  				if b < 0x80 {
   606  					break
   607  				}
   608  			}
   609  			intStringLen := int(stringLen)
   610  			if intStringLen < 0 {
   611  				return ErrInvalidLengthEvents
   612  			}
   613  			postIndex := iNdEx + intStringLen
   614  			if postIndex < 0 {
   615  				return ErrInvalidLengthEvents
   616  			}
   617  			if postIndex > l {
   618  				return io.ErrUnexpectedEOF
   619  			}
   620  			m.Topic = string(dAtA[iNdEx:postIndex])
   621  			iNdEx = postIndex
   622  		case 4:
   623  			if wireType != 2 {
   624  				return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType)
   625  			}
   626  			var msglen int
   627  			for shift := uint(0); ; shift += 7 {
   628  				if shift >= 64 {
   629  					return ErrIntOverflowEvents
   630  				}
   631  				if iNdEx >= l {
   632  					return io.ErrUnexpectedEOF
   633  				}
   634  				b := dAtA[iNdEx]
   635  				iNdEx++
   636  				msglen |= int(b&0x7F) << shift
   637  				if b < 0x80 {
   638  					break
   639  				}
   640  			}
   641  			if msglen < 0 {
   642  				return ErrInvalidLengthEvents
   643  			}
   644  			postIndex := iNdEx + msglen
   645  			if postIndex < 0 {
   646  				return ErrInvalidLengthEvents
   647  			}
   648  			if postIndex > l {
   649  				return io.ErrUnexpectedEOF
   650  			}
   651  			if m.Event == nil {
   652  				m.Event = &types.Any{}
   653  			}
   654  			if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   655  				return err
   656  			}
   657  			iNdEx = postIndex
   658  		default:
   659  			iNdEx = preIndex
   660  			skippy, err := skipEvents(dAtA[iNdEx:])
   661  			if err != nil {
   662  				return err
   663  			}
   664  			if skippy < 0 {
   665  				return ErrInvalidLengthEvents
   666  			}
   667  			if (iNdEx + skippy) < 0 {
   668  				return ErrInvalidLengthEvents
   669  			}
   670  			if (iNdEx + skippy) > l {
   671  				return io.ErrUnexpectedEOF
   672  			}
   673  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
   674  			iNdEx += skippy
   675  		}
   676  	}
   677  
   678  	if iNdEx > l {
   679  		return io.ErrUnexpectedEOF
   680  	}
   681  	return nil
   682  }
   683  func skipEvents(dAtA []byte) (n int, err error) {
   684  	l := len(dAtA)
   685  	iNdEx := 0
   686  	depth := 0
   687  	for iNdEx < l {
   688  		var wire uint64
   689  		for shift := uint(0); ; shift += 7 {
   690  			if shift >= 64 {
   691  				return 0, ErrIntOverflowEvents
   692  			}
   693  			if iNdEx >= l {
   694  				return 0, io.ErrUnexpectedEOF
   695  			}
   696  			b := dAtA[iNdEx]
   697  			iNdEx++
   698  			wire |= (uint64(b) & 0x7F) << shift
   699  			if b < 0x80 {
   700  				break
   701  			}
   702  		}
   703  		wireType := int(wire & 0x7)
   704  		switch wireType {
   705  		case 0:
   706  			for shift := uint(0); ; shift += 7 {
   707  				if shift >= 64 {
   708  					return 0, ErrIntOverflowEvents
   709  				}
   710  				if iNdEx >= l {
   711  					return 0, io.ErrUnexpectedEOF
   712  				}
   713  				iNdEx++
   714  				if dAtA[iNdEx-1] < 0x80 {
   715  					break
   716  				}
   717  			}
   718  		case 1:
   719  			iNdEx += 8
   720  		case 2:
   721  			var length int
   722  			for shift := uint(0); ; shift += 7 {
   723  				if shift >= 64 {
   724  					return 0, ErrIntOverflowEvents
   725  				}
   726  				if iNdEx >= l {
   727  					return 0, io.ErrUnexpectedEOF
   728  				}
   729  				b := dAtA[iNdEx]
   730  				iNdEx++
   731  				length |= (int(b) & 0x7F) << shift
   732  				if b < 0x80 {
   733  					break
   734  				}
   735  			}
   736  			if length < 0 {
   737  				return 0, ErrInvalidLengthEvents
   738  			}
   739  			iNdEx += length
   740  		case 3:
   741  			depth++
   742  		case 4:
   743  			if depth == 0 {
   744  				return 0, ErrUnexpectedEndOfGroupEvents
   745  			}
   746  			depth--
   747  		case 5:
   748  			iNdEx += 4
   749  		default:
   750  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   751  		}
   752  		if iNdEx < 0 {
   753  			return 0, ErrInvalidLengthEvents
   754  		}
   755  		if depth == 0 {
   756  			return iNdEx, nil
   757  		}
   758  	}
   759  	return 0, io.ErrUnexpectedEOF
   760  }
   761  
   762  var (
   763  	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
   764  	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
   765  	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
   766  )