// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
// source: sdk.proto
|
|
package protomsg
|
|
import (
|
fmt "fmt"
|
proto "github.com/gogo/protobuf/proto"
|
io "io"
|
math "math"
|
)
|
|
// 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
|
|
// Image ipc struct
|
type Image struct {
|
Width int32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
|
Height int32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
|
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
Timestamp string `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
Id int64 `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty"`
|
Cid string `protobuf:"bytes,6,opt,name=cid,proto3" json:"cid,omitempty"`
|
Cname string `protobuf:"bytes,7,opt,name=cname,proto3" json:"cname,omitempty"`
|
}
|
|
func (m *Image) Reset() { *m = Image{} }
|
func (m *Image) String() string { return proto.CompactTextString(m) }
|
func (*Image) ProtoMessage() {}
|
func (*Image) Descriptor() ([]byte, []int) {
|
return fileDescriptor_70decb0fb6f436df, []int{0}
|
}
|
func (m *Image) XXX_Unmarshal(b []byte) error {
|
return m.Unmarshal(b)
|
}
|
func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
if deterministic {
|
return xxx_messageInfo_Image.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 *Image) XXX_Merge(src proto.Message) {
|
xxx_messageInfo_Image.Merge(m, src)
|
}
|
func (m *Image) XXX_Size() int {
|
return m.Size()
|
}
|
func (m *Image) XXX_DiscardUnknown() {
|
xxx_messageInfo_Image.DiscardUnknown(m)
|
}
|
|
var xxx_messageInfo_Image proto.InternalMessageInfo
|
|
func (m *Image) GetWidth() int32 {
|
if m != nil {
|
return m.Width
|
}
|
return 0
|
}
|
|
func (m *Image) GetHeight() int32 {
|
if m != nil {
|
return m.Height
|
}
|
return 0
|
}
|
|
func (m *Image) GetData() []byte {
|
if m != nil {
|
return m.Data
|
}
|
return nil
|
}
|
|
func (m *Image) GetTimestamp() string {
|
if m != nil {
|
return m.Timestamp
|
}
|
return ""
|
}
|
|
func (m *Image) GetId() int64 {
|
if m != nil {
|
return m.Id
|
}
|
return 0
|
}
|
|
func (m *Image) GetCid() string {
|
if m != nil {
|
return m.Cid
|
}
|
return ""
|
}
|
|
func (m *Image) GetCname() string {
|
if m != nil {
|
return m.Cname
|
}
|
return ""
|
}
|
|
type Target struct {
|
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
|
Confidence int32 `protobuf:"varint,3,opt,name=confidence,proto3" json:"confidence,omitempty"`
|
Rect *Rect `protobuf:"bytes,4,opt,name=rect,proto3" json:"rect,omitempty"`
|
Feature []byte `protobuf:"bytes,5,opt,name=feature,proto3" json:"feature,omitempty"`
|
Attribute string `protobuf:"bytes,6,opt,name=attribute,proto3" json:"attribute,omitempty"`
|
}
|
|
func (m *Target) Reset() { *m = Target{} }
|
func (m *Target) String() string { return proto.CompactTextString(m) }
|
func (*Target) ProtoMessage() {}
|
func (*Target) Descriptor() ([]byte, []int) {
|
return fileDescriptor_70decb0fb6f436df, []int{1}
|
}
|
func (m *Target) XXX_Unmarshal(b []byte) error {
|
return m.Unmarshal(b)
|
}
|
func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
if deterministic {
|
return xxx_messageInfo_Target.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 *Target) XXX_Merge(src proto.Message) {
|
xxx_messageInfo_Target.Merge(m, src)
|
}
|
func (m *Target) XXX_Size() int {
|
return m.Size()
|
}
|
func (m *Target) XXX_DiscardUnknown() {
|
xxx_messageInfo_Target.DiscardUnknown(m)
|
}
|
|
var xxx_messageInfo_Target proto.InternalMessageInfo
|
|
func (m *Target) GetId() uint64 {
|
if m != nil {
|
return m.Id
|
}
|
return 0
|
}
|
|
func (m *Target) GetType() string {
|
if m != nil {
|
return m.Type
|
}
|
return ""
|
}
|
|
func (m *Target) GetConfidence() int32 {
|
if m != nil {
|
return m.Confidence
|
}
|
return 0
|
}
|
|
func (m *Target) GetRect() *Rect {
|
if m != nil {
|
return m.Rect
|
}
|
return nil
|
}
|
|
func (m *Target) GetFeature() []byte {
|
if m != nil {
|
return m.Feature
|
}
|
return nil
|
}
|
|
func (m *Target) GetAttribute() string {
|
if m != nil {
|
return m.Attribute
|
}
|
return ""
|
}
|
|
type NewSDKMessage struct {
|
SdkID string `protobuf:"bytes,1,opt,name=sdkID,proto3" json:"sdkID,omitempty"`
|
SdkType string `protobuf:"bytes,2,opt,name=sdkType,proto3" json:"sdkType,omitempty"`
|
SdkName string `protobuf:"bytes,3,opt,name=sdkName,proto3" json:"sdkName,omitempty"`
|
Target []*Target `protobuf:"bytes,4,rep,name=target,proto3" json:"target,omitempty"`
|
Timestamp string `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
}
|
|
func (m *NewSDKMessage) Reset() { *m = NewSDKMessage{} }
|
func (m *NewSDKMessage) String() string { return proto.CompactTextString(m) }
|
func (*NewSDKMessage) ProtoMessage() {}
|
func (*NewSDKMessage) Descriptor() ([]byte, []int) {
|
return fileDescriptor_70decb0fb6f436df, []int{2}
|
}
|
func (m *NewSDKMessage) XXX_Unmarshal(b []byte) error {
|
return m.Unmarshal(b)
|
}
|
func (m *NewSDKMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
if deterministic {
|
return xxx_messageInfo_NewSDKMessage.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 *NewSDKMessage) XXX_Merge(src proto.Message) {
|
xxx_messageInfo_NewSDKMessage.Merge(m, src)
|
}
|
func (m *NewSDKMessage) XXX_Size() int {
|
return m.Size()
|
}
|
func (m *NewSDKMessage) XXX_DiscardUnknown() {
|
xxx_messageInfo_NewSDKMessage.DiscardUnknown(m)
|
}
|
|
var xxx_messageInfo_NewSDKMessage proto.InternalMessageInfo
|
|
func (m *NewSDKMessage) GetSdkID() string {
|
if m != nil {
|
return m.SdkID
|
}
|
return ""
|
}
|
|
func (m *NewSDKMessage) GetSdkType() string {
|
if m != nil {
|
return m.SdkType
|
}
|
return ""
|
}
|
|
func (m *NewSDKMessage) GetSdkName() string {
|
if m != nil {
|
return m.SdkName
|
}
|
return ""
|
}
|
|
func (m *NewSDKMessage) GetTarget() []*Target {
|
if m != nil {
|
return m.Target
|
}
|
return nil
|
}
|
|
func (m *NewSDKMessage) GetTimestamp() string {
|
if m != nil {
|
return m.Timestamp
|
}
|
return ""
|
}
|
|
type NewRuleMessage struct {
|
DataType string `protobuf:"bytes,1,opt,name=dataType,proto3" json:"dataType,omitempty"`
|
HandleTrack string `protobuf:"bytes,2,opt,name=handleTrack,proto3" json:"handleTrack,omitempty"`
|
Message []*NewSDKMessage `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"`
|
}
|
|
func (m *NewRuleMessage) Reset() { *m = NewRuleMessage{} }
|
func (m *NewRuleMessage) String() string { return proto.CompactTextString(m) }
|
func (*NewRuleMessage) ProtoMessage() {}
|
func (*NewRuleMessage) Descriptor() ([]byte, []int) {
|
return fileDescriptor_70decb0fb6f436df, []int{3}
|
}
|
func (m *NewRuleMessage) XXX_Unmarshal(b []byte) error {
|
return m.Unmarshal(b)
|
}
|
func (m *NewRuleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
if deterministic {
|
return xxx_messageInfo_NewRuleMessage.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 *NewRuleMessage) XXX_Merge(src proto.Message) {
|
xxx_messageInfo_NewRuleMessage.Merge(m, src)
|
}
|
func (m *NewRuleMessage) XXX_Size() int {
|
return m.Size()
|
}
|
func (m *NewRuleMessage) XXX_DiscardUnknown() {
|
xxx_messageInfo_NewRuleMessage.DiscardUnknown(m)
|
}
|
|
var xxx_messageInfo_NewRuleMessage proto.InternalMessageInfo
|
|
func (m *NewRuleMessage) GetDataType() string {
|
if m != nil {
|
return m.DataType
|
}
|
return ""
|
}
|
|
func (m *NewRuleMessage) GetHandleTrack() string {
|
if m != nil {
|
return m.HandleTrack
|
}
|
return ""
|
}
|
|
func (m *NewRuleMessage) GetMessage() []*NewSDKMessage {
|
if m != nil {
|
return m.Message
|
}
|
return nil
|
}
|
|
func init() {
|
proto.RegisterType((*Image)(nil), "protomsg.Image")
|
proto.RegisterType((*Target)(nil), "protomsg.Target")
|
proto.RegisterType((*NewSDKMessage)(nil), "protomsg.NewSDKMessage")
|
proto.RegisterType((*NewRuleMessage)(nil), "protomsg.NewRuleMessage")
|
}
|
|
func init() { proto.RegisterFile("sdk.proto", fileDescriptor_70decb0fb6f436df) }
|
|
var fileDescriptor_70decb0fb6f436df = []byte{
|
// 421 bytes of a gzipped FileDescriptorProto
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xcf, 0x6e, 0xd3, 0x40,
|
0x10, 0xc6, 0xb3, 0xf1, 0x9f, 0xd4, 0x93, 0x12, 0x55, 0x2b, 0x04, 0xab, 0x0a, 0x59, 0x96, 0x4f,
|
0x3e, 0x45, 0xa2, 0xbc, 0x01, 0xea, 0xa5, 0x42, 0xe4, 0xb0, 0xe4, 0x05, 0x36, 0xde, 0x69, 0xb2,
|
0x4a, 0xed, 0x44, 0xde, 0x8d, 0x22, 0x8e, 0xbc, 0x01, 0x6f, 0x80, 0xb8, 0xf1, 0x28, 0x1c, 0x7b,
|
0xe4, 0x88, 0x92, 0x17, 0x41, 0x3b, 0xb6, 0xeb, 0x96, 0x93, 0xe7, 0xfb, 0x66, 0x3c, 0xfa, 0xed,
|
0x37, 0x90, 0x58, 0xbd, 0x9d, 0xef, 0x9b, 0x9d, 0xdb, 0xf1, 0x0b, 0xfa, 0x54, 0x76, 0x7d, 0x0d,
|
0x2b, 0x65, 0xb1, 0x75, 0xf3, 0x1f, 0x0c, 0xa2, 0xbb, 0x4a, 0xad, 0x91, 0xbf, 0x86, 0xe8, 0x68,
|
0xb4, 0xdb, 0x08, 0x96, 0xb1, 0x22, 0x92, 0xad, 0xe0, 0x6f, 0x20, 0xde, 0xa0, 0x59, 0x6f, 0x9c,
|
0x18, 0x93, 0xdd, 0x29, 0xce, 0x21, 0xd4, 0xca, 0x29, 0x11, 0x64, 0xac, 0xb8, 0x94, 0x54, 0xf3,
|
0x77, 0x90, 0x38, 0x53, 0xa1, 0x75, 0xaa, 0xda, 0x8b, 0x30, 0x63, 0x45, 0x22, 0x07, 0x83, 0xcf,
|
0x60, 0x6c, 0xb4, 0x88, 0x32, 0x56, 0x04, 0x72, 0x6c, 0x34, 0xbf, 0x82, 0xa0, 0x34, 0x5a, 0xc4,
|
0x34, 0xe7, 0x4b, 0x4f, 0x50, 0xd6, 0xaa, 0x42, 0x31, 0x21, 0xaf, 0x15, 0xf9, 0x2f, 0x06, 0xf1,
|
0x52, 0x35, 0x6b, 0x74, 0xdd, 0x0a, 0xcf, 0x17, 0xd2, 0x0a, 0x0e, 0xa1, 0xfb, 0xba, 0x47, 0x42,
|
0x4b, 0x24, 0xd5, 0x3c, 0x05, 0x28, 0x77, 0xf5, 0xbd, 0xd1, 0x58, 0x97, 0x48, 0x78, 0x91, 0x7c,
|
0xe6, 0xf0, 0x1c, 0xc2, 0x06, 0x4b, 0x47, 0x7c, 0xd3, 0x9b, 0xd9, 0xbc, 0x4f, 0x65, 0x2e, 0xb1,
|
0x74, 0x92, 0x7a, 0x5c, 0xc0, 0xe4, 0x1e, 0x95, 0x3b, 0x34, 0x48, 0xbc, 0x97, 0xb2, 0x97, 0xfe,
|
0x89, 0xca, 0xb9, 0xc6, 0xac, 0x0e, 0x0e, 0x3b, 0xf4, 0xc1, 0xc8, 0x7f, 0x32, 0x78, 0xb5, 0xc0,
|
0xe3, 0x97, 0xdb, 0x4f, 0x9f, 0xd1, 0xda, 0x2e, 0x54, 0xab, 0xb7, 0x77, 0xb7, 0x04, 0x9d, 0xc8,
|
0x56, 0xf8, 0xfd, 0x56, 0x6f, 0x97, 0x03, 0x7a, 0x2f, 0xbb, 0xce, 0xc2, 0x87, 0x10, 0x3c, 0x75,
|
0xbc, 0xe4, 0x05, 0xc4, 0x8e, 0x52, 0x10, 0x61, 0x16, 0x14, 0xd3, 0x9b, 0xab, 0x81, 0xbc, 0x4d,
|
0x47, 0x76, 0xfd, 0x97, 0x67, 0x88, 0xfe, 0x3b, 0x43, 0xfe, 0x8d, 0xc1, 0x6c, 0x81, 0x47, 0x79,
|
0x78, 0xc0, 0x1e, 0xf2, 0x1a, 0x2e, 0xfc, 0xfd, 0x88, 0xa7, 0xe5, 0x7c, 0xd2, 0x3c, 0x83, 0xe9,
|
0x46, 0xd5, 0xfa, 0x01, 0x97, 0x8d, 0x2a, 0xb7, 0x1d, 0xee, 0x73, 0x8b, 0xbf, 0x87, 0x49, 0xd5,
|
0x2e, 0x12, 0x01, 0x91, 0xbd, 0x1d, 0xc8, 0x5e, 0x84, 0x21, 0xfb, 0xb9, 0x8f, 0xe2, 0xf7, 0x29,
|
0x65, 0x8f, 0xa7, 0x94, 0xfd, 0x3d, 0xa5, 0xec, 0xfb, 0x39, 0x1d, 0x3d, 0x9e, 0xd3, 0xd1, 0x9f,
|
0x73, 0x3a, 0x5a, 0xc5, 0xf4, 0xeb, 0x87, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc6, 0x02, 0xee,
|
0xf7, 0xb8, 0x02, 0x00, 0x00,
|
}
|
|
func (m *Image) 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 *Image) MarshalTo(dAtA []byte) (int, error) {
|
var i int
|
_ = i
|
var l int
|
_ = l
|
if m.Width != 0 {
|
dAtA[i] = 0x8
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(m.Width))
|
}
|
if m.Height != 0 {
|
dAtA[i] = 0x10
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(m.Height))
|
}
|
if len(m.Data) > 0 {
|
dAtA[i] = 0x1a
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.Data)))
|
i += copy(dAtA[i:], m.Data)
|
}
|
if len(m.Timestamp) > 0 {
|
dAtA[i] = 0x22
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.Timestamp)))
|
i += copy(dAtA[i:], m.Timestamp)
|
}
|
if m.Id != 0 {
|
dAtA[i] = 0x28
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(m.Id))
|
}
|
if len(m.Cid) > 0 {
|
dAtA[i] = 0x32
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.Cid)))
|
i += copy(dAtA[i:], m.Cid)
|
}
|
if len(m.Cname) > 0 {
|
dAtA[i] = 0x3a
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.Cname)))
|
i += copy(dAtA[i:], m.Cname)
|
}
|
return i, nil
|
}
|
|
func (m *Target) 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 *Target) MarshalTo(dAtA []byte) (int, error) {
|
var i int
|
_ = i
|
var l int
|
_ = l
|
if m.Id != 0 {
|
dAtA[i] = 0x8
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(m.Id))
|
}
|
if len(m.Type) > 0 {
|
dAtA[i] = 0x12
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.Type)))
|
i += copy(dAtA[i:], m.Type)
|
}
|
if m.Confidence != 0 {
|
dAtA[i] = 0x18
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(m.Confidence))
|
}
|
if m.Rect != nil {
|
dAtA[i] = 0x22
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(m.Rect.Size()))
|
n1, err1 := m.Rect.MarshalTo(dAtA[i:])
|
if err1 != nil {
|
return 0, err1
|
}
|
i += n1
|
}
|
if len(m.Feature) > 0 {
|
dAtA[i] = 0x2a
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.Feature)))
|
i += copy(dAtA[i:], m.Feature)
|
}
|
if len(m.Attribute) > 0 {
|
dAtA[i] = 0x32
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.Attribute)))
|
i += copy(dAtA[i:], m.Attribute)
|
}
|
return i, nil
|
}
|
|
func (m *NewSDKMessage) 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 *NewSDKMessage) MarshalTo(dAtA []byte) (int, error) {
|
var i int
|
_ = i
|
var l int
|
_ = l
|
if len(m.SdkID) > 0 {
|
dAtA[i] = 0xa
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.SdkID)))
|
i += copy(dAtA[i:], m.SdkID)
|
}
|
if len(m.SdkType) > 0 {
|
dAtA[i] = 0x12
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.SdkType)))
|
i += copy(dAtA[i:], m.SdkType)
|
}
|
if len(m.SdkName) > 0 {
|
dAtA[i] = 0x1a
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.SdkName)))
|
i += copy(dAtA[i:], m.SdkName)
|
}
|
if len(m.Target) > 0 {
|
for _, msg := range m.Target {
|
dAtA[i] = 0x22
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(msg.Size()))
|
n, err := msg.MarshalTo(dAtA[i:])
|
if err != nil {
|
return 0, err
|
}
|
i += n
|
}
|
}
|
if len(m.Timestamp) > 0 {
|
dAtA[i] = 0x2a
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.Timestamp)))
|
i += copy(dAtA[i:], m.Timestamp)
|
}
|
return i, nil
|
}
|
|
func (m *NewRuleMessage) 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 *NewRuleMessage) MarshalTo(dAtA []byte) (int, error) {
|
var i int
|
_ = i
|
var l int
|
_ = l
|
if len(m.DataType) > 0 {
|
dAtA[i] = 0xa
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.DataType)))
|
i += copy(dAtA[i:], m.DataType)
|
}
|
if len(m.HandleTrack) > 0 {
|
dAtA[i] = 0x12
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(len(m.HandleTrack)))
|
i += copy(dAtA[i:], m.HandleTrack)
|
}
|
if len(m.Message) > 0 {
|
for _, msg := range m.Message {
|
dAtA[i] = 0x1a
|
i++
|
i = encodeVarintSdk(dAtA, i, uint64(msg.Size()))
|
n, err := msg.MarshalTo(dAtA[i:])
|
if err != nil {
|
return 0, err
|
}
|
i += n
|
}
|
}
|
return i, nil
|
}
|
|
func encodeVarintSdk(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 *Image) Size() (n int) {
|
if m == nil {
|
return 0
|
}
|
var l int
|
_ = l
|
if m.Width != 0 {
|
n += 1 + sovSdk(uint64(m.Width))
|
}
|
if m.Height != 0 {
|
n += 1 + sovSdk(uint64(m.Height))
|
}
|
l = len(m.Data)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
l = len(m.Timestamp)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
if m.Id != 0 {
|
n += 1 + sovSdk(uint64(m.Id))
|
}
|
l = len(m.Cid)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
l = len(m.Cname)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
return n
|
}
|
|
func (m *Target) Size() (n int) {
|
if m == nil {
|
return 0
|
}
|
var l int
|
_ = l
|
if m.Id != 0 {
|
n += 1 + sovSdk(uint64(m.Id))
|
}
|
l = len(m.Type)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
if m.Confidence != 0 {
|
n += 1 + sovSdk(uint64(m.Confidence))
|
}
|
if m.Rect != nil {
|
l = m.Rect.Size()
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
l = len(m.Feature)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
l = len(m.Attribute)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
return n
|
}
|
|
func (m *NewSDKMessage) Size() (n int) {
|
if m == nil {
|
return 0
|
}
|
var l int
|
_ = l
|
l = len(m.SdkID)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
l = len(m.SdkType)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
l = len(m.SdkName)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
if len(m.Target) > 0 {
|
for _, e := range m.Target {
|
l = e.Size()
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
}
|
l = len(m.Timestamp)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
return n
|
}
|
|
func (m *NewRuleMessage) Size() (n int) {
|
if m == nil {
|
return 0
|
}
|
var l int
|
_ = l
|
l = len(m.DataType)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
l = len(m.HandleTrack)
|
if l > 0 {
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
if len(m.Message) > 0 {
|
for _, e := range m.Message {
|
l = e.Size()
|
n += 1 + l + sovSdk(uint64(l))
|
}
|
}
|
return n
|
}
|
|
func sovSdk(x uint64) (n int) {
|
for {
|
n++
|
x >>= 7
|
if x == 0 {
|
break
|
}
|
}
|
return n
|
}
|
func sozSdk(x uint64) (n int) {
|
return sovSdk(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
}
|
func (m *Image) 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 ErrIntOverflowSdk
|
}
|
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: Image: wiretype end group for non-group")
|
}
|
if fieldNum <= 0 {
|
return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire)
|
}
|
switch fieldNum {
|
case 1:
|
if wireType != 0 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType)
|
}
|
m.Width = 0
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
m.Width |= int32(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
case 2:
|
if wireType != 0 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
|
}
|
m.Height = 0
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
m.Height |= int32(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
case 3:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
}
|
var byteLen int
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
byteLen |= int(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
if byteLen < 0 {
|
return ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + byteLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
|
if m.Data == nil {
|
m.Data = []byte{}
|
}
|
iNdEx = postIndex
|
case 4:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.Timestamp = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
case 5:
|
if wireType != 0 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
}
|
m.Id = 0
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
m.Id |= int64(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
case 6:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.Cid = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
case 7:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Cname", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.Cname = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
default:
|
iNdEx = preIndex
|
skippy, err := skipSdk(dAtA[iNdEx:])
|
if err != nil {
|
return err
|
}
|
if skippy < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if (iNdEx + skippy) < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if (iNdEx + skippy) > l {
|
return io.ErrUnexpectedEOF
|
}
|
iNdEx += skippy
|
}
|
}
|
|
if iNdEx > l {
|
return io.ErrUnexpectedEOF
|
}
|
return nil
|
}
|
func (m *Target) 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 ErrIntOverflowSdk
|
}
|
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: Target: wiretype end group for non-group")
|
}
|
if fieldNum <= 0 {
|
return fmt.Errorf("proto: Target: illegal tag %d (wire type %d)", fieldNum, wire)
|
}
|
switch fieldNum {
|
case 1:
|
if wireType != 0 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
}
|
m.Id = 0
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
m.Id |= uint64(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
case 2:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.Type = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
case 3:
|
if wireType != 0 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Confidence", wireType)
|
}
|
m.Confidence = 0
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
m.Confidence |= int32(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
case 4:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Rect", wireType)
|
}
|
var msglen int
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
msglen |= int(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
if msglen < 0 {
|
return ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + msglen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
if m.Rect == nil {
|
m.Rect = &Rect{}
|
}
|
if err := m.Rect.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
return err
|
}
|
iNdEx = postIndex
|
case 5:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Feature", wireType)
|
}
|
var byteLen int
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
byteLen |= int(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
if byteLen < 0 {
|
return ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + byteLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.Feature = append(m.Feature[:0], dAtA[iNdEx:postIndex]...)
|
if m.Feature == nil {
|
m.Feature = []byte{}
|
}
|
iNdEx = postIndex
|
case 6:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Attribute", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.Attribute = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
default:
|
iNdEx = preIndex
|
skippy, err := skipSdk(dAtA[iNdEx:])
|
if err != nil {
|
return err
|
}
|
if skippy < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if (iNdEx + skippy) < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if (iNdEx + skippy) > l {
|
return io.ErrUnexpectedEOF
|
}
|
iNdEx += skippy
|
}
|
}
|
|
if iNdEx > l {
|
return io.ErrUnexpectedEOF
|
}
|
return nil
|
}
|
func (m *NewSDKMessage) 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 ErrIntOverflowSdk
|
}
|
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: NewSDKMessage: wiretype end group for non-group")
|
}
|
if fieldNum <= 0 {
|
return fmt.Errorf("proto: NewSDKMessage: illegal tag %d (wire type %d)", fieldNum, wire)
|
}
|
switch fieldNum {
|
case 1:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field SdkID", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.SdkID = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
case 2:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field SdkType", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.SdkType = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
case 3:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field SdkName", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.SdkName = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
case 4:
|
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 ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
msglen |= int(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
if msglen < 0 {
|
return ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + msglen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
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
|
case 5:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.Timestamp = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
default:
|
iNdEx = preIndex
|
skippy, err := skipSdk(dAtA[iNdEx:])
|
if err != nil {
|
return err
|
}
|
if skippy < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if (iNdEx + skippy) < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if (iNdEx + skippy) > l {
|
return io.ErrUnexpectedEOF
|
}
|
iNdEx += skippy
|
}
|
}
|
|
if iNdEx > l {
|
return io.ErrUnexpectedEOF
|
}
|
return nil
|
}
|
func (m *NewRuleMessage) 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 ErrIntOverflowSdk
|
}
|
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: NewRuleMessage: wiretype end group for non-group")
|
}
|
if fieldNum <= 0 {
|
return fmt.Errorf("proto: NewRuleMessage: illegal tag %d (wire type %d)", fieldNum, wire)
|
}
|
switch fieldNum {
|
case 1:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.DataType = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
case 2:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field HandleTrack", wireType)
|
}
|
var stringLen uint64
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
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 ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + intStringLen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.HandleTrack = string(dAtA[iNdEx:postIndex])
|
iNdEx = postIndex
|
case 3:
|
if wireType != 2 {
|
return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
|
}
|
var msglen int
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return ErrIntOverflowSdk
|
}
|
if iNdEx >= l {
|
return io.ErrUnexpectedEOF
|
}
|
b := dAtA[iNdEx]
|
iNdEx++
|
msglen |= int(b&0x7F) << shift
|
if b < 0x80 {
|
break
|
}
|
}
|
if msglen < 0 {
|
return ErrInvalidLengthSdk
|
}
|
postIndex := iNdEx + msglen
|
if postIndex < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if postIndex > l {
|
return io.ErrUnexpectedEOF
|
}
|
m.Message = append(m.Message, &NewSDKMessage{})
|
if err := m.Message[len(m.Message)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
return err
|
}
|
iNdEx = postIndex
|
default:
|
iNdEx = preIndex
|
skippy, err := skipSdk(dAtA[iNdEx:])
|
if err != nil {
|
return err
|
}
|
if skippy < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if (iNdEx + skippy) < 0 {
|
return ErrInvalidLengthSdk
|
}
|
if (iNdEx + skippy) > l {
|
return io.ErrUnexpectedEOF
|
}
|
iNdEx += skippy
|
}
|
}
|
|
if iNdEx > l {
|
return io.ErrUnexpectedEOF
|
}
|
return nil
|
}
|
func skipSdk(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, ErrIntOverflowSdk
|
}
|
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, ErrIntOverflowSdk
|
}
|
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, ErrIntOverflowSdk
|
}
|
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, ErrInvalidLengthSdk
|
}
|
iNdEx += length
|
if iNdEx < 0 {
|
return 0, ErrInvalidLengthSdk
|
}
|
return iNdEx, nil
|
case 3:
|
for {
|
var innerWire uint64
|
var start int = iNdEx
|
for shift := uint(0); ; shift += 7 {
|
if shift >= 64 {
|
return 0, ErrIntOverflowSdk
|
}
|
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 := skipSdk(dAtA[start:])
|
if err != nil {
|
return 0, err
|
}
|
iNdEx = start + next
|
if iNdEx < 0 {
|
return 0, ErrInvalidLengthSdk
|
}
|
}
|
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 (
|
ErrInvalidLengthSdk = fmt.Errorf("proto: negative length found during unmarshaling")
|
ErrIntOverflowSdk = fmt.Errorf("proto: integer overflow")
|
)
|