model/modelpb/error_vtproto.pb.go (1,372 lines of code) (raw):

// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10 // source: error.proto package modelpb import ( fmt "fmt" io "io" protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *Error) CloneVT() *Error { if m == nil { return (*Error)(nil) } r := new(Error) r.Exception = m.Exception.CloneVT() r.Log = m.Log.CloneVT() r.Id = m.Id r.GroupingKey = m.GroupingKey r.Culprit = m.Culprit r.StackTrace = m.StackTrace r.Message = m.Message r.Type = m.Type if rhs := m.Custom; rhs != nil { tmpContainer := make([]*KeyValue, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Custom = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Error) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Exception) CloneVT() *Exception { if m == nil { return (*Exception)(nil) } r := new(Exception) r.Message = m.Message r.Module = m.Module r.Code = m.Code r.Type = m.Type if rhs := m.Attributes; rhs != nil { tmpContainer := make([]*KeyValue, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Attributes = tmpContainer } if rhs := m.Stacktrace; rhs != nil { tmpContainer := make([]*StacktraceFrame, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Stacktrace = tmpContainer } if rhs := m.Handled; rhs != nil { tmpVal := *rhs r.Handled = &tmpVal } if rhs := m.Cause; rhs != nil { tmpContainer := make([]*Exception, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Cause = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Exception) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *ErrorLog) CloneVT() *ErrorLog { if m == nil { return (*ErrorLog)(nil) } r := new(ErrorLog) r.Message = m.Message r.Level = m.Level r.ParamMessage = m.ParamMessage r.LoggerName = m.LoggerName if rhs := m.Stacktrace; rhs != nil { tmpContainer := make([]*StacktraceFrame, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Stacktrace = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *ErrorLog) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Error) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Error) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Error) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x4a } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x42 } if len(m.StackTrace) > 0 { i -= len(m.StackTrace) copy(dAtA[i:], m.StackTrace) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StackTrace))) i-- dAtA[i] = 0x3a } if len(m.Culprit) > 0 { i -= len(m.Culprit) copy(dAtA[i:], m.Culprit) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Culprit))) i-- dAtA[i] = 0x32 } if len(m.GroupingKey) > 0 { i -= len(m.GroupingKey) copy(dAtA[i:], m.GroupingKey) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupingKey))) i-- dAtA[i] = 0x2a } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x22 } if m.Log != nil { size, err := m.Log.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if m.Exception != nil { size, err := m.Exception.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if len(m.Custom) > 0 { for iNdEx := len(m.Custom) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Custom[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Exception) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Exception) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Exception) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Cause) > 0 { for iNdEx := len(m.Cause) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Cause[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x42 } } if m.Handled != nil { i-- if *m.Handled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x38 } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x32 } if len(m.Stacktrace) > 0 { for iNdEx := len(m.Stacktrace) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Stacktrace[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } } if len(m.Attributes) > 0 { for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Attributes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } } if len(m.Code) > 0 { i -= len(m.Code) copy(dAtA[i:], m.Code) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Code))) i-- dAtA[i] = 0x1a } if len(m.Module) > 0 { i -= len(m.Module) copy(dAtA[i:], m.Module) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Module))) i-- dAtA[i] = 0x12 } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ErrorLog) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ErrorLog) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *ErrorLog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Stacktrace) > 0 { for iNdEx := len(m.Stacktrace) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Stacktrace[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } } if len(m.LoggerName) > 0 { i -= len(m.LoggerName) copy(dAtA[i:], m.LoggerName) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LoggerName))) i-- dAtA[i] = 0x22 } if len(m.ParamMessage) > 0 { i -= len(m.ParamMessage) copy(dAtA[i:], m.ParamMessage) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParamMessage))) i-- dAtA[i] = 0x1a } if len(m.Level) > 0 { i -= len(m.Level) copy(dAtA[i:], m.Level) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Level))) i-- dAtA[i] = 0x12 } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Error) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Custom) > 0 { for _, e := range m.Custom { l = e.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Exception != nil { l = m.Exception.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Log != nil { l = m.Log.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Id) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.GroupingKey) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Culprit) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.StackTrace) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Message) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } func (m *Exception) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Message) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Module) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Code) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Attributes) > 0 { for _, e := range m.Attributes { l = e.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.Stacktrace) > 0 { for _, e := range m.Stacktrace { l = e.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } l = len(m.Type) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Handled != nil { n += 2 } if len(m.Cause) > 0 { for _, e := range m.Cause { l = e.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } func (m *ErrorLog) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Message) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Level) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ParamMessage) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.LoggerName) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Stacktrace) > 0 { for _, e := range m.Stacktrace { l = e.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) return n } func (m *Error) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Error: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Custom", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Custom = append(m.Custom, &KeyValue{}) if err := m.Custom[len(m.Custom)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Exception", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Exception == nil { m.Exception = &Exception{} } if err := m.Exception.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Log == nil { m.Log = &ErrorLog{} } if err := m.Log.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GroupingKey", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.GroupingKey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Culprit", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Culprit = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StackTrace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.StackTrace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Exception) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Exception: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Exception: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Module = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Code = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Attributes = append(m.Attributes, &KeyValue{}) if err := m.Attributes[len(m.Attributes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stacktrace", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Stacktrace = append(m.Stacktrace, &StacktraceFrame{}) if err := m.Stacktrace[len(m.Stacktrace)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Handled", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } b := bool(v != 0) m.Handled = &b case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Cause", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Cause = append(m.Cause, &Exception{}) if err := m.Cause[len(m.Cause)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ErrorLog: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ErrorLog: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Level = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParamMessage", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.ParamMessage = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LoggerName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.LoggerName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stacktrace", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Stacktrace = append(m.Stacktrace, &StacktraceFrame{}) if err := m.Stacktrace[len(m.Stacktrace)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil }