mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-26 13:48:53 +08:00

* Update increment ID to UUID in things service Update increment ID to UUID for things and channels in things service and proto files. Also, update ID type from uint to string. Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update increment ID to UUID in http adapter Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update increment ID to UUID in ws adapter Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update increment ID to UUID in CoAP adapter Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update increment ID to UUID in normalizer service Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update increment ID to UUID in writer services Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update increment ID to UUID in reader services Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update increment ID to UUID in SDK Update increment ID to UUID in SDK. Update id type to string. Update tests. Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update increment ID to UUID in mqtt adapter Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Remove unnecessary case from influxdb reader Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update tests in order to increase code coverage Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update lora adapter to use string ID instead of unsigned int Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
1552 lines
37 KiB
Go
1552 lines
37 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: message.proto
|
|
|
|
package mainflux
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
import encoding_binary "encoding/binary"
|
|
|
|
import io "io"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
// RawMessage represents a message emitted by the Mainflux adapters layer.
|
|
type RawMessage struct {
|
|
Channel string `protobuf:"bytes,1,opt,name=Channel,proto3" json:"Channel,omitempty"`
|
|
Publisher string `protobuf:"bytes,2,opt,name=Publisher,proto3" json:"Publisher,omitempty"`
|
|
Protocol string `protobuf:"bytes,3,opt,name=Protocol,proto3" json:"Protocol,omitempty"`
|
|
ContentType string `protobuf:"bytes,4,opt,name=ContentType,proto3" json:"ContentType,omitempty"`
|
|
Payload []byte `protobuf:"bytes,5,opt,name=Payload,proto3" json:"Payload,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RawMessage) Reset() { *m = RawMessage{} }
|
|
func (m *RawMessage) String() string { return proto.CompactTextString(m) }
|
|
func (*RawMessage) ProtoMessage() {}
|
|
func (*RawMessage) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_message_3605d564124e586d, []int{0}
|
|
}
|
|
func (m *RawMessage) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RawMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RawMessage.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (dst *RawMessage) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RawMessage.Merge(dst, src)
|
|
}
|
|
func (m *RawMessage) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RawMessage) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RawMessage.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RawMessage proto.InternalMessageInfo
|
|
|
|
func (m *RawMessage) GetChannel() string {
|
|
if m != nil {
|
|
return m.Channel
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RawMessage) GetPublisher() string {
|
|
if m != nil {
|
|
return m.Publisher
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RawMessage) GetProtocol() string {
|
|
if m != nil {
|
|
return m.Protocol
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RawMessage) GetContentType() string {
|
|
if m != nil {
|
|
return m.ContentType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RawMessage) GetPayload() []byte {
|
|
if m != nil {
|
|
return m.Payload
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Message represents a resolved (normalized) raw message.
|
|
type Message struct {
|
|
Channel string `protobuf:"bytes,1,opt,name=Channel,proto3" json:"Channel,omitempty"`
|
|
Publisher string `protobuf:"bytes,2,opt,name=Publisher,proto3" json:"Publisher,omitempty"`
|
|
Protocol string `protobuf:"bytes,3,opt,name=Protocol,proto3" json:"Protocol,omitempty"`
|
|
Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"`
|
|
Unit string `protobuf:"bytes,5,opt,name=Unit,proto3" json:"Unit,omitempty"`
|
|
// Types that are valid to be assigned to Value:
|
|
// *Message_FloatValue
|
|
// *Message_StringValue
|
|
// *Message_BoolValue
|
|
// *Message_DataValue
|
|
Value isMessage_Value `protobuf_oneof:"value"`
|
|
ValueSum *SumValue `protobuf:"bytes,10,opt,name=ValueSum" json:"ValueSum,omitempty"`
|
|
Time float64 `protobuf:"fixed64,11,opt,name=Time,proto3" json:"Time,omitempty"`
|
|
UpdateTime float64 `protobuf:"fixed64,12,opt,name=UpdateTime,proto3" json:"UpdateTime,omitempty"`
|
|
Link string `protobuf:"bytes,13,opt,name=Link,proto3" json:"Link,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Message) Reset() { *m = Message{} }
|
|
func (m *Message) String() string { return proto.CompactTextString(m) }
|
|
func (*Message) ProtoMessage() {}
|
|
func (*Message) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_message_3605d564124e586d, []int{1}
|
|
}
|
|
func (m *Message) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Message.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (dst *Message) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Message.Merge(dst, src)
|
|
}
|
|
func (m *Message) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Message) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Message.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Message proto.InternalMessageInfo
|
|
|
|
type isMessage_Value interface {
|
|
isMessage_Value()
|
|
MarshalTo([]byte) (int, error)
|
|
Size() int
|
|
}
|
|
|
|
type Message_FloatValue struct {
|
|
FloatValue float64 `protobuf:"fixed64,6,opt,name=FloatValue,proto3,oneof"`
|
|
}
|
|
type Message_StringValue struct {
|
|
StringValue string `protobuf:"bytes,7,opt,name=StringValue,proto3,oneof"`
|
|
}
|
|
type Message_BoolValue struct {
|
|
BoolValue bool `protobuf:"varint,8,opt,name=BoolValue,proto3,oneof"`
|
|
}
|
|
type Message_DataValue struct {
|
|
DataValue string `protobuf:"bytes,9,opt,name=DataValue,proto3,oneof"`
|
|
}
|
|
|
|
func (*Message_FloatValue) isMessage_Value() {}
|
|
func (*Message_StringValue) isMessage_Value() {}
|
|
func (*Message_BoolValue) isMessage_Value() {}
|
|
func (*Message_DataValue) isMessage_Value() {}
|
|
|
|
func (m *Message) GetValue() isMessage_Value {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message) GetChannel() string {
|
|
if m != nil {
|
|
return m.Channel
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetPublisher() string {
|
|
if m != nil {
|
|
return m.Publisher
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetProtocol() string {
|
|
if m != nil {
|
|
return m.Protocol
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetUnit() string {
|
|
if m != nil {
|
|
return m.Unit
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetFloatValue() float64 {
|
|
if x, ok := m.GetValue().(*Message_FloatValue); ok {
|
|
return x.FloatValue
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Message) GetStringValue() string {
|
|
if x, ok := m.GetValue().(*Message_StringValue); ok {
|
|
return x.StringValue
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetBoolValue() bool {
|
|
if x, ok := m.GetValue().(*Message_BoolValue); ok {
|
|
return x.BoolValue
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *Message) GetDataValue() string {
|
|
if x, ok := m.GetValue().(*Message_DataValue); ok {
|
|
return x.DataValue
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Message) GetValueSum() *SumValue {
|
|
if m != nil {
|
|
return m.ValueSum
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Message) GetTime() float64 {
|
|
if m != nil {
|
|
return m.Time
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Message) GetUpdateTime() float64 {
|
|
if m != nil {
|
|
return m.UpdateTime
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Message) GetLink() string {
|
|
if m != nil {
|
|
return m.Link
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
func (*Message) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
|
return _Message_OneofMarshaler, _Message_OneofUnmarshaler, _Message_OneofSizer, []interface{}{
|
|
(*Message_FloatValue)(nil),
|
|
(*Message_StringValue)(nil),
|
|
(*Message_BoolValue)(nil),
|
|
(*Message_DataValue)(nil),
|
|
}
|
|
}
|
|
|
|
func _Message_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*Message)
|
|
// value
|
|
switch x := m.Value.(type) {
|
|
case *Message_FloatValue:
|
|
_ = b.EncodeVarint(6<<3 | proto.WireFixed64)
|
|
_ = b.EncodeFixed64(math.Float64bits(x.FloatValue))
|
|
case *Message_StringValue:
|
|
_ = b.EncodeVarint(7<<3 | proto.WireBytes)
|
|
_ = b.EncodeStringBytes(x.StringValue)
|
|
case *Message_BoolValue:
|
|
t := uint64(0)
|
|
if x.BoolValue {
|
|
t = 1
|
|
}
|
|
_ = b.EncodeVarint(8<<3 | proto.WireVarint)
|
|
_ = b.EncodeVarint(t)
|
|
case *Message_DataValue:
|
|
_ = b.EncodeVarint(9<<3 | proto.WireBytes)
|
|
_ = b.EncodeStringBytes(x.DataValue)
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("Message.Value has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _Message_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*Message)
|
|
switch tag {
|
|
case 6: // value.FloatValue
|
|
if wire != proto.WireFixed64 {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeFixed64()
|
|
m.Value = &Message_FloatValue{math.Float64frombits(x)}
|
|
return true, err
|
|
case 7: // value.StringValue
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeStringBytes()
|
|
m.Value = &Message_StringValue{x}
|
|
return true, err
|
|
case 8: // value.BoolValue
|
|
if wire != proto.WireVarint {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeVarint()
|
|
m.Value = &Message_BoolValue{x != 0}
|
|
return true, err
|
|
case 9: // value.DataValue
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeStringBytes()
|
|
m.Value = &Message_DataValue{x}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _Message_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*Message)
|
|
// value
|
|
switch x := m.Value.(type) {
|
|
case *Message_FloatValue:
|
|
n += 1 // tag and wire
|
|
n += 8
|
|
case *Message_StringValue:
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(len(x.StringValue)))
|
|
n += len(x.StringValue)
|
|
case *Message_BoolValue:
|
|
n += 1 // tag and wire
|
|
n += 1
|
|
case *Message_DataValue:
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(len(x.DataValue)))
|
|
n += len(x.DataValue)
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
// SumValue is a simple wrapper around the double value.
|
|
type SumValue struct {
|
|
Value float64 `protobuf:"fixed64,1,opt,name=Value,proto3" json:"Value,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SumValue) Reset() { *m = SumValue{} }
|
|
func (m *SumValue) String() string { return proto.CompactTextString(m) }
|
|
func (*SumValue) ProtoMessage() {}
|
|
func (*SumValue) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_message_3605d564124e586d, []int{2}
|
|
}
|
|
func (m *SumValue) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SumValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SumValue.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalTo(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (dst *SumValue) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SumValue.Merge(dst, src)
|
|
}
|
|
func (m *SumValue) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SumValue) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SumValue.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SumValue proto.InternalMessageInfo
|
|
|
|
func (m *SumValue) GetValue() float64 {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*RawMessage)(nil), "mainflux.RawMessage")
|
|
proto.RegisterType((*Message)(nil), "mainflux.Message")
|
|
proto.RegisterType((*SumValue)(nil), "mainflux.SumValue")
|
|
}
|
|
func (m *RawMessage) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RawMessage) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Channel) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Channel)))
|
|
i += copy(dAtA[i:], m.Channel)
|
|
}
|
|
if len(m.Publisher) > 0 {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Publisher)))
|
|
i += copy(dAtA[i:], m.Publisher)
|
|
}
|
|
if len(m.Protocol) > 0 {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Protocol)))
|
|
i += copy(dAtA[i:], m.Protocol)
|
|
}
|
|
if len(m.ContentType) > 0 {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.ContentType)))
|
|
i += copy(dAtA[i:], m.ContentType)
|
|
}
|
|
if len(m.Payload) > 0 {
|
|
dAtA[i] = 0x2a
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Payload)))
|
|
i += copy(dAtA[i:], m.Payload)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Message) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Message) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Channel) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Channel)))
|
|
i += copy(dAtA[i:], m.Channel)
|
|
}
|
|
if len(m.Publisher) > 0 {
|
|
dAtA[i] = 0x12
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Publisher)))
|
|
i += copy(dAtA[i:], m.Publisher)
|
|
}
|
|
if len(m.Protocol) > 0 {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Protocol)))
|
|
i += copy(dAtA[i:], m.Protocol)
|
|
}
|
|
if len(m.Name) > 0 {
|
|
dAtA[i] = 0x22
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Name)))
|
|
i += copy(dAtA[i:], m.Name)
|
|
}
|
|
if len(m.Unit) > 0 {
|
|
dAtA[i] = 0x2a
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Unit)))
|
|
i += copy(dAtA[i:], m.Unit)
|
|
}
|
|
if m.Value != nil {
|
|
nn1, err := m.Value.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += nn1
|
|
}
|
|
if m.ValueSum != nil {
|
|
dAtA[i] = 0x52
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(m.ValueSum.Size()))
|
|
n2, err := m.ValueSum.MarshalTo(dAtA[i:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i += n2
|
|
}
|
|
if m.Time != 0 {
|
|
dAtA[i] = 0x59
|
|
i++
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Time))))
|
|
i += 8
|
|
}
|
|
if m.UpdateTime != 0 {
|
|
dAtA[i] = 0x61
|
|
i++
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.UpdateTime))))
|
|
i += 8
|
|
}
|
|
if len(m.Link) > 0 {
|
|
dAtA[i] = 0x6a
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.Link)))
|
|
i += copy(dAtA[i:], m.Link)
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *Message_FloatValue) MarshalTo(dAtA []byte) (int, error) {
|
|
i := 0
|
|
dAtA[i] = 0x31
|
|
i++
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FloatValue))))
|
|
i += 8
|
|
return i, nil
|
|
}
|
|
func (m *Message_StringValue) MarshalTo(dAtA []byte) (int, error) {
|
|
i := 0
|
|
dAtA[i] = 0x3a
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.StringValue)))
|
|
i += copy(dAtA[i:], m.StringValue)
|
|
return i, nil
|
|
}
|
|
func (m *Message_BoolValue) MarshalTo(dAtA []byte) (int, error) {
|
|
i := 0
|
|
dAtA[i] = 0x40
|
|
i++
|
|
if m.BoolValue {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i++
|
|
return i, nil
|
|
}
|
|
func (m *Message_DataValue) MarshalTo(dAtA []byte) (int, error) {
|
|
i := 0
|
|
dAtA[i] = 0x4a
|
|
i++
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.DataValue)))
|
|
i += copy(dAtA[i:], m.DataValue)
|
|
return i, nil
|
|
}
|
|
func (m *SumValue) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalTo(dAtA)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SumValue) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Value != 0 {
|
|
dAtA[i] = 0x9
|
|
i++
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
|
|
i += 8
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
i += copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func encodeVarintMessage(dAtA []byte, offset int, v uint64) int {
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return offset + 1
|
|
}
|
|
func (m *RawMessage) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Channel)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.Publisher)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.Protocol)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.ContentType)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.Payload)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Message) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Channel)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.Publisher)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.Protocol)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
l = len(m.Unit)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
if m.Value != nil {
|
|
n += m.Value.Size()
|
|
}
|
|
if m.ValueSum != nil {
|
|
l = m.ValueSum.Size()
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
if m.Time != 0 {
|
|
n += 9
|
|
}
|
|
if m.UpdateTime != 0 {
|
|
n += 9
|
|
}
|
|
l = len(m.Link)
|
|
if l > 0 {
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Message_FloatValue) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
n += 9
|
|
return n
|
|
}
|
|
func (m *Message_StringValue) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.StringValue)
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
return n
|
|
}
|
|
func (m *Message_BoolValue) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
n += 2
|
|
return n
|
|
}
|
|
func (m *Message_DataValue) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.DataValue)
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
return n
|
|
}
|
|
func (m *SumValue) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Value != 0 {
|
|
n += 9
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovMessage(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozMessage(x uint64) (n int) {
|
|
return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *RawMessage) Unmarshal(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 ErrIntOverflowMessage
|
|
}
|
|
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: RawMessage: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RawMessage: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Channel = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Publisher", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Publisher = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Protocol = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ContentType", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ContentType = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Payload == nil {
|
|
m.Payload = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessage(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Message) Unmarshal(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 ErrIntOverflowMessage
|
|
}
|
|
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: Message: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Channel = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Publisher", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Publisher = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Protocol = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Unit = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field FloatValue", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Value = &Message_FloatValue{float64(math.Float64frombits(v))}
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = &Message_StringValue{string(dAtA[iNdEx:postIndex])}
|
|
iNdEx = postIndex
|
|
case 8:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
b := bool(v != 0)
|
|
m.Value = &Message_BoolValue{b}
|
|
case 9:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field DataValue", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = &Message_DataValue{string(dAtA[iNdEx:postIndex])}
|
|
iNdEx = postIndex
|
|
case 10:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ValueSum", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.ValueSum == nil {
|
|
m.ValueSum = &SumValue{}
|
|
}
|
|
if err := m.ValueSum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 11:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Time = float64(math.Float64frombits(v))
|
|
case 12:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.UpdateTime = float64(math.Float64frombits(v))
|
|
case 13:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Link", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Link = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessage(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *SumValue) Unmarshal(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 ErrIntOverflowMessage
|
|
}
|
|
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: SumValue: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SumValue: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Value = float64(math.Float64frombits(v))
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessage(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipMessage(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
iNdEx += length
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthMessage
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipMessage(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|
|
func init() { proto.RegisterFile("message.proto", fileDescriptor_message_3605d564124e586d) }
|
|
|
|
var fileDescriptor_message_3605d564124e586d = []byte{
|
|
// 358 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0x4f, 0x4e, 0xf3, 0x30,
|
|
0x14, 0xc4, 0xe3, 0xaf, 0x7f, 0x92, 0xbc, 0xb4, 0xd2, 0x27, 0x8b, 0x85, 0x85, 0x50, 0x64, 0x65,
|
|
0x95, 0x55, 0x16, 0x70, 0x83, 0x16, 0xa1, 0x2e, 0x00, 0x55, 0x6e, 0xcb, 0xde, 0xa5, 0xa6, 0x8d,
|
|
0x70, 0xec, 0xaa, 0x75, 0x80, 0xde, 0x81, 0x03, 0xb0, 0xe0, 0x40, 0x2c, 0x39, 0x02, 0x2a, 0x17,
|
|
0x41, 0x76, 0x48, 0x9b, 0x0b, 0xb0, 0x9b, 0x37, 0xbf, 0xe7, 0xf1, 0x58, 0x09, 0xf4, 0x0b, 0xb1,
|
|
0xdd, 0xf2, 0xa5, 0xc8, 0xd6, 0x1b, 0x6d, 0x34, 0x0e, 0x0a, 0x9e, 0xab, 0x07, 0x59, 0xbe, 0x24,
|
|
0xef, 0x08, 0x80, 0xf1, 0xe7, 0x9b, 0x0a, 0x63, 0x02, 0xfe, 0x70, 0xc5, 0x95, 0x12, 0x92, 0x20,
|
|
0x8a, 0xd2, 0x90, 0xd5, 0x23, 0x3e, 0x83, 0x70, 0x5c, 0xce, 0x65, 0xbe, 0x5d, 0x89, 0x0d, 0xf9,
|
|
0xe7, 0xd8, 0xd1, 0xc0, 0xa7, 0x10, 0x8c, 0x6d, 0xf2, 0xbd, 0x96, 0xa4, 0xe5, 0xe0, 0x61, 0xc6,
|
|
0x14, 0xa2, 0xa1, 0x56, 0x46, 0x28, 0x33, 0xdd, 0xad, 0x05, 0x69, 0x3b, 0xdc, 0xb4, 0xec, 0xad,
|
|
0x63, 0xbe, 0x93, 0x9a, 0x2f, 0x48, 0x87, 0xa2, 0xb4, 0xc7, 0xea, 0x31, 0x79, 0x6d, 0x81, 0xff,
|
|
0x97, 0xdd, 0x30, 0xb4, 0x6f, 0x79, 0x51, 0x97, 0x72, 0xda, 0x7a, 0x33, 0x95, 0x1b, 0x57, 0x25,
|
|
0x64, 0x4e, 0x63, 0x0a, 0x70, 0x25, 0x35, 0x37, 0x77, 0x5c, 0x96, 0x82, 0x74, 0x29, 0x4a, 0xd1,
|
|
0xc8, 0x63, 0x0d, 0x0f, 0x27, 0x10, 0x4d, 0xcc, 0x26, 0x57, 0xcb, 0x6a, 0xc5, 0xb7, 0x87, 0x47,
|
|
0x1e, 0x6b, 0x9a, 0x38, 0x86, 0x70, 0xa0, 0xb5, 0xac, 0x36, 0x02, 0x8a, 0xd2, 0x60, 0xe4, 0xb1,
|
|
0xa3, 0x65, 0xf9, 0x25, 0x37, 0xbc, 0xe2, 0xe1, 0x6f, 0xc2, 0xd1, 0xc2, 0x19, 0x04, 0x4e, 0x4c,
|
|
0xca, 0x82, 0x00, 0x45, 0x69, 0x74, 0x8e, 0xb3, 0xfa, 0x4b, 0x66, 0x93, 0xb2, 0x70, 0x90, 0x1d,
|
|
0x76, 0xec, 0x4b, 0xa6, 0x79, 0x21, 0x48, 0x64, 0xfb, 0x32, 0xa7, 0x71, 0x0c, 0x30, 0x5b, 0x2f,
|
|
0xb8, 0x11, 0x8e, 0xf4, 0x1c, 0x69, 0x38, 0xf6, 0xcc, 0x75, 0xae, 0x1e, 0x49, 0xbf, 0x7a, 0xbd,
|
|
0xd5, 0x03, 0x1f, 0x3a, 0x4f, 0x36, 0x33, 0xa1, 0x10, 0xd4, 0xd7, 0xe0, 0x13, 0xe8, 0x54, 0x45,
|
|
0x91, 0xcb, 0xa8, 0x86, 0xc1, 0xff, 0x8f, 0x7d, 0x8c, 0x3e, 0xf7, 0x31, 0xfa, 0xda, 0xc7, 0xe8,
|
|
0xed, 0x3b, 0xf6, 0xe6, 0x5d, 0xf7, 0xcb, 0x5d, 0xfc, 0x04, 0x00, 0x00, 0xff, 0xff, 0x41, 0xd3,
|
|
0x14, 0x1c, 0x83, 0x02, 0x00, 0x00,
|
|
}
|