// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// source: error_msg.proto
|
|
package bhome_msg
|
|
import (
|
fmt "fmt"
|
proto "github.com/gogo/protobuf/proto"
|
io "io"
|
math "math"
|
math_bits "math/bits"
|
)
|
|
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
|
type ErrorCode int32
|
|
const (
|
ErrorCode_eSuccess ErrorCode = 0
|
ErrorCode_eError ErrorCode = 1
|
ErrorCode_eInvalidInput ErrorCode = 2
|
ErrorCode_eNotRegistered ErrorCode = 3
|
ErrorCode_eNotFound ErrorCode = 4
|
ErrorCode_eOffline ErrorCode = 5
|
ErrorCode_eNoRespond ErrorCode = 6
|
ErrorCode_eAddressNotMatch ErrorCode = 7
|
)
|
|
var ErrorCode_name = map[int32]string{
|
0: "eSuccess",
|
1: "eError",
|
2: "eInvalidInput",
|
3: "eNotRegistered",
|
4: "eNotFound",
|
5: "eOffline",
|
6: "eNoRespond",
|
7: "eAddressNotMatch",
|
}
|
|
var ErrorCode_value = map[string]int32{
|
"eSuccess": 0,
|
"eError": 1,
|
"eInvalidInput": 2,
|
"eNotRegistered": 3,
|
"eNotFound": 4,
|
"eOffline": 5,
|
"eNoRespond": 6,
|
"eAddressNotMatch": 7,
|
}
|
|
func (x ErrorCode) String() string {
|
return proto.EnumName(ErrorCode_name, int32(x))
|
}
|
|
func (ErrorCode) EnumDescriptor() ([]byte, []int) {
|
return fileDescriptor_da93925f7641a6e0, []int{0}
|
}
|
|
type ErrorMsg struct {
|
ErrCode ErrorCode `protobuf:"varint,1,opt,name=errCode,proto3,enum=bhome_msg.ErrorCode" json:"errCode,omitempty"`
|
ErrString []byte `protobuf:"bytes,2,opt,name=errString,proto3" json:"errString,omitempty"`
|
}
|
|
func (m *ErrorMsg) Reset() { *m = ErrorMsg{} }
|
func (m *ErrorMsg) String() string { return proto.CompactTextString(m) }
|
func (*ErrorMsg) ProtoMessage() {}
|
func (*ErrorMsg) Descriptor() ([]byte, []int) {
|
return fileDescriptor_da93925f7641a6e0, []int{0}
|
}
|
func (m *ErrorMsg) XXX_Unmarshal(b []byte) error {
|
return m.Unmarshal(b)
|
}
|
func (m *ErrorMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
if deterministic {
|
return xxx_messageInfo_ErrorMsg.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 (m *ErrorMsg) XXX_Merge(src proto.Message) {
|
xxx_messageInfo_ErrorMsg.Merge(m, src)
|
}
|
func (m *ErrorMsg) XXX_Size() int {
|
return m.Size()
|
}
|
func (m *ErrorMsg) XXX_DiscardUnknown() {
|
xxx_messageInfo_ErrorMsg.DiscardUnknown(m)
|
}
|
|
var xxx_messageInfo_ErrorMsg proto.InternalMessageInfo
|
|
func (m *ErrorMsg) GetErrCode() ErrorCode {
|
if m != nil {
|
return m.ErrCode
|
}
|
return ErrorCode_eSuccess
|
}
|
|
func (m *ErrorMsg) GetErrString() []byte {
|
if m != nil {
|
return m.ErrString
|
}
|
return nil
|
}
|
|
func init() {
|
proto.RegisterEnum("bhome_msg.ErrorCode", ErrorCode_name, ErrorCode_value)
|
proto.RegisterType((*ErrorMsg)(nil), "bhome_msg.ErrorMsg")
|
}
|
|
func init() { proto.RegisterFile("error_msg.proto", fileDescriptor_da93925f7641a6e0) }
|
|
var fileDescriptor_da93925f7641a6e0 = []byte{
|
// 274 bytes of a gzipped FileDescriptorProto
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0xc1, 0x4a, 0xf3, 0x40,
|
0x10,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 0xcb, 0x34, 0xf2, 0xff, 0x22, 0x00, 0xc0, 0xc8, 0xc4, 0x68,
|
0x73, 0xa3, 0x15, 0xef, 0x89, 0x31, 0x70, 0xbc, 0x51, 0x8a, 0xd0, 0xda, 0xc8, 0xb8, 0xc5, 0xca,
|
0x25, 0x5b, 0xde, 0xbf, 0x3d, 0xff, 0x2c, 0x25, 0x3b, 0x94, 0x92, 0x7d, 0x97, 0x92, 0x7d, 0x54,
|
0xd2, 0x3b, 0x54, 0xd2, 0xfb, 0xaa, 0xa4, 0xf7, 0xd8, 0x7d, 0x39, 0x0a, 0x2f, 0xdb, 0x5b, 0xd7,
|
0xbd, 0xe6, 0x4d, 0xd7, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x33, 0xa4, 0xff, 0xc0, 0x39, 0x01,
|
0x00, 0x00,
|
}
|
|
func (m *ErrorMsg) 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 *ErrorMsg) MarshalTo(dAtA []byte) (int, error) {
|
var i int
|
_ = i
|
var l int
|
_ = l
|
if m.ErrCode != 0 {
|
dAtA[i] = 0x8
|
i++
|
i = encodeVarintErrorMsg(dAtA, i, uint64(m.ErrCode))
|
}
|
if len(m.ErrString) > 0 {
|
dAtA[i] = 0x12
|
i++
|
i = encodeVarintErrorMsg(dAtA, i, uint64(len(m.ErrString)))
|
i += copy(dAtA[i:], m.ErrString)
|
}
|
return i, nil
|
}
|
|
func encodeVarintErrorMsg(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 *ErrorMsg) Size() (n int) {
|
if m == nil {
|
return 0
|
}
|
var l int
|
_ = l
|
if m.ErrCode != 0 {
|
n += 1 + sovErrorMsg(uint64(m.ErrCode))
|
}
|
l = len(m.ErrString)
|
if l > 0 {
|
n += 1 + l + sovErrorMsg(uint64(l))
|
}
|
return n
|
}
|
|
func sovErrorMsg(x uint64) (n int) {
|
return (math_bits.Len64(x|1) + 6) / 7
|
}
|
func sozErrorMsg(x uint64) (n int) {
|
return sovErrorMsg(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
}
|
func (m *ErrorMsg) 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 ErrIntOverflowErrorMsg
|
}
|
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: ErrorMsg: wiretype end group for non-group")
|
}
|
if fieldNum <= 0 {
|
return fmt.Errorf("proto: ErrorMsg: illegal tag %d (wire type %d)", fieldNum, wire)
|
}
|
switch fieldNum {
|
case 1:
|
if wireType != 0 {
|
return fmt.Errorf("proto: wrong wireType = %d for field ErrCode", wireType)
|
}
|
m.ErrCode = 0
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowErrorMsg
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
m.ErrCode |= ErrorCode(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
case 2:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field ErrString", wireType)
|
}
|
var byteLen int
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowErrorMsg
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
byteLen |= int(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
if byteLen < 0 {
|
return ErrInvalidLengthErrorMsg
|
}
|
postIndex := iNdEx + byteLen
|
if postIndex < 0 {
|
return ErrInvalidLengthErrorMsg
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.ErrString = append(m.ErrString[:0], dAtA[iNdEx:postIndex]...)
|
if m.ErrString == nil {
|
m.ErrString = []byte{}
|
}
|
iNdEx = postIndex
|
default:
|
iNdEx = preIndex
|
skippy, err := skipErrorMsg(dAtA[iNdEx:])
|
if err != nil {
|
return err
|
}
|
if skippy < 0 {
|
return ErrInvalidLengthErrorMsg
|
}
|
if (iNdEx + skippy) < 0 {
|
return ErrInvalidLengthErrorMsg
|
}
|
if (iNdEx + skippy) > l {
|
return io.ErrUnexpectedEOF
|
}
|
iNdEx += skippy
|
}
|
}
|
|
if iNdEx > l {
|
return io.ErrUnexpectedEOF
|
}
|
return nil
|
}
|
func skipErrorMsg(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, ErrIntOverflowErrorMsg
|
}
|
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, ErrIntOverflowErrorMsg
|
}
|
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, ErrIntOverflowErrorMsg
|
}
|
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, ErrInvalidLengthErrorMsg
|
}
|
iNdEx += length
|
if iNdEx < 0 {
|
return 0, ErrInvalidLengthErrorMsg
|
}
|
return iNdEx, nil
|
case 3:
|
for {
|
var innerWire uint64
|
var start int = iNdEx
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return 0, ErrIntOverflowErrorMsg
|
}
|
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 := skipErrorMsg(dAtA[start:])
|
if err != nil {
|
return 0, err
|
}
|
iNdEx = start + next
|
if iNdEx < 0 {
|
return 0, ErrInvalidLengthErrorMsg
|
}
|
}
|
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 (
|
ErrInvalidLengthErrorMsg = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrIntOverflowErrorMsg = fmt.Errorf("proto: integer overflow")
|
)
|