func (m *ValueMetric) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.Name == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } else { data[i] = 0xa i++ i = encodeVarintMetric(data, i, uint64(len(*m.Name))) i += copy(data[i:], *m.Name) } if m.Value == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") } else { data[i] = 0x11 i++ i = encodeFixed64Metric(data, i, uint64(math.Float64bits(*m.Value))) } if m.Unit == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("unit") } else { data[i] = 0x1a i++ i = encodeVarintMetric(data, i, uint64(len(*m.Unit))) i += copy(data[i:], *m.Unit) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil }
func (m *CounterEvent) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.Name == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } else { data[i] = 0xa i++ i = encodeVarintMetric(data, i, uint64(len(*m.Name))) i += copy(data[i:], *m.Name) } if m.Delta == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("delta") } else { data[i] = 0x10 i++ i = encodeVarintMetric(data, i, uint64(*m.Delta)) } if m.Total != nil { data[i] = 0x18 i++ i = encodeVarintMetric(data, i, uint64(*m.Total)) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil }
func (m *Error) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.Source == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("source") } else { data[i] = 0xa i++ i = encodeVarintError(data, i, uint64(len(*m.Source))) i += copy(data[i:], *m.Source) } if m.Code == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("code") } else { data[i] = 0x10 i++ i = encodeVarintError(data, i, uint64(*m.Code)) } if m.Message == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") } else { data[i] = 0x1a i++ i = encodeVarintError(data, i, uint64(len(*m.Message))) i += copy(data[i:], *m.Message) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil }
func (m *LogMessage) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.Message == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") } else { data[i] = 0xa i++ i = encodeVarintLog(data, i, uint64(len(m.Message))) i += copy(data[i:], m.Message) } if m.MessageType == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("message_type") } else { data[i] = 0x10 i++ i = encodeVarintLog(data, i, uint64(*m.MessageType)) } if m.Timestamp == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") } else { data[i] = 0x18 i++ i = encodeVarintLog(data, i, uint64(*m.Timestamp)) } if m.AppId != nil { data[i] = 0x22 i++ i = encodeVarintLog(data, i, uint64(len(*m.AppId))) i += copy(data[i:], *m.AppId) } if m.SourceType != nil { data[i] = 0x2a i++ i = encodeVarintLog(data, i, uint64(len(*m.SourceType))) i += copy(data[i:], *m.SourceType) } if m.SourceInstance != nil { data[i] = 0x32 i++ i = encodeVarintLog(data, i, uint64(len(*m.SourceInstance))) i += copy(data[i:], *m.SourceInstance) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil }
func (m *ContainerMetric) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.ApplicationId == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("applicationId") } else { data[i] = 0xa i++ i = encodeVarintMetric(data, i, uint64(len(*m.ApplicationId))) i += copy(data[i:], *m.ApplicationId) } if m.InstanceIndex == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("instanceIndex") } else { data[i] = 0x10 i++ i = encodeVarintMetric(data, i, uint64(*m.InstanceIndex)) } if m.CpuPercentage == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("cpuPercentage") } else { data[i] = 0x19 i++ i = encodeFixed64Metric(data, i, uint64(math.Float64bits(*m.CpuPercentage))) } if m.MemoryBytes == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("memoryBytes") } else { data[i] = 0x20 i++ i = encodeVarintMetric(data, i, uint64(*m.MemoryBytes)) } if m.DiskBytes == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("diskBytes") } else { data[i] = 0x28 i++ i = encodeVarintMetric(data, i, uint64(*m.DiskBytes)) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil }
func (m *UUID) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.Low == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("low") } else { data[i] = 0x8 i++ i = encodeVarintUuid(data, i, uint64(*m.Low)) } if m.High == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("high") } else { data[i] = 0x10 i++ i = encodeVarintUuid(data, i, uint64(*m.High)) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil }
func (m *ContainerMetric) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { 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) switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ApplicationId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { 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 ErrInvalidLengthMetric } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) m.ApplicationId = &s iNdEx = postIndex hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field InstanceIndex", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } m.InstanceIndex = &v hasFields[0] |= uint64(0x00000002) case 3: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field CpuPercentage", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } iNdEx += 8 v = uint64(data[iNdEx-8]) v |= uint64(data[iNdEx-7]) << 8 v |= uint64(data[iNdEx-6]) << 16 v |= uint64(data[iNdEx-5]) << 24 v |= uint64(data[iNdEx-4]) << 32 v |= uint64(data[iNdEx-3]) << 40 v |= uint64(data[iNdEx-2]) << 48 v |= uint64(data[iNdEx-1]) << 56 v2 := float64(math.Float64frombits(v)) m.CpuPercentage = &v2 hasFields[0] |= uint64(0x00000004) case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MemoryBytes", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } m.MemoryBytes = &v hasFields[0] |= uint64(0x00000008) case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DiskBytes", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } m.DiskBytes = &v hasFields[0] |= uint64(0x00000010) default: var sizeOfWire int for { sizeOfWire++ wire >>= 7 if wire == 0 { break } } iNdEx -= sizeOfWire skippy, err := skipMetric(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMetric } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("applicationId") } if hasFields[0]&uint64(0x00000002) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("instanceIndex") } if hasFields[0]&uint64(0x00000004) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("cpuPercentage") } if hasFields[0]&uint64(0x00000008) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("memoryBytes") } if hasFields[0]&uint64(0x00000010) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("diskBytes") } return nil }
func (m *CounterEvent) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { 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) switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { 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 ErrInvalidLengthMetric } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) m.Name = &s iNdEx = postIndex hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Delta", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } m.Delta = &v hasFields[0] |= uint64(0x00000002) case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } m.Total = &v default: var sizeOfWire int for { sizeOfWire++ wire >>= 7 if wire == 0 { break } } iNdEx -= sizeOfWire skippy, err := skipMetric(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMetric } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") } if hasFields[0]&uint64(0x00000002) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("delta") } return nil }
func (m *HttpStart) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { 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) switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.Timestamp = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthHttp } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.RequestId == nil { m.RequestId = &UUID{} } if err := m.RequestId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex hasFields[0] |= uint64(0x00000002) case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PeerType", wireType) } var v PeerType for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (PeerType(b) & 0x7F) << shift if b < 0x80 { break } } m.PeerType = &v hasFields[0] |= uint64(0x00000004) case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) } var v Method for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (Method(b) & 0x7F) << shift if b < 0x80 { break } } m.Method = &v hasFields[0] |= uint64(0x00000008) case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { 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 ErrInvalidLengthHttp } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) m.Uri = &s iNdEx = postIndex hasFields[0] |= uint64(0x00000010) case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RemoteAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { 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 ErrInvalidLengthHttp } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) m.RemoteAddress = &s iNdEx = postIndex hasFields[0] |= uint64(0x00000020) case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserAgent", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { 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 ErrInvalidLengthHttp } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) m.UserAgent = &s iNdEx = postIndex hasFields[0] |= uint64(0x00000040) case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParentRequestId", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthHttp } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.ParentRequestId == nil { m.ParentRequestId = &UUID{} } if err := m.ParentRequestId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ApplicationId", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthHttp } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.ApplicationId == nil { m.ApplicationId = &UUID{} } if err := m.ApplicationId.Unmarshal(data[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field InstanceIndex", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } m.InstanceIndex = &v case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InstanceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { 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 ErrInvalidLengthHttp } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) m.InstanceId = &s iNdEx = postIndex default: var sizeOfWire int for { sizeOfWire++ wire >>= 7 if wire == 0 { break } } iNdEx -= sizeOfWire skippy, err := skipHttp(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthHttp } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") } if hasFields[0]&uint64(0x00000002) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId") } if hasFields[0]&uint64(0x00000004) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType") } if hasFields[0]&uint64(0x00000008) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("method") } if hasFields[0]&uint64(0x00000010) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri") } if hasFields[0]&uint64(0x00000020) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("remoteAddress") } if hasFields[0]&uint64(0x00000040) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("userAgent") } return nil }
func (m *HttpStartStop) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.StartTimestamp == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("startTimestamp") } else { data[i] = 0x8 i++ i = encodeVarintHttp(data, i, uint64(*m.StartTimestamp)) } if m.StopTimestamp == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("stopTimestamp") } else { data[i] = 0x10 i++ i = encodeVarintHttp(data, i, uint64(*m.StopTimestamp)) } if m.RequestId == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId") } else { data[i] = 0x1a i++ i = encodeVarintHttp(data, i, uint64(m.RequestId.Size())) n6, err := m.RequestId.MarshalTo(data[i:]) if err != nil { return 0, err } i += n6 } if m.PeerType == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType") } else { data[i] = 0x20 i++ i = encodeVarintHttp(data, i, uint64(*m.PeerType)) } if m.Method == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("method") } else { data[i] = 0x28 i++ i = encodeVarintHttp(data, i, uint64(*m.Method)) } if m.Uri == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri") } else { data[i] = 0x32 i++ i = encodeVarintHttp(data, i, uint64(len(*m.Uri))) i += copy(data[i:], *m.Uri) } if m.RemoteAddress == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("remoteAddress") } else { data[i] = 0x3a i++ i = encodeVarintHttp(data, i, uint64(len(*m.RemoteAddress))) i += copy(data[i:], *m.RemoteAddress) } if m.UserAgent == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("userAgent") } else { data[i] = 0x42 i++ i = encodeVarintHttp(data, i, uint64(len(*m.UserAgent))) i += copy(data[i:], *m.UserAgent) } if m.StatusCode == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("statusCode") } else { data[i] = 0x48 i++ i = encodeVarintHttp(data, i, uint64(*m.StatusCode)) } if m.ContentLength == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("contentLength") } else { data[i] = 0x50 i++ i = encodeVarintHttp(data, i, uint64(*m.ContentLength)) } if m.ParentRequestId != nil { data[i] = 0x5a i++ i = encodeVarintHttp(data, i, uint64(m.ParentRequestId.Size())) n7, err := m.ParentRequestId.MarshalTo(data[i:]) if err != nil { return 0, err } i += n7 } if m.ApplicationId != nil { data[i] = 0x62 i++ i = encodeVarintHttp(data, i, uint64(m.ApplicationId.Size())) n8, err := m.ApplicationId.MarshalTo(data[i:]) if err != nil { return 0, err } i += n8 } if m.InstanceIndex != nil { data[i] = 0x68 i++ i = encodeVarintHttp(data, i, uint64(*m.InstanceIndex)) } if m.InstanceId != nil { data[i] = 0x72 i++ i = encodeVarintHttp(data, i, uint64(len(*m.InstanceId))) i += copy(data[i:], *m.InstanceId) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil }
func (m *HttpStop) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.Timestamp == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") } else { data[i] = 0x8 i++ i = encodeVarintHttp(data, i, uint64(*m.Timestamp)) } if m.Uri == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri") } else { data[i] = 0x12 i++ i = encodeVarintHttp(data, i, uint64(len(*m.Uri))) i += copy(data[i:], *m.Uri) } if m.RequestId == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId") } else { data[i] = 0x1a i++ i = encodeVarintHttp(data, i, uint64(m.RequestId.Size())) n4, err := m.RequestId.MarshalTo(data[i:]) if err != nil { return 0, err } i += n4 } if m.PeerType == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType") } else { data[i] = 0x20 i++ i = encodeVarintHttp(data, i, uint64(*m.PeerType)) } if m.StatusCode == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("statusCode") } else { data[i] = 0x28 i++ i = encodeVarintHttp(data, i, uint64(*m.StatusCode)) } if m.ContentLength == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("contentLength") } else { data[i] = 0x30 i++ i = encodeVarintHttp(data, i, uint64(*m.ContentLength)) } if m.ApplicationId != nil { data[i] = 0x3a i++ i = encodeVarintHttp(data, i, uint64(m.ApplicationId.Size())) n5, err := m.ApplicationId.MarshalTo(data[i:]) if err != nil { return 0, err } i += n5 } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil }
func (m *HttpStart) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.Timestamp == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") } else { data[i] = 0x8 i++ i = encodeVarintHttp(data, i, uint64(*m.Timestamp)) } if m.RequestId == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("requestId") } else { data[i] = 0x12 i++ i = encodeVarintHttp(data, i, uint64(m.RequestId.Size())) n1, err := m.RequestId.MarshalTo(data[i:]) if err != nil { return 0, err } i += n1 } if m.PeerType == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("peerType") } else { data[i] = 0x18 i++ i = encodeVarintHttp(data, i, uint64(*m.PeerType)) } if m.Method == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("method") } else { data[i] = 0x20 i++ i = encodeVarintHttp(data, i, uint64(*m.Method)) } if m.Uri == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uri") } else { data[i] = 0x2a i++ i = encodeVarintHttp(data, i, uint64(len(*m.Uri))) i += copy(data[i:], *m.Uri) } if m.RemoteAddress == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("remoteAddress") } else { data[i] = 0x32 i++ i = encodeVarintHttp(data, i, uint64(len(*m.RemoteAddress))) i += copy(data[i:], *m.RemoteAddress) } if m.UserAgent == nil { return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("userAgent") } else { data[i] = 0x3a i++ i = encodeVarintHttp(data, i, uint64(len(*m.UserAgent))) i += copy(data[i:], *m.UserAgent) } if m.ParentRequestId != nil { data[i] = 0x42 i++ i = encodeVarintHttp(data, i, uint64(m.ParentRequestId.Size())) n2, err := m.ParentRequestId.MarshalTo(data[i:]) if err != nil { return 0, err } i += n2 } if m.ApplicationId != nil { data[i] = 0x4a i++ i = encodeVarintHttp(data, i, uint64(m.ApplicationId.Size())) n3, err := m.ApplicationId.MarshalTo(data[i:]) if err != nil { return 0, err } i += n3 } if m.InstanceIndex != nil { data[i] = 0x50 i++ i = encodeVarintHttp(data, i, uint64(*m.InstanceIndex)) } if m.InstanceId != nil { data[i] = 0x5a i++ i = encodeVarintHttp(data, i, uint64(len(*m.InstanceId))) i += copy(data[i:], *m.InstanceId) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil }
func (m *LogMessage) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { 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) switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthLog } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Message = append([]byte{}, data[iNdEx:postIndex]...) iNdEx = postIndex hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MessageType", wireType) } var v LogMessage_MessageType for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (LogMessage_MessageType(b) & 0x7F) << shift if b < 0x80 { break } } m.MessageType = &v hasFields[0] |= uint64(0x00000002) case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.Timestamp = &v hasFields[0] |= uint64(0x00000004) case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AppId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { 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 ErrInvalidLengthLog } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) m.AppId = &s iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SourceType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { 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 ErrInvalidLengthLog } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) m.SourceType = &s iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SourceInstance", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { 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 ErrInvalidLengthLog } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } s := string(data[iNdEx:postIndex]) m.SourceInstance = &s iNdEx = postIndex default: var sizeOfWire int for { sizeOfWire++ wire >>= 7 if wire == 0 { break } } iNdEx -= sizeOfWire skippy, err := skipLog(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthLog } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") } if hasFields[0]&uint64(0x00000002) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("message_type") } if hasFields[0]&uint64(0x00000004) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") } return nil }
func (m *UUID) Unmarshal(data []byte) error { var hasFields [1]uint64 l := len(data) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { 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) switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Low", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } m.Low = &v hasFields[0] |= uint64(0x00000001) case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field High", wireType) } var v uint64 for shift := uint(0); ; shift += 7 { if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } m.High = &v hasFields[0] |= uint64(0x00000002) default: var sizeOfWire int for { sizeOfWire++ wire >>= 7 if wire == 0 { break } } iNdEx -= sizeOfWire skippy, err := skipUuid(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthUuid } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if hasFields[0]&uint64(0x00000001) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("low") } if hasFields[0]&uint64(0x00000002) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("high") } return nil }