New file |
| | |
| | | // Code generated by protoc-gen-gogo. DO NOT EDIT. |
| | | // source: rule.proto |
| | | |
| | | package protomsg |
| | | |
| | | 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 RuleTargets struct { |
| | | Target []*Target `protobuf:"bytes,1,rep,name=target,proto3" json:"target,omitempty"` |
| | | } |
| | | |
| | | func (m *RuleTargets) Reset() { *m = RuleTargets{} } |
| | | func (m *RuleTargets) String() string { return proto.CompactTextString(m) } |
| | | func (*RuleTargets) ProtoMessage() {} |
| | | func (*RuleTargets) Descriptor() ([]byte, []int) { |
| | | return fileDescriptor_07e8e0fa338d4596, []int{0} |
| | | } |
| | | func (m *RuleTargets) XXX_Unmarshal(b []byte) error { |
| | | return m.Unmarshal(b) |
| | | } |
| | | func (m *RuleTargets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| | | if deterministic { |
| | | return xxx_messageInfo_RuleTargets.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 *RuleTargets) XXX_Merge(src proto.Message) { |
| | | xxx_messageInfo_RuleTargets.Merge(m, src) |
| | | } |
| | | func (m *RuleTargets) XXX_Size() int { |
| | | return m.Size() |
| | | } |
| | | func (m *RuleTargets) XXX_DiscardUnknown() { |
| | | xxx_messageInfo_RuleTargets.DiscardUnknown(m) |
| | | } |
| | | |
| | | var xxx_messageInfo_RuleTargets proto.InternalMessageInfo |
| | | |
| | | func (m *RuleTargets) GetTarget() []*Target { |
| | | if m != nil { |
| | | return m.Target |
| | | } |
| | | return nil |
| | | } |
| | | |
| | | type RuleSOResult struct { |
| | | IsEvent bool `protobuf:"varint,1,opt,name=IsEvent,proto3" json:"IsEvent,omitempty"` |
| | | IsEndRecord bool `protobuf:"varint,2,opt,name=IsEndRecord,proto3" json:"IsEndRecord,omitempty"` |
| | | Targets []*RuleSoTarget `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets,omitempty"` |
| | | CacheImage *Image `protobuf:"bytes,4,opt,name=cacheImage,proto3" json:"cacheImage,omitempty"` |
| | | SoType string `protobuf:"bytes,5,opt,name=soType,proto3" json:"soType,omitempty"` |
| | | } |
| | | |
| | | func (m *RuleSOResult) Reset() { *m = RuleSOResult{} } |
| | | func (m *RuleSOResult) String() string { return proto.CompactTextString(m) } |
| | | func (*RuleSOResult) ProtoMessage() {} |
| | | func (*RuleSOResult) Descriptor() ([]byte, []int) { |
| | | return fileDescriptor_07e8e0fa338d4596, []int{1} |
| | | } |
| | | func (m *RuleSOResult) XXX_Unmarshal(b []byte) error { |
| | | return m.Unmarshal(b) |
| | | } |
| | | func (m *RuleSOResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| | | if deterministic { |
| | | return xxx_messageInfo_RuleSOResult.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 *RuleSOResult) XXX_Merge(src proto.Message) { |
| | | xxx_messageInfo_RuleSOResult.Merge(m, src) |
| | | } |
| | | func (m *RuleSOResult) XXX_Size() int { |
| | | return m.Size() |
| | | } |
| | | func (m *RuleSOResult) XXX_DiscardUnknown() { |
| | | xxx_messageInfo_RuleSOResult.DiscardUnknown(m) |
| | | } |
| | | |
| | | var xxx_messageInfo_RuleSOResult proto.InternalMessageInfo |
| | | |
| | | func (m *RuleSOResult) GetIsEvent() bool { |
| | | if m != nil { |
| | | return m.IsEvent |
| | | } |
| | | return false |
| | | } |
| | | |
| | | func (m *RuleSOResult) GetIsEndRecord() bool { |
| | | if m != nil { |
| | | return m.IsEndRecord |
| | | } |
| | | return false |
| | | } |
| | | |
| | | func (m *RuleSOResult) GetTargets() []*RuleSoTarget { |
| | | if m != nil { |
| | | return m.Targets |
| | | } |
| | | return nil |
| | | } |
| | | |
| | | func (m *RuleSOResult) GetCacheImage() *Image { |
| | | if m != nil { |
| | | return m.CacheImage |
| | | } |
| | | return nil |
| | | } |
| | | |
| | | func (m *RuleSOResult) GetSoType() string { |
| | | if m != nil { |
| | | return m.SoType |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | type RuleSoTarget struct { |
| | | SrcTarget *Target `protobuf:"bytes,1,opt,name=srcTarget,proto3" json:"srcTarget,omitempty"` |
| | | AreaId string `protobuf:"bytes,2,opt,name=areaId,proto3" json:"areaId,omitempty"` |
| | | AreaName string `protobuf:"bytes,3,opt,name=areaName,proto3" json:"areaName,omitempty"` |
| | | BelongsTargetID string `protobuf:"bytes,4,opt,name=belongsTargetID,proto3" json:"belongsTargetID,omitempty"` |
| | | CompDbInfo []*RuleBaseCompareInfo `protobuf:"bytes,5,rep,name=compDbInfo,proto3" json:"compDbInfo,omitempty"` |
| | | ImageId int64 `protobuf:"varint,6,opt,name=imageId,proto3" json:"imageId,omitempty"` |
| | | } |
| | | |
| | | func (m *RuleSoTarget) Reset() { *m = RuleSoTarget{} } |
| | | func (m *RuleSoTarget) String() string { return proto.CompactTextString(m) } |
| | | func (*RuleSoTarget) ProtoMessage() {} |
| | | func (*RuleSoTarget) Descriptor() ([]byte, []int) { |
| | | return fileDescriptor_07e8e0fa338d4596, []int{2} |
| | | } |
| | | func (m *RuleSoTarget) XXX_Unmarshal(b []byte) error { |
| | | return m.Unmarshal(b) |
| | | } |
| | | func (m *RuleSoTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| | | if deterministic { |
| | | return xxx_messageInfo_RuleSoTarget.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 *RuleSoTarget) XXX_Merge(src proto.Message) { |
| | | xxx_messageInfo_RuleSoTarget.Merge(m, src) |
| | | } |
| | | func (m *RuleSoTarget) XXX_Size() int { |
| | | return m.Size() |
| | | } |
| | | func (m *RuleSoTarget) XXX_DiscardUnknown() { |
| | | xxx_messageInfo_RuleSoTarget.DiscardUnknown(m) |
| | | } |
| | | |
| | | var xxx_messageInfo_RuleSoTarget proto.InternalMessageInfo |
| | | |
| | | func (m *RuleSoTarget) GetSrcTarget() *Target { |
| | | if m != nil { |
| | | return m.SrcTarget |
| | | } |
| | | return nil |
| | | } |
| | | |
| | | func (m *RuleSoTarget) GetAreaId() string { |
| | | if m != nil { |
| | | return m.AreaId |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleSoTarget) GetAreaName() string { |
| | | if m != nil { |
| | | return m.AreaName |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleSoTarget) GetBelongsTargetID() string { |
| | | if m != nil { |
| | | return m.BelongsTargetID |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleSoTarget) GetCompDbInfo() []*RuleBaseCompareInfo { |
| | | if m != nil { |
| | | return m.CompDbInfo |
| | | } |
| | | return nil |
| | | } |
| | | |
| | | func (m *RuleSoTarget) GetImageId() int64 { |
| | | if m != nil { |
| | | return m.ImageId |
| | | } |
| | | return 0 |
| | | } |
| | | |
| | | type RuleBaseCompareInfo struct { |
| | | TableId string `protobuf:"bytes,1,opt,name=TableId,proto3" json:"TableId,omitempty"` |
| | | TableName string `protobuf:"bytes,2,opt,name=TableName,proto3" json:"TableName,omitempty"` |
| | | BwType string `protobuf:"bytes,3,opt,name=BwType,proto3" json:"BwType,omitempty"` |
| | | CompareScore string `protobuf:"bytes,4,opt,name=CompareScore,proto3" json:"CompareScore,omitempty"` |
| | | TargetId string `protobuf:"bytes,5,opt,name=TargetId,proto3" json:"TargetId,omitempty"` |
| | | TargetName string `protobuf:"bytes,6,opt,name=TargetName,proto3" json:"TargetName,omitempty"` |
| | | TargetPicUrl string `protobuf:"bytes,7,opt,name=TargetPicUrl,proto3" json:"TargetPicUrl,omitempty"` |
| | | MonitorLevel string `protobuf:"bytes,8,opt,name=MonitorLevel,proto3" json:"MonitorLevel,omitempty"` |
| | | Content string `protobuf:"bytes,9,opt,name=Content,proto3" json:"Content,omitempty"` |
| | | DbLabel string `protobuf:"bytes,10,opt,name=DbLabel,proto3" json:"DbLabel,omitempty"` |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) Reset() { *m = RuleBaseCompareInfo{} } |
| | | func (m *RuleBaseCompareInfo) String() string { return proto.CompactTextString(m) } |
| | | func (*RuleBaseCompareInfo) ProtoMessage() {} |
| | | func (*RuleBaseCompareInfo) Descriptor() ([]byte, []int) { |
| | | return fileDescriptor_07e8e0fa338d4596, []int{3} |
| | | } |
| | | func (m *RuleBaseCompareInfo) XXX_Unmarshal(b []byte) error { |
| | | return m.Unmarshal(b) |
| | | } |
| | | func (m *RuleBaseCompareInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| | | if deterministic { |
| | | return xxx_messageInfo_RuleBaseCompareInfo.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 *RuleBaseCompareInfo) XXX_Merge(src proto.Message) { |
| | | xxx_messageInfo_RuleBaseCompareInfo.Merge(m, src) |
| | | } |
| | | func (m *RuleBaseCompareInfo) XXX_Size() int { |
| | | return m.Size() |
| | | } |
| | | func (m *RuleBaseCompareInfo) XXX_DiscardUnknown() { |
| | | xxx_messageInfo_RuleBaseCompareInfo.DiscardUnknown(m) |
| | | } |
| | | |
| | | var xxx_messageInfo_RuleBaseCompareInfo proto.InternalMessageInfo |
| | | |
| | | func (m *RuleBaseCompareInfo) GetTableId() string { |
| | | if m != nil { |
| | | return m.TableId |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) GetTableName() string { |
| | | if m != nil { |
| | | return m.TableName |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) GetBwType() string { |
| | | if m != nil { |
| | | return m.BwType |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) GetCompareScore() string { |
| | | if m != nil { |
| | | return m.CompareScore |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) GetTargetId() string { |
| | | if m != nil { |
| | | return m.TargetId |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) GetTargetName() string { |
| | | if m != nil { |
| | | return m.TargetName |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) GetTargetPicUrl() string { |
| | | if m != nil { |
| | | return m.TargetPicUrl |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) GetMonitorLevel() string { |
| | | if m != nil { |
| | | return m.MonitorLevel |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) GetContent() string { |
| | | if m != nil { |
| | | return m.Content |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) GetDbLabel() string { |
| | | if m != nil { |
| | | return m.DbLabel |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func init() { |
| | | proto.RegisterType((*RuleTargets)(nil), "protomsg.RuleTargets") |
| | | proto.RegisterType((*RuleSOResult)(nil), "protomsg.RuleSOResult") |
| | | proto.RegisterType((*RuleSoTarget)(nil), "protomsg.RuleSoTarget") |
| | | proto.RegisterType((*RuleBaseCompareInfo)(nil), "protomsg.RuleBaseCompareInfo") |
| | | } |
| | | |
| | | func init() { proto.RegisterFile("rule.proto", fileDescriptor_07e8e0fa338d4596) } |
| | | |
| | | var fileDescriptor_07e8e0fa338d4596 = []byte{ |
| | | // 477 bytes of a gzipped FileDescriptorProto |
| | | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x4d, 0x6f, 0xd3, 0x40, |
| | | 0x10, 0xcd, 0x36, 0xd4, 0x89, 0x27, 0x95, 0x8a, 0x16, 0xa9, 0x5a, 0x55, 0x60, 0x59, 0x3e, 0xf9, |
| | | 0x14, 0x50, 0x39, 0x70, 0xe2, 0x92, 0xa6, 0x07, 0x4b, 0xe5, 0x43, 0xdb, 0xf0, 0x03, 0xd6, 0xf6, |
| | | 0x10, 0x22, 0x6c, 0x6f, 0xb4, 0xeb, 0x14, 0xf1, 0x2f, 0xf8, 0x4b, 0x1c, 0x90, 0x38, 0xf6, 0xc8, |
| | | 0x11, 0x25, 0xbf, 0x81, 0x3b, 0xda, 0x0f, 0x37, 0x6e, 0x95, 0x53, 0xe6, 0xbd, 0x99, 0x37, 0x93, |
| | | 0xf7, 0xd6, 0x00, 0x6a, 0x53, 0xe1, 0x74, 0xad, 0x64, 0x2b, 0xe9, 0xd8, 0xfe, 0xd4, 0x7a, 0x79, |
| | | 0x1e, 0xea, 0xf2, 0xab, 0x23, 0x93, 0x37, 0x30, 0xe1, 0x9b, 0x0a, 0x17, 0x42, 0x2d, 0xb1, 0xd5, |
| | | 0x34, 0x85, 0xa0, 0xb5, 0x25, 0x23, 0xf1, 0x30, 0x9d, 0x5c, 0x3c, 0x9d, 0x76, 0xa2, 0xa9, 0x1b, |
| | | 0xe1, 0xbe, 0x9f, 0xfc, 0x22, 0x70, 0x62, 0x94, 0x37, 0x1f, 0x38, 0xea, 0x4d, 0xd5, 0x52, 0x06, |
| | | 0xa3, 0x4c, 0x5f, 0xdd, 0x62, 0x63, 0xb4, 0x24, 0x1d, 0xf3, 0x0e, 0xd2, 0x18, 0x26, 0x99, 0xbe, |
| | | 0x6a, 0x4a, 0x8e, 0x85, 0x54, 0x25, 0x3b, 0xb2, 0xdd, 0x3e, 0x45, 0x5f, 0xc1, 0xc8, 0xad, 0xd5, |
| | | 0x6c, 0x68, 0xef, 0x9e, 0xed, 0xef, 0xda, 0x23, 0xd2, 0x5f, 0xef, 0xc6, 0xe8, 0x4b, 0x80, 0x42, |
| | | 0x14, 0x5f, 0x30, 0xab, 0xc5, 0x12, 0xd9, 0x93, 0x98, 0xa4, 0x93, 0x8b, 0xd3, 0xbd, 0xc8, 0xd2, |
| | | 0xbc, 0x37, 0x42, 0xcf, 0x20, 0xd0, 0x72, 0xf1, 0x7d, 0x8d, 0xec, 0x38, 0x26, 0x69, 0xc8, 0x3d, |
| | | 0x4a, 0xfe, 0x75, 0x3e, 0xfc, 0x09, 0x3a, 0x85, 0x50, 0xab, 0x62, 0xd1, 0xa5, 0x40, 0x0e, 0xa6, |
| | | 0xb0, 0x1f, 0x31, 0x8b, 0x85, 0x42, 0x91, 0x39, 0x63, 0x21, 0xf7, 0x88, 0x9e, 0xc3, 0xd8, 0x54, |
| | | 0xef, 0x45, 0x8d, 0x6c, 0x68, 0x3b, 0xf7, 0x98, 0xa6, 0x70, 0x9a, 0x63, 0x25, 0x9b, 0xa5, 0x76, |
| | | 0x4b, 0xb2, 0xb9, 0xb5, 0x10, 0xf2, 0xc7, 0x34, 0x7d, 0x0b, 0x50, 0xc8, 0x7a, 0x3d, 0xcf, 0xb3, |
| | | 0xe6, 0xb3, 0x64, 0xc7, 0x36, 0x9c, 0x17, 0x0f, 0xc3, 0x99, 0x09, 0x8d, 0x97, 0xb2, 0x5e, 0x0b, |
| | | 0x85, 0x66, 0x88, 0xf7, 0x04, 0xe6, 0x51, 0x56, 0xc6, 0x7e, 0x56, 0xb2, 0x20, 0x26, 0xe9, 0x90, |
| | | 0x77, 0x30, 0xf9, 0x79, 0x04, 0xcf, 0x0e, 0xa8, 0x8d, 0x62, 0x21, 0xf2, 0xca, 0x28, 0x88, 0xfd, |
| | | 0x4b, 0x1d, 0xa4, 0xcf, 0x21, 0xb4, 0xa5, 0x75, 0xe4, 0xbc, 0xee, 0x09, 0x13, 0xc3, 0xec, 0x9b, |
| | | 0xcd, 0xd7, 0x99, 0xf5, 0x88, 0x26, 0x70, 0xe2, 0xd7, 0xdf, 0x14, 0x52, 0xa1, 0xf7, 0xf9, 0x80, |
| | | 0x33, 0x51, 0x79, 0xc3, 0xa5, 0x7f, 0x9d, 0x7b, 0x4c, 0x23, 0x00, 0x57, 0xdb, 0xb3, 0x81, 0xed, |
| | | 0xf6, 0x18, 0xb3, 0xdf, 0xa1, 0x8f, 0xab, 0xe2, 0x93, 0xaa, 0xd8, 0xc8, 0xed, 0xef, 0x73, 0x66, |
| | | 0xe6, 0x9d, 0x6c, 0x56, 0xad, 0x54, 0xd7, 0x78, 0x8b, 0x15, 0x1b, 0xbb, 0x99, 0x3e, 0x67, 0x7c, |
| | | 0x5f, 0xca, 0xa6, 0x35, 0x9f, 0x6f, 0xe8, 0x7c, 0x7b, 0x68, 0x3a, 0xf3, 0xfc, 0x5a, 0xe4, 0x58, |
| | | 0x31, 0x70, 0x1d, 0x0f, 0x67, 0xec, 0xf7, 0x36, 0x22, 0x77, 0xdb, 0x88, 0xfc, 0xdd, 0x46, 0xe4, |
| | | 0xc7, 0x2e, 0x1a, 0xdc, 0xed, 0xa2, 0xc1, 0x9f, 0x5d, 0x34, 0xc8, 0x03, 0xfb, 0x42, 0xaf, 0xff, |
| | | 0x07, 0x00, 0x00, 0xff, 0xff, 0x46, 0x24, 0x7f, 0xc3, 0x80, 0x03, 0x00, 0x00, |
| | | } |
| | | |
| | | func (m *RuleTargets) 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 *RuleTargets) MarshalTo(dAtA []byte) (int, error) { |
| | | var i int |
| | | _ = i |
| | | var l int |
| | | _ = l |
| | | if len(m.Target) > 0 { |
| | | for _, msg := range m.Target { |
| | | dAtA[i] = 0xa |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(msg.Size())) |
| | | n, err := msg.MarshalTo(dAtA[i:]) |
| | | if err != nil { |
| | | return 0, err |
| | | } |
| | | i += n |
| | | } |
| | | } |
| | | return i, nil |
| | | } |
| | | |
| | | func (m *RuleSOResult) 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 *RuleSOResult) MarshalTo(dAtA []byte) (int, error) { |
| | | var i int |
| | | _ = i |
| | | var l int |
| | | _ = l |
| | | if m.IsEvent { |
| | | dAtA[i] = 0x8 |
| | | i++ |
| | | if m.IsEvent { |
| | | dAtA[i] = 1 |
| | | } else { |
| | | dAtA[i] = 0 |
| | | } |
| | | i++ |
| | | } |
| | | if m.IsEndRecord { |
| | | dAtA[i] = 0x10 |
| | | i++ |
| | | if m.IsEndRecord { |
| | | dAtA[i] = 1 |
| | | } else { |
| | | dAtA[i] = 0 |
| | | } |
| | | i++ |
| | | } |
| | | if len(m.Targets) > 0 { |
| | | for _, msg := range m.Targets { |
| | | dAtA[i] = 0x1a |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(msg.Size())) |
| | | n, err := msg.MarshalTo(dAtA[i:]) |
| | | if err != nil { |
| | | return 0, err |
| | | } |
| | | i += n |
| | | } |
| | | } |
| | | if m.CacheImage != nil { |
| | | dAtA[i] = 0x22 |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(m.CacheImage.Size())) |
| | | n1, err1 := m.CacheImage.MarshalTo(dAtA[i:]) |
| | | if err1 != nil { |
| | | return 0, err1 |
| | | } |
| | | i += n1 |
| | | } |
| | | if len(m.SoType) > 0 { |
| | | dAtA[i] = 0x2a |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.SoType))) |
| | | i += copy(dAtA[i:], m.SoType) |
| | | } |
| | | return i, nil |
| | | } |
| | | |
| | | func (m *RuleSoTarget) 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 *RuleSoTarget) MarshalTo(dAtA []byte) (int, error) { |
| | | var i int |
| | | _ = i |
| | | var l int |
| | | _ = l |
| | | if m.SrcTarget != nil { |
| | | dAtA[i] = 0xa |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(m.SrcTarget.Size())) |
| | | n2, err2 := m.SrcTarget.MarshalTo(dAtA[i:]) |
| | | if err2 != nil { |
| | | return 0, err2 |
| | | } |
| | | i += n2 |
| | | } |
| | | if len(m.AreaId) > 0 { |
| | | dAtA[i] = 0x12 |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.AreaId))) |
| | | i += copy(dAtA[i:], m.AreaId) |
| | | } |
| | | if len(m.AreaName) > 0 { |
| | | dAtA[i] = 0x1a |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.AreaName))) |
| | | i += copy(dAtA[i:], m.AreaName) |
| | | } |
| | | if len(m.BelongsTargetID) > 0 { |
| | | dAtA[i] = 0x22 |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.BelongsTargetID))) |
| | | i += copy(dAtA[i:], m.BelongsTargetID) |
| | | } |
| | | if len(m.CompDbInfo) > 0 { |
| | | for _, msg := range m.CompDbInfo { |
| | | dAtA[i] = 0x2a |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(msg.Size())) |
| | | n, err := msg.MarshalTo(dAtA[i:]) |
| | | if err != nil { |
| | | return 0, err |
| | | } |
| | | i += n |
| | | } |
| | | } |
| | | if m.ImageId != 0 { |
| | | dAtA[i] = 0x30 |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(m.ImageId)) |
| | | } |
| | | return i, nil |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) 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 *RuleBaseCompareInfo) MarshalTo(dAtA []byte) (int, error) { |
| | | var i int |
| | | _ = i |
| | | var l int |
| | | _ = l |
| | | if len(m.TableId) > 0 { |
| | | dAtA[i] = 0xa |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.TableId))) |
| | | i += copy(dAtA[i:], m.TableId) |
| | | } |
| | | if len(m.TableName) > 0 { |
| | | dAtA[i] = 0x12 |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.TableName))) |
| | | i += copy(dAtA[i:], m.TableName) |
| | | } |
| | | if len(m.BwType) > 0 { |
| | | dAtA[i] = 0x1a |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.BwType))) |
| | | i += copy(dAtA[i:], m.BwType) |
| | | } |
| | | if len(m.CompareScore) > 0 { |
| | | dAtA[i] = 0x22 |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.CompareScore))) |
| | | i += copy(dAtA[i:], m.CompareScore) |
| | | } |
| | | if len(m.TargetId) > 0 { |
| | | dAtA[i] = 0x2a |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.TargetId))) |
| | | i += copy(dAtA[i:], m.TargetId) |
| | | } |
| | | if len(m.TargetName) > 0 { |
| | | dAtA[i] = 0x32 |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.TargetName))) |
| | | i += copy(dAtA[i:], m.TargetName) |
| | | } |
| | | if len(m.TargetPicUrl) > 0 { |
| | | dAtA[i] = 0x3a |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.TargetPicUrl))) |
| | | i += copy(dAtA[i:], m.TargetPicUrl) |
| | | } |
| | | if len(m.MonitorLevel) > 0 { |
| | | dAtA[i] = 0x42 |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.MonitorLevel))) |
| | | i += copy(dAtA[i:], m.MonitorLevel) |
| | | } |
| | | if len(m.Content) > 0 { |
| | | dAtA[i] = 0x4a |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.Content))) |
| | | i += copy(dAtA[i:], m.Content) |
| | | } |
| | | if len(m.DbLabel) > 0 { |
| | | dAtA[i] = 0x52 |
| | | i++ |
| | | i = encodeVarintRule(dAtA, i, uint64(len(m.DbLabel))) |
| | | i += copy(dAtA[i:], m.DbLabel) |
| | | } |
| | | return i, nil |
| | | } |
| | | |
| | | func encodeVarintRule(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 *RuleTargets) Size() (n int) { |
| | | if m == nil { |
| | | return 0 |
| | | } |
| | | var l int |
| | | _ = l |
| | | if len(m.Target) > 0 { |
| | | for _, e := range m.Target { |
| | | l = e.Size() |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | } |
| | | return n |
| | | } |
| | | |
| | | func (m *RuleSOResult) Size() (n int) { |
| | | if m == nil { |
| | | return 0 |
| | | } |
| | | var l int |
| | | _ = l |
| | | if m.IsEvent { |
| | | n += 2 |
| | | } |
| | | if m.IsEndRecord { |
| | | n += 2 |
| | | } |
| | | if len(m.Targets) > 0 { |
| | | for _, e := range m.Targets { |
| | | l = e.Size() |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | } |
| | | if m.CacheImage != nil { |
| | | l = m.CacheImage.Size() |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.SoType) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | return n |
| | | } |
| | | |
| | | func (m *RuleSoTarget) Size() (n int) { |
| | | if m == nil { |
| | | return 0 |
| | | } |
| | | var l int |
| | | _ = l |
| | | if m.SrcTarget != nil { |
| | | l = m.SrcTarget.Size() |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.AreaId) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.AreaName) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.BelongsTargetID) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | if len(m.CompDbInfo) > 0 { |
| | | for _, e := range m.CompDbInfo { |
| | | l = e.Size() |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | } |
| | | if m.ImageId != 0 { |
| | | n += 1 + sovRule(uint64(m.ImageId)) |
| | | } |
| | | return n |
| | | } |
| | | |
| | | func (m *RuleBaseCompareInfo) Size() (n int) { |
| | | if m == nil { |
| | | return 0 |
| | | } |
| | | var l int |
| | | _ = l |
| | | l = len(m.TableId) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.TableName) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.BwType) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.CompareScore) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.TargetId) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.TargetName) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.TargetPicUrl) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.MonitorLevel) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.Content) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | l = len(m.DbLabel) |
| | | if l > 0 { |
| | | n += 1 + l + sovRule(uint64(l)) |
| | | } |
| | | return n |
| | | } |
| | | |
| | | func sovRule(x uint64) (n int) { |
| | | return (math_bits.Len64(x|1) + 6) / 7 |
| | | } |
| | | func sozRule(x uint64) (n int) { |
| | | return sovRule(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| | | } |
| | | func (m *RuleTargets) 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 ErrIntOverflowRule |
| | | } |
| | | 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: RuleTargets: wiretype end group for non-group") |
| | | } |
| | | if fieldNum <= 0 { |
| | | return fmt.Errorf("proto: RuleTargets: illegal tag %d (wire type %d)", fieldNum, wire) |
| | | } |
| | | switch fieldNum { |
| | | case 1: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) |
| | | } |
| | | var msglen int |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | if iNdEx >= l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | b := dAtA[iNdEx] |
| | | iNdEx++ |
| | | msglen |= int(b&0x7F) << shift |
| | | if b < 0x80 { |
| | | break |
| | | } |
| | | } |
| | | if msglen < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + msglen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.Target = append(m.Target, &Target{}) |
| | | if err := m.Target[len(m.Target)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| | | return err |
| | | } |
| | | iNdEx = postIndex |
| | | default: |
| | | iNdEx = preIndex |
| | | skippy, err := skipRule(dAtA[iNdEx:]) |
| | | if err != nil { |
| | | return err |
| | | } |
| | | if skippy < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if (iNdEx + skippy) < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if (iNdEx + skippy) > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | iNdEx += skippy |
| | | } |
| | | } |
| | | |
| | | if iNdEx > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | return nil |
| | | } |
| | | func (m *RuleSOResult) 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 ErrIntOverflowRule |
| | | } |
| | | 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: RuleSOResult: wiretype end group for non-group") |
| | | } |
| | | if fieldNum <= 0 { |
| | | return fmt.Errorf("proto: RuleSOResult: illegal tag %d (wire type %d)", fieldNum, wire) |
| | | } |
| | | switch fieldNum { |
| | | case 1: |
| | | if wireType != 0 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field IsEvent", wireType) |
| | | } |
| | | var v int |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | if iNdEx >= l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | b := dAtA[iNdEx] |
| | | iNdEx++ |
| | | v |= int(b&0x7F) << shift |
| | | if b < 0x80 { |
| | | break |
| | | } |
| | | } |
| | | m.IsEvent = bool(v != 0) |
| | | case 2: |
| | | if wireType != 0 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field IsEndRecord", wireType) |
| | | } |
| | | var v int |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | if iNdEx >= l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | b := dAtA[iNdEx] |
| | | iNdEx++ |
| | | v |= int(b&0x7F) << shift |
| | | if b < 0x80 { |
| | | break |
| | | } |
| | | } |
| | | m.IsEndRecord = bool(v != 0) |
| | | case 3: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field Targets", wireType) |
| | | } |
| | | var msglen int |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | if iNdEx >= l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | b := dAtA[iNdEx] |
| | | iNdEx++ |
| | | msglen |= int(b&0x7F) << shift |
| | | if b < 0x80 { |
| | | break |
| | | } |
| | | } |
| | | if msglen < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + msglen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.Targets = append(m.Targets, &RuleSoTarget{}) |
| | | if err := m.Targets[len(m.Targets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| | | return err |
| | | } |
| | | iNdEx = postIndex |
| | | case 4: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field CacheImage", wireType) |
| | | } |
| | | var msglen int |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | if iNdEx >= l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | b := dAtA[iNdEx] |
| | | iNdEx++ |
| | | msglen |= int(b&0x7F) << shift |
| | | if b < 0x80 { |
| | | break |
| | | } |
| | | } |
| | | if msglen < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + msglen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | if m.CacheImage == nil { |
| | | m.CacheImage = &Image{} |
| | | } |
| | | if err := m.CacheImage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| | | return err |
| | | } |
| | | iNdEx = postIndex |
| | | case 5: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field SoType", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.SoType = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | default: |
| | | iNdEx = preIndex |
| | | skippy, err := skipRule(dAtA[iNdEx:]) |
| | | if err != nil { |
| | | return err |
| | | } |
| | | if skippy < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if (iNdEx + skippy) < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if (iNdEx + skippy) > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | iNdEx += skippy |
| | | } |
| | | } |
| | | |
| | | if iNdEx > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | return nil |
| | | } |
| | | func (m *RuleSoTarget) 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 ErrIntOverflowRule |
| | | } |
| | | 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: RuleSoTarget: wiretype end group for non-group") |
| | | } |
| | | if fieldNum <= 0 { |
| | | return fmt.Errorf("proto: RuleSoTarget: illegal tag %d (wire type %d)", fieldNum, wire) |
| | | } |
| | | switch fieldNum { |
| | | case 1: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field SrcTarget", wireType) |
| | | } |
| | | var msglen int |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | if iNdEx >= l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | b := dAtA[iNdEx] |
| | | iNdEx++ |
| | | msglen |= int(b&0x7F) << shift |
| | | if b < 0x80 { |
| | | break |
| | | } |
| | | } |
| | | if msglen < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + msglen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | if m.SrcTarget == nil { |
| | | m.SrcTarget = &Target{} |
| | | } |
| | | if err := m.SrcTarget.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| | | return err |
| | | } |
| | | iNdEx = postIndex |
| | | case 2: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field AreaId", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.AreaId = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 3: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field AreaName", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.AreaName = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 4: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field BelongsTargetID", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.BelongsTargetID = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 5: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field CompDbInfo", wireType) |
| | | } |
| | | var msglen int |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | if iNdEx >= l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | b := dAtA[iNdEx] |
| | | iNdEx++ |
| | | msglen |= int(b&0x7F) << shift |
| | | if b < 0x80 { |
| | | break |
| | | } |
| | | } |
| | | if msglen < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + msglen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.CompDbInfo = append(m.CompDbInfo, &RuleBaseCompareInfo{}) |
| | | if err := m.CompDbInfo[len(m.CompDbInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| | | return err |
| | | } |
| | | iNdEx = postIndex |
| | | case 6: |
| | | if wireType != 0 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field ImageId", wireType) |
| | | } |
| | | m.ImageId = 0 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | if iNdEx >= l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | b := dAtA[iNdEx] |
| | | iNdEx++ |
| | | m.ImageId |= int64(b&0x7F) << shift |
| | | if b < 0x80 { |
| | | break |
| | | } |
| | | } |
| | | default: |
| | | iNdEx = preIndex |
| | | skippy, err := skipRule(dAtA[iNdEx:]) |
| | | if err != nil { |
| | | return err |
| | | } |
| | | if skippy < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if (iNdEx + skippy) < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if (iNdEx + skippy) > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | iNdEx += skippy |
| | | } |
| | | } |
| | | |
| | | if iNdEx > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | return nil |
| | | } |
| | | func (m *RuleBaseCompareInfo) 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 ErrIntOverflowRule |
| | | } |
| | | 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: RuleBaseCompareInfo: wiretype end group for non-group") |
| | | } |
| | | if fieldNum <= 0 { |
| | | return fmt.Errorf("proto: RuleBaseCompareInfo: illegal tag %d (wire type %d)", fieldNum, wire) |
| | | } |
| | | switch fieldNum { |
| | | case 1: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field TableId", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.TableId = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 2: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.TableName = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 3: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field BwType", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.BwType = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 4: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field CompareScore", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.CompareScore = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 5: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field TargetId", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.TargetId = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 6: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field TargetName", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.TargetName = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 7: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field TargetPicUrl", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.TargetPicUrl = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 8: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field MonitorLevel", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.MonitorLevel = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 9: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.Content = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | case 10: |
| | | if wireType != 2 { |
| | | return fmt.Errorf("proto: wrong wireType = %d for field DbLabel", wireType) |
| | | } |
| | | var stringLen uint64 |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return ErrIntOverflowRule |
| | | } |
| | | 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 ErrInvalidLengthRule |
| | | } |
| | | postIndex := iNdEx + intStringLen |
| | | if postIndex < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if postIndex > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | m.DbLabel = string(dAtA[iNdEx:postIndex]) |
| | | iNdEx = postIndex |
| | | default: |
| | | iNdEx = preIndex |
| | | skippy, err := skipRule(dAtA[iNdEx:]) |
| | | if err != nil { |
| | | return err |
| | | } |
| | | if skippy < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if (iNdEx + skippy) < 0 { |
| | | return ErrInvalidLengthRule |
| | | } |
| | | if (iNdEx + skippy) > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | iNdEx += skippy |
| | | } |
| | | } |
| | | |
| | | if iNdEx > l { |
| | | return io.ErrUnexpectedEOF |
| | | } |
| | | return nil |
| | | } |
| | | func skipRule(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, ErrIntOverflowRule |
| | | } |
| | | 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, ErrIntOverflowRule |
| | | } |
| | | 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, ErrIntOverflowRule |
| | | } |
| | | 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, ErrInvalidLengthRule |
| | | } |
| | | iNdEx += length |
| | | if iNdEx < 0 { |
| | | return 0, ErrInvalidLengthRule |
| | | } |
| | | return iNdEx, nil |
| | | case 3: |
| | | for { |
| | | var innerWire uint64 |
| | | var start int = iNdEx |
| | | for shift := uint(0); ; shift += 7 { |
| | | if shift >= 64 { |
| | | return 0, ErrIntOverflowRule |
| | | } |
| | | 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 := skipRule(dAtA[start:]) |
| | | if err != nil { |
| | | return 0, err |
| | | } |
| | | iNdEx = start + next |
| | | if iNdEx < 0 { |
| | | return 0, ErrInvalidLengthRule |
| | | } |
| | | } |
| | | 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 ( |
| | | ErrInvalidLengthRule = fmt.Errorf("proto: negative length found during unmarshaling") |
| | | ErrIntOverflowRule = fmt.Errorf("proto: integer overflow") |
| | | ) |