From ad354d8d81b5d72adec93236eba95b5cf9272d0f Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期四, 02 九月 2021 15:19:00 +0800 Subject: [PATCH] rebuild go proto files --- proto/source/bhome_msg/bhome_msg.pb.go | 2419 +++------------------------------------------------------- 1 files changed, 148 insertions(+), 2,271 deletions(-) diff --git a/proto/source/bhome_msg/bhome_msg.pb.go b/proto/source/bhome_msg/bhome_msg.pb.go index 1010ed1..16eaa0e 100644 --- a/proto/source/bhome_msg/bhome_msg.pb.go +++ b/proto/source/bhome_msg/bhome_msg.pb.go @@ -1,14 +1,12 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: bhome_msg.proto package bhome_msg import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" + proto "github.com/golang/protobuf/proto" math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -20,7 +18,7 @@ // 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type MsgType int32 @@ -102,14 +100,17 @@ } type BHMsgHead struct { - MsgId []byte `protobuf:"bytes,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` - Route []*BHAddress `protobuf:"bytes,2,rep,name=route,proto3" json:"route,omitempty"` - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Type int32 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` - SsnId uint64 `protobuf:"varint,5,opt,name=ssn_id,json=ssnId,proto3" json:"ssn_id,omitempty"` - ProcId []byte `protobuf:"bytes,6,opt,name=proc_id,json=procId,proto3" json:"proc_id,omitempty"` - Topic []byte `protobuf:"bytes,7,opt,name=topic,proto3" json:"topic,omitempty"` - Dest *BHAddress `protobuf:"bytes,8,opt,name=dest,proto3" json:"dest,omitempty"` + MsgId []byte `protobuf:"bytes,1,opt,name=msg_id,json=msgId,proto3" json:"msg_id,omitempty"` + Route []*BHAddress `protobuf:"bytes,2,rep,name=route,proto3" json:"route,omitempty"` + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Type int32 `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` + SsnId uint64 `protobuf:"varint,5,opt,name=ssn_id,json=ssnId,proto3" json:"ssn_id,omitempty"` + ProcId []byte `protobuf:"bytes,6,opt,name=proc_id,json=procId,proto3" json:"proc_id,omitempty"` + Topic []byte `protobuf:"bytes,7,opt,name=topic,proto3" json:"topic,omitempty"` + Dest *BHAddress `protobuf:"bytes,8,opt,name=dest,proto3" json:"dest,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *BHMsgHead) Reset() { *m = BHMsgHead{} } @@ -118,26 +119,18 @@ func (*BHMsgHead) Descriptor() ([]byte, []int) { return fileDescriptor_88ce6d52215a3d3f, []int{0} } + func (m *BHMsgHead) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_BHMsgHead.Unmarshal(m, b) } func (m *BHMsgHead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BHMsgHead.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_BHMsgHead.Marshal(b, m, deterministic) } func (m *BHMsgHead) XXX_Merge(src proto.Message) { xxx_messageInfo_BHMsgHead.Merge(m, src) } func (m *BHMsgHead) XXX_Size() int { - return m.Size() + return xxx_messageInfo_BHMsgHead.Size(m) } func (m *BHMsgHead) XXX_DiscardUnknown() { xxx_messageInfo_BHMsgHead.DiscardUnknown(m) @@ -202,8 +195,10 @@ } type MsgSubscribe struct { - Topics *MsgTopicList `protobuf:"bytes,1,opt,name=topics,proto3" json:"topics,omitempty"` - Network bool `protobuf:"varint,2,opt,name=network,proto3" json:"network,omitempty"` + Topics *MsgTopicList `protobuf:"bytes,1,opt,name=topics,proto3" json:"topics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgSubscribe) Reset() { *m = MsgSubscribe{} } @@ -212,26 +207,18 @@ func (*MsgSubscribe) Descriptor() ([]byte, []int) { return fileDescriptor_88ce6d52215a3d3f, []int{1} } + func (m *MsgSubscribe) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_MsgSubscribe.Unmarshal(m, b) } func (m *MsgSubscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubscribe.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_MsgSubscribe.Marshal(b, m, deterministic) } func (m *MsgSubscribe) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSubscribe.Merge(m, src) } func (m *MsgSubscribe) XXX_Size() int { - return m.Size() + return xxx_messageInfo_MsgSubscribe.Size(m) } func (m *MsgSubscribe) XXX_DiscardUnknown() { xxx_messageInfo_MsgSubscribe.DiscardUnknown(m) @@ -246,16 +233,11 @@ return nil } -func (m *MsgSubscribe) GetNetwork() bool { - if m != nil { - return m.Network - } - return false -} - type MsgUnsubscribe struct { - Topics *MsgTopicList `protobuf:"bytes,1,opt,name=topics,proto3" json:"topics,omitempty"` - Network bool `protobuf:"varint,2,opt,name=network,proto3" json:"network,omitempty"` + Topics *MsgTopicList `protobuf:"bytes,1,opt,name=topics,proto3" json:"topics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgUnsubscribe) Reset() { *m = MsgUnsubscribe{} } @@ -264,26 +246,18 @@ func (*MsgUnsubscribe) Descriptor() ([]byte, []int) { return fileDescriptor_88ce6d52215a3d3f, []int{2} } + func (m *MsgUnsubscribe) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_MsgUnsubscribe.Unmarshal(m, b) } func (m *MsgUnsubscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUnsubscribe.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_MsgUnsubscribe.Marshal(b, m, deterministic) } func (m *MsgUnsubscribe) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUnsubscribe.Merge(m, src) } func (m *MsgUnsubscribe) XXX_Size() int { - return m.Size() + return xxx_messageInfo_MsgUnsubscribe.Size(m) } func (m *MsgUnsubscribe) XXX_DiscardUnknown() { xxx_messageInfo_MsgUnsubscribe.DiscardUnknown(m) @@ -298,15 +272,11 @@ return nil } -func (m *MsgUnsubscribe) GetNetwork() bool { - if m != nil { - return m.Network - } - return false -} - type MsgRegisterRPC struct { - Topics *MsgTopicList `protobuf:"bytes,1,opt,name=topics,proto3" json:"topics,omitempty"` + Topics *MsgTopicList `protobuf:"bytes,1,opt,name=topics,proto3" json:"topics,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgRegisterRPC) Reset() { *m = MsgRegisterRPC{} } @@ -315,26 +285,18 @@ func (*MsgRegisterRPC) Descriptor() ([]byte, []int) { return fileDescriptor_88ce6d52215a3d3f, []int{3} } + func (m *MsgRegisterRPC) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_MsgRegisterRPC.Unmarshal(m, b) } func (m *MsgRegisterRPC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterRPC.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_MsgRegisterRPC.Marshal(b, m, deterministic) } func (m *MsgRegisterRPC) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRegisterRPC.Merge(m, src) } func (m *MsgRegisterRPC) XXX_Size() int { - return m.Size() + return xxx_messageInfo_MsgRegisterRPC.Size(m) } func (m *MsgRegisterRPC) XXX_DiscardUnknown() { xxx_messageInfo_MsgRegisterRPC.DiscardUnknown(m) @@ -350,7 +312,10 @@ } type MsgProcInit struct { - ExtraMqNum int32 `protobuf:"varint,1,opt,name=extra_mq_num,json=extraMqNum,proto3" json:"extra_mq_num,omitempty"` + ExtraMqNum int32 `protobuf:"varint,1,opt,name=extra_mq_num,json=extraMqNum,proto3" json:"extra_mq_num,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgProcInit) Reset() { *m = MsgProcInit{} } @@ -359,26 +324,18 @@ func (*MsgProcInit) Descriptor() ([]byte, []int) { return fileDescriptor_88ce6d52215a3d3f, []int{4} } + func (m *MsgProcInit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_MsgProcInit.Unmarshal(m, b) } func (m *MsgProcInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgProcInit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_MsgProcInit.Marshal(b, m, deterministic) } func (m *MsgProcInit) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgProcInit.Merge(m, src) } func (m *MsgProcInit) XXX_Size() int { - return m.Size() + return xxx_messageInfo_MsgProcInit.Size(m) } func (m *MsgProcInit) XXX_DiscardUnknown() { xxx_messageInfo_MsgProcInit.DiscardUnknown(m) @@ -394,9 +351,12 @@ } type MsgProcInitReply struct { - Errmsg *ErrorMsg `protobuf:"bytes,1,opt,name=errmsg,proto3" json:"errmsg,omitempty"` - ProcIndex int32 `protobuf:"varint,2,opt,name=proc_index,json=procIndex,proto3" json:"proc_index,omitempty"` - ExtraMqs []*BHAddress `protobuf:"bytes,3,rep,name=extra_mqs,json=extraMqs,proto3" json:"extra_mqs,omitempty"` + Errmsg *ErrorMsg `protobuf:"bytes,1,opt,name=errmsg,proto3" json:"errmsg,omitempty"` + ProcIndex int32 `protobuf:"varint,2,opt,name=proc_index,json=procIndex,proto3" json:"proc_index,omitempty"` + ExtraMqs []*BHAddress `protobuf:"bytes,3,rep,name=extra_mqs,json=extraMqs,proto3" json:"extra_mqs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgProcInitReply) Reset() { *m = MsgProcInitReply{} } @@ -405,26 +365,18 @@ func (*MsgProcInitReply) Descriptor() ([]byte, []int) { return fileDescriptor_88ce6d52215a3d3f, []int{5} } + func (m *MsgProcInitReply) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_MsgProcInitReply.Unmarshal(m, b) } func (m *MsgProcInitReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgProcInitReply.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_MsgProcInitReply.Marshal(b, m, deterministic) } func (m *MsgProcInitReply) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgProcInitReply.Merge(m, src) } func (m *MsgProcInitReply) XXX_Size() int { - return m.Size() + return xxx_messageInfo_MsgProcInitReply.Size(m) } func (m *MsgProcInitReply) XXX_DiscardUnknown() { xxx_messageInfo_MsgProcInitReply.DiscardUnknown(m) @@ -460,7 +412,10 @@ // *MsgRequest_Register // *MsgRequest_TopicRequest // *MsgRequest_TopicQuery - Request isMsgRequest_Request `protobuf_oneof:"request"` + Request isMsgRequest_Request `protobuf_oneof:"request"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgRequest) Reset() { *m = MsgRequest{} } @@ -469,26 +424,18 @@ func (*MsgRequest) Descriptor() ([]byte, []int) { return fileDescriptor_88ce6d52215a3d3f, []int{6} } + func (m *MsgRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_MsgRequest.Unmarshal(m, b) } func (m *MsgRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_MsgRequest.Marshal(b, m, deterministic) } func (m *MsgRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRequest.Merge(m, src) } func (m *MsgRequest) XXX_Size() int { - return m.Size() + return xxx_messageInfo_MsgRequest.Size(m) } func (m *MsgRequest) XXX_DiscardUnknown() { xxx_messageInfo_MsgRequest.DiscardUnknown(m) @@ -498,23 +445,25 @@ type isMsgRequest_Request interface { isMsgRequest_Request() - MarshalTo([]byte) (int, error) - Size() int } type MsgRequest_Register struct { Register *MsgRegister `protobuf:"bytes,1,opt,name=register,proto3,oneof"` } + type MsgRequest_TopicRequest struct { TopicRequest *MsgRequestTopic `protobuf:"bytes,2,opt,name=topic_request,json=topicRequest,proto3,oneof"` } + type MsgRequest_TopicQuery struct { TopicQuery *MsgQueryTopic `protobuf:"bytes,3,opt,name=topic_query,json=topicQuery,proto3,oneof"` } -func (*MsgRequest_Register) isMsgRequest_Request() {} +func (*MsgRequest_Register) isMsgRequest_Request() {} + func (*MsgRequest_TopicRequest) isMsgRequest_Request() {} -func (*MsgRequest_TopicQuery) isMsgRequest_Request() {} + +func (*MsgRequest_TopicQuery) isMsgRequest_Request() {} func (m *MsgRequest) GetRequest() isMsgRequest_Request { if m != nil { @@ -544,101 +493,20 @@ return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*MsgRequest) 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 _MsgRequest_OneofMarshaler, _MsgRequest_OneofUnmarshaler, _MsgRequest_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*MsgRequest) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*MsgRequest_Register)(nil), (*MsgRequest_TopicRequest)(nil), (*MsgRequest_TopicQuery)(nil), } } -func _MsgRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*MsgRequest) - // request - switch x := m.Request.(type) { - case *MsgRequest_Register: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Register); err != nil { - return err - } - case *MsgRequest_TopicRequest: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TopicRequest); err != nil { - return err - } - case *MsgRequest_TopicQuery: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.TopicQuery); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("MsgRequest.Request has unexpected type %T", x) - } - return nil -} - -func _MsgRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*MsgRequest) - switch tag { - case 1: // request.register - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(MsgRegister) - err := b.DecodeMessage(msg) - m.Request = &MsgRequest_Register{msg} - return true, err - case 2: // request.topic_request - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(MsgRequestTopic) - err := b.DecodeMessage(msg) - m.Request = &MsgRequest_TopicRequest{msg} - return true, err - case 3: // request.topic_query - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(MsgQueryTopic) - err := b.DecodeMessage(msg) - m.Request = &MsgRequest_TopicQuery{msg} - return true, err - default: - return false, nil - } -} - -func _MsgRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*MsgRequest) - // request - switch x := m.Request.(type) { - case *MsgRequest_Register: - s := proto.Size(x.Register) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *MsgRequest_TopicRequest: - s := proto.Size(x.TopicRequest) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *MsgRequest_TopicQuery: - s := proto.Size(x.TopicQuery) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type MsgReply struct { - ErrMsg *ErrorMsg `protobuf:"bytes,1,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` + ErrMsg *ErrorMsg `protobuf:"bytes,1,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgReply) Reset() { *m = MsgReply{} } @@ -647,26 +515,18 @@ func (*MsgReply) Descriptor() ([]byte, []int) { return fileDescriptor_88ce6d52215a3d3f, []int{7} } + func (m *MsgReply) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_MsgReply.Unmarshal(m, b) } func (m *MsgReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgReply.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_MsgReply.Marshal(b, m, deterministic) } func (m *MsgReply) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgReply.Merge(m, src) } func (m *MsgReply) XXX_Size() int { - return m.Size() + return xxx_messageInfo_MsgReply.Size(m) } func (m *MsgReply) XXX_DiscardUnknown() { xxx_messageInfo_MsgReply.DiscardUnknown(m) @@ -685,7 +545,10 @@ // Types that are valid to be assigned to Reqrep: // *BHMsgBody_Request // *BHMsgBody_Reply - Reqrep isBHMsgBody_Reqrep `protobuf_oneof:"reqrep"` + Reqrep isBHMsgBody_Reqrep `protobuf_oneof:"reqrep"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *BHMsgBody) Reset() { *m = BHMsgBody{} } @@ -694,26 +557,18 @@ func (*BHMsgBody) Descriptor() ([]byte, []int) { return fileDescriptor_88ce6d52215a3d3f, []int{8} } + func (m *BHMsgBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_BHMsgBody.Unmarshal(m, b) } func (m *BHMsgBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BHMsgBody.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalTo(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_BHMsgBody.Marshal(b, m, deterministic) } func (m *BHMsgBody) XXX_Merge(src proto.Message) { xxx_messageInfo_BHMsgBody.Merge(m, src) } func (m *BHMsgBody) XXX_Size() int { - return m.Size() + return xxx_messageInfo_BHMsgBody.Size(m) } func (m *BHMsgBody) XXX_DiscardUnknown() { xxx_messageInfo_BHMsgBody.DiscardUnknown(m) @@ -723,19 +578,19 @@ type isBHMsgBody_Reqrep interface { isBHMsgBody_Reqrep() - MarshalTo([]byte) (int, error) - Size() int } type BHMsgBody_Request struct { Request *MsgRequest `protobuf:"bytes,1,opt,name=request,proto3,oneof"` } + type BHMsgBody_Reply struct { Reply *MsgReply `protobuf:"bytes,2,opt,name=reply,proto3,oneof"` } func (*BHMsgBody_Request) isBHMsgBody_Reqrep() {} -func (*BHMsgBody_Reply) isBHMsgBody_Reqrep() {} + +func (*BHMsgBody_Reply) isBHMsgBody_Reqrep() {} func (m *BHMsgBody) GetReqrep() isBHMsgBody_Reqrep { if m != nil { @@ -758,78 +613,12 @@ return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*BHMsgBody) 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 _BHMsgBody_OneofMarshaler, _BHMsgBody_OneofUnmarshaler, _BHMsgBody_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*BHMsgBody) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*BHMsgBody_Request)(nil), (*BHMsgBody_Reply)(nil), } -} - -func _BHMsgBody_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*BHMsgBody) - // reqrep - switch x := m.Reqrep.(type) { - case *BHMsgBody_Request: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Request); err != nil { - return err - } - case *BHMsgBody_Reply: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Reply); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("BHMsgBody.Reqrep has unexpected type %T", x) - } - return nil -} - -func _BHMsgBody_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*BHMsgBody) - switch tag { - case 1: // reqrep.request - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(MsgRequest) - err := b.DecodeMessage(msg) - m.Reqrep = &BHMsgBody_Request{msg} - return true, err - case 2: // reqrep.reply - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(MsgReply) - err := b.DecodeMessage(msg) - m.Reqrep = &BHMsgBody_Reply{msg} - return true, err - default: - return false, nil - } -} - -func _BHMsgBody_OneofSizer(msg proto.Message) (n int) { - m := msg.(*BHMsgBody) - // reqrep - switch x := m.Reqrep.(type) { - case *BHMsgBody_Request: - s := proto.Size(x.Request) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *BHMsgBody_Reply: - s := proto.Size(x.Reply) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n } func init() { @@ -848,1965 +637,53 @@ func init() { proto.RegisterFile("bhome_msg.proto", fileDescriptor_88ce6d52215a3d3f) } var fileDescriptor_88ce6d52215a3d3f = []byte{ - // 809 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x16, 0x2d, 0x53, 0xa2, 0x46, 0x6a, 0xbc, 0x19, 0xc9, 0x36, 0xa3, 0xc6, 0x02, 0xc1, 0x4b, - 0x85, 0xa4, 0xb0, 0x11, 0xb5, 0x87, 0x02, 0xbd, 0xd4, 0x72, 0x0a, 0xd0, 0x40, 0x55, 0xb8, 0xdb, - 0xe6, 0xd0, 0xf6, 0x20, 0x50, 0xe6, 0x82, 0x21, 0x22, 0xfe, 0x68, 0x77, 0xd9, 0x44, 0x6f, 0xd1, - 0xf6, 0x8d, 0x7a, 0xeb, 0xa5, 0x40, 0x8e, 0x3d, 0x16, 0xf6, 0x0b, 0xf4, 0x11, 0x8a, 0x5d, 0x92, - 0x12, 0xe3, 0xc4, 0x31, 0x7a, 0xc8, 0x6d, 0xf7, 0x9b, 0xf9, 0xbe, 0xf9, 0xd9, 0x19, 0x12, 0xf6, - 0x16, 0xcf, 0xd3, 0x98, 0xcd, 0x63, 0x11, 0x1e, 0x67, 0x3c, 0x95, 0x29, 0x76, 0x36, 0xc0, 0xb0, - 0xbf, 0x39, 0xce, 0xfd, 0x2c, 0x2a, 0xec, 0xc3, 0x3d, 0xc6, 0x79, 0xca, 0xb7, 0x04, 0xf7, 0x5f, - 0x03, 0x3a, 0x53, 0x6f, 0x26, 0x42, 0x8f, 0xf9, 0x01, 0xee, 0x43, 0x4b, 0xf9, 0x47, 0x81, 0x6d, - 0x38, 0xc6, 0xb8, 0x47, 0xcd, 0x58, 0x84, 0xe7, 0x01, 0x3e, 0x02, 0x93, 0xa7, 0xb9, 0x64, 0xf6, - 0x8e, 0xd3, 0x1c, 0x77, 0x27, 0x83, 0xe3, 0x6d, 0xd8, 0xa9, 0x77, 0x1a, 0x04, 0x9c, 0x09, 0x41, - 0x0b, 0x17, 0x7c, 0x08, 0x1d, 0x19, 0xc5, 0x4c, 0x48, 0x3f, 0xce, 0xec, 0xa6, 0x63, 0x8c, 0x9b, - 0x74, 0x0b, 0x20, 0xc2, 0xae, 0x5c, 0x67, 0xcc, 0xde, 0x75, 0x8c, 0xb1, 0x49, 0xf5, 0x59, 0x05, - 0x15, 0x22, 0x51, 0x41, 0x4d, 0xc7, 0x18, 0xef, 0x52, 0x53, 0x88, 0xe4, 0x3c, 0xc0, 0x43, 0x68, - 0x67, 0x3c, 0xbd, 0x54, 0x78, 0x4b, 0x27, 0xd3, 0x52, 0xd7, 0xf3, 0x00, 0x07, 0x60, 0xca, 0x34, - 0x8b, 0x2e, 0xed, 0x76, 0x91, 0xa3, 0xbe, 0xe0, 0x18, 0x76, 0x03, 0x26, 0xa4, 0x6d, 0x39, 0xc6, - 0xad, 0x29, 0x6a, 0x0f, 0xf7, 0x47, 0xe8, 0xcd, 0x44, 0xf8, 0x7d, 0xbe, 0x10, 0x97, 0x3c, 0x5a, - 0x30, 0x3c, 0x81, 0x96, 0x96, 0x10, 0xba, 0xe8, 0xee, 0xe4, 0xb0, 0xc6, 0x9d, 0x89, 0xf0, 0x07, - 0x65, 0xfb,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xb0, - 0x87, 0x36, 0x0c, 0xb6, 0x11, 0xb6, 0x23, 0x40, 0x08, 0x1e, 0xc1, 0x83, 0x77, 0x59, 0x0a, 0xe2, - 0xfd, 0x7a, 0x91, 0xb5, 0x45, 0x25, 0x58, 0x6f, 0xc9, 0x45, 0xbe, 0x58, 0x46, 0xe2, 0x39, 0x19, - 0xd4, 0x53, 0xde, 0x7c, 0x8e, 0xc8, 0x41, 0x5d, 0xa4, 0xf6, 0x29, 0x21, 0x76, 0xbd, 0x96, 0x67, - 0x49, 0x35, 0xca, 0x64, 0x58, 0xd7, 0xd1, 0xb5, 0xa8, 0x86, 0x91, 0x87, 0x38, 0x84, 0x83, 0xb7, - 0xe0, 0x22, 0xd1, 0xa3, 0xc9, 0xef, 0x06, 0x58, 0x45, 0xe6, 0x17, 0x67, 0xf8, 0x15, 0x98, 0xda, - 0x01, 0x6f, 0x9d, 0xde, 0xe1, 0xd1, 0x6d, 0x96, 0x62, 0x6e, 0x9f, 0x42, 0xbb, 0x5a, 0x8b, 0xf7, - 0xac, 0xd0, 0x1d, 0x2a, 0xd3, 0x4f, 0xfe, 0xbc, 0x1a, 0x19, 0xaf, 0xaf, 0x46, 0xc6, 0x3f, 0x57, - 0x23, 0xe3, 0xd7, 0xeb, 0x51, 0xe3, 0xf5, 0xf5, 0xa8, 0xf1, 0xf7, 0xf5, 0xa8, 0xe1, 0x35, 0x7f, - 0xea, 0x1e, 0x9f, 0x6c, 0xb8, 0x8b, 0x96, 0xfe, 0x79, 0x7d, 0xf6, 0x5f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x27, 0x28, 0x5d, 0xb5, 0x00, 0x07, 0x00, 0x00, + // 753 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xdd, 0x6e, 0xda, 0x4a, + 0x10, 0xc6, 0x01, 0xf3, 0x33, 0x70, 0xc2, 0x66, 0xf8, 0x73,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+ 0xe5, 0xdc, 0x9b, 0x58, 0xd8, 0x81, 0x52, 0xc0, 0xfc, 0x2b, 0x81, 0x17, 0x65, 0x33, 0x45, 0xf1, + 0x73, 0x62, 0x61, 0x13, 0xd4, 0xd0, 0x0f, 0x9c, 0x2b, 0xad, 0x14, 0xf7, 0x28, 0x7f, 0xe0, 0x10, + 0x0a, 0x16, 0xe5, 0xa1, 0x56, 0xee, 0x2b, 0x8f, 0xb6, 0x28, 0x33, 0x06, 0x2f, 0xa1, 0x36, 0xe5, + 0xf6, 0xfb, 0x68, 0xc1, 0xaf, 0x98, 0xb3, 0xa0, 0x78, 0x02, 0x45, 0x49, 0xc1, 0xe5, 0xa5, 0xab, + 0xa3, 0x4e, 0xa6, 0x76, 0xca, 0xed, 0x0f, 0x22, 0xf6, 0xc6, 0xe1, 0xa1, 0x91, 0xa4, 0x0d, 0xce, + 0x60, 0x77, 0xca, 0xed, 0x4b, 0x8f, 0xff, 0x29, 0x85, 0x41, 0x6d, 0x87, 0x87, 0x94, 0x19, 0xb3, + 0xf3, 0xdf, 0xa7, 0x38, 0x81, 0xea, 0x94, 0xdb, 0x33, 0xe1, 0x89, 0xe7, 0x84, 0xd8, 0x87, 0x1a, + 0xbd, 0x09, 0x99, 0x39, 0x77, 0x57, 0x73, 0x2f, 0x72, 0x25, 0x8b, 0x6a, 0x80, 0xc4, 0xa6, 0xab, + 0xb7, 0x91, 0x3b, 0xf8, 0xaa, 0x00, 0xc9, 0x54, 0x18, 0x34, 0x58, 0xae, 0xf1, 0x08, 0x8a, 0x94, + 0x31, 0x97, 0xdb, 0x89, 0x6c, 0x23, 0x23, 0xfb, 0x5a, 0xcc, 0x8a, 0x68, 0x33, 0x49, 0xc1, 0x1e, + 0x40, 0xfc, 0x24, 0x9e, 0x45, 0x6f, 0xb4, 0x1d, 0xa9, 0x50, 0x91, 0xaf, 0x22, 0x00, 0x3c, 0x85, + 0x4a, 0xda, 0x02, 0xd7, 0xf2, 0x4f, 0x8c, 0x4a, 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 0x9e, 0xe4, + 0x27, 0x3b, 0xd8, 0x04, 0x92, 0x06, 0xd2, 0x39, 0x23, 0x65, 0xdc, 0x87, 0xd6, 0x5d, 0x34, 0x2e, + 0xa8, 0x64, 0x0b, 0xd2, 0xb7, 0x25, 0x80, 0x2d, 0xd8, 0x4b, 0x51, 0x9d, 0x9a, 0x2c, 0x5c, 0x50, + 0x33, 0x24, 0x35, 0x6c, 0x03, 0xa6, 0xf0, 0xf6, 0x31, 0xc8, 0x2e, 0xfe, 0x0d, 0x9d, 0xfb, 0x78, + 0xac, 0x50, 0x47, 0x0d, 0x9a, 0x5b, 0x85, 0xed, 0x08, 0x10, 0x82, 0x3d, 0xd8, 0x7f, 0x28, 0x12, + 0x17, 0xee, 0x65, 0x2f, 0x99, 0x59, 0x54, 0x82, 0x59, 0x4b, 0x66, 0xd1, 0x62, 0xe9, 0xf0, 0x6b, + 0xd2, 0xcc, 0xb6, 0xbc, 0xf9, 0xb4, 0x90, 0x76, 0x96, 0x24, 0xf3, 0xc1, 0x20, 0x5a, 0xf6, 0x2e, + 0x97, 0x5e, 0x3a, 0xca, 0xa4, 0x9b, 0xe5, 0x91, 0x77, 0x11, 0x86, 0x91, 0x03, 0xec, 0x42, 0xfb, + 0x1e, 0x1c, 0x37, 0xda, 0x1b, 0x7d, 0x53, 0xa0, 0x1c, 0x77, 0x3e, 0x3b, 0xc7, 0x57, 0xa0, 0xca, + 0x04, 0x7c, 0x74, 0x7a, 0xbb, 0xbd, 0xc7, 0x22, 0xf1, 0xdc, 0x5e, 0x40, 0x29, 0x5d, 0x8b, 0x27, + 0x56, 0xe8, 0x19, 0x96, 0x71, 0x5d, 0xcf, 0x7f, 0xac, 0x1e, 0x9f, 0x6c, 0x72, 0x16, 0x45, 0xf9, + 0x87, 0xf3, 0xef, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x05, 0x7b, 0xe2, 0x94, 0xb4, 0x06, 0x00, + 0x00, } - -func (m *BHMsgHead) 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 *BHMsgHead) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.MsgId) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(len(m.MsgId))) - i += copy(dAtA[i:], m.MsgId) - } - if len(m.Route) > 0 { - for _, msg := range m.Route { - dAtA[i] = 0x12 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Timestamp != 0 { - dAtA[i] = 0x18 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Timestamp)) - } - if m.Type != 0 { - dAtA[i] = 0x20 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Type)) - } - if m.SsnId != 0 { - dAtA[i] = 0x28 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.SsnId)) - } - if len(m.ProcId) > 0 { - dAtA[i] = 0x32 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(len(m.ProcId))) - i += copy(dAtA[i:], m.ProcId) - } - if len(m.Topic) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(len(m.Topic))) - i += copy(dAtA[i:], m.Topic) - } - if m.Dest != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Dest.Size())) - n1, err1 := m.Dest.MarshalTo(dAtA[i:]) - if err1 != nil { - return 0, err1 - } - i += n1 - } - return i, nil -} - -func (m *MsgSubscribe) 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 *MsgSubscribe) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Topics != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Topics.Size())) - n2, err2 := m.Topics.MarshalTo(dAtA[i:]) - if err2 != nil { - return 0, err2 - } - i += n2 - } - if m.Network { - dAtA[i] = 0x10 - i++ - if m.Network { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *MsgUnsubscribe) 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 *MsgUnsubscribe) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Topics != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Topics.Size())) - n3, err3 := m.Topics.MarshalTo(dAtA[i:]) - if err3 != nil { - return 0, err3 - } - i += n3 - } - if m.Network { - dAtA[i] = 0x10 - i++ - if m.Network { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - return i, nil -} - -func (m *MsgRegisterRPC) 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 *MsgRegisterRPC) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Topics != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Topics.Size())) - n4, err4 := m.Topics.MarshalTo(dAtA[i:]) - if err4 != nil { - return 0, err4 - } - i += n4 - } - return i, nil -} - -func (m *MsgProcInit) 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 *MsgProcInit) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ExtraMqNum != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.ExtraMqNum)) - } - return i, nil -} - -func (m *MsgProcInitReply) 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 *MsgProcInitReply) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Errmsg != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Errmsg.Size())) - n5, err5 := m.Errmsg.MarshalTo(dAtA[i:]) - if err5 != nil { - return 0, err5 - } - i += n5 - } - if m.ProcIndex != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.ProcIndex)) - } - if len(m.ExtraMqs) > 0 { - for _, msg := range m.ExtraMqs { - dAtA[i] = 0x1a - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *MsgRequest) 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 *MsgRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Request != nil { - nn6, err6 := m.Request.MarshalTo(dAtA[i:]) - if err6 != nil { - return 0, err6 - } - i += nn6 - } - return i, nil -} - -func (m *MsgRequest_Register) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Register != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Register.Size())) - n7, err7 := m.Register.MarshalTo(dAtA[i:]) - if err7 != nil { - return 0, err7 - } - i += n7 - } - return i, nil -} -func (m *MsgRequest_TopicRequest) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TopicRequest != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.TopicRequest.Size())) - n8, err8 := m.TopicRequest.MarshalTo(dAtA[i:]) - if err8 != nil { - return 0, err8 - } - i += n8 - } - return i, nil -} -func (m *MsgRequest_TopicQuery) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.TopicQuery != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.TopicQuery.Size())) - n9, err9 := m.TopicQuery.MarshalTo(dAtA[i:]) - if err9 != nil { - return 0, err9 - } - i += n9 - } - return i, nil -} -func (m *MsgReply) 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 *MsgReply) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ErrMsg != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.ErrMsg.Size())) - n10, err10 := m.ErrMsg.MarshalTo(dAtA[i:]) - if err10 != nil { - return 0, err10 - } - i += n10 - } - return i, nil -} - -func (m *BHMsgBody) 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 *BHMsgBody) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Reqrep != nil { - nn11, err11 := m.Reqrep.MarshalTo(dAtA[i:]) - if err11 != nil { - return 0, err11 - } - i += nn11 - } - return i, nil -} - -func (m *BHMsgBody_Request) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Request != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Request.Size())) - n12, err12 := m.Request.MarshalTo(dAtA[i:]) - if err12 != nil { - return 0, err12 - } - i += n12 - } - return i, nil -} -func (m *BHMsgBody_Reply) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Reply != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintBhomeMsg(dAtA, i, uint64(m.Reply.Size())) - n13, err13 := m.Reply.MarshalTo(dAtA[i:]) - if err13 != nil { - return 0, err13 - } - i += n13 - } - return i, nil -} -func encodeVarintBhomeMsg(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 *BHMsgHead) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.MsgId) - if l > 0 { - n += 1 + l + sovBhomeMsg(uint64(l)) - } - if len(m.Route) > 0 { - for _, e := range m.Route { - l = e.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - } - if m.Timestamp != 0 { - n += 1 + sovBhomeMsg(uint64(m.Timestamp)) - } - if m.Type != 0 { - n += 1 + sovBhomeMsg(uint64(m.Type)) - } - if m.SsnId != 0 { - n += 1 + sovBhomeMsg(uint64(m.SsnId)) - } - l = len(m.ProcId) - if l > 0 { - n += 1 + l + sovBhomeMsg(uint64(l)) - } - l = len(m.Topic) - if l > 0 { - n += 1 + l + sovBhomeMsg(uint64(l)) - } - if m.Dest != nil { - l = m.Dest.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - return n -} - -func (m *MsgSubscribe) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Topics != nil { - l = m.Topics.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - if m.Network { - n += 2 - } - return n -} - -func (m *MsgUnsubscribe) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Topics != nil { - l = m.Topics.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - if m.Network { - n += 2 - } - return n -} - -func (m *MsgRegisterRPC) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Topics != nil { - l = m.Topics.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - return n -} - -func (m *MsgProcInit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExtraMqNum != 0 { - n += 1 + sovBhomeMsg(uint64(m.ExtraMqNum)) - } - return n -} - -func (m *MsgProcInitReply) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Errmsg != nil { - l = m.Errmsg.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - if m.ProcIndex != 0 { - n += 1 + sovBhomeMsg(uint64(m.ProcIndex)) - } - if len(m.ExtraMqs) > 0 { - for _, e := range m.ExtraMqs { - l = e.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - } - return n -} - -func (m *MsgRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - n += m.Request.Size() - } - return n -} - -func (m *MsgRequest_Register) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Register != nil { - l = m.Register.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - return n -} -func (m *MsgRequest_TopicRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TopicRequest != nil { - l = m.TopicRequest.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - return n -} -func (m *MsgRequest_TopicQuery) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TopicQuery != nil { - l = m.TopicQuery.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - return n -} -func (m *MsgReply) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ErrMsg != nil { - l = m.ErrMsg.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - return n -} - -func (m *BHMsgBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Reqrep != nil { - n += m.Reqrep.Size() - } - return n -} - -func (m *BHMsgBody_Request) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - return n -} -func (m *BHMsgBody_Reply) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Reply != nil { - l = m.Reply.Size() - n += 1 + l + sovBhomeMsg(uint64(l)) - } - return n -} - -func sovBhomeMsg(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozBhomeMsg(x uint64) (n int) { - return sovBhomeMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *BHMsgHead) 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 ErrIntOverflowBhomeMsg - } - 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: BHMsgHead: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BHMsgHead: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MsgId = append(m.MsgId[:0], dAtA[iNdEx:postIndex]...) - if m.MsgId == nil { - m.MsgId = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Route = append(m.Route, &BHAddress{}) - if err := m.Route[len(m.Route)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SsnId", wireType) - } - m.SsnId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SsnId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProcId = append(m.ProcId[:0], dAtA[iNdEx:postIndex]...) - if m.ProcId == nil { - m.ProcId = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Topic = append(m.Topic[:0], dAtA[iNdEx:postIndex]...) - if m.Topic == nil { - m.Topic = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Dest == nil { - m.Dest = &BHAddress{} - } - if err := m.Dest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBhomeMsg(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubscribe) 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 ErrIntOverflowBhomeMsg - } - 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: MsgSubscribe: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubscribe: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Topics == nil { - m.Topics = &MsgTopicList{} - } - if err := m.Topics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Network = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipBhomeMsg(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUnsubscribe) 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 ErrIntOverflowBhomeMsg - } - 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: MsgUnsubscribe: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUnsubscribe: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Topics == nil { - m.Topics = &MsgTopicList{} - } - if err := m.Topics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Network = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipBhomeMsg(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRegisterRPC) 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 ErrIntOverflowBhomeMsg - } - 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: MsgRegisterRPC: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterRPC: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Topics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Topics == nil { - m.Topics = &MsgTopicList{} - } - if err := m.Topics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBhomeMsg(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgProcInit) 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 ErrIntOverflowBhomeMsg - } - 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: MsgProcInit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgProcInit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtraMqNum", wireType) - } - m.ExtraMqNum = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExtraMqNum |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipBhomeMsg(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgProcInitReply) 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 ErrIntOverflowBhomeMsg - } - 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: MsgProcInitReply: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgProcInitReply: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errmsg", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Errmsg == nil { - m.Errmsg = &ErrorMsg{} - } - if err := m.Errmsg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcIndex", wireType) - } - m.ProcIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProcIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtraMqs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExtraMqs = append(m.ExtraMqs, &BHAddress{}) - if err := m.ExtraMqs[len(m.ExtraMqs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBhomeMsg(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRequest) 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 ErrIntOverflowBhomeMsg - } - 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: MsgRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Register", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &MsgRegister{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &MsgRequest_Register{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TopicRequest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &MsgRequestTopic{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &MsgRequest_TopicRequest{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TopicQuery", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &MsgQueryTopic{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &MsgRequest_TopicQuery{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBhomeMsg(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgReply) 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 ErrIntOverflowBhomeMsg - } - 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: MsgReply: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgReply: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrMsg", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ErrMsg == nil { - m.ErrMsg = &ErrorMsg{} - } - if err := m.ErrMsg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBhomeMsg(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BHMsgBody) 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 ErrIntOverflowBhomeMsg - } - 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: BHMsgBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BHMsgBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &MsgRequest{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Reqrep = &BHMsgBody_Request{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reply", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBhomeMsg - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBhomeMsg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &MsgReply{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Reqrep = &BHMsgBody_Reply{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipBhomeMsg(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthBhomeMsg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipBhomeMsg(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, ErrIntOverflowBhomeMsg - } - 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, ErrIntOverflowBhomeMsg - } - 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, ErrIntOverflowBhomeMsg - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthBhomeMsg - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthBhomeMsg - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowBhomeMsg - } - 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 := skipBhomeMsg(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthBhomeMsg - } - } - 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 ( - ErrInvalidLengthBhomeMsg = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowBhomeMsg = fmt.Errorf("proto: integer overflow") -) -- Gitblit v1.8.0