github.com/pingcap/ticdc@v0.0.0-20220526033649-485a10ef2652/proto/canal/CanalProtocol.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: CanalProtocol.proto
     3  
     4  package com_alibaba_otter_canal_protocol
     5  
     6  import (
     7  	fmt "fmt"
     8  	proto "github.com/golang/protobuf/proto"
     9  	io "io"
    10  	math "math"
    11  	math_bits "math/bits"
    12  )
    13  
    14  // Reference imports to suppress errors if they are not otherwise used.
    15  var _ = proto.Marshal
    16  var _ = fmt.Errorf
    17  var _ = math.Inf
    18  
    19  // This is a compile-time assertion to ensure that this generated file
    20  // is compatible with the proto package it is being compiled against.
    21  // A compilation error at this line likely means your copy of the
    22  // proto package needs to be updated.
    23  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    24  
    25  type Compression int32
    26  
    27  const (
    28  	Compression_COMPRESSIONCOMPATIBLEPROTO2 Compression = 0
    29  	Compression_NONE                        Compression = 1
    30  	Compression_ZLIB                        Compression = 2
    31  	Compression_GZIP                        Compression = 3
    32  	Compression_LZF                         Compression = 4
    33  )
    34  
    35  var Compression_name = map[int32]string{
    36  	0: "COMPRESSIONCOMPATIBLEPROTO2",
    37  	1: "NONE",
    38  	2: "ZLIB",
    39  	3: "GZIP",
    40  	4: "LZF",
    41  }
    42  
    43  var Compression_value = map[string]int32{
    44  	"COMPRESSIONCOMPATIBLEPROTO2": 0,
    45  	"NONE":                        1,
    46  	"ZLIB":                        2,
    47  	"GZIP":                        3,
    48  	"LZF":                         4,
    49  }
    50  
    51  func (x Compression) String() string {
    52  	return proto.EnumName(Compression_name, int32(x))
    53  }
    54  
    55  func (Compression) EnumDescriptor() ([]byte, []int) {
    56  	return fileDescriptor_638f57be23f1b015, []int{0}
    57  }
    58  
    59  type PacketType int32
    60  
    61  const (
    62  	//compatible
    63  	PacketType_PACKAGETYPECOMPATIBLEPROTO2 PacketType = 0
    64  	PacketType_HANDSHAKE                   PacketType = 1
    65  	PacketType_CLIENTAUTHENTICATION        PacketType = 2
    66  	PacketType_ACK                         PacketType = 3
    67  	PacketType_SUBSCRIPTION                PacketType = 4
    68  	PacketType_UNSUBSCRIPTION              PacketType = 5
    69  	PacketType_GET                         PacketType = 6
    70  	PacketType_MESSAGES                    PacketType = 7
    71  	PacketType_CLIENTACK                   PacketType = 8
    72  	// management part
    73  	PacketType_SHUTDOWN PacketType = 9
    74  	// integration
    75  	PacketType_DUMP           PacketType = 10
    76  	PacketType_HEARTBEAT      PacketType = 11
    77  	PacketType_CLIENTROLLBACK PacketType = 12
    78  )
    79  
    80  var PacketType_name = map[int32]string{
    81  	0:  "PACKAGETYPECOMPATIBLEPROTO2",
    82  	1:  "HANDSHAKE",
    83  	2:  "CLIENTAUTHENTICATION",
    84  	3:  "ACK",
    85  	4:  "SUBSCRIPTION",
    86  	5:  "UNSUBSCRIPTION",
    87  	6:  "GET",
    88  	7:  "MESSAGES",
    89  	8:  "CLIENTACK",
    90  	9:  "SHUTDOWN",
    91  	10: "DUMP",
    92  	11: "HEARTBEAT",
    93  	12: "CLIENTROLLBACK",
    94  }
    95  
    96  var PacketType_value = map[string]int32{
    97  	"PACKAGETYPECOMPATIBLEPROTO2": 0,
    98  	"HANDSHAKE":                   1,
    99  	"CLIENTAUTHENTICATION":        2,
   100  	"ACK":                         3,
   101  	"SUBSCRIPTION":                4,
   102  	"UNSUBSCRIPTION":              5,
   103  	"GET":                         6,
   104  	"MESSAGES":                    7,
   105  	"CLIENTACK":                   8,
   106  	"SHUTDOWN":                    9,
   107  	"DUMP":                        10,
   108  	"HEARTBEAT":                   11,
   109  	"CLIENTROLLBACK":              12,
   110  }
   111  
   112  func (x PacketType) String() string {
   113  	return proto.EnumName(PacketType_name, int32(x))
   114  }
   115  
   116  func (PacketType) EnumDescriptor() ([]byte, []int) {
   117  	return fileDescriptor_638f57be23f1b015, []int{1}
   118  }
   119  
   120  type Packet struct {
   121  	//[default = 17];
   122  	//
   123  	// Types that are valid to be assigned to MagicNumberPresent:
   124  	//	*Packet_MagicNumber
   125  	MagicNumberPresent isPacket_MagicNumberPresent `protobuf_oneof:"magic_number_present"`
   126  	//[default = 1];
   127  	//
   128  	// Types that are valid to be assigned to VersionPresent:
   129  	//	*Packet_Version
   130  	VersionPresent isPacket_VersionPresent `protobuf_oneof:"version_present"`
   131  	Type           PacketType              `protobuf:"varint,3,opt,name=type,proto3,enum=com.alibaba.otter.canal.protocol.PacketType" json:"type,omitempty"`
   132  	//[default = NONE];
   133  	//
   134  	// Types that are valid to be assigned to CompressionPresent:
   135  	//	*Packet_Compression
   136  	CompressionPresent   isPacket_CompressionPresent `protobuf_oneof:"compression_present"`
   137  	Body                 []byte                      `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
   138  	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
   139  	XXX_unrecognized     []byte                      `json:"-"`
   140  	XXX_sizecache        int32                       `json:"-"`
   141  }
   142  
   143  func (m *Packet) Reset()         { *m = Packet{} }
   144  func (m *Packet) String() string { return proto.CompactTextString(m) }
   145  func (*Packet) ProtoMessage()    {}
   146  func (*Packet) Descriptor() ([]byte, []int) {
   147  	return fileDescriptor_638f57be23f1b015, []int{0}
   148  }
   149  func (m *Packet) XXX_Unmarshal(b []byte) error {
   150  	return m.Unmarshal(b)
   151  }
   152  func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   153  	if deterministic {
   154  		return xxx_messageInfo_Packet.Marshal(b, m, deterministic)
   155  	} else {
   156  		b = b[:cap(b)]
   157  		n, err := m.MarshalToSizedBuffer(b)
   158  		if err != nil {
   159  			return nil, err
   160  		}
   161  		return b[:n], nil
   162  	}
   163  }
   164  func (m *Packet) XXX_Merge(src proto.Message) {
   165  	xxx_messageInfo_Packet.Merge(m, src)
   166  }
   167  func (m *Packet) XXX_Size() int {
   168  	return m.Size()
   169  }
   170  func (m *Packet) XXX_DiscardUnknown() {
   171  	xxx_messageInfo_Packet.DiscardUnknown(m)
   172  }
   173  
   174  var xxx_messageInfo_Packet proto.InternalMessageInfo
   175  
   176  type isPacket_MagicNumberPresent interface {
   177  	isPacket_MagicNumberPresent()
   178  	MarshalTo([]byte) (int, error)
   179  	Size() int
   180  }
   181  type isPacket_VersionPresent interface {
   182  	isPacket_VersionPresent()
   183  	MarshalTo([]byte) (int, error)
   184  	Size() int
   185  }
   186  type isPacket_CompressionPresent interface {
   187  	isPacket_CompressionPresent()
   188  	MarshalTo([]byte) (int, error)
   189  	Size() int
   190  }
   191  
   192  type Packet_MagicNumber struct {
   193  	MagicNumber int32 `protobuf:"varint,1,opt,name=magic_number,json=magicNumber,proto3,oneof" json:"magic_number,omitempty"`
   194  }
   195  type Packet_Version struct {
   196  	Version int32 `protobuf:"varint,2,opt,name=version,proto3,oneof" json:"version,omitempty"`
   197  }
   198  type Packet_Compression struct {
   199  	Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=com.alibaba.otter.canal.protocol.Compression,oneof" json:"compression,omitempty"`
   200  }
   201  
   202  func (*Packet_MagicNumber) isPacket_MagicNumberPresent() {}
   203  func (*Packet_Version) isPacket_VersionPresent()         {}
   204  func (*Packet_Compression) isPacket_CompressionPresent() {}
   205  
   206  func (m *Packet) GetMagicNumberPresent() isPacket_MagicNumberPresent {
   207  	if m != nil {
   208  		return m.MagicNumberPresent
   209  	}
   210  	return nil
   211  }
   212  func (m *Packet) GetVersionPresent() isPacket_VersionPresent {
   213  	if m != nil {
   214  		return m.VersionPresent
   215  	}
   216  	return nil
   217  }
   218  func (m *Packet) GetCompressionPresent() isPacket_CompressionPresent {
   219  	if m != nil {
   220  		return m.CompressionPresent
   221  	}
   222  	return nil
   223  }
   224  
   225  func (m *Packet) GetMagicNumber() int32 {
   226  	if x, ok := m.GetMagicNumberPresent().(*Packet_MagicNumber); ok {
   227  		return x.MagicNumber
   228  	}
   229  	return 0
   230  }
   231  
   232  func (m *Packet) GetVersion() int32 {
   233  	if x, ok := m.GetVersionPresent().(*Packet_Version); ok {
   234  		return x.Version
   235  	}
   236  	return 0
   237  }
   238  
   239  func (m *Packet) GetType() PacketType {
   240  	if m != nil {
   241  		return m.Type
   242  	}
   243  	return PacketType_PACKAGETYPECOMPATIBLEPROTO2
   244  }
   245  
   246  func (m *Packet) GetCompression() Compression {
   247  	if x, ok := m.GetCompressionPresent().(*Packet_Compression); ok {
   248  		return x.Compression
   249  	}
   250  	return Compression_COMPRESSIONCOMPATIBLEPROTO2
   251  }
   252  
   253  func (m *Packet) GetBody() []byte {
   254  	if m != nil {
   255  		return m.Body
   256  	}
   257  	return nil
   258  }
   259  
   260  // XXX_OneofWrappers is for the internal use of the proto package.
   261  func (*Packet) XXX_OneofWrappers() []interface{} {
   262  	return []interface{}{
   263  		(*Packet_MagicNumber)(nil),
   264  		(*Packet_Version)(nil),
   265  		(*Packet_Compression)(nil),
   266  	}
   267  }
   268  
   269  type HeartBeat struct {
   270  	SendTimestamp        int64    `protobuf:"varint,1,opt,name=send_timestamp,json=sendTimestamp,proto3" json:"send_timestamp,omitempty"`
   271  	StartTimestamp       int64    `protobuf:"varint,2,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
   272  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   273  	XXX_unrecognized     []byte   `json:"-"`
   274  	XXX_sizecache        int32    `json:"-"`
   275  }
   276  
   277  func (m *HeartBeat) Reset()         { *m = HeartBeat{} }
   278  func (m *HeartBeat) String() string { return proto.CompactTextString(m) }
   279  func (*HeartBeat) ProtoMessage()    {}
   280  func (*HeartBeat) Descriptor() ([]byte, []int) {
   281  	return fileDescriptor_638f57be23f1b015, []int{1}
   282  }
   283  func (m *HeartBeat) XXX_Unmarshal(b []byte) error {
   284  	return m.Unmarshal(b)
   285  }
   286  func (m *HeartBeat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   287  	if deterministic {
   288  		return xxx_messageInfo_HeartBeat.Marshal(b, m, deterministic)
   289  	} else {
   290  		b = b[:cap(b)]
   291  		n, err := m.MarshalToSizedBuffer(b)
   292  		if err != nil {
   293  			return nil, err
   294  		}
   295  		return b[:n], nil
   296  	}
   297  }
   298  func (m *HeartBeat) XXX_Merge(src proto.Message) {
   299  	xxx_messageInfo_HeartBeat.Merge(m, src)
   300  }
   301  func (m *HeartBeat) XXX_Size() int {
   302  	return m.Size()
   303  }
   304  func (m *HeartBeat) XXX_DiscardUnknown() {
   305  	xxx_messageInfo_HeartBeat.DiscardUnknown(m)
   306  }
   307  
   308  var xxx_messageInfo_HeartBeat proto.InternalMessageInfo
   309  
   310  func (m *HeartBeat) GetSendTimestamp() int64 {
   311  	if m != nil {
   312  		return m.SendTimestamp
   313  	}
   314  	return 0
   315  }
   316  
   317  func (m *HeartBeat) GetStartTimestamp() int64 {
   318  	if m != nil {
   319  		return m.StartTimestamp
   320  	}
   321  	return 0
   322  }
   323  
   324  type Handshake struct {
   325  	//  [default = "utf8"];
   326  	//
   327  	// Types that are valid to be assigned to CommunicationEncodingPresent:
   328  	//	*Handshake_CommunicationEncoding
   329  	CommunicationEncodingPresent isHandshake_CommunicationEncodingPresent `protobuf_oneof:"communication_encoding_present"`
   330  	Seeds                        []byte                                   `protobuf:"bytes,2,opt,name=seeds,proto3" json:"seeds,omitempty"`
   331  	SupportedCompressions        Compression                              `protobuf:"varint,3,opt,name=supported_compressions,json=supportedCompressions,proto3,enum=com.alibaba.otter.canal.protocol.Compression" json:"supported_compressions,omitempty"`
   332  	XXX_NoUnkeyedLiteral         struct{}                                 `json:"-"`
   333  	XXX_unrecognized             []byte                                   `json:"-"`
   334  	XXX_sizecache                int32                                    `json:"-"`
   335  }
   336  
   337  func (m *Handshake) Reset()         { *m = Handshake{} }
   338  func (m *Handshake) String() string { return proto.CompactTextString(m) }
   339  func (*Handshake) ProtoMessage()    {}
   340  func (*Handshake) Descriptor() ([]byte, []int) {
   341  	return fileDescriptor_638f57be23f1b015, []int{2}
   342  }
   343  func (m *Handshake) XXX_Unmarshal(b []byte) error {
   344  	return m.Unmarshal(b)
   345  }
   346  func (m *Handshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   347  	if deterministic {
   348  		return xxx_messageInfo_Handshake.Marshal(b, m, deterministic)
   349  	} else {
   350  		b = b[:cap(b)]
   351  		n, err := m.MarshalToSizedBuffer(b)
   352  		if err != nil {
   353  			return nil, err
   354  		}
   355  		return b[:n], nil
   356  	}
   357  }
   358  func (m *Handshake) XXX_Merge(src proto.Message) {
   359  	xxx_messageInfo_Handshake.Merge(m, src)
   360  }
   361  func (m *Handshake) XXX_Size() int {
   362  	return m.Size()
   363  }
   364  func (m *Handshake) XXX_DiscardUnknown() {
   365  	xxx_messageInfo_Handshake.DiscardUnknown(m)
   366  }
   367  
   368  var xxx_messageInfo_Handshake proto.InternalMessageInfo
   369  
   370  type isHandshake_CommunicationEncodingPresent interface {
   371  	isHandshake_CommunicationEncodingPresent()
   372  	MarshalTo([]byte) (int, error)
   373  	Size() int
   374  }
   375  
   376  type Handshake_CommunicationEncoding struct {
   377  	CommunicationEncoding string `protobuf:"bytes,1,opt,name=communication_encoding,json=communicationEncoding,proto3,oneof" json:"communication_encoding,omitempty"`
   378  }
   379  
   380  func (*Handshake_CommunicationEncoding) isHandshake_CommunicationEncodingPresent() {}
   381  
   382  func (m *Handshake) GetCommunicationEncodingPresent() isHandshake_CommunicationEncodingPresent {
   383  	if m != nil {
   384  		return m.CommunicationEncodingPresent
   385  	}
   386  	return nil
   387  }
   388  
   389  func (m *Handshake) GetCommunicationEncoding() string {
   390  	if x, ok := m.GetCommunicationEncodingPresent().(*Handshake_CommunicationEncoding); ok {
   391  		return x.CommunicationEncoding
   392  	}
   393  	return ""
   394  }
   395  
   396  func (m *Handshake) GetSeeds() []byte {
   397  	if m != nil {
   398  		return m.Seeds
   399  	}
   400  	return nil
   401  }
   402  
   403  func (m *Handshake) GetSupportedCompressions() Compression {
   404  	if m != nil {
   405  		return m.SupportedCompressions
   406  	}
   407  	return Compression_COMPRESSIONCOMPATIBLEPROTO2
   408  }
   409  
   410  // XXX_OneofWrappers is for the internal use of the proto package.
   411  func (*Handshake) XXX_OneofWrappers() []interface{} {
   412  	return []interface{}{
   413  		(*Handshake_CommunicationEncoding)(nil),
   414  	}
   415  }
   416  
   417  // client authentication
   418  type ClientAuth struct {
   419  	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
   420  	Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
   421  	// [default = 0]
   422  	//
   423  	// Types that are valid to be assigned to NetReadTimeoutPresent:
   424  	//	*ClientAuth_NetReadTimeout
   425  	NetReadTimeoutPresent isClientAuth_NetReadTimeoutPresent `protobuf_oneof:"net_read_timeout_present"`
   426  	// [default = 0];
   427  	//
   428  	// Types that are valid to be assigned to NetWriteTimeoutPresent:
   429  	//	*ClientAuth_NetWriteTimeout
   430  	NetWriteTimeoutPresent isClientAuth_NetWriteTimeoutPresent `protobuf_oneof:"net_write_timeout_present"`
   431  	Destination            string                              `protobuf:"bytes,5,opt,name=destination,proto3" json:"destination,omitempty"`
   432  	ClientId               string                              `protobuf:"bytes,6,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   433  	Filter                 string                              `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
   434  	StartTimestamp         int64                               `protobuf:"varint,8,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
   435  	XXX_NoUnkeyedLiteral   struct{}                            `json:"-"`
   436  	XXX_unrecognized       []byte                              `json:"-"`
   437  	XXX_sizecache          int32                               `json:"-"`
   438  }
   439  
   440  func (m *ClientAuth) Reset()         { *m = ClientAuth{} }
   441  func (m *ClientAuth) String() string { return proto.CompactTextString(m) }
   442  func (*ClientAuth) ProtoMessage()    {}
   443  func (*ClientAuth) Descriptor() ([]byte, []int) {
   444  	return fileDescriptor_638f57be23f1b015, []int{3}
   445  }
   446  func (m *ClientAuth) XXX_Unmarshal(b []byte) error {
   447  	return m.Unmarshal(b)
   448  }
   449  func (m *ClientAuth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   450  	if deterministic {
   451  		return xxx_messageInfo_ClientAuth.Marshal(b, m, deterministic)
   452  	} else {
   453  		b = b[:cap(b)]
   454  		n, err := m.MarshalToSizedBuffer(b)
   455  		if err != nil {
   456  			return nil, err
   457  		}
   458  		return b[:n], nil
   459  	}
   460  }
   461  func (m *ClientAuth) XXX_Merge(src proto.Message) {
   462  	xxx_messageInfo_ClientAuth.Merge(m, src)
   463  }
   464  func (m *ClientAuth) XXX_Size() int {
   465  	return m.Size()
   466  }
   467  func (m *ClientAuth) XXX_DiscardUnknown() {
   468  	xxx_messageInfo_ClientAuth.DiscardUnknown(m)
   469  }
   470  
   471  var xxx_messageInfo_ClientAuth proto.InternalMessageInfo
   472  
   473  type isClientAuth_NetReadTimeoutPresent interface {
   474  	isClientAuth_NetReadTimeoutPresent()
   475  	MarshalTo([]byte) (int, error)
   476  	Size() int
   477  }
   478  type isClientAuth_NetWriteTimeoutPresent interface {
   479  	isClientAuth_NetWriteTimeoutPresent()
   480  	MarshalTo([]byte) (int, error)
   481  	Size() int
   482  }
   483  
   484  type ClientAuth_NetReadTimeout struct {
   485  	NetReadTimeout int32 `protobuf:"varint,3,opt,name=net_read_timeout,json=netReadTimeout,proto3,oneof" json:"net_read_timeout,omitempty"`
   486  }
   487  type ClientAuth_NetWriteTimeout struct {
   488  	NetWriteTimeout int32 `protobuf:"varint,4,opt,name=net_write_timeout,json=netWriteTimeout,proto3,oneof" json:"net_write_timeout,omitempty"`
   489  }
   490  
   491  func (*ClientAuth_NetReadTimeout) isClientAuth_NetReadTimeoutPresent()   {}
   492  func (*ClientAuth_NetWriteTimeout) isClientAuth_NetWriteTimeoutPresent() {}
   493  
   494  func (m *ClientAuth) GetNetReadTimeoutPresent() isClientAuth_NetReadTimeoutPresent {
   495  	if m != nil {
   496  		return m.NetReadTimeoutPresent
   497  	}
   498  	return nil
   499  }
   500  func (m *ClientAuth) GetNetWriteTimeoutPresent() isClientAuth_NetWriteTimeoutPresent {
   501  	if m != nil {
   502  		return m.NetWriteTimeoutPresent
   503  	}
   504  	return nil
   505  }
   506  
   507  func (m *ClientAuth) GetUsername() string {
   508  	if m != nil {
   509  		return m.Username
   510  	}
   511  	return ""
   512  }
   513  
   514  func (m *ClientAuth) GetPassword() []byte {
   515  	if m != nil {
   516  		return m.Password
   517  	}
   518  	return nil
   519  }
   520  
   521  func (m *ClientAuth) GetNetReadTimeout() int32 {
   522  	if x, ok := m.GetNetReadTimeoutPresent().(*ClientAuth_NetReadTimeout); ok {
   523  		return x.NetReadTimeout
   524  	}
   525  	return 0
   526  }
   527  
   528  func (m *ClientAuth) GetNetWriteTimeout() int32 {
   529  	if x, ok := m.GetNetWriteTimeoutPresent().(*ClientAuth_NetWriteTimeout); ok {
   530  		return x.NetWriteTimeout
   531  	}
   532  	return 0
   533  }
   534  
   535  func (m *ClientAuth) GetDestination() string {
   536  	if m != nil {
   537  		return m.Destination
   538  	}
   539  	return ""
   540  }
   541  
   542  func (m *ClientAuth) GetClientId() string {
   543  	if m != nil {
   544  		return m.ClientId
   545  	}
   546  	return ""
   547  }
   548  
   549  func (m *ClientAuth) GetFilter() string {
   550  	if m != nil {
   551  		return m.Filter
   552  	}
   553  	return ""
   554  }
   555  
   556  func (m *ClientAuth) GetStartTimestamp() int64 {
   557  	if m != nil {
   558  		return m.StartTimestamp
   559  	}
   560  	return 0
   561  }
   562  
   563  // XXX_OneofWrappers is for the internal use of the proto package.
   564  func (*ClientAuth) XXX_OneofWrappers() []interface{} {
   565  	return []interface{}{
   566  		(*ClientAuth_NetReadTimeout)(nil),
   567  		(*ClientAuth_NetWriteTimeout)(nil),
   568  	}
   569  }
   570  
   571  type Ack struct {
   572  	//[default = 0]
   573  	//
   574  	// Types that are valid to be assigned to ErrorCodePresent:
   575  	//	*Ack_ErrorCode
   576  	ErrorCodePresent     isAck_ErrorCodePresent `protobuf_oneof:"error_code_present"`
   577  	ErrorMessage         string                 `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
   578  	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
   579  	XXX_unrecognized     []byte                 `json:"-"`
   580  	XXX_sizecache        int32                  `json:"-"`
   581  }
   582  
   583  func (m *Ack) Reset()         { *m = Ack{} }
   584  func (m *Ack) String() string { return proto.CompactTextString(m) }
   585  func (*Ack) ProtoMessage()    {}
   586  func (*Ack) Descriptor() ([]byte, []int) {
   587  	return fileDescriptor_638f57be23f1b015, []int{4}
   588  }
   589  func (m *Ack) XXX_Unmarshal(b []byte) error {
   590  	return m.Unmarshal(b)
   591  }
   592  func (m *Ack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   593  	if deterministic {
   594  		return xxx_messageInfo_Ack.Marshal(b, m, deterministic)
   595  	} else {
   596  		b = b[:cap(b)]
   597  		n, err := m.MarshalToSizedBuffer(b)
   598  		if err != nil {
   599  			return nil, err
   600  		}
   601  		return b[:n], nil
   602  	}
   603  }
   604  func (m *Ack) XXX_Merge(src proto.Message) {
   605  	xxx_messageInfo_Ack.Merge(m, src)
   606  }
   607  func (m *Ack) XXX_Size() int {
   608  	return m.Size()
   609  }
   610  func (m *Ack) XXX_DiscardUnknown() {
   611  	xxx_messageInfo_Ack.DiscardUnknown(m)
   612  }
   613  
   614  var xxx_messageInfo_Ack proto.InternalMessageInfo
   615  
   616  type isAck_ErrorCodePresent interface {
   617  	isAck_ErrorCodePresent()
   618  	MarshalTo([]byte) (int, error)
   619  	Size() int
   620  }
   621  
   622  type Ack_ErrorCode struct {
   623  	ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3,oneof" json:"error_code,omitempty"`
   624  }
   625  
   626  func (*Ack_ErrorCode) isAck_ErrorCodePresent() {}
   627  
   628  func (m *Ack) GetErrorCodePresent() isAck_ErrorCodePresent {
   629  	if m != nil {
   630  		return m.ErrorCodePresent
   631  	}
   632  	return nil
   633  }
   634  
   635  func (m *Ack) GetErrorCode() int32 {
   636  	if x, ok := m.GetErrorCodePresent().(*Ack_ErrorCode); ok {
   637  		return x.ErrorCode
   638  	}
   639  	return 0
   640  }
   641  
   642  func (m *Ack) GetErrorMessage() string {
   643  	if m != nil {
   644  		return m.ErrorMessage
   645  	}
   646  	return ""
   647  }
   648  
   649  // XXX_OneofWrappers is for the internal use of the proto package.
   650  func (*Ack) XXX_OneofWrappers() []interface{} {
   651  	return []interface{}{
   652  		(*Ack_ErrorCode)(nil),
   653  	}
   654  }
   655  
   656  type ClientAck struct {
   657  	Destination          string   `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
   658  	ClientId             string   `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   659  	BatchId              int64    `protobuf:"varint,3,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
   660  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   661  	XXX_unrecognized     []byte   `json:"-"`
   662  	XXX_sizecache        int32    `json:"-"`
   663  }
   664  
   665  func (m *ClientAck) Reset()         { *m = ClientAck{} }
   666  func (m *ClientAck) String() string { return proto.CompactTextString(m) }
   667  func (*ClientAck) ProtoMessage()    {}
   668  func (*ClientAck) Descriptor() ([]byte, []int) {
   669  	return fileDescriptor_638f57be23f1b015, []int{5}
   670  }
   671  func (m *ClientAck) XXX_Unmarshal(b []byte) error {
   672  	return m.Unmarshal(b)
   673  }
   674  func (m *ClientAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   675  	if deterministic {
   676  		return xxx_messageInfo_ClientAck.Marshal(b, m, deterministic)
   677  	} else {
   678  		b = b[:cap(b)]
   679  		n, err := m.MarshalToSizedBuffer(b)
   680  		if err != nil {
   681  			return nil, err
   682  		}
   683  		return b[:n], nil
   684  	}
   685  }
   686  func (m *ClientAck) XXX_Merge(src proto.Message) {
   687  	xxx_messageInfo_ClientAck.Merge(m, src)
   688  }
   689  func (m *ClientAck) XXX_Size() int {
   690  	return m.Size()
   691  }
   692  func (m *ClientAck) XXX_DiscardUnknown() {
   693  	xxx_messageInfo_ClientAck.DiscardUnknown(m)
   694  }
   695  
   696  var xxx_messageInfo_ClientAck proto.InternalMessageInfo
   697  
   698  func (m *ClientAck) GetDestination() string {
   699  	if m != nil {
   700  		return m.Destination
   701  	}
   702  	return ""
   703  }
   704  
   705  func (m *ClientAck) GetClientId() string {
   706  	if m != nil {
   707  		return m.ClientId
   708  	}
   709  	return ""
   710  }
   711  
   712  func (m *ClientAck) GetBatchId() int64 {
   713  	if m != nil {
   714  		return m.BatchId
   715  	}
   716  	return 0
   717  }
   718  
   719  // subscription
   720  type Sub struct {
   721  	Destination          string   `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
   722  	ClientId             string   `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   723  	Filter               string   `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
   724  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   725  	XXX_unrecognized     []byte   `json:"-"`
   726  	XXX_sizecache        int32    `json:"-"`
   727  }
   728  
   729  func (m *Sub) Reset()         { *m = Sub{} }
   730  func (m *Sub) String() string { return proto.CompactTextString(m) }
   731  func (*Sub) ProtoMessage()    {}
   732  func (*Sub) Descriptor() ([]byte, []int) {
   733  	return fileDescriptor_638f57be23f1b015, []int{6}
   734  }
   735  func (m *Sub) XXX_Unmarshal(b []byte) error {
   736  	return m.Unmarshal(b)
   737  }
   738  func (m *Sub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   739  	if deterministic {
   740  		return xxx_messageInfo_Sub.Marshal(b, m, deterministic)
   741  	} else {
   742  		b = b[:cap(b)]
   743  		n, err := m.MarshalToSizedBuffer(b)
   744  		if err != nil {
   745  			return nil, err
   746  		}
   747  		return b[:n], nil
   748  	}
   749  }
   750  func (m *Sub) XXX_Merge(src proto.Message) {
   751  	xxx_messageInfo_Sub.Merge(m, src)
   752  }
   753  func (m *Sub) XXX_Size() int {
   754  	return m.Size()
   755  }
   756  func (m *Sub) XXX_DiscardUnknown() {
   757  	xxx_messageInfo_Sub.DiscardUnknown(m)
   758  }
   759  
   760  var xxx_messageInfo_Sub proto.InternalMessageInfo
   761  
   762  func (m *Sub) GetDestination() string {
   763  	if m != nil {
   764  		return m.Destination
   765  	}
   766  	return ""
   767  }
   768  
   769  func (m *Sub) GetClientId() string {
   770  	if m != nil {
   771  		return m.ClientId
   772  	}
   773  	return ""
   774  }
   775  
   776  func (m *Sub) GetFilter() string {
   777  	if m != nil {
   778  		return m.Filter
   779  	}
   780  	return ""
   781  }
   782  
   783  // Unsubscription
   784  type Unsub struct {
   785  	Destination          string   `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
   786  	ClientId             string   `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   787  	Filter               string   `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
   788  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   789  	XXX_unrecognized     []byte   `json:"-"`
   790  	XXX_sizecache        int32    `json:"-"`
   791  }
   792  
   793  func (m *Unsub) Reset()         { *m = Unsub{} }
   794  func (m *Unsub) String() string { return proto.CompactTextString(m) }
   795  func (*Unsub) ProtoMessage()    {}
   796  func (*Unsub) Descriptor() ([]byte, []int) {
   797  	return fileDescriptor_638f57be23f1b015, []int{7}
   798  }
   799  func (m *Unsub) XXX_Unmarshal(b []byte) error {
   800  	return m.Unmarshal(b)
   801  }
   802  func (m *Unsub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   803  	if deterministic {
   804  		return xxx_messageInfo_Unsub.Marshal(b, m, deterministic)
   805  	} else {
   806  		b = b[:cap(b)]
   807  		n, err := m.MarshalToSizedBuffer(b)
   808  		if err != nil {
   809  			return nil, err
   810  		}
   811  		return b[:n], nil
   812  	}
   813  }
   814  func (m *Unsub) XXX_Merge(src proto.Message) {
   815  	xxx_messageInfo_Unsub.Merge(m, src)
   816  }
   817  func (m *Unsub) XXX_Size() int {
   818  	return m.Size()
   819  }
   820  func (m *Unsub) XXX_DiscardUnknown() {
   821  	xxx_messageInfo_Unsub.DiscardUnknown(m)
   822  }
   823  
   824  var xxx_messageInfo_Unsub proto.InternalMessageInfo
   825  
   826  func (m *Unsub) GetDestination() string {
   827  	if m != nil {
   828  		return m.Destination
   829  	}
   830  	return ""
   831  }
   832  
   833  func (m *Unsub) GetClientId() string {
   834  	if m != nil {
   835  		return m.ClientId
   836  	}
   837  	return ""
   838  }
   839  
   840  func (m *Unsub) GetFilter() string {
   841  	if m != nil {
   842  		return m.Filter
   843  	}
   844  	return ""
   845  }
   846  
   847  //  PullRequest
   848  type Get struct {
   849  	Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
   850  	ClientId    string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
   851  	FetchSize   int32  `protobuf:"varint,3,opt,name=fetch_size,json=fetchSize,proto3" json:"fetch_size,omitempty"`
   852  	//[default = -1]
   853  	//
   854  	// Types that are valid to be assigned to TimeoutPresent:
   855  	//	*Get_Timeout
   856  	TimeoutPresent isGet_TimeoutPresent `protobuf_oneof:"timeout_present"`
   857  	//[default = 2]
   858  	//
   859  	// Types that are valid to be assigned to UnitPresent:
   860  	//	*Get_Unit
   861  	UnitPresent isGet_UnitPresent `protobuf_oneof:"unit_present"`
   862  	//[default = false]
   863  	//
   864  	// Types that are valid to be assigned to AutoAckPresent:
   865  	//	*Get_AutoAck
   866  	AutoAckPresent       isGet_AutoAckPresent `protobuf_oneof:"auto_ack_present"`
   867  	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
   868  	XXX_unrecognized     []byte               `json:"-"`
   869  	XXX_sizecache        int32                `json:"-"`
   870  }
   871  
   872  func (m *Get) Reset()         { *m = Get{} }
   873  func (m *Get) String() string { return proto.CompactTextString(m) }
   874  func (*Get) ProtoMessage()    {}
   875  func (*Get) Descriptor() ([]byte, []int) {
   876  	return fileDescriptor_638f57be23f1b015, []int{8}
   877  }
   878  func (m *Get) XXX_Unmarshal(b []byte) error {
   879  	return m.Unmarshal(b)
   880  }
   881  func (m *Get) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   882  	if deterministic {
   883  		return xxx_messageInfo_Get.Marshal(b, m, deterministic)
   884  	} else {
   885  		b = b[:cap(b)]
   886  		n, err := m.MarshalToSizedBuffer(b)
   887  		if err != nil {
   888  			return nil, err
   889  		}
   890  		return b[:n], nil
   891  	}
   892  }
   893  func (m *Get) XXX_Merge(src proto.Message) {
   894  	xxx_messageInfo_Get.Merge(m, src)
   895  }
   896  func (m *Get) XXX_Size() int {
   897  	return m.Size()
   898  }
   899  func (m *Get) XXX_DiscardUnknown() {
   900  	xxx_messageInfo_Get.DiscardUnknown(m)
   901  }
   902  
   903  var xxx_messageInfo_Get proto.InternalMessageInfo
   904  
   905  type isGet_TimeoutPresent interface {
   906  	isGet_TimeoutPresent()
   907  	MarshalTo([]byte) (int, error)
   908  	Size() int
   909  }
   910  type isGet_UnitPresent interface {
   911  	isGet_UnitPresent()
   912  	MarshalTo([]byte) (int, error)
   913  	Size() int
   914  }
   915  type isGet_AutoAckPresent interface {
   916  	isGet_AutoAckPresent()
   917  	MarshalTo([]byte) (int, error)
   918  	Size() int
   919  }
   920  
   921  type Get_Timeout struct {
   922  	Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
   923  }
   924  type Get_Unit struct {
   925  	Unit int32 `protobuf:"varint,5,opt,name=unit,proto3,oneof" json:"unit,omitempty"`
   926  }
   927  type Get_AutoAck struct {
   928  	AutoAck bool `protobuf:"varint,6,opt,name=auto_ack,json=autoAck,proto3,oneof" json:"auto_ack,omitempty"`
   929  }
   930  
   931  func (*Get_Timeout) isGet_TimeoutPresent() {}
   932  func (*Get_Unit) isGet_UnitPresent()       {}
   933  func (*Get_AutoAck) isGet_AutoAckPresent() {}
   934  
   935  func (m *Get) GetTimeoutPresent() isGet_TimeoutPresent {
   936  	if m != nil {
   937  		return m.TimeoutPresent
   938  	}
   939  	return nil
   940  }
   941  func (m *Get) GetUnitPresent() isGet_UnitPresent {
   942  	if m != nil {
   943  		return m.UnitPresent
   944  	}
   945  	return nil
   946  }
   947  func (m *Get) GetAutoAckPresent() isGet_AutoAckPresent {
   948  	if m != nil {
   949  		return m.AutoAckPresent
   950  	}
   951  	return nil
   952  }
   953  
   954  func (m *Get) GetDestination() string {
   955  	if m != nil {
   956  		return m.Destination
   957  	}
   958  	return ""
   959  }
   960  
   961  func (m *Get) GetClientId() string {
   962  	if m != nil {
   963  		return m.ClientId
   964  	}
   965  	return ""
   966  }
   967  
   968  func (m *Get) GetFetchSize() int32 {
   969  	if m != nil {
   970  		return m.FetchSize
   971  	}
   972  	return 0
   973  }
   974  
   975  func (m *Get) GetTimeout() int64 {
   976  	if x, ok := m.GetTimeoutPresent().(*Get_Timeout); ok {
   977  		return x.Timeout
   978  	}
   979  	return 0
   980  }
   981  
   982  func (m *Get) GetUnit() int32 {
   983  	if x, ok := m.GetUnitPresent().(*Get_Unit); ok {
   984  		return x.Unit
   985  	}
   986  	return 0
   987  }
   988  
   989  func (m *Get) GetAutoAck() bool {
   990  	if x, ok := m.GetAutoAckPresent().(*Get_AutoAck); ok {
   991  		return x.AutoAck
   992  	}
   993  	return false
   994  }
   995  
   996  // XXX_OneofWrappers is for the internal use of the proto package.
   997  func (*Get) XXX_OneofWrappers() []interface{} {
   998  	return []interface{}{
   999  		(*Get_Timeout)(nil),
  1000  		(*Get_Unit)(nil),
  1001  		(*Get_AutoAck)(nil),
  1002  	}
  1003  }
  1004  
  1005  //
  1006  type Messages struct {
  1007  	BatchId              int64    `protobuf:"varint,1,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
  1008  	Messages             [][]byte `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
  1009  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1010  	XXX_unrecognized     []byte   `json:"-"`
  1011  	XXX_sizecache        int32    `json:"-"`
  1012  }
  1013  
  1014  func (m *Messages) Reset()         { *m = Messages{} }
  1015  func (m *Messages) String() string { return proto.CompactTextString(m) }
  1016  func (*Messages) ProtoMessage()    {}
  1017  func (*Messages) Descriptor() ([]byte, []int) {
  1018  	return fileDescriptor_638f57be23f1b015, []int{9}
  1019  }
  1020  func (m *Messages) XXX_Unmarshal(b []byte) error {
  1021  	return m.Unmarshal(b)
  1022  }
  1023  func (m *Messages) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1024  	if deterministic {
  1025  		return xxx_messageInfo_Messages.Marshal(b, m, deterministic)
  1026  	} else {
  1027  		b = b[:cap(b)]
  1028  		n, err := m.MarshalToSizedBuffer(b)
  1029  		if err != nil {
  1030  			return nil, err
  1031  		}
  1032  		return b[:n], nil
  1033  	}
  1034  }
  1035  func (m *Messages) XXX_Merge(src proto.Message) {
  1036  	xxx_messageInfo_Messages.Merge(m, src)
  1037  }
  1038  func (m *Messages) XXX_Size() int {
  1039  	return m.Size()
  1040  }
  1041  func (m *Messages) XXX_DiscardUnknown() {
  1042  	xxx_messageInfo_Messages.DiscardUnknown(m)
  1043  }
  1044  
  1045  var xxx_messageInfo_Messages proto.InternalMessageInfo
  1046  
  1047  func (m *Messages) GetBatchId() int64 {
  1048  	if m != nil {
  1049  		return m.BatchId
  1050  	}
  1051  	return 0
  1052  }
  1053  
  1054  func (m *Messages) GetMessages() [][]byte {
  1055  	if m != nil {
  1056  		return m.Messages
  1057  	}
  1058  	return nil
  1059  }
  1060  
  1061  // TBD when new packets are required
  1062  type Dump struct {
  1063  	Journal  string `protobuf:"bytes,1,opt,name=journal,proto3" json:"journal,omitempty"`
  1064  	Position int64  `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"`
  1065  	// [default = 0]
  1066  	//
  1067  	// Types that are valid to be assigned to TimestampPresent:
  1068  	//	*Dump_Timestamp
  1069  	TimestampPresent     isDump_TimestampPresent `protobuf_oneof:"timestamp_present"`
  1070  	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
  1071  	XXX_unrecognized     []byte                  `json:"-"`
  1072  	XXX_sizecache        int32                   `json:"-"`
  1073  }
  1074  
  1075  func (m *Dump) Reset()         { *m = Dump{} }
  1076  func (m *Dump) String() string { return proto.CompactTextString(m) }
  1077  func (*Dump) ProtoMessage()    {}
  1078  func (*Dump) Descriptor() ([]byte, []int) {
  1079  	return fileDescriptor_638f57be23f1b015, []int{10}
  1080  }
  1081  func (m *Dump) XXX_Unmarshal(b []byte) error {
  1082  	return m.Unmarshal(b)
  1083  }
  1084  func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1085  	if deterministic {
  1086  		return xxx_messageInfo_Dump.Marshal(b, m, deterministic)
  1087  	} else {
  1088  		b = b[:cap(b)]
  1089  		n, err := m.MarshalToSizedBuffer(b)
  1090  		if err != nil {
  1091  			return nil, err
  1092  		}
  1093  		return b[:n], nil
  1094  	}
  1095  }
  1096  func (m *Dump) XXX_Merge(src proto.Message) {
  1097  	xxx_messageInfo_Dump.Merge(m, src)
  1098  }
  1099  func (m *Dump) XXX_Size() int {
  1100  	return m.Size()
  1101  }
  1102  func (m *Dump) XXX_DiscardUnknown() {
  1103  	xxx_messageInfo_Dump.DiscardUnknown(m)
  1104  }
  1105  
  1106  var xxx_messageInfo_Dump proto.InternalMessageInfo
  1107  
  1108  type isDump_TimestampPresent interface {
  1109  	isDump_TimestampPresent()
  1110  	MarshalTo([]byte) (int, error)
  1111  	Size() int
  1112  }
  1113  
  1114  type Dump_Timestamp struct {
  1115  	Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3,oneof" json:"timestamp,omitempty"`
  1116  }
  1117  
  1118  func (*Dump_Timestamp) isDump_TimestampPresent() {}
  1119  
  1120  func (m *Dump) GetTimestampPresent() isDump_TimestampPresent {
  1121  	if m != nil {
  1122  		return m.TimestampPresent
  1123  	}
  1124  	return nil
  1125  }
  1126  
  1127  func (m *Dump) GetJournal() string {
  1128  	if m != nil {
  1129  		return m.Journal
  1130  	}
  1131  	return ""
  1132  }
  1133  
  1134  func (m *Dump) GetPosition() int64 {
  1135  	if m != nil {
  1136  		return m.Position
  1137  	}
  1138  	return 0
  1139  }
  1140  
  1141  func (m *Dump) GetTimestamp() int64 {
  1142  	if x, ok := m.GetTimestampPresent().(*Dump_Timestamp); ok {
  1143  		return x.Timestamp
  1144  	}
  1145  	return 0
  1146  }
  1147  
  1148  // XXX_OneofWrappers is for the internal use of the proto package.
  1149  func (*Dump) XXX_OneofWrappers() []interface{} {
  1150  	return []interface{}{
  1151  		(*Dump_Timestamp)(nil),
  1152  	}
  1153  }
  1154  
  1155  type ClientRollback struct {
  1156  	Destination          string   `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
  1157  	ClientId             string   `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
  1158  	BatchId              int64    `protobuf:"varint,3,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
  1159  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1160  	XXX_unrecognized     []byte   `json:"-"`
  1161  	XXX_sizecache        int32    `json:"-"`
  1162  }
  1163  
  1164  func (m *ClientRollback) Reset()         { *m = ClientRollback{} }
  1165  func (m *ClientRollback) String() string { return proto.CompactTextString(m) }
  1166  func (*ClientRollback) ProtoMessage()    {}
  1167  func (*ClientRollback) Descriptor() ([]byte, []int) {
  1168  	return fileDescriptor_638f57be23f1b015, []int{11}
  1169  }
  1170  func (m *ClientRollback) XXX_Unmarshal(b []byte) error {
  1171  	return m.Unmarshal(b)
  1172  }
  1173  func (m *ClientRollback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1174  	if deterministic {
  1175  		return xxx_messageInfo_ClientRollback.Marshal(b, m, deterministic)
  1176  	} else {
  1177  		b = b[:cap(b)]
  1178  		n, err := m.MarshalToSizedBuffer(b)
  1179  		if err != nil {
  1180  			return nil, err
  1181  		}
  1182  		return b[:n], nil
  1183  	}
  1184  }
  1185  func (m *ClientRollback) XXX_Merge(src proto.Message) {
  1186  	xxx_messageInfo_ClientRollback.Merge(m, src)
  1187  }
  1188  func (m *ClientRollback) XXX_Size() int {
  1189  	return m.Size()
  1190  }
  1191  func (m *ClientRollback) XXX_DiscardUnknown() {
  1192  	xxx_messageInfo_ClientRollback.DiscardUnknown(m)
  1193  }
  1194  
  1195  var xxx_messageInfo_ClientRollback proto.InternalMessageInfo
  1196  
  1197  func (m *ClientRollback) GetDestination() string {
  1198  	if m != nil {
  1199  		return m.Destination
  1200  	}
  1201  	return ""
  1202  }
  1203  
  1204  func (m *ClientRollback) GetClientId() string {
  1205  	if m != nil {
  1206  		return m.ClientId
  1207  	}
  1208  	return ""
  1209  }
  1210  
  1211  func (m *ClientRollback) GetBatchId() int64 {
  1212  	if m != nil {
  1213  		return m.BatchId
  1214  	}
  1215  	return 0
  1216  }
  1217  
  1218  func init() {
  1219  	proto.RegisterEnum("com.alibaba.otter.canal.protocol.Compression", Compression_name, Compression_value)
  1220  	proto.RegisterEnum("com.alibaba.otter.canal.protocol.PacketType", PacketType_name, PacketType_value)
  1221  	proto.RegisterType((*Packet)(nil), "com.alibaba.otter.canal.protocol.Packet")
  1222  	proto.RegisterType((*HeartBeat)(nil), "com.alibaba.otter.canal.protocol.HeartBeat")
  1223  	proto.RegisterType((*Handshake)(nil), "com.alibaba.otter.canal.protocol.Handshake")
  1224  	proto.RegisterType((*ClientAuth)(nil), "com.alibaba.otter.canal.protocol.ClientAuth")
  1225  	proto.RegisterType((*Ack)(nil), "com.alibaba.otter.canal.protocol.Ack")
  1226  	proto.RegisterType((*ClientAck)(nil), "com.alibaba.otter.canal.protocol.ClientAck")
  1227  	proto.RegisterType((*Sub)(nil), "com.alibaba.otter.canal.protocol.Sub")
  1228  	proto.RegisterType((*Unsub)(nil), "com.alibaba.otter.canal.protocol.Unsub")
  1229  	proto.RegisterType((*Get)(nil), "com.alibaba.otter.canal.protocol.Get")
  1230  	proto.RegisterType((*Messages)(nil), "com.alibaba.otter.canal.protocol.Messages")
  1231  	proto.RegisterType((*Dump)(nil), "com.alibaba.otter.canal.protocol.Dump")
  1232  	proto.RegisterType((*ClientRollback)(nil), "com.alibaba.otter.canal.protocol.ClientRollback")
  1233  }
  1234  
  1235  func init() { proto.RegisterFile("CanalProtocol.proto", fileDescriptor_638f57be23f1b015) }
  1236  
  1237  var fileDescriptor_638f57be23f1b015 = []byte{
  1238  	// 1038 bytes of a gzipped FileDescriptorProto
  1239  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x5f, 0x6f, 0xe3, 0x44,
  1240  	0x10, 0xaf, 0xe3, 0xa4, 0x89, 0x27, 0x69, 0xea, 0x6e, 0xff, 0x28, 0xd7, 0x8a, 0x5c, 0x94, 0x13,
  1241  	0xa2, 0xaa, 0x8e, 0x3c, 0x1c, 0x0f, 0xbc, 0x62, 0xa7, 0xa6, 0x8e, 0x9a, 0x26, 0x61, 0xe3, 0xe8,
  1242  	0x44, 0x41, 0x44, 0x1b, 0x7b, 0xaf, 0xf5, 0x25, 0xf6, 0x06, 0x7b, 0xcd, 0xa9, 0xf7, 0x49, 0xf8,
  1243  	0x20, 0x7c, 0x08, 0x1e, 0x79, 0xe3, 0x15, 0x15, 0x09, 0x89, 0x6f, 0x81, 0x76, 0xed, 0xb8, 0x69,
  1244  	0x29, 0xaa, 0xd0, 0xe9, 0xde, 0x76, 0x7e, 0x33, 0x3b, 0xb3, 0xf3, 0x9b, 0xdf, 0xae, 0x0d, 0xbb,
  1245  	0x5d, 0x12, 0x92, 0xc5, 0x28, 0x62, 0x9c, 0xb9, 0x6c, 0xd1, 0x59, 0x8a, 0x05, 0x6a, 0xb9, 0x2c,
  1246  	0xe8, 0x90, 0x85, 0x3f, 0x23, 0x33, 0xd2, 0x61, 0x9c, 0xd3, 0xa8, 0xe3, 0x8a, 0xb0, 0xd4, 0xed,
  1247  	0xb2, 0x45, 0xfb, 0x97, 0x02, 0x6c, 0x8e, 0x88, 0x3b, 0xa7, 0x1c, 0xbd, 0x80, 0x5a, 0x40, 0xae,
  1248  	0x7c, 0x77, 0x1a, 0x26, 0xc1, 0x8c, 0x46, 0x0d, 0xa5, 0xa5, 0x1c, 0x97, 0xec, 0x0d, 0x5c, 0x95,
  1249  	0xe8, 0x40, 0x82, 0xe8, 0x10, 0xca, 0x3f, 0xd1, 0x28, 0xf6, 0x59, 0xd8, 0x28, 0x48, 0xbf, 0x82,
  1250  	0x57, 0x00, 0xfa, 0x0a, 0x8a, 0xfc, 0x66, 0x49, 0x1b, 0x6a, 0x4b, 0x39, 0xae, 0xbf, 0x7a, 0xd9,
  1251  	0x79, 0xaa, 0x78, 0x27, 0x2d, 0xec, 0xdc, 0x2c, 0x29, 0x96, 0x3b, 0xd1, 0x37, 0x50, 0x75, 0x59,
  1252  	0xb0, 0x8c, 0x68, 0x2c, 0x2b, 0x14, 0x65, 0xa2, 0xcf, 0x9f, 0x4e, 0xd4, 0xbd, 0xdb, 0x64, 0x17,
  1253  	0xf0, 0x7a, 0x0e, 0x84, 0xa0, 0x38, 0x63, 0xde, 0x4d, 0xa3, 0xd4, 0x52, 0x8e, 0x6b, 0x58, 0xae,
  1254  	0xcd, 0x03, 0xd8, 0x5b, 0xef, 0x74, 0x2a, 0x82, 0x69, 0xc8, 0xcd, 0x1d, 0xd8, 0xce, 0x7a, 0xc9,
  1255  	0xa1, 0x7d, 0xd8, 0x5d, 0xcb, 0xb6, 0x82, 0xdb, 0xdf, 0x81, 0x66, 0x53, 0x12, 0x71, 0x93, 0x12,
  1256  	0x8e, 0x3e, 0x85, 0x7a, 0x4c, 0x43, 0x6f, 0xca, 0xfd, 0x80, 0xc6, 0x9c, 0x04, 0x4b, 0x49, 0x9d,
  1257  	0x8a, 0xb7, 0x04, 0xea, 0xac, 0x40, 0xf4, 0x19, 0x6c, 0xc7, 0x9c, 0x44, 0x7c, 0x2d, 0xae, 0x20,
  1258  	0xe3, 0xea, 0x12, 0xce, 0x03, 0xdb, 0xb7, 0x0a, 0x68, 0x36, 0x09, 0xbd, 0xf8, 0x9a, 0xcc, 0x29,
  1259  	0xfa, 0x12, 0x0e, 0x5c, 0x16, 0x04, 0x49, 0xe8, 0xbb, 0x84, 0x8b, 0x33, 0xd0, 0xd0, 0x65, 0x9e,
  1260  	0x1f, 0x5e, 0xc9, 0x2a, 0x9a, 0xbd, 0x81, 0xf7, 0xef, 0xf9, 0xad, 0xcc, 0x8d, 0xf6, 0xa0, 0x14,
  1261  	0x53, 0xea, 0xc5, 0xb2, 0x4a, 0x0d, 0xa7, 0x06, 0xf2, 0xe0, 0x20, 0x4e, 0x96, 0x4b, 0x16, 0x71,
  1262  	0xea, 0x4d, 0xd7, 0x5a, 0x8b, 0xb3, 0xb1, 0xfd, 0x3f, 0xb6, 0xf1, 0x7e, 0x9e, 0x6c, 0x0d, 0x8d,
  1263  	0xcd, 0x16, 0x34, 0x1f, 0x3f, 0x74, 0xce, 0xe0, 0xef, 0x05, 0x80, 0xee, 0xc2, 0xa7, 0x21, 0x37,
  1264  	0x12, 0x7e, 0x8d, 0x0e, 0xa1, 0x92, 0xc4, 0x34, 0x0a, 0x49, 0x40, 0xd3, 0xbe, 0x70, 0x6e, 0x0b,
  1265  	0xdf, 0x92, 0xc4, 0xf1, 0x3b, 0x16, 0x79, 0x59, 0x2f, 0xb9, 0x8d, 0x4e, 0x40, 0x0f, 0x29, 0x9f,
  1266  	0x46, 0x94, 0xa4, 0xfc, 0xb3, 0x84, 0xcb, 0x46, 0x84, 0x70, 0xeb, 0x21, 0xe5, 0x98, 0x12, 0x39,
  1267  	0x02, 0x96, 0x70, 0xf4, 0x12, 0x76, 0x44, 0xec, 0xbb, 0xc8, 0xe7, 0x34, 0x0f, 0x2e, 0x66, 0x2a,
  1268  	0xde, 0x0e, 0x29, 0x7f, 0x2d, 0x3c, 0xab, 0xe8, 0x16, 0x54, 0x3d, 0x1a, 0x73, 0x3f, 0x94, 0x0d,
  1269  	0x48, 0xfd, 0x68, 0x78, 0x1d, 0x42, 0x47, 0xa0, 0xb9, 0xb2, 0x83, 0xa9, 0xef, 0x35, 0x36, 0xd3,
  1270  	0x43, 0xa7, 0x40, 0xcf, 0x43, 0x07, 0xb0, 0xf9, 0xc6, 0x5f, 0x70, 0x1a, 0x35, 0xca, 0xd2, 0x93,
  1271  	0x59, 0x8f, 0xa9, 0xa0, 0xf2, 0x98, 0x0a, 0xcc, 0x43, 0x68, 0x3c, 0xec, 0x2c, 0x57, 0xe5, 0x11,
  1272  	0x3c, 0xfb, 0x57, 0x27, 0x39, 0xb3, 0x04, 0x54, 0xc3, 0x9d, 0xa3, 0xe7, 0x00, 0x34, 0x8a, 0x58,
  1273  	0x34, 0x75, 0x99, 0x47, 0xf3, 0xcb, 0xac, 0x49, 0xac, 0xcb, 0x3c, 0x8a, 0x5e, 0xc0, 0x56, 0x1a,
  1274  	0x10, 0xd0, 0x38, 0x26, 0x57, 0x54, 0x72, 0xab, 0xe1, 0x9a, 0x04, 0x2f, 0x52, 0xcc, 0xdc, 0x03,
  1275  	0x74, 0x97, 0x25, 0x2f, 0x41, 0x41, 0xcb, 0x66, 0xe7, 0xce, 0x1f, 0x12, 0xa5, 0x3c, 0x41, 0x54,
  1276  	0xe1, 0x01, 0x51, 0xcf, 0xa0, 0x32, 0x23, 0xdc, 0xbd, 0x16, 0x3e, 0x55, 0x32, 0x51, 0x96, 0x76,
  1277  	0xcf, 0x6b, 0x7f, 0x0f, 0xea, 0x38, 0x99, 0x7d, 0x68, 0x81, 0xff, 0x98, 0x44, 0xfb, 0x07, 0x28,
  1278  	0x4d, 0xc2, 0xf8, 0xe3, 0xe5, 0xff, 0x5b, 0x01, 0xf5, 0x8c, 0xf2, 0x0f, 0x4d, 0xff, 0x09, 0xc0,
  1279  	0x1b, 0x2a, 0xf8, 0x89, 0xfd, 0xf7, 0xe9, 0xdb, 0x5a, 0xc2, 0x9a, 0x44, 0xc6, 0xfe, 0x7b, 0x71,
  1280  	0x39, 0xca, 0xeb, 0x52, 0x56, 0xed, 0x0d, 0xbc, 0x02, 0xd0, 0x1e, 0x14, 0x93, 0xd0, 0xe7, 0x52,
  1281  	0xbb, 0x42, 0xe3, 0xd2, 0x42, 0x47, 0x50, 0x21, 0x09, 0x67, 0x53, 0xe2, 0xce, 0xa5, 0x6a, 0x2b,
  1282  	0x76, 0x01, 0x97, 0x05, 0x62, 0xb8, 0x73, 0xf1, 0x04, 0x3e, 0x14, 0x5b, 0x1d, 0x6a, 0x62, 0x5f,
  1283  	0x6e, 0x23, 0xd0, 0x57, 0xfb, 0x73, 0x41, 0x18, 0x50, 0xc9, 0x14, 0x13, 0xdf, 0x1b, 0xa8, 0x72,
  1284  	0x6f, 0xa0, 0xe2, 0x26, 0x67, 0x62, 0x13, 0xaf, 0x92, 0x2a, 0x6e, 0xf2, 0xca, 0x6e, 0xff, 0x08,
  1285  	0xc5, 0xd3, 0x24, 0x58, 0xa2, 0x06, 0x94, 0xdf, 0xb2, 0x24, 0x0a, 0xc9, 0x22, 0xa3, 0x6a, 0x65,
  1286  	0xca, 0x77, 0x80, 0xc5, 0x3e, 0x5f, 0x7d, 0x7c, 0x54, 0x9c, 0xdb, 0xa8, 0x09, 0xda, 0xdd, 0x85,
  1287  	0x52, 0x33, 0x22, 0xee, 0x20, 0x73, 0x17, 0x76, 0x72, 0x23, 0x3f, 0xf5, 0x5b, 0xa8, 0xa7, 0x32,
  1288  	0xc6, 0x6c, 0xb1, 0x98, 0x91, 0x8f, 0xa9, 0xe5, 0x93, 0x09, 0x54, 0xd7, 0x5e, 0x48, 0xf4, 0x1c,
  1289  	0x8e, 0xba, 0xc3, 0x8b, 0x11, 0xb6, 0xc6, 0xe3, 0xde, 0x70, 0x20, 0x96, 0x86, 0xd3, 0x33, 0xfb,
  1290  	0xd6, 0x08, 0x0f, 0x9d, 0xe1, 0x2b, 0x7d, 0x03, 0x55, 0xa0, 0x38, 0x18, 0x0e, 0x2c, 0x5d, 0x11,
  1291  	0xab, 0xcb, 0x7e, 0xcf, 0xd4, 0x0b, 0x62, 0x75, 0x76, 0xd9, 0x1b, 0xe9, 0x2a, 0x2a, 0x83, 0xda,
  1292  	0xbf, 0xfc, 0x5a, 0x2f, 0x9e, 0xfc, 0xa5, 0x00, 0xdc, 0x7d, 0x46, 0x45, 0xda, 0x91, 0xd1, 0x3d,
  1293  	0x37, 0xce, 0x2c, 0xe7, 0xdb, 0x91, 0xf5, 0x48, 0xda, 0x2d, 0xd0, 0x6c, 0x63, 0x70, 0x3a, 0xb6,
  1294  	0x8d, 0x73, 0x91, 0xbb, 0x01, 0x7b, 0xdd, 0x7e, 0xcf, 0x1a, 0x38, 0xc6, 0xc4, 0xb1, 0xad, 0x81,
  1295  	0xd3, 0xeb, 0x1a, 0x4e, 0x6f, 0x38, 0xd0, 0x0b, 0xa2, 0x82, 0xd1, 0x3d, 0xd7, 0x55, 0xa4, 0x43,
  1296  	0x6d, 0x3c, 0x31, 0xc7, 0x5d, 0xdc, 0x1b, 0x49, 0x57, 0x11, 0x21, 0xa8, 0x4f, 0x06, 0xf7, 0xb0,
  1297  	0x92, 0x08, 0x3f, 0xb3, 0x1c, 0x7d, 0x13, 0xd5, 0xa0, 0x72, 0x61, 0x8d, 0xc7, 0xc6, 0x99, 0x35,
  1298  	0xd6, 0xcb, 0xa2, 0x5c, 0x96, 0xbf, 0x7b, 0xae, 0x57, 0x84, 0x73, 0x6c, 0x4f, 0x9c, 0xd3, 0xe1,
  1299  	0xeb, 0x81, 0xae, 0x89, 0x76, 0x4e, 0x27, 0x17, 0x23, 0x1d, 0xe4, 0xa9, 0x2c, 0x03, 0x3b, 0xa6,
  1300  	0x65, 0x38, 0x7a, 0x55, 0x14, 0x48, 0x77, 0xe1, 0x61, 0xbf, 0x6f, 0x8a, 0xad, 0x35, 0xd3, 0xf8,
  1301  	0xf5, 0xb6, 0xa9, 0xfc, 0x76, 0xdb, 0x54, 0xfe, 0xb8, 0x6d, 0x2a, 0x3f, 0xff, 0xd9, 0xdc, 0x80,
  1302  	0x27, 0x7f, 0x6e, 0xcc, 0x6a, 0xfa, 0x4f, 0x24, 0xe9, 0xb1, 0x95, 0xd9, 0xa6, 0x74, 0x7c, 0xf1,
  1303  	0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x97, 0x69, 0xe7, 0x75, 0x2b, 0x09, 0x00, 0x00,
  1304  }
  1305  
  1306  func (m *Packet) Marshal() (dAtA []byte, err error) {
  1307  	size := m.Size()
  1308  	dAtA = make([]byte, size)
  1309  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1310  	if err != nil {
  1311  		return nil, err
  1312  	}
  1313  	return dAtA[:n], nil
  1314  }
  1315  
  1316  func (m *Packet) MarshalTo(dAtA []byte) (int, error) {
  1317  	size := m.Size()
  1318  	return m.MarshalToSizedBuffer(dAtA[:size])
  1319  }
  1320  
  1321  func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1322  	i := len(dAtA)
  1323  	_ = i
  1324  	var l int
  1325  	_ = l
  1326  	if m.XXX_unrecognized != nil {
  1327  		i -= len(m.XXX_unrecognized)
  1328  		copy(dAtA[i:], m.XXX_unrecognized)
  1329  	}
  1330  	if len(m.Body) > 0 {
  1331  		i -= len(m.Body)
  1332  		copy(dAtA[i:], m.Body)
  1333  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Body)))
  1334  		i--
  1335  		dAtA[i] = 0x2a
  1336  	}
  1337  	if m.CompressionPresent != nil {
  1338  		{
  1339  			size := m.CompressionPresent.Size()
  1340  			i -= size
  1341  			if _, err := m.CompressionPresent.MarshalTo(dAtA[i:]); err != nil {
  1342  				return 0, err
  1343  			}
  1344  		}
  1345  	}
  1346  	if m.Type != 0 {
  1347  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Type))
  1348  		i--
  1349  		dAtA[i] = 0x18
  1350  	}
  1351  	if m.VersionPresent != nil {
  1352  		{
  1353  			size := m.VersionPresent.Size()
  1354  			i -= size
  1355  			if _, err := m.VersionPresent.MarshalTo(dAtA[i:]); err != nil {
  1356  				return 0, err
  1357  			}
  1358  		}
  1359  	}
  1360  	if m.MagicNumberPresent != nil {
  1361  		{
  1362  			size := m.MagicNumberPresent.Size()
  1363  			i -= size
  1364  			if _, err := m.MagicNumberPresent.MarshalTo(dAtA[i:]); err != nil {
  1365  				return 0, err
  1366  			}
  1367  		}
  1368  	}
  1369  	return len(dAtA) - i, nil
  1370  }
  1371  
  1372  func (m *Packet_MagicNumber) MarshalTo(dAtA []byte) (int, error) {
  1373  	size := m.Size()
  1374  	return m.MarshalToSizedBuffer(dAtA[:size])
  1375  }
  1376  
  1377  func (m *Packet_MagicNumber) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1378  	i := len(dAtA)
  1379  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.MagicNumber))
  1380  	i--
  1381  	dAtA[i] = 0x8
  1382  	return len(dAtA) - i, nil
  1383  }
  1384  func (m *Packet_Version) MarshalTo(dAtA []byte) (int, error) {
  1385  	size := m.Size()
  1386  	return m.MarshalToSizedBuffer(dAtA[:size])
  1387  }
  1388  
  1389  func (m *Packet_Version) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1390  	i := len(dAtA)
  1391  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Version))
  1392  	i--
  1393  	dAtA[i] = 0x10
  1394  	return len(dAtA) - i, nil
  1395  }
  1396  func (m *Packet_Compression) MarshalTo(dAtA []byte) (int, error) {
  1397  	size := m.Size()
  1398  	return m.MarshalToSizedBuffer(dAtA[:size])
  1399  }
  1400  
  1401  func (m *Packet_Compression) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1402  	i := len(dAtA)
  1403  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Compression))
  1404  	i--
  1405  	dAtA[i] = 0x20
  1406  	return len(dAtA) - i, nil
  1407  }
  1408  func (m *HeartBeat) Marshal() (dAtA []byte, err error) {
  1409  	size := m.Size()
  1410  	dAtA = make([]byte, size)
  1411  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1412  	if err != nil {
  1413  		return nil, err
  1414  	}
  1415  	return dAtA[:n], nil
  1416  }
  1417  
  1418  func (m *HeartBeat) MarshalTo(dAtA []byte) (int, error) {
  1419  	size := m.Size()
  1420  	return m.MarshalToSizedBuffer(dAtA[:size])
  1421  }
  1422  
  1423  func (m *HeartBeat) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1424  	i := len(dAtA)
  1425  	_ = i
  1426  	var l int
  1427  	_ = l
  1428  	if m.XXX_unrecognized != nil {
  1429  		i -= len(m.XXX_unrecognized)
  1430  		copy(dAtA[i:], m.XXX_unrecognized)
  1431  	}
  1432  	if m.StartTimestamp != 0 {
  1433  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.StartTimestamp))
  1434  		i--
  1435  		dAtA[i] = 0x10
  1436  	}
  1437  	if m.SendTimestamp != 0 {
  1438  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.SendTimestamp))
  1439  		i--
  1440  		dAtA[i] = 0x8
  1441  	}
  1442  	return len(dAtA) - i, nil
  1443  }
  1444  
  1445  func (m *Handshake) Marshal() (dAtA []byte, err error) {
  1446  	size := m.Size()
  1447  	dAtA = make([]byte, size)
  1448  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1449  	if err != nil {
  1450  		return nil, err
  1451  	}
  1452  	return dAtA[:n], nil
  1453  }
  1454  
  1455  func (m *Handshake) MarshalTo(dAtA []byte) (int, error) {
  1456  	size := m.Size()
  1457  	return m.MarshalToSizedBuffer(dAtA[:size])
  1458  }
  1459  
  1460  func (m *Handshake) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1461  	i := len(dAtA)
  1462  	_ = i
  1463  	var l int
  1464  	_ = l
  1465  	if m.XXX_unrecognized != nil {
  1466  		i -= len(m.XXX_unrecognized)
  1467  		copy(dAtA[i:], m.XXX_unrecognized)
  1468  	}
  1469  	if m.SupportedCompressions != 0 {
  1470  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.SupportedCompressions))
  1471  		i--
  1472  		dAtA[i] = 0x18
  1473  	}
  1474  	if len(m.Seeds) > 0 {
  1475  		i -= len(m.Seeds)
  1476  		copy(dAtA[i:], m.Seeds)
  1477  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Seeds)))
  1478  		i--
  1479  		dAtA[i] = 0x12
  1480  	}
  1481  	if m.CommunicationEncodingPresent != nil {
  1482  		{
  1483  			size := m.CommunicationEncodingPresent.Size()
  1484  			i -= size
  1485  			if _, err := m.CommunicationEncodingPresent.MarshalTo(dAtA[i:]); err != nil {
  1486  				return 0, err
  1487  			}
  1488  		}
  1489  	}
  1490  	return len(dAtA) - i, nil
  1491  }
  1492  
  1493  func (m *Handshake_CommunicationEncoding) MarshalTo(dAtA []byte) (int, error) {
  1494  	size := m.Size()
  1495  	return m.MarshalToSizedBuffer(dAtA[:size])
  1496  }
  1497  
  1498  func (m *Handshake_CommunicationEncoding) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1499  	i := len(dAtA)
  1500  	i -= len(m.CommunicationEncoding)
  1501  	copy(dAtA[i:], m.CommunicationEncoding)
  1502  	i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.CommunicationEncoding)))
  1503  	i--
  1504  	dAtA[i] = 0xa
  1505  	return len(dAtA) - i, nil
  1506  }
  1507  func (m *ClientAuth) Marshal() (dAtA []byte, err error) {
  1508  	size := m.Size()
  1509  	dAtA = make([]byte, size)
  1510  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1511  	if err != nil {
  1512  		return nil, err
  1513  	}
  1514  	return dAtA[:n], nil
  1515  }
  1516  
  1517  func (m *ClientAuth) MarshalTo(dAtA []byte) (int, error) {
  1518  	size := m.Size()
  1519  	return m.MarshalToSizedBuffer(dAtA[:size])
  1520  }
  1521  
  1522  func (m *ClientAuth) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1523  	i := len(dAtA)
  1524  	_ = i
  1525  	var l int
  1526  	_ = l
  1527  	if m.XXX_unrecognized != nil {
  1528  		i -= len(m.XXX_unrecognized)
  1529  		copy(dAtA[i:], m.XXX_unrecognized)
  1530  	}
  1531  	if m.StartTimestamp != 0 {
  1532  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.StartTimestamp))
  1533  		i--
  1534  		dAtA[i] = 0x40
  1535  	}
  1536  	if len(m.Filter) > 0 {
  1537  		i -= len(m.Filter)
  1538  		copy(dAtA[i:], m.Filter)
  1539  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Filter)))
  1540  		i--
  1541  		dAtA[i] = 0x3a
  1542  	}
  1543  	if len(m.ClientId) > 0 {
  1544  		i -= len(m.ClientId)
  1545  		copy(dAtA[i:], m.ClientId)
  1546  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1547  		i--
  1548  		dAtA[i] = 0x32
  1549  	}
  1550  	if len(m.Destination) > 0 {
  1551  		i -= len(m.Destination)
  1552  		copy(dAtA[i:], m.Destination)
  1553  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1554  		i--
  1555  		dAtA[i] = 0x2a
  1556  	}
  1557  	if m.NetWriteTimeoutPresent != nil {
  1558  		{
  1559  			size := m.NetWriteTimeoutPresent.Size()
  1560  			i -= size
  1561  			if _, err := m.NetWriteTimeoutPresent.MarshalTo(dAtA[i:]); err != nil {
  1562  				return 0, err
  1563  			}
  1564  		}
  1565  	}
  1566  	if m.NetReadTimeoutPresent != nil {
  1567  		{
  1568  			size := m.NetReadTimeoutPresent.Size()
  1569  			i -= size
  1570  			if _, err := m.NetReadTimeoutPresent.MarshalTo(dAtA[i:]); err != nil {
  1571  				return 0, err
  1572  			}
  1573  		}
  1574  	}
  1575  	if len(m.Password) > 0 {
  1576  		i -= len(m.Password)
  1577  		copy(dAtA[i:], m.Password)
  1578  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Password)))
  1579  		i--
  1580  		dAtA[i] = 0x12
  1581  	}
  1582  	if len(m.Username) > 0 {
  1583  		i -= len(m.Username)
  1584  		copy(dAtA[i:], m.Username)
  1585  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Username)))
  1586  		i--
  1587  		dAtA[i] = 0xa
  1588  	}
  1589  	return len(dAtA) - i, nil
  1590  }
  1591  
  1592  func (m *ClientAuth_NetReadTimeout) MarshalTo(dAtA []byte) (int, error) {
  1593  	size := m.Size()
  1594  	return m.MarshalToSizedBuffer(dAtA[:size])
  1595  }
  1596  
  1597  func (m *ClientAuth_NetReadTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1598  	i := len(dAtA)
  1599  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.NetReadTimeout))
  1600  	i--
  1601  	dAtA[i] = 0x18
  1602  	return len(dAtA) - i, nil
  1603  }
  1604  func (m *ClientAuth_NetWriteTimeout) MarshalTo(dAtA []byte) (int, error) {
  1605  	size := m.Size()
  1606  	return m.MarshalToSizedBuffer(dAtA[:size])
  1607  }
  1608  
  1609  func (m *ClientAuth_NetWriteTimeout) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1610  	i := len(dAtA)
  1611  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.NetWriteTimeout))
  1612  	i--
  1613  	dAtA[i] = 0x20
  1614  	return len(dAtA) - i, nil
  1615  }
  1616  func (m *Ack) Marshal() (dAtA []byte, err error) {
  1617  	size := m.Size()
  1618  	dAtA = make([]byte, size)
  1619  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1620  	if err != nil {
  1621  		return nil, err
  1622  	}
  1623  	return dAtA[:n], nil
  1624  }
  1625  
  1626  func (m *Ack) MarshalTo(dAtA []byte) (int, error) {
  1627  	size := m.Size()
  1628  	return m.MarshalToSizedBuffer(dAtA[:size])
  1629  }
  1630  
  1631  func (m *Ack) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1632  	i := len(dAtA)
  1633  	_ = i
  1634  	var l int
  1635  	_ = l
  1636  	if m.XXX_unrecognized != nil {
  1637  		i -= len(m.XXX_unrecognized)
  1638  		copy(dAtA[i:], m.XXX_unrecognized)
  1639  	}
  1640  	if len(m.ErrorMessage) > 0 {
  1641  		i -= len(m.ErrorMessage)
  1642  		copy(dAtA[i:], m.ErrorMessage)
  1643  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ErrorMessage)))
  1644  		i--
  1645  		dAtA[i] = 0x12
  1646  	}
  1647  	if m.ErrorCodePresent != nil {
  1648  		{
  1649  			size := m.ErrorCodePresent.Size()
  1650  			i -= size
  1651  			if _, err := m.ErrorCodePresent.MarshalTo(dAtA[i:]); err != nil {
  1652  				return 0, err
  1653  			}
  1654  		}
  1655  	}
  1656  	return len(dAtA) - i, nil
  1657  }
  1658  
  1659  func (m *Ack_ErrorCode) MarshalTo(dAtA []byte) (int, error) {
  1660  	size := m.Size()
  1661  	return m.MarshalToSizedBuffer(dAtA[:size])
  1662  }
  1663  
  1664  func (m *Ack_ErrorCode) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1665  	i := len(dAtA)
  1666  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.ErrorCode))
  1667  	i--
  1668  	dAtA[i] = 0x8
  1669  	return len(dAtA) - i, nil
  1670  }
  1671  func (m *ClientAck) Marshal() (dAtA []byte, err error) {
  1672  	size := m.Size()
  1673  	dAtA = make([]byte, size)
  1674  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1675  	if err != nil {
  1676  		return nil, err
  1677  	}
  1678  	return dAtA[:n], nil
  1679  }
  1680  
  1681  func (m *ClientAck) MarshalTo(dAtA []byte) (int, error) {
  1682  	size := m.Size()
  1683  	return m.MarshalToSizedBuffer(dAtA[:size])
  1684  }
  1685  
  1686  func (m *ClientAck) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1687  	i := len(dAtA)
  1688  	_ = i
  1689  	var l int
  1690  	_ = l
  1691  	if m.XXX_unrecognized != nil {
  1692  		i -= len(m.XXX_unrecognized)
  1693  		copy(dAtA[i:], m.XXX_unrecognized)
  1694  	}
  1695  	if m.BatchId != 0 {
  1696  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.BatchId))
  1697  		i--
  1698  		dAtA[i] = 0x18
  1699  	}
  1700  	if len(m.ClientId) > 0 {
  1701  		i -= len(m.ClientId)
  1702  		copy(dAtA[i:], m.ClientId)
  1703  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1704  		i--
  1705  		dAtA[i] = 0x12
  1706  	}
  1707  	if len(m.Destination) > 0 {
  1708  		i -= len(m.Destination)
  1709  		copy(dAtA[i:], m.Destination)
  1710  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1711  		i--
  1712  		dAtA[i] = 0xa
  1713  	}
  1714  	return len(dAtA) - i, nil
  1715  }
  1716  
  1717  func (m *Sub) Marshal() (dAtA []byte, err error) {
  1718  	size := m.Size()
  1719  	dAtA = make([]byte, size)
  1720  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1721  	if err != nil {
  1722  		return nil, err
  1723  	}
  1724  	return dAtA[:n], nil
  1725  }
  1726  
  1727  func (m *Sub) MarshalTo(dAtA []byte) (int, error) {
  1728  	size := m.Size()
  1729  	return m.MarshalToSizedBuffer(dAtA[:size])
  1730  }
  1731  
  1732  func (m *Sub) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1733  	i := len(dAtA)
  1734  	_ = i
  1735  	var l int
  1736  	_ = l
  1737  	if m.XXX_unrecognized != nil {
  1738  		i -= len(m.XXX_unrecognized)
  1739  		copy(dAtA[i:], m.XXX_unrecognized)
  1740  	}
  1741  	if len(m.Filter) > 0 {
  1742  		i -= len(m.Filter)
  1743  		copy(dAtA[i:], m.Filter)
  1744  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Filter)))
  1745  		i--
  1746  		dAtA[i] = 0x3a
  1747  	}
  1748  	if len(m.ClientId) > 0 {
  1749  		i -= len(m.ClientId)
  1750  		copy(dAtA[i:], m.ClientId)
  1751  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1752  		i--
  1753  		dAtA[i] = 0x12
  1754  	}
  1755  	if len(m.Destination) > 0 {
  1756  		i -= len(m.Destination)
  1757  		copy(dAtA[i:], m.Destination)
  1758  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1759  		i--
  1760  		dAtA[i] = 0xa
  1761  	}
  1762  	return len(dAtA) - i, nil
  1763  }
  1764  
  1765  func (m *Unsub) Marshal() (dAtA []byte, err error) {
  1766  	size := m.Size()
  1767  	dAtA = make([]byte, size)
  1768  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1769  	if err != nil {
  1770  		return nil, err
  1771  	}
  1772  	return dAtA[:n], nil
  1773  }
  1774  
  1775  func (m *Unsub) MarshalTo(dAtA []byte) (int, error) {
  1776  	size := m.Size()
  1777  	return m.MarshalToSizedBuffer(dAtA[:size])
  1778  }
  1779  
  1780  func (m *Unsub) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1781  	i := len(dAtA)
  1782  	_ = i
  1783  	var l int
  1784  	_ = l
  1785  	if m.XXX_unrecognized != nil {
  1786  		i -= len(m.XXX_unrecognized)
  1787  		copy(dAtA[i:], m.XXX_unrecognized)
  1788  	}
  1789  	if len(m.Filter) > 0 {
  1790  		i -= len(m.Filter)
  1791  		copy(dAtA[i:], m.Filter)
  1792  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Filter)))
  1793  		i--
  1794  		dAtA[i] = 0x3a
  1795  	}
  1796  	if len(m.ClientId) > 0 {
  1797  		i -= len(m.ClientId)
  1798  		copy(dAtA[i:], m.ClientId)
  1799  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1800  		i--
  1801  		dAtA[i] = 0x12
  1802  	}
  1803  	if len(m.Destination) > 0 {
  1804  		i -= len(m.Destination)
  1805  		copy(dAtA[i:], m.Destination)
  1806  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1807  		i--
  1808  		dAtA[i] = 0xa
  1809  	}
  1810  	return len(dAtA) - i, nil
  1811  }
  1812  
  1813  func (m *Get) Marshal() (dAtA []byte, err error) {
  1814  	size := m.Size()
  1815  	dAtA = make([]byte, size)
  1816  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1817  	if err != nil {
  1818  		return nil, err
  1819  	}
  1820  	return dAtA[:n], nil
  1821  }
  1822  
  1823  func (m *Get) MarshalTo(dAtA []byte) (int, error) {
  1824  	size := m.Size()
  1825  	return m.MarshalToSizedBuffer(dAtA[:size])
  1826  }
  1827  
  1828  func (m *Get) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1829  	i := len(dAtA)
  1830  	_ = i
  1831  	var l int
  1832  	_ = l
  1833  	if m.XXX_unrecognized != nil {
  1834  		i -= len(m.XXX_unrecognized)
  1835  		copy(dAtA[i:], m.XXX_unrecognized)
  1836  	}
  1837  	if m.AutoAckPresent != nil {
  1838  		{
  1839  			size := m.AutoAckPresent.Size()
  1840  			i -= size
  1841  			if _, err := m.AutoAckPresent.MarshalTo(dAtA[i:]); err != nil {
  1842  				return 0, err
  1843  			}
  1844  		}
  1845  	}
  1846  	if m.UnitPresent != nil {
  1847  		{
  1848  			size := m.UnitPresent.Size()
  1849  			i -= size
  1850  			if _, err := m.UnitPresent.MarshalTo(dAtA[i:]); err != nil {
  1851  				return 0, err
  1852  			}
  1853  		}
  1854  	}
  1855  	if m.TimeoutPresent != nil {
  1856  		{
  1857  			size := m.TimeoutPresent.Size()
  1858  			i -= size
  1859  			if _, err := m.TimeoutPresent.MarshalTo(dAtA[i:]); err != nil {
  1860  				return 0, err
  1861  			}
  1862  		}
  1863  	}
  1864  	if m.FetchSize != 0 {
  1865  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.FetchSize))
  1866  		i--
  1867  		dAtA[i] = 0x18
  1868  	}
  1869  	if len(m.ClientId) > 0 {
  1870  		i -= len(m.ClientId)
  1871  		copy(dAtA[i:], m.ClientId)
  1872  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  1873  		i--
  1874  		dAtA[i] = 0x12
  1875  	}
  1876  	if len(m.Destination) > 0 {
  1877  		i -= len(m.Destination)
  1878  		copy(dAtA[i:], m.Destination)
  1879  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  1880  		i--
  1881  		dAtA[i] = 0xa
  1882  	}
  1883  	return len(dAtA) - i, nil
  1884  }
  1885  
  1886  func (m *Get_Timeout) MarshalTo(dAtA []byte) (int, error) {
  1887  	size := m.Size()
  1888  	return m.MarshalToSizedBuffer(dAtA[:size])
  1889  }
  1890  
  1891  func (m *Get_Timeout) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1892  	i := len(dAtA)
  1893  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Timeout))
  1894  	i--
  1895  	dAtA[i] = 0x20
  1896  	return len(dAtA) - i, nil
  1897  }
  1898  func (m *Get_Unit) MarshalTo(dAtA []byte) (int, error) {
  1899  	size := m.Size()
  1900  	return m.MarshalToSizedBuffer(dAtA[:size])
  1901  }
  1902  
  1903  func (m *Get_Unit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1904  	i := len(dAtA)
  1905  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Unit))
  1906  	i--
  1907  	dAtA[i] = 0x28
  1908  	return len(dAtA) - i, nil
  1909  }
  1910  func (m *Get_AutoAck) MarshalTo(dAtA []byte) (int, error) {
  1911  	size := m.Size()
  1912  	return m.MarshalToSizedBuffer(dAtA[:size])
  1913  }
  1914  
  1915  func (m *Get_AutoAck) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1916  	i := len(dAtA)
  1917  	i--
  1918  	if m.AutoAck {
  1919  		dAtA[i] = 1
  1920  	} else {
  1921  		dAtA[i] = 0
  1922  	}
  1923  	i--
  1924  	dAtA[i] = 0x30
  1925  	return len(dAtA) - i, nil
  1926  }
  1927  func (m *Messages) Marshal() (dAtA []byte, err error) {
  1928  	size := m.Size()
  1929  	dAtA = make([]byte, size)
  1930  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1931  	if err != nil {
  1932  		return nil, err
  1933  	}
  1934  	return dAtA[:n], nil
  1935  }
  1936  
  1937  func (m *Messages) MarshalTo(dAtA []byte) (int, error) {
  1938  	size := m.Size()
  1939  	return m.MarshalToSizedBuffer(dAtA[:size])
  1940  }
  1941  
  1942  func (m *Messages) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1943  	i := len(dAtA)
  1944  	_ = i
  1945  	var l int
  1946  	_ = l
  1947  	if m.XXX_unrecognized != nil {
  1948  		i -= len(m.XXX_unrecognized)
  1949  		copy(dAtA[i:], m.XXX_unrecognized)
  1950  	}
  1951  	if len(m.Messages) > 0 {
  1952  		for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- {
  1953  			i -= len(m.Messages[iNdEx])
  1954  			copy(dAtA[i:], m.Messages[iNdEx])
  1955  			i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Messages[iNdEx])))
  1956  			i--
  1957  			dAtA[i] = 0x12
  1958  		}
  1959  	}
  1960  	if m.BatchId != 0 {
  1961  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.BatchId))
  1962  		i--
  1963  		dAtA[i] = 0x8
  1964  	}
  1965  	return len(dAtA) - i, nil
  1966  }
  1967  
  1968  func (m *Dump) Marshal() (dAtA []byte, err error) {
  1969  	size := m.Size()
  1970  	dAtA = make([]byte, size)
  1971  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1972  	if err != nil {
  1973  		return nil, err
  1974  	}
  1975  	return dAtA[:n], nil
  1976  }
  1977  
  1978  func (m *Dump) MarshalTo(dAtA []byte) (int, error) {
  1979  	size := m.Size()
  1980  	return m.MarshalToSizedBuffer(dAtA[:size])
  1981  }
  1982  
  1983  func (m *Dump) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1984  	i := len(dAtA)
  1985  	_ = i
  1986  	var l int
  1987  	_ = l
  1988  	if m.XXX_unrecognized != nil {
  1989  		i -= len(m.XXX_unrecognized)
  1990  		copy(dAtA[i:], m.XXX_unrecognized)
  1991  	}
  1992  	if m.TimestampPresent != nil {
  1993  		{
  1994  			size := m.TimestampPresent.Size()
  1995  			i -= size
  1996  			if _, err := m.TimestampPresent.MarshalTo(dAtA[i:]); err != nil {
  1997  				return 0, err
  1998  			}
  1999  		}
  2000  	}
  2001  	if m.Position != 0 {
  2002  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Position))
  2003  		i--
  2004  		dAtA[i] = 0x10
  2005  	}
  2006  	if len(m.Journal) > 0 {
  2007  		i -= len(m.Journal)
  2008  		copy(dAtA[i:], m.Journal)
  2009  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Journal)))
  2010  		i--
  2011  		dAtA[i] = 0xa
  2012  	}
  2013  	return len(dAtA) - i, nil
  2014  }
  2015  
  2016  func (m *Dump_Timestamp) MarshalTo(dAtA []byte) (int, error) {
  2017  	size := m.Size()
  2018  	return m.MarshalToSizedBuffer(dAtA[:size])
  2019  }
  2020  
  2021  func (m *Dump_Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2022  	i := len(dAtA)
  2023  	i = encodeVarintCanalProtocol(dAtA, i, uint64(m.Timestamp))
  2024  	i--
  2025  	dAtA[i] = 0x18
  2026  	return len(dAtA) - i, nil
  2027  }
  2028  func (m *ClientRollback) Marshal() (dAtA []byte, err error) {
  2029  	size := m.Size()
  2030  	dAtA = make([]byte, size)
  2031  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2032  	if err != nil {
  2033  		return nil, err
  2034  	}
  2035  	return dAtA[:n], nil
  2036  }
  2037  
  2038  func (m *ClientRollback) MarshalTo(dAtA []byte) (int, error) {
  2039  	size := m.Size()
  2040  	return m.MarshalToSizedBuffer(dAtA[:size])
  2041  }
  2042  
  2043  func (m *ClientRollback) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2044  	i := len(dAtA)
  2045  	_ = i
  2046  	var l int
  2047  	_ = l
  2048  	if m.XXX_unrecognized != nil {
  2049  		i -= len(m.XXX_unrecognized)
  2050  		copy(dAtA[i:], m.XXX_unrecognized)
  2051  	}
  2052  	if m.BatchId != 0 {
  2053  		i = encodeVarintCanalProtocol(dAtA, i, uint64(m.BatchId))
  2054  		i--
  2055  		dAtA[i] = 0x18
  2056  	}
  2057  	if len(m.ClientId) > 0 {
  2058  		i -= len(m.ClientId)
  2059  		copy(dAtA[i:], m.ClientId)
  2060  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.ClientId)))
  2061  		i--
  2062  		dAtA[i] = 0x12
  2063  	}
  2064  	if len(m.Destination) > 0 {
  2065  		i -= len(m.Destination)
  2066  		copy(dAtA[i:], m.Destination)
  2067  		i = encodeVarintCanalProtocol(dAtA, i, uint64(len(m.Destination)))
  2068  		i--
  2069  		dAtA[i] = 0xa
  2070  	}
  2071  	return len(dAtA) - i, nil
  2072  }
  2073  
  2074  func encodeVarintCanalProtocol(dAtA []byte, offset int, v uint64) int {
  2075  	offset -= sovCanalProtocol(v)
  2076  	base := offset
  2077  	for v >= 1<<7 {
  2078  		dAtA[offset] = uint8(v&0x7f | 0x80)
  2079  		v >>= 7
  2080  		offset++
  2081  	}
  2082  	dAtA[offset] = uint8(v)
  2083  	return base
  2084  }
  2085  func (m *Packet) Size() (n int) {
  2086  	if m == nil {
  2087  		return 0
  2088  	}
  2089  	var l int
  2090  	_ = l
  2091  	if m.MagicNumberPresent != nil {
  2092  		n += m.MagicNumberPresent.Size()
  2093  	}
  2094  	if m.VersionPresent != nil {
  2095  		n += m.VersionPresent.Size()
  2096  	}
  2097  	if m.Type != 0 {
  2098  		n += 1 + sovCanalProtocol(uint64(m.Type))
  2099  	}
  2100  	if m.CompressionPresent != nil {
  2101  		n += m.CompressionPresent.Size()
  2102  	}
  2103  	l = len(m.Body)
  2104  	if l > 0 {
  2105  		n += 1 + l + sovCanalProtocol(uint64(l))
  2106  	}
  2107  	if m.XXX_unrecognized != nil {
  2108  		n += len(m.XXX_unrecognized)
  2109  	}
  2110  	return n
  2111  }
  2112  
  2113  func (m *Packet_MagicNumber) Size() (n int) {
  2114  	if m == nil {
  2115  		return 0
  2116  	}
  2117  	var l int
  2118  	_ = l
  2119  	n += 1 + sovCanalProtocol(uint64(m.MagicNumber))
  2120  	return n
  2121  }
  2122  func (m *Packet_Version) Size() (n int) {
  2123  	if m == nil {
  2124  		return 0
  2125  	}
  2126  	var l int
  2127  	_ = l
  2128  	n += 1 + sovCanalProtocol(uint64(m.Version))
  2129  	return n
  2130  }
  2131  func (m *Packet_Compression) Size() (n int) {
  2132  	if m == nil {
  2133  		return 0
  2134  	}
  2135  	var l int
  2136  	_ = l
  2137  	n += 1 + sovCanalProtocol(uint64(m.Compression))
  2138  	return n
  2139  }
  2140  func (m *HeartBeat) Size() (n int) {
  2141  	if m == nil {
  2142  		return 0
  2143  	}
  2144  	var l int
  2145  	_ = l
  2146  	if m.SendTimestamp != 0 {
  2147  		n += 1 + sovCanalProtocol(uint64(m.SendTimestamp))
  2148  	}
  2149  	if m.StartTimestamp != 0 {
  2150  		n += 1 + sovCanalProtocol(uint64(m.StartTimestamp))
  2151  	}
  2152  	if m.XXX_unrecognized != nil {
  2153  		n += len(m.XXX_unrecognized)
  2154  	}
  2155  	return n
  2156  }
  2157  
  2158  func (m *Handshake) Size() (n int) {
  2159  	if m == nil {
  2160  		return 0
  2161  	}
  2162  	var l int
  2163  	_ = l
  2164  	if m.CommunicationEncodingPresent != nil {
  2165  		n += m.CommunicationEncodingPresent.Size()
  2166  	}
  2167  	l = len(m.Seeds)
  2168  	if l > 0 {
  2169  		n += 1 + l + sovCanalProtocol(uint64(l))
  2170  	}
  2171  	if m.SupportedCompressions != 0 {
  2172  		n += 1 + sovCanalProtocol(uint64(m.SupportedCompressions))
  2173  	}
  2174  	if m.XXX_unrecognized != nil {
  2175  		n += len(m.XXX_unrecognized)
  2176  	}
  2177  	return n
  2178  }
  2179  
  2180  func (m *Handshake_CommunicationEncoding) Size() (n int) {
  2181  	if m == nil {
  2182  		return 0
  2183  	}
  2184  	var l int
  2185  	_ = l
  2186  	l = len(m.CommunicationEncoding)
  2187  	n += 1 + l + sovCanalProtocol(uint64(l))
  2188  	return n
  2189  }
  2190  func (m *ClientAuth) Size() (n int) {
  2191  	if m == nil {
  2192  		return 0
  2193  	}
  2194  	var l int
  2195  	_ = l
  2196  	l = len(m.Username)
  2197  	if l > 0 {
  2198  		n += 1 + l + sovCanalProtocol(uint64(l))
  2199  	}
  2200  	l = len(m.Password)
  2201  	if l > 0 {
  2202  		n += 1 + l + sovCanalProtocol(uint64(l))
  2203  	}
  2204  	if m.NetReadTimeoutPresent != nil {
  2205  		n += m.NetReadTimeoutPresent.Size()
  2206  	}
  2207  	if m.NetWriteTimeoutPresent != nil {
  2208  		n += m.NetWriteTimeoutPresent.Size()
  2209  	}
  2210  	l = len(m.Destination)
  2211  	if l > 0 {
  2212  		n += 1 + l + sovCanalProtocol(uint64(l))
  2213  	}
  2214  	l = len(m.ClientId)
  2215  	if l > 0 {
  2216  		n += 1 + l + sovCanalProtocol(uint64(l))
  2217  	}
  2218  	l = len(m.Filter)
  2219  	if l > 0 {
  2220  		n += 1 + l + sovCanalProtocol(uint64(l))
  2221  	}
  2222  	if m.StartTimestamp != 0 {
  2223  		n += 1 + sovCanalProtocol(uint64(m.StartTimestamp))
  2224  	}
  2225  	if m.XXX_unrecognized != nil {
  2226  		n += len(m.XXX_unrecognized)
  2227  	}
  2228  	return n
  2229  }
  2230  
  2231  func (m *ClientAuth_NetReadTimeout) Size() (n int) {
  2232  	if m == nil {
  2233  		return 0
  2234  	}
  2235  	var l int
  2236  	_ = l
  2237  	n += 1 + sovCanalProtocol(uint64(m.NetReadTimeout))
  2238  	return n
  2239  }
  2240  func (m *ClientAuth_NetWriteTimeout) Size() (n int) {
  2241  	if m == nil {
  2242  		return 0
  2243  	}
  2244  	var l int
  2245  	_ = l
  2246  	n += 1 + sovCanalProtocol(uint64(m.NetWriteTimeout))
  2247  	return n
  2248  }
  2249  func (m *Ack) Size() (n int) {
  2250  	if m == nil {
  2251  		return 0
  2252  	}
  2253  	var l int
  2254  	_ = l
  2255  	if m.ErrorCodePresent != nil {
  2256  		n += m.ErrorCodePresent.Size()
  2257  	}
  2258  	l = len(m.ErrorMessage)
  2259  	if l > 0 {
  2260  		n += 1 + l + sovCanalProtocol(uint64(l))
  2261  	}
  2262  	if m.XXX_unrecognized != nil {
  2263  		n += len(m.XXX_unrecognized)
  2264  	}
  2265  	return n
  2266  }
  2267  
  2268  func (m *Ack_ErrorCode) Size() (n int) {
  2269  	if m == nil {
  2270  		return 0
  2271  	}
  2272  	var l int
  2273  	_ = l
  2274  	n += 1 + sovCanalProtocol(uint64(m.ErrorCode))
  2275  	return n
  2276  }
  2277  func (m *ClientAck) Size() (n int) {
  2278  	if m == nil {
  2279  		return 0
  2280  	}
  2281  	var l int
  2282  	_ = l
  2283  	l = len(m.Destination)
  2284  	if l > 0 {
  2285  		n += 1 + l + sovCanalProtocol(uint64(l))
  2286  	}
  2287  	l = len(m.ClientId)
  2288  	if l > 0 {
  2289  		n += 1 + l + sovCanalProtocol(uint64(l))
  2290  	}
  2291  	if m.BatchId != 0 {
  2292  		n += 1 + sovCanalProtocol(uint64(m.BatchId))
  2293  	}
  2294  	if m.XXX_unrecognized != nil {
  2295  		n += len(m.XXX_unrecognized)
  2296  	}
  2297  	return n
  2298  }
  2299  
  2300  func (m *Sub) Size() (n int) {
  2301  	if m == nil {
  2302  		return 0
  2303  	}
  2304  	var l int
  2305  	_ = l
  2306  	l = len(m.Destination)
  2307  	if l > 0 {
  2308  		n += 1 + l + sovCanalProtocol(uint64(l))
  2309  	}
  2310  	l = len(m.ClientId)
  2311  	if l > 0 {
  2312  		n += 1 + l + sovCanalProtocol(uint64(l))
  2313  	}
  2314  	l = len(m.Filter)
  2315  	if l > 0 {
  2316  		n += 1 + l + sovCanalProtocol(uint64(l))
  2317  	}
  2318  	if m.XXX_unrecognized != nil {
  2319  		n += len(m.XXX_unrecognized)
  2320  	}
  2321  	return n
  2322  }
  2323  
  2324  func (m *Unsub) Size() (n int) {
  2325  	if m == nil {
  2326  		return 0
  2327  	}
  2328  	var l int
  2329  	_ = l
  2330  	l = len(m.Destination)
  2331  	if l > 0 {
  2332  		n += 1 + l + sovCanalProtocol(uint64(l))
  2333  	}
  2334  	l = len(m.ClientId)
  2335  	if l > 0 {
  2336  		n += 1 + l + sovCanalProtocol(uint64(l))
  2337  	}
  2338  	l = len(m.Filter)
  2339  	if l > 0 {
  2340  		n += 1 + l + sovCanalProtocol(uint64(l))
  2341  	}
  2342  	if m.XXX_unrecognized != nil {
  2343  		n += len(m.XXX_unrecognized)
  2344  	}
  2345  	return n
  2346  }
  2347  
  2348  func (m *Get) Size() (n int) {
  2349  	if m == nil {
  2350  		return 0
  2351  	}
  2352  	var l int
  2353  	_ = l
  2354  	l = len(m.Destination)
  2355  	if l > 0 {
  2356  		n += 1 + l + sovCanalProtocol(uint64(l))
  2357  	}
  2358  	l = len(m.ClientId)
  2359  	if l > 0 {
  2360  		n += 1 + l + sovCanalProtocol(uint64(l))
  2361  	}
  2362  	if m.FetchSize != 0 {
  2363  		n += 1 + sovCanalProtocol(uint64(m.FetchSize))
  2364  	}
  2365  	if m.TimeoutPresent != nil {
  2366  		n += m.TimeoutPresent.Size()
  2367  	}
  2368  	if m.UnitPresent != nil {
  2369  		n += m.UnitPresent.Size()
  2370  	}
  2371  	if m.AutoAckPresent != nil {
  2372  		n += m.AutoAckPresent.Size()
  2373  	}
  2374  	if m.XXX_unrecognized != nil {
  2375  		n += len(m.XXX_unrecognized)
  2376  	}
  2377  	return n
  2378  }
  2379  
  2380  func (m *Get_Timeout) Size() (n int) {
  2381  	if m == nil {
  2382  		return 0
  2383  	}
  2384  	var l int
  2385  	_ = l
  2386  	n += 1 + sovCanalProtocol(uint64(m.Timeout))
  2387  	return n
  2388  }
  2389  func (m *Get_Unit) Size() (n int) {
  2390  	if m == nil {
  2391  		return 0
  2392  	}
  2393  	var l int
  2394  	_ = l
  2395  	n += 1 + sovCanalProtocol(uint64(m.Unit))
  2396  	return n
  2397  }
  2398  func (m *Get_AutoAck) Size() (n int) {
  2399  	if m == nil {
  2400  		return 0
  2401  	}
  2402  	var l int
  2403  	_ = l
  2404  	n += 2
  2405  	return n
  2406  }
  2407  func (m *Messages) Size() (n int) {
  2408  	if m == nil {
  2409  		return 0
  2410  	}
  2411  	var l int
  2412  	_ = l
  2413  	if m.BatchId != 0 {
  2414  		n += 1 + sovCanalProtocol(uint64(m.BatchId))
  2415  	}
  2416  	if len(m.Messages) > 0 {
  2417  		for _, b := range m.Messages {
  2418  			l = len(b)
  2419  			n += 1 + l + sovCanalProtocol(uint64(l))
  2420  		}
  2421  	}
  2422  	if m.XXX_unrecognized != nil {
  2423  		n += len(m.XXX_unrecognized)
  2424  	}
  2425  	return n
  2426  }
  2427  
  2428  func (m *Dump) Size() (n int) {
  2429  	if m == nil {
  2430  		return 0
  2431  	}
  2432  	var l int
  2433  	_ = l
  2434  	l = len(m.Journal)
  2435  	if l > 0 {
  2436  		n += 1 + l + sovCanalProtocol(uint64(l))
  2437  	}
  2438  	if m.Position != 0 {
  2439  		n += 1 + sovCanalProtocol(uint64(m.Position))
  2440  	}
  2441  	if m.TimestampPresent != nil {
  2442  		n += m.TimestampPresent.Size()
  2443  	}
  2444  	if m.XXX_unrecognized != nil {
  2445  		n += len(m.XXX_unrecognized)
  2446  	}
  2447  	return n
  2448  }
  2449  
  2450  func (m *Dump_Timestamp) Size() (n int) {
  2451  	if m == nil {
  2452  		return 0
  2453  	}
  2454  	var l int
  2455  	_ = l
  2456  	n += 1 + sovCanalProtocol(uint64(m.Timestamp))
  2457  	return n
  2458  }
  2459  func (m *ClientRollback) Size() (n int) {
  2460  	if m == nil {
  2461  		return 0
  2462  	}
  2463  	var l int
  2464  	_ = l
  2465  	l = len(m.Destination)
  2466  	if l > 0 {
  2467  		n += 1 + l + sovCanalProtocol(uint64(l))
  2468  	}
  2469  	l = len(m.ClientId)
  2470  	if l > 0 {
  2471  		n += 1 + l + sovCanalProtocol(uint64(l))
  2472  	}
  2473  	if m.BatchId != 0 {
  2474  		n += 1 + sovCanalProtocol(uint64(m.BatchId))
  2475  	}
  2476  	if m.XXX_unrecognized != nil {
  2477  		n += len(m.XXX_unrecognized)
  2478  	}
  2479  	return n
  2480  }
  2481  
  2482  func sovCanalProtocol(x uint64) (n int) {
  2483  	return (math_bits.Len64(x|1) + 6) / 7
  2484  }
  2485  func sozCanalProtocol(x uint64) (n int) {
  2486  	return sovCanalProtocol(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2487  }
  2488  func (m *Packet) Unmarshal(dAtA []byte) error {
  2489  	l := len(dAtA)
  2490  	iNdEx := 0
  2491  	for iNdEx < l {
  2492  		preIndex := iNdEx
  2493  		var wire uint64
  2494  		for shift := uint(0); ; shift += 7 {
  2495  			if shift >= 64 {
  2496  				return ErrIntOverflowCanalProtocol
  2497  			}
  2498  			if iNdEx >= l {
  2499  				return io.ErrUnexpectedEOF
  2500  			}
  2501  			b := dAtA[iNdEx]
  2502  			iNdEx++
  2503  			wire |= uint64(b&0x7F) << shift
  2504  			if b < 0x80 {
  2505  				break
  2506  			}
  2507  		}
  2508  		fieldNum := int32(wire >> 3)
  2509  		wireType := int(wire & 0x7)
  2510  		if wireType == 4 {
  2511  			return fmt.Errorf("proto: Packet: wiretype end group for non-group")
  2512  		}
  2513  		if fieldNum <= 0 {
  2514  			return fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire)
  2515  		}
  2516  		switch fieldNum {
  2517  		case 1:
  2518  			if wireType != 0 {
  2519  				return fmt.Errorf("proto: wrong wireType = %d for field MagicNumber", wireType)
  2520  			}
  2521  			var v int32
  2522  			for shift := uint(0); ; shift += 7 {
  2523  				if shift >= 64 {
  2524  					return ErrIntOverflowCanalProtocol
  2525  				}
  2526  				if iNdEx >= l {
  2527  					return io.ErrUnexpectedEOF
  2528  				}
  2529  				b := dAtA[iNdEx]
  2530  				iNdEx++
  2531  				v |= int32(b&0x7F) << shift
  2532  				if b < 0x80 {
  2533  					break
  2534  				}
  2535  			}
  2536  			m.MagicNumberPresent = &Packet_MagicNumber{v}
  2537  		case 2:
  2538  			if wireType != 0 {
  2539  				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  2540  			}
  2541  			var v int32
  2542  			for shift := uint(0); ; shift += 7 {
  2543  				if shift >= 64 {
  2544  					return ErrIntOverflowCanalProtocol
  2545  				}
  2546  				if iNdEx >= l {
  2547  					return io.ErrUnexpectedEOF
  2548  				}
  2549  				b := dAtA[iNdEx]
  2550  				iNdEx++
  2551  				v |= int32(b&0x7F) << shift
  2552  				if b < 0x80 {
  2553  					break
  2554  				}
  2555  			}
  2556  			m.VersionPresent = &Packet_Version{v}
  2557  		case 3:
  2558  			if wireType != 0 {
  2559  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2560  			}
  2561  			m.Type = 0
  2562  			for shift := uint(0); ; shift += 7 {
  2563  				if shift >= 64 {
  2564  					return ErrIntOverflowCanalProtocol
  2565  				}
  2566  				if iNdEx >= l {
  2567  					return io.ErrUnexpectedEOF
  2568  				}
  2569  				b := dAtA[iNdEx]
  2570  				iNdEx++
  2571  				m.Type |= PacketType(b&0x7F) << shift
  2572  				if b < 0x80 {
  2573  					break
  2574  				}
  2575  			}
  2576  		case 4:
  2577  			if wireType != 0 {
  2578  				return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  2579  			}
  2580  			var v Compression
  2581  			for shift := uint(0); ; shift += 7 {
  2582  				if shift >= 64 {
  2583  					return ErrIntOverflowCanalProtocol
  2584  				}
  2585  				if iNdEx >= l {
  2586  					return io.ErrUnexpectedEOF
  2587  				}
  2588  				b := dAtA[iNdEx]
  2589  				iNdEx++
  2590  				v |= Compression(b&0x7F) << shift
  2591  				if b < 0x80 {
  2592  					break
  2593  				}
  2594  			}
  2595  			m.CompressionPresent = &Packet_Compression{v}
  2596  		case 5:
  2597  			if wireType != 2 {
  2598  				return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType)
  2599  			}
  2600  			var byteLen int
  2601  			for shift := uint(0); ; shift += 7 {
  2602  				if shift >= 64 {
  2603  					return ErrIntOverflowCanalProtocol
  2604  				}
  2605  				if iNdEx >= l {
  2606  					return io.ErrUnexpectedEOF
  2607  				}
  2608  				b := dAtA[iNdEx]
  2609  				iNdEx++
  2610  				byteLen |= int(b&0x7F) << shift
  2611  				if b < 0x80 {
  2612  					break
  2613  				}
  2614  			}
  2615  			if byteLen < 0 {
  2616  				return ErrInvalidLengthCanalProtocol
  2617  			}
  2618  			postIndex := iNdEx + byteLen
  2619  			if postIndex < 0 {
  2620  				return ErrInvalidLengthCanalProtocol
  2621  			}
  2622  			if postIndex > l {
  2623  				return io.ErrUnexpectedEOF
  2624  			}
  2625  			m.Body = append(m.Body[:0], dAtA[iNdEx:postIndex]...)
  2626  			if m.Body == nil {
  2627  				m.Body = []byte{}
  2628  			}
  2629  			iNdEx = postIndex
  2630  		default:
  2631  			iNdEx = preIndex
  2632  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  2633  			if err != nil {
  2634  				return err
  2635  			}
  2636  			if skippy < 0 {
  2637  				return ErrInvalidLengthCanalProtocol
  2638  			}
  2639  			if (iNdEx + skippy) < 0 {
  2640  				return ErrInvalidLengthCanalProtocol
  2641  			}
  2642  			if (iNdEx + skippy) > l {
  2643  				return io.ErrUnexpectedEOF
  2644  			}
  2645  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  2646  			iNdEx += skippy
  2647  		}
  2648  	}
  2649  
  2650  	if iNdEx > l {
  2651  		return io.ErrUnexpectedEOF
  2652  	}
  2653  	return nil
  2654  }
  2655  func (m *HeartBeat) Unmarshal(dAtA []byte) error {
  2656  	l := len(dAtA)
  2657  	iNdEx := 0
  2658  	for iNdEx < l {
  2659  		preIndex := iNdEx
  2660  		var wire uint64
  2661  		for shift := uint(0); ; shift += 7 {
  2662  			if shift >= 64 {
  2663  				return ErrIntOverflowCanalProtocol
  2664  			}
  2665  			if iNdEx >= l {
  2666  				return io.ErrUnexpectedEOF
  2667  			}
  2668  			b := dAtA[iNdEx]
  2669  			iNdEx++
  2670  			wire |= uint64(b&0x7F) << shift
  2671  			if b < 0x80 {
  2672  				break
  2673  			}
  2674  		}
  2675  		fieldNum := int32(wire >> 3)
  2676  		wireType := int(wire & 0x7)
  2677  		if wireType == 4 {
  2678  			return fmt.Errorf("proto: HeartBeat: wiretype end group for non-group")
  2679  		}
  2680  		if fieldNum <= 0 {
  2681  			return fmt.Errorf("proto: HeartBeat: illegal tag %d (wire type %d)", fieldNum, wire)
  2682  		}
  2683  		switch fieldNum {
  2684  		case 1:
  2685  			if wireType != 0 {
  2686  				return fmt.Errorf("proto: wrong wireType = %d for field SendTimestamp", wireType)
  2687  			}
  2688  			m.SendTimestamp = 0
  2689  			for shift := uint(0); ; shift += 7 {
  2690  				if shift >= 64 {
  2691  					return ErrIntOverflowCanalProtocol
  2692  				}
  2693  				if iNdEx >= l {
  2694  					return io.ErrUnexpectedEOF
  2695  				}
  2696  				b := dAtA[iNdEx]
  2697  				iNdEx++
  2698  				m.SendTimestamp |= int64(b&0x7F) << shift
  2699  				if b < 0x80 {
  2700  					break
  2701  				}
  2702  			}
  2703  		case 2:
  2704  			if wireType != 0 {
  2705  				return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType)
  2706  			}
  2707  			m.StartTimestamp = 0
  2708  			for shift := uint(0); ; shift += 7 {
  2709  				if shift >= 64 {
  2710  					return ErrIntOverflowCanalProtocol
  2711  				}
  2712  				if iNdEx >= l {
  2713  					return io.ErrUnexpectedEOF
  2714  				}
  2715  				b := dAtA[iNdEx]
  2716  				iNdEx++
  2717  				m.StartTimestamp |= int64(b&0x7F) << shift
  2718  				if b < 0x80 {
  2719  					break
  2720  				}
  2721  			}
  2722  		default:
  2723  			iNdEx = preIndex
  2724  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  2725  			if err != nil {
  2726  				return err
  2727  			}
  2728  			if skippy < 0 {
  2729  				return ErrInvalidLengthCanalProtocol
  2730  			}
  2731  			if (iNdEx + skippy) < 0 {
  2732  				return ErrInvalidLengthCanalProtocol
  2733  			}
  2734  			if (iNdEx + skippy) > l {
  2735  				return io.ErrUnexpectedEOF
  2736  			}
  2737  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  2738  			iNdEx += skippy
  2739  		}
  2740  	}
  2741  
  2742  	if iNdEx > l {
  2743  		return io.ErrUnexpectedEOF
  2744  	}
  2745  	return nil
  2746  }
  2747  func (m *Handshake) Unmarshal(dAtA []byte) error {
  2748  	l := len(dAtA)
  2749  	iNdEx := 0
  2750  	for iNdEx < l {
  2751  		preIndex := iNdEx
  2752  		var wire uint64
  2753  		for shift := uint(0); ; shift += 7 {
  2754  			if shift >= 64 {
  2755  				return ErrIntOverflowCanalProtocol
  2756  			}
  2757  			if iNdEx >= l {
  2758  				return io.ErrUnexpectedEOF
  2759  			}
  2760  			b := dAtA[iNdEx]
  2761  			iNdEx++
  2762  			wire |= uint64(b&0x7F) << shift
  2763  			if b < 0x80 {
  2764  				break
  2765  			}
  2766  		}
  2767  		fieldNum := int32(wire >> 3)
  2768  		wireType := int(wire & 0x7)
  2769  		if wireType == 4 {
  2770  			return fmt.Errorf("proto: Handshake: wiretype end group for non-group")
  2771  		}
  2772  		if fieldNum <= 0 {
  2773  			return fmt.Errorf("proto: Handshake: illegal tag %d (wire type %d)", fieldNum, wire)
  2774  		}
  2775  		switch fieldNum {
  2776  		case 1:
  2777  			if wireType != 2 {
  2778  				return fmt.Errorf("proto: wrong wireType = %d for field CommunicationEncoding", wireType)
  2779  			}
  2780  			var stringLen uint64
  2781  			for shift := uint(0); ; shift += 7 {
  2782  				if shift >= 64 {
  2783  					return ErrIntOverflowCanalProtocol
  2784  				}
  2785  				if iNdEx >= l {
  2786  					return io.ErrUnexpectedEOF
  2787  				}
  2788  				b := dAtA[iNdEx]
  2789  				iNdEx++
  2790  				stringLen |= uint64(b&0x7F) << shift
  2791  				if b < 0x80 {
  2792  					break
  2793  				}
  2794  			}
  2795  			intStringLen := int(stringLen)
  2796  			if intStringLen < 0 {
  2797  				return ErrInvalidLengthCanalProtocol
  2798  			}
  2799  			postIndex := iNdEx + intStringLen
  2800  			if postIndex < 0 {
  2801  				return ErrInvalidLengthCanalProtocol
  2802  			}
  2803  			if postIndex > l {
  2804  				return io.ErrUnexpectedEOF
  2805  			}
  2806  			m.CommunicationEncodingPresent = &Handshake_CommunicationEncoding{string(dAtA[iNdEx:postIndex])}
  2807  			iNdEx = postIndex
  2808  		case 2:
  2809  			if wireType != 2 {
  2810  				return fmt.Errorf("proto: wrong wireType = %d for field Seeds", wireType)
  2811  			}
  2812  			var byteLen int
  2813  			for shift := uint(0); ; shift += 7 {
  2814  				if shift >= 64 {
  2815  					return ErrIntOverflowCanalProtocol
  2816  				}
  2817  				if iNdEx >= l {
  2818  					return io.ErrUnexpectedEOF
  2819  				}
  2820  				b := dAtA[iNdEx]
  2821  				iNdEx++
  2822  				byteLen |= int(b&0x7F) << shift
  2823  				if b < 0x80 {
  2824  					break
  2825  				}
  2826  			}
  2827  			if byteLen < 0 {
  2828  				return ErrInvalidLengthCanalProtocol
  2829  			}
  2830  			postIndex := iNdEx + byteLen
  2831  			if postIndex < 0 {
  2832  				return ErrInvalidLengthCanalProtocol
  2833  			}
  2834  			if postIndex > l {
  2835  				return io.ErrUnexpectedEOF
  2836  			}
  2837  			m.Seeds = append(m.Seeds[:0], dAtA[iNdEx:postIndex]...)
  2838  			if m.Seeds == nil {
  2839  				m.Seeds = []byte{}
  2840  			}
  2841  			iNdEx = postIndex
  2842  		case 3:
  2843  			if wireType != 0 {
  2844  				return fmt.Errorf("proto: wrong wireType = %d for field SupportedCompressions", wireType)
  2845  			}
  2846  			m.SupportedCompressions = 0
  2847  			for shift := uint(0); ; shift += 7 {
  2848  				if shift >= 64 {
  2849  					return ErrIntOverflowCanalProtocol
  2850  				}
  2851  				if iNdEx >= l {
  2852  					return io.ErrUnexpectedEOF
  2853  				}
  2854  				b := dAtA[iNdEx]
  2855  				iNdEx++
  2856  				m.SupportedCompressions |= Compression(b&0x7F) << shift
  2857  				if b < 0x80 {
  2858  					break
  2859  				}
  2860  			}
  2861  		default:
  2862  			iNdEx = preIndex
  2863  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  2864  			if err != nil {
  2865  				return err
  2866  			}
  2867  			if skippy < 0 {
  2868  				return ErrInvalidLengthCanalProtocol
  2869  			}
  2870  			if (iNdEx + skippy) < 0 {
  2871  				return ErrInvalidLengthCanalProtocol
  2872  			}
  2873  			if (iNdEx + skippy) > l {
  2874  				return io.ErrUnexpectedEOF
  2875  			}
  2876  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  2877  			iNdEx += skippy
  2878  		}
  2879  	}
  2880  
  2881  	if iNdEx > l {
  2882  		return io.ErrUnexpectedEOF
  2883  	}
  2884  	return nil
  2885  }
  2886  func (m *ClientAuth) Unmarshal(dAtA []byte) error {
  2887  	l := len(dAtA)
  2888  	iNdEx := 0
  2889  	for iNdEx < l {
  2890  		preIndex := iNdEx
  2891  		var wire uint64
  2892  		for shift := uint(0); ; shift += 7 {
  2893  			if shift >= 64 {
  2894  				return ErrIntOverflowCanalProtocol
  2895  			}
  2896  			if iNdEx >= l {
  2897  				return io.ErrUnexpectedEOF
  2898  			}
  2899  			b := dAtA[iNdEx]
  2900  			iNdEx++
  2901  			wire |= uint64(b&0x7F) << shift
  2902  			if b < 0x80 {
  2903  				break
  2904  			}
  2905  		}
  2906  		fieldNum := int32(wire >> 3)
  2907  		wireType := int(wire & 0x7)
  2908  		if wireType == 4 {
  2909  			return fmt.Errorf("proto: ClientAuth: wiretype end group for non-group")
  2910  		}
  2911  		if fieldNum <= 0 {
  2912  			return fmt.Errorf("proto: ClientAuth: illegal tag %d (wire type %d)", fieldNum, wire)
  2913  		}
  2914  		switch fieldNum {
  2915  		case 1:
  2916  			if wireType != 2 {
  2917  				return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
  2918  			}
  2919  			var stringLen uint64
  2920  			for shift := uint(0); ; shift += 7 {
  2921  				if shift >= 64 {
  2922  					return ErrIntOverflowCanalProtocol
  2923  				}
  2924  				if iNdEx >= l {
  2925  					return io.ErrUnexpectedEOF
  2926  				}
  2927  				b := dAtA[iNdEx]
  2928  				iNdEx++
  2929  				stringLen |= uint64(b&0x7F) << shift
  2930  				if b < 0x80 {
  2931  					break
  2932  				}
  2933  			}
  2934  			intStringLen := int(stringLen)
  2935  			if intStringLen < 0 {
  2936  				return ErrInvalidLengthCanalProtocol
  2937  			}
  2938  			postIndex := iNdEx + intStringLen
  2939  			if postIndex < 0 {
  2940  				return ErrInvalidLengthCanalProtocol
  2941  			}
  2942  			if postIndex > l {
  2943  				return io.ErrUnexpectedEOF
  2944  			}
  2945  			m.Username = string(dAtA[iNdEx:postIndex])
  2946  			iNdEx = postIndex
  2947  		case 2:
  2948  			if wireType != 2 {
  2949  				return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
  2950  			}
  2951  			var byteLen int
  2952  			for shift := uint(0); ; shift += 7 {
  2953  				if shift >= 64 {
  2954  					return ErrIntOverflowCanalProtocol
  2955  				}
  2956  				if iNdEx >= l {
  2957  					return io.ErrUnexpectedEOF
  2958  				}
  2959  				b := dAtA[iNdEx]
  2960  				iNdEx++
  2961  				byteLen |= int(b&0x7F) << shift
  2962  				if b < 0x80 {
  2963  					break
  2964  				}
  2965  			}
  2966  			if byteLen < 0 {
  2967  				return ErrInvalidLengthCanalProtocol
  2968  			}
  2969  			postIndex := iNdEx + byteLen
  2970  			if postIndex < 0 {
  2971  				return ErrInvalidLengthCanalProtocol
  2972  			}
  2973  			if postIndex > l {
  2974  				return io.ErrUnexpectedEOF
  2975  			}
  2976  			m.Password = append(m.Password[:0], dAtA[iNdEx:postIndex]...)
  2977  			if m.Password == nil {
  2978  				m.Password = []byte{}
  2979  			}
  2980  			iNdEx = postIndex
  2981  		case 3:
  2982  			if wireType != 0 {
  2983  				return fmt.Errorf("proto: wrong wireType = %d for field NetReadTimeout", wireType)
  2984  			}
  2985  			var v int32
  2986  			for shift := uint(0); ; shift += 7 {
  2987  				if shift >= 64 {
  2988  					return ErrIntOverflowCanalProtocol
  2989  				}
  2990  				if iNdEx >= l {
  2991  					return io.ErrUnexpectedEOF
  2992  				}
  2993  				b := dAtA[iNdEx]
  2994  				iNdEx++
  2995  				v |= int32(b&0x7F) << shift
  2996  				if b < 0x80 {
  2997  					break
  2998  				}
  2999  			}
  3000  			m.NetReadTimeoutPresent = &ClientAuth_NetReadTimeout{v}
  3001  		case 4:
  3002  			if wireType != 0 {
  3003  				return fmt.Errorf("proto: wrong wireType = %d for field NetWriteTimeout", wireType)
  3004  			}
  3005  			var v int32
  3006  			for shift := uint(0); ; shift += 7 {
  3007  				if shift >= 64 {
  3008  					return ErrIntOverflowCanalProtocol
  3009  				}
  3010  				if iNdEx >= l {
  3011  					return io.ErrUnexpectedEOF
  3012  				}
  3013  				b := dAtA[iNdEx]
  3014  				iNdEx++
  3015  				v |= int32(b&0x7F) << shift
  3016  				if b < 0x80 {
  3017  					break
  3018  				}
  3019  			}
  3020  			m.NetWriteTimeoutPresent = &ClientAuth_NetWriteTimeout{v}
  3021  		case 5:
  3022  			if wireType != 2 {
  3023  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  3024  			}
  3025  			var stringLen uint64
  3026  			for shift := uint(0); ; shift += 7 {
  3027  				if shift >= 64 {
  3028  					return ErrIntOverflowCanalProtocol
  3029  				}
  3030  				if iNdEx >= l {
  3031  					return io.ErrUnexpectedEOF
  3032  				}
  3033  				b := dAtA[iNdEx]
  3034  				iNdEx++
  3035  				stringLen |= uint64(b&0x7F) << shift
  3036  				if b < 0x80 {
  3037  					break
  3038  				}
  3039  			}
  3040  			intStringLen := int(stringLen)
  3041  			if intStringLen < 0 {
  3042  				return ErrInvalidLengthCanalProtocol
  3043  			}
  3044  			postIndex := iNdEx + intStringLen
  3045  			if postIndex < 0 {
  3046  				return ErrInvalidLengthCanalProtocol
  3047  			}
  3048  			if postIndex > l {
  3049  				return io.ErrUnexpectedEOF
  3050  			}
  3051  			m.Destination = string(dAtA[iNdEx:postIndex])
  3052  			iNdEx = postIndex
  3053  		case 6:
  3054  			if wireType != 2 {
  3055  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  3056  			}
  3057  			var stringLen uint64
  3058  			for shift := uint(0); ; shift += 7 {
  3059  				if shift >= 64 {
  3060  					return ErrIntOverflowCanalProtocol
  3061  				}
  3062  				if iNdEx >= l {
  3063  					return io.ErrUnexpectedEOF
  3064  				}
  3065  				b := dAtA[iNdEx]
  3066  				iNdEx++
  3067  				stringLen |= uint64(b&0x7F) << shift
  3068  				if b < 0x80 {
  3069  					break
  3070  				}
  3071  			}
  3072  			intStringLen := int(stringLen)
  3073  			if intStringLen < 0 {
  3074  				return ErrInvalidLengthCanalProtocol
  3075  			}
  3076  			postIndex := iNdEx + intStringLen
  3077  			if postIndex < 0 {
  3078  				return ErrInvalidLengthCanalProtocol
  3079  			}
  3080  			if postIndex > l {
  3081  				return io.ErrUnexpectedEOF
  3082  			}
  3083  			m.ClientId = string(dAtA[iNdEx:postIndex])
  3084  			iNdEx = postIndex
  3085  		case 7:
  3086  			if wireType != 2 {
  3087  				return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
  3088  			}
  3089  			var stringLen uint64
  3090  			for shift := uint(0); ; shift += 7 {
  3091  				if shift >= 64 {
  3092  					return ErrIntOverflowCanalProtocol
  3093  				}
  3094  				if iNdEx >= l {
  3095  					return io.ErrUnexpectedEOF
  3096  				}
  3097  				b := dAtA[iNdEx]
  3098  				iNdEx++
  3099  				stringLen |= uint64(b&0x7F) << shift
  3100  				if b < 0x80 {
  3101  					break
  3102  				}
  3103  			}
  3104  			intStringLen := int(stringLen)
  3105  			if intStringLen < 0 {
  3106  				return ErrInvalidLengthCanalProtocol
  3107  			}
  3108  			postIndex := iNdEx + intStringLen
  3109  			if postIndex < 0 {
  3110  				return ErrInvalidLengthCanalProtocol
  3111  			}
  3112  			if postIndex > l {
  3113  				return io.ErrUnexpectedEOF
  3114  			}
  3115  			m.Filter = string(dAtA[iNdEx:postIndex])
  3116  			iNdEx = postIndex
  3117  		case 8:
  3118  			if wireType != 0 {
  3119  				return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType)
  3120  			}
  3121  			m.StartTimestamp = 0
  3122  			for shift := uint(0); ; shift += 7 {
  3123  				if shift >= 64 {
  3124  					return ErrIntOverflowCanalProtocol
  3125  				}
  3126  				if iNdEx >= l {
  3127  					return io.ErrUnexpectedEOF
  3128  				}
  3129  				b := dAtA[iNdEx]
  3130  				iNdEx++
  3131  				m.StartTimestamp |= int64(b&0x7F) << shift
  3132  				if b < 0x80 {
  3133  					break
  3134  				}
  3135  			}
  3136  		default:
  3137  			iNdEx = preIndex
  3138  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3139  			if err != nil {
  3140  				return err
  3141  			}
  3142  			if skippy < 0 {
  3143  				return ErrInvalidLengthCanalProtocol
  3144  			}
  3145  			if (iNdEx + skippy) < 0 {
  3146  				return ErrInvalidLengthCanalProtocol
  3147  			}
  3148  			if (iNdEx + skippy) > l {
  3149  				return io.ErrUnexpectedEOF
  3150  			}
  3151  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3152  			iNdEx += skippy
  3153  		}
  3154  	}
  3155  
  3156  	if iNdEx > l {
  3157  		return io.ErrUnexpectedEOF
  3158  	}
  3159  	return nil
  3160  }
  3161  func (m *Ack) Unmarshal(dAtA []byte) error {
  3162  	l := len(dAtA)
  3163  	iNdEx := 0
  3164  	for iNdEx < l {
  3165  		preIndex := iNdEx
  3166  		var wire uint64
  3167  		for shift := uint(0); ; shift += 7 {
  3168  			if shift >= 64 {
  3169  				return ErrIntOverflowCanalProtocol
  3170  			}
  3171  			if iNdEx >= l {
  3172  				return io.ErrUnexpectedEOF
  3173  			}
  3174  			b := dAtA[iNdEx]
  3175  			iNdEx++
  3176  			wire |= uint64(b&0x7F) << shift
  3177  			if b < 0x80 {
  3178  				break
  3179  			}
  3180  		}
  3181  		fieldNum := int32(wire >> 3)
  3182  		wireType := int(wire & 0x7)
  3183  		if wireType == 4 {
  3184  			return fmt.Errorf("proto: Ack: wiretype end group for non-group")
  3185  		}
  3186  		if fieldNum <= 0 {
  3187  			return fmt.Errorf("proto: Ack: illegal tag %d (wire type %d)", fieldNum, wire)
  3188  		}
  3189  		switch fieldNum {
  3190  		case 1:
  3191  			if wireType != 0 {
  3192  				return fmt.Errorf("proto: wrong wireType = %d for field ErrorCode", wireType)
  3193  			}
  3194  			var v int32
  3195  			for shift := uint(0); ; shift += 7 {
  3196  				if shift >= 64 {
  3197  					return ErrIntOverflowCanalProtocol
  3198  				}
  3199  				if iNdEx >= l {
  3200  					return io.ErrUnexpectedEOF
  3201  				}
  3202  				b := dAtA[iNdEx]
  3203  				iNdEx++
  3204  				v |= int32(b&0x7F) << shift
  3205  				if b < 0x80 {
  3206  					break
  3207  				}
  3208  			}
  3209  			m.ErrorCodePresent = &Ack_ErrorCode{v}
  3210  		case 2:
  3211  			if wireType != 2 {
  3212  				return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType)
  3213  			}
  3214  			var stringLen uint64
  3215  			for shift := uint(0); ; shift += 7 {
  3216  				if shift >= 64 {
  3217  					return ErrIntOverflowCanalProtocol
  3218  				}
  3219  				if iNdEx >= l {
  3220  					return io.ErrUnexpectedEOF
  3221  				}
  3222  				b := dAtA[iNdEx]
  3223  				iNdEx++
  3224  				stringLen |= uint64(b&0x7F) << shift
  3225  				if b < 0x80 {
  3226  					break
  3227  				}
  3228  			}
  3229  			intStringLen := int(stringLen)
  3230  			if intStringLen < 0 {
  3231  				return ErrInvalidLengthCanalProtocol
  3232  			}
  3233  			postIndex := iNdEx + intStringLen
  3234  			if postIndex < 0 {
  3235  				return ErrInvalidLengthCanalProtocol
  3236  			}
  3237  			if postIndex > l {
  3238  				return io.ErrUnexpectedEOF
  3239  			}
  3240  			m.ErrorMessage = string(dAtA[iNdEx:postIndex])
  3241  			iNdEx = postIndex
  3242  		default:
  3243  			iNdEx = preIndex
  3244  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3245  			if err != nil {
  3246  				return err
  3247  			}
  3248  			if skippy < 0 {
  3249  				return ErrInvalidLengthCanalProtocol
  3250  			}
  3251  			if (iNdEx + skippy) < 0 {
  3252  				return ErrInvalidLengthCanalProtocol
  3253  			}
  3254  			if (iNdEx + skippy) > l {
  3255  				return io.ErrUnexpectedEOF
  3256  			}
  3257  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3258  			iNdEx += skippy
  3259  		}
  3260  	}
  3261  
  3262  	if iNdEx > l {
  3263  		return io.ErrUnexpectedEOF
  3264  	}
  3265  	return nil
  3266  }
  3267  func (m *ClientAck) Unmarshal(dAtA []byte) error {
  3268  	l := len(dAtA)
  3269  	iNdEx := 0
  3270  	for iNdEx < l {
  3271  		preIndex := iNdEx
  3272  		var wire uint64
  3273  		for shift := uint(0); ; shift += 7 {
  3274  			if shift >= 64 {
  3275  				return ErrIntOverflowCanalProtocol
  3276  			}
  3277  			if iNdEx >= l {
  3278  				return io.ErrUnexpectedEOF
  3279  			}
  3280  			b := dAtA[iNdEx]
  3281  			iNdEx++
  3282  			wire |= uint64(b&0x7F) << shift
  3283  			if b < 0x80 {
  3284  				break
  3285  			}
  3286  		}
  3287  		fieldNum := int32(wire >> 3)
  3288  		wireType := int(wire & 0x7)
  3289  		if wireType == 4 {
  3290  			return fmt.Errorf("proto: ClientAck: wiretype end group for non-group")
  3291  		}
  3292  		if fieldNum <= 0 {
  3293  			return fmt.Errorf("proto: ClientAck: illegal tag %d (wire type %d)", fieldNum, wire)
  3294  		}
  3295  		switch fieldNum {
  3296  		case 1:
  3297  			if wireType != 2 {
  3298  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  3299  			}
  3300  			var stringLen uint64
  3301  			for shift := uint(0); ; shift += 7 {
  3302  				if shift >= 64 {
  3303  					return ErrIntOverflowCanalProtocol
  3304  				}
  3305  				if iNdEx >= l {
  3306  					return io.ErrUnexpectedEOF
  3307  				}
  3308  				b := dAtA[iNdEx]
  3309  				iNdEx++
  3310  				stringLen |= uint64(b&0x7F) << shift
  3311  				if b < 0x80 {
  3312  					break
  3313  				}
  3314  			}
  3315  			intStringLen := int(stringLen)
  3316  			if intStringLen < 0 {
  3317  				return ErrInvalidLengthCanalProtocol
  3318  			}
  3319  			postIndex := iNdEx + intStringLen
  3320  			if postIndex < 0 {
  3321  				return ErrInvalidLengthCanalProtocol
  3322  			}
  3323  			if postIndex > l {
  3324  				return io.ErrUnexpectedEOF
  3325  			}
  3326  			m.Destination = string(dAtA[iNdEx:postIndex])
  3327  			iNdEx = postIndex
  3328  		case 2:
  3329  			if wireType != 2 {
  3330  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  3331  			}
  3332  			var stringLen uint64
  3333  			for shift := uint(0); ; shift += 7 {
  3334  				if shift >= 64 {
  3335  					return ErrIntOverflowCanalProtocol
  3336  				}
  3337  				if iNdEx >= l {
  3338  					return io.ErrUnexpectedEOF
  3339  				}
  3340  				b := dAtA[iNdEx]
  3341  				iNdEx++
  3342  				stringLen |= uint64(b&0x7F) << shift
  3343  				if b < 0x80 {
  3344  					break
  3345  				}
  3346  			}
  3347  			intStringLen := int(stringLen)
  3348  			if intStringLen < 0 {
  3349  				return ErrInvalidLengthCanalProtocol
  3350  			}
  3351  			postIndex := iNdEx + intStringLen
  3352  			if postIndex < 0 {
  3353  				return ErrInvalidLengthCanalProtocol
  3354  			}
  3355  			if postIndex > l {
  3356  				return io.ErrUnexpectedEOF
  3357  			}
  3358  			m.ClientId = string(dAtA[iNdEx:postIndex])
  3359  			iNdEx = postIndex
  3360  		case 3:
  3361  			if wireType != 0 {
  3362  				return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType)
  3363  			}
  3364  			m.BatchId = 0
  3365  			for shift := uint(0); ; shift += 7 {
  3366  				if shift >= 64 {
  3367  					return ErrIntOverflowCanalProtocol
  3368  				}
  3369  				if iNdEx >= l {
  3370  					return io.ErrUnexpectedEOF
  3371  				}
  3372  				b := dAtA[iNdEx]
  3373  				iNdEx++
  3374  				m.BatchId |= int64(b&0x7F) << shift
  3375  				if b < 0x80 {
  3376  					break
  3377  				}
  3378  			}
  3379  		default:
  3380  			iNdEx = preIndex
  3381  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3382  			if err != nil {
  3383  				return err
  3384  			}
  3385  			if skippy < 0 {
  3386  				return ErrInvalidLengthCanalProtocol
  3387  			}
  3388  			if (iNdEx + skippy) < 0 {
  3389  				return ErrInvalidLengthCanalProtocol
  3390  			}
  3391  			if (iNdEx + skippy) > l {
  3392  				return io.ErrUnexpectedEOF
  3393  			}
  3394  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3395  			iNdEx += skippy
  3396  		}
  3397  	}
  3398  
  3399  	if iNdEx > l {
  3400  		return io.ErrUnexpectedEOF
  3401  	}
  3402  	return nil
  3403  }
  3404  func (m *Sub) Unmarshal(dAtA []byte) error {
  3405  	l := len(dAtA)
  3406  	iNdEx := 0
  3407  	for iNdEx < l {
  3408  		preIndex := iNdEx
  3409  		var wire uint64
  3410  		for shift := uint(0); ; shift += 7 {
  3411  			if shift >= 64 {
  3412  				return ErrIntOverflowCanalProtocol
  3413  			}
  3414  			if iNdEx >= l {
  3415  				return io.ErrUnexpectedEOF
  3416  			}
  3417  			b := dAtA[iNdEx]
  3418  			iNdEx++
  3419  			wire |= uint64(b&0x7F) << shift
  3420  			if b < 0x80 {
  3421  				break
  3422  			}
  3423  		}
  3424  		fieldNum := int32(wire >> 3)
  3425  		wireType := int(wire & 0x7)
  3426  		if wireType == 4 {
  3427  			return fmt.Errorf("proto: Sub: wiretype end group for non-group")
  3428  		}
  3429  		if fieldNum <= 0 {
  3430  			return fmt.Errorf("proto: Sub: illegal tag %d (wire type %d)", fieldNum, wire)
  3431  		}
  3432  		switch fieldNum {
  3433  		case 1:
  3434  			if wireType != 2 {
  3435  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  3436  			}
  3437  			var stringLen uint64
  3438  			for shift := uint(0); ; shift += 7 {
  3439  				if shift >= 64 {
  3440  					return ErrIntOverflowCanalProtocol
  3441  				}
  3442  				if iNdEx >= l {
  3443  					return io.ErrUnexpectedEOF
  3444  				}
  3445  				b := dAtA[iNdEx]
  3446  				iNdEx++
  3447  				stringLen |= uint64(b&0x7F) << shift
  3448  				if b < 0x80 {
  3449  					break
  3450  				}
  3451  			}
  3452  			intStringLen := int(stringLen)
  3453  			if intStringLen < 0 {
  3454  				return ErrInvalidLengthCanalProtocol
  3455  			}
  3456  			postIndex := iNdEx + intStringLen
  3457  			if postIndex < 0 {
  3458  				return ErrInvalidLengthCanalProtocol
  3459  			}
  3460  			if postIndex > l {
  3461  				return io.ErrUnexpectedEOF
  3462  			}
  3463  			m.Destination = string(dAtA[iNdEx:postIndex])
  3464  			iNdEx = postIndex
  3465  		case 2:
  3466  			if wireType != 2 {
  3467  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  3468  			}
  3469  			var stringLen uint64
  3470  			for shift := uint(0); ; shift += 7 {
  3471  				if shift >= 64 {
  3472  					return ErrIntOverflowCanalProtocol
  3473  				}
  3474  				if iNdEx >= l {
  3475  					return io.ErrUnexpectedEOF
  3476  				}
  3477  				b := dAtA[iNdEx]
  3478  				iNdEx++
  3479  				stringLen |= uint64(b&0x7F) << shift
  3480  				if b < 0x80 {
  3481  					break
  3482  				}
  3483  			}
  3484  			intStringLen := int(stringLen)
  3485  			if intStringLen < 0 {
  3486  				return ErrInvalidLengthCanalProtocol
  3487  			}
  3488  			postIndex := iNdEx + intStringLen
  3489  			if postIndex < 0 {
  3490  				return ErrInvalidLengthCanalProtocol
  3491  			}
  3492  			if postIndex > l {
  3493  				return io.ErrUnexpectedEOF
  3494  			}
  3495  			m.ClientId = string(dAtA[iNdEx:postIndex])
  3496  			iNdEx = postIndex
  3497  		case 7:
  3498  			if wireType != 2 {
  3499  				return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
  3500  			}
  3501  			var stringLen uint64
  3502  			for shift := uint(0); ; shift += 7 {
  3503  				if shift >= 64 {
  3504  					return ErrIntOverflowCanalProtocol
  3505  				}
  3506  				if iNdEx >= l {
  3507  					return io.ErrUnexpectedEOF
  3508  				}
  3509  				b := dAtA[iNdEx]
  3510  				iNdEx++
  3511  				stringLen |= uint64(b&0x7F) << shift
  3512  				if b < 0x80 {
  3513  					break
  3514  				}
  3515  			}
  3516  			intStringLen := int(stringLen)
  3517  			if intStringLen < 0 {
  3518  				return ErrInvalidLengthCanalProtocol
  3519  			}
  3520  			postIndex := iNdEx + intStringLen
  3521  			if postIndex < 0 {
  3522  				return ErrInvalidLengthCanalProtocol
  3523  			}
  3524  			if postIndex > l {
  3525  				return io.ErrUnexpectedEOF
  3526  			}
  3527  			m.Filter = string(dAtA[iNdEx:postIndex])
  3528  			iNdEx = postIndex
  3529  		default:
  3530  			iNdEx = preIndex
  3531  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3532  			if err != nil {
  3533  				return err
  3534  			}
  3535  			if skippy < 0 {
  3536  				return ErrInvalidLengthCanalProtocol
  3537  			}
  3538  			if (iNdEx + skippy) < 0 {
  3539  				return ErrInvalidLengthCanalProtocol
  3540  			}
  3541  			if (iNdEx + skippy) > l {
  3542  				return io.ErrUnexpectedEOF
  3543  			}
  3544  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3545  			iNdEx += skippy
  3546  		}
  3547  	}
  3548  
  3549  	if iNdEx > l {
  3550  		return io.ErrUnexpectedEOF
  3551  	}
  3552  	return nil
  3553  }
  3554  func (m *Unsub) Unmarshal(dAtA []byte) error {
  3555  	l := len(dAtA)
  3556  	iNdEx := 0
  3557  	for iNdEx < l {
  3558  		preIndex := iNdEx
  3559  		var wire uint64
  3560  		for shift := uint(0); ; shift += 7 {
  3561  			if shift >= 64 {
  3562  				return ErrIntOverflowCanalProtocol
  3563  			}
  3564  			if iNdEx >= l {
  3565  				return io.ErrUnexpectedEOF
  3566  			}
  3567  			b := dAtA[iNdEx]
  3568  			iNdEx++
  3569  			wire |= uint64(b&0x7F) << shift
  3570  			if b < 0x80 {
  3571  				break
  3572  			}
  3573  		}
  3574  		fieldNum := int32(wire >> 3)
  3575  		wireType := int(wire & 0x7)
  3576  		if wireType == 4 {
  3577  			return fmt.Errorf("proto: Unsub: wiretype end group for non-group")
  3578  		}
  3579  		if fieldNum <= 0 {
  3580  			return fmt.Errorf("proto: Unsub: illegal tag %d (wire type %d)", fieldNum, wire)
  3581  		}
  3582  		switch fieldNum {
  3583  		case 1:
  3584  			if wireType != 2 {
  3585  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  3586  			}
  3587  			var stringLen uint64
  3588  			for shift := uint(0); ; shift += 7 {
  3589  				if shift >= 64 {
  3590  					return ErrIntOverflowCanalProtocol
  3591  				}
  3592  				if iNdEx >= l {
  3593  					return io.ErrUnexpectedEOF
  3594  				}
  3595  				b := dAtA[iNdEx]
  3596  				iNdEx++
  3597  				stringLen |= uint64(b&0x7F) << shift
  3598  				if b < 0x80 {
  3599  					break
  3600  				}
  3601  			}
  3602  			intStringLen := int(stringLen)
  3603  			if intStringLen < 0 {
  3604  				return ErrInvalidLengthCanalProtocol
  3605  			}
  3606  			postIndex := iNdEx + intStringLen
  3607  			if postIndex < 0 {
  3608  				return ErrInvalidLengthCanalProtocol
  3609  			}
  3610  			if postIndex > l {
  3611  				return io.ErrUnexpectedEOF
  3612  			}
  3613  			m.Destination = string(dAtA[iNdEx:postIndex])
  3614  			iNdEx = postIndex
  3615  		case 2:
  3616  			if wireType != 2 {
  3617  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  3618  			}
  3619  			var stringLen uint64
  3620  			for shift := uint(0); ; shift += 7 {
  3621  				if shift >= 64 {
  3622  					return ErrIntOverflowCanalProtocol
  3623  				}
  3624  				if iNdEx >= l {
  3625  					return io.ErrUnexpectedEOF
  3626  				}
  3627  				b := dAtA[iNdEx]
  3628  				iNdEx++
  3629  				stringLen |= uint64(b&0x7F) << shift
  3630  				if b < 0x80 {
  3631  					break
  3632  				}
  3633  			}
  3634  			intStringLen := int(stringLen)
  3635  			if intStringLen < 0 {
  3636  				return ErrInvalidLengthCanalProtocol
  3637  			}
  3638  			postIndex := iNdEx + intStringLen
  3639  			if postIndex < 0 {
  3640  				return ErrInvalidLengthCanalProtocol
  3641  			}
  3642  			if postIndex > l {
  3643  				return io.ErrUnexpectedEOF
  3644  			}
  3645  			m.ClientId = string(dAtA[iNdEx:postIndex])
  3646  			iNdEx = postIndex
  3647  		case 7:
  3648  			if wireType != 2 {
  3649  				return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
  3650  			}
  3651  			var stringLen uint64
  3652  			for shift := uint(0); ; shift += 7 {
  3653  				if shift >= 64 {
  3654  					return ErrIntOverflowCanalProtocol
  3655  				}
  3656  				if iNdEx >= l {
  3657  					return io.ErrUnexpectedEOF
  3658  				}
  3659  				b := dAtA[iNdEx]
  3660  				iNdEx++
  3661  				stringLen |= uint64(b&0x7F) << shift
  3662  				if b < 0x80 {
  3663  					break
  3664  				}
  3665  			}
  3666  			intStringLen := int(stringLen)
  3667  			if intStringLen < 0 {
  3668  				return ErrInvalidLengthCanalProtocol
  3669  			}
  3670  			postIndex := iNdEx + intStringLen
  3671  			if postIndex < 0 {
  3672  				return ErrInvalidLengthCanalProtocol
  3673  			}
  3674  			if postIndex > l {
  3675  				return io.ErrUnexpectedEOF
  3676  			}
  3677  			m.Filter = string(dAtA[iNdEx:postIndex])
  3678  			iNdEx = postIndex
  3679  		default:
  3680  			iNdEx = preIndex
  3681  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3682  			if err != nil {
  3683  				return err
  3684  			}
  3685  			if skippy < 0 {
  3686  				return ErrInvalidLengthCanalProtocol
  3687  			}
  3688  			if (iNdEx + skippy) < 0 {
  3689  				return ErrInvalidLengthCanalProtocol
  3690  			}
  3691  			if (iNdEx + skippy) > l {
  3692  				return io.ErrUnexpectedEOF
  3693  			}
  3694  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3695  			iNdEx += skippy
  3696  		}
  3697  	}
  3698  
  3699  	if iNdEx > l {
  3700  		return io.ErrUnexpectedEOF
  3701  	}
  3702  	return nil
  3703  }
  3704  func (m *Get) Unmarshal(dAtA []byte) error {
  3705  	l := len(dAtA)
  3706  	iNdEx := 0
  3707  	for iNdEx < l {
  3708  		preIndex := iNdEx
  3709  		var wire uint64
  3710  		for shift := uint(0); ; shift += 7 {
  3711  			if shift >= 64 {
  3712  				return ErrIntOverflowCanalProtocol
  3713  			}
  3714  			if iNdEx >= l {
  3715  				return io.ErrUnexpectedEOF
  3716  			}
  3717  			b := dAtA[iNdEx]
  3718  			iNdEx++
  3719  			wire |= uint64(b&0x7F) << shift
  3720  			if b < 0x80 {
  3721  				break
  3722  			}
  3723  		}
  3724  		fieldNum := int32(wire >> 3)
  3725  		wireType := int(wire & 0x7)
  3726  		if wireType == 4 {
  3727  			return fmt.Errorf("proto: Get: wiretype end group for non-group")
  3728  		}
  3729  		if fieldNum <= 0 {
  3730  			return fmt.Errorf("proto: Get: illegal tag %d (wire type %d)", fieldNum, wire)
  3731  		}
  3732  		switch fieldNum {
  3733  		case 1:
  3734  			if wireType != 2 {
  3735  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  3736  			}
  3737  			var stringLen uint64
  3738  			for shift := uint(0); ; shift += 7 {
  3739  				if shift >= 64 {
  3740  					return ErrIntOverflowCanalProtocol
  3741  				}
  3742  				if iNdEx >= l {
  3743  					return io.ErrUnexpectedEOF
  3744  				}
  3745  				b := dAtA[iNdEx]
  3746  				iNdEx++
  3747  				stringLen |= uint64(b&0x7F) << shift
  3748  				if b < 0x80 {
  3749  					break
  3750  				}
  3751  			}
  3752  			intStringLen := int(stringLen)
  3753  			if intStringLen < 0 {
  3754  				return ErrInvalidLengthCanalProtocol
  3755  			}
  3756  			postIndex := iNdEx + intStringLen
  3757  			if postIndex < 0 {
  3758  				return ErrInvalidLengthCanalProtocol
  3759  			}
  3760  			if postIndex > l {
  3761  				return io.ErrUnexpectedEOF
  3762  			}
  3763  			m.Destination = string(dAtA[iNdEx:postIndex])
  3764  			iNdEx = postIndex
  3765  		case 2:
  3766  			if wireType != 2 {
  3767  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  3768  			}
  3769  			var stringLen uint64
  3770  			for shift := uint(0); ; shift += 7 {
  3771  				if shift >= 64 {
  3772  					return ErrIntOverflowCanalProtocol
  3773  				}
  3774  				if iNdEx >= l {
  3775  					return io.ErrUnexpectedEOF
  3776  				}
  3777  				b := dAtA[iNdEx]
  3778  				iNdEx++
  3779  				stringLen |= uint64(b&0x7F) << shift
  3780  				if b < 0x80 {
  3781  					break
  3782  				}
  3783  			}
  3784  			intStringLen := int(stringLen)
  3785  			if intStringLen < 0 {
  3786  				return ErrInvalidLengthCanalProtocol
  3787  			}
  3788  			postIndex := iNdEx + intStringLen
  3789  			if postIndex < 0 {
  3790  				return ErrInvalidLengthCanalProtocol
  3791  			}
  3792  			if postIndex > l {
  3793  				return io.ErrUnexpectedEOF
  3794  			}
  3795  			m.ClientId = string(dAtA[iNdEx:postIndex])
  3796  			iNdEx = postIndex
  3797  		case 3:
  3798  			if wireType != 0 {
  3799  				return fmt.Errorf("proto: wrong wireType = %d for field FetchSize", wireType)
  3800  			}
  3801  			m.FetchSize = 0
  3802  			for shift := uint(0); ; shift += 7 {
  3803  				if shift >= 64 {
  3804  					return ErrIntOverflowCanalProtocol
  3805  				}
  3806  				if iNdEx >= l {
  3807  					return io.ErrUnexpectedEOF
  3808  				}
  3809  				b := dAtA[iNdEx]
  3810  				iNdEx++
  3811  				m.FetchSize |= int32(b&0x7F) << shift
  3812  				if b < 0x80 {
  3813  					break
  3814  				}
  3815  			}
  3816  		case 4:
  3817  			if wireType != 0 {
  3818  				return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
  3819  			}
  3820  			var v int64
  3821  			for shift := uint(0); ; shift += 7 {
  3822  				if shift >= 64 {
  3823  					return ErrIntOverflowCanalProtocol
  3824  				}
  3825  				if iNdEx >= l {
  3826  					return io.ErrUnexpectedEOF
  3827  				}
  3828  				b := dAtA[iNdEx]
  3829  				iNdEx++
  3830  				v |= int64(b&0x7F) << shift
  3831  				if b < 0x80 {
  3832  					break
  3833  				}
  3834  			}
  3835  			m.TimeoutPresent = &Get_Timeout{v}
  3836  		case 5:
  3837  			if wireType != 0 {
  3838  				return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType)
  3839  			}
  3840  			var v int32
  3841  			for shift := uint(0); ; shift += 7 {
  3842  				if shift >= 64 {
  3843  					return ErrIntOverflowCanalProtocol
  3844  				}
  3845  				if iNdEx >= l {
  3846  					return io.ErrUnexpectedEOF
  3847  				}
  3848  				b := dAtA[iNdEx]
  3849  				iNdEx++
  3850  				v |= int32(b&0x7F) << shift
  3851  				if b < 0x80 {
  3852  					break
  3853  				}
  3854  			}
  3855  			m.UnitPresent = &Get_Unit{v}
  3856  		case 6:
  3857  			if wireType != 0 {
  3858  				return fmt.Errorf("proto: wrong wireType = %d for field AutoAck", wireType)
  3859  			}
  3860  			var v int
  3861  			for shift := uint(0); ; shift += 7 {
  3862  				if shift >= 64 {
  3863  					return ErrIntOverflowCanalProtocol
  3864  				}
  3865  				if iNdEx >= l {
  3866  					return io.ErrUnexpectedEOF
  3867  				}
  3868  				b := dAtA[iNdEx]
  3869  				iNdEx++
  3870  				v |= int(b&0x7F) << shift
  3871  				if b < 0x80 {
  3872  					break
  3873  				}
  3874  			}
  3875  			b := bool(v != 0)
  3876  			m.AutoAckPresent = &Get_AutoAck{b}
  3877  		default:
  3878  			iNdEx = preIndex
  3879  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3880  			if err != nil {
  3881  				return err
  3882  			}
  3883  			if skippy < 0 {
  3884  				return ErrInvalidLengthCanalProtocol
  3885  			}
  3886  			if (iNdEx + skippy) < 0 {
  3887  				return ErrInvalidLengthCanalProtocol
  3888  			}
  3889  			if (iNdEx + skippy) > l {
  3890  				return io.ErrUnexpectedEOF
  3891  			}
  3892  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3893  			iNdEx += skippy
  3894  		}
  3895  	}
  3896  
  3897  	if iNdEx > l {
  3898  		return io.ErrUnexpectedEOF
  3899  	}
  3900  	return nil
  3901  }
  3902  func (m *Messages) Unmarshal(dAtA []byte) error {
  3903  	l := len(dAtA)
  3904  	iNdEx := 0
  3905  	for iNdEx < l {
  3906  		preIndex := iNdEx
  3907  		var wire uint64
  3908  		for shift := uint(0); ; shift += 7 {
  3909  			if shift >= 64 {
  3910  				return ErrIntOverflowCanalProtocol
  3911  			}
  3912  			if iNdEx >= l {
  3913  				return io.ErrUnexpectedEOF
  3914  			}
  3915  			b := dAtA[iNdEx]
  3916  			iNdEx++
  3917  			wire |= uint64(b&0x7F) << shift
  3918  			if b < 0x80 {
  3919  				break
  3920  			}
  3921  		}
  3922  		fieldNum := int32(wire >> 3)
  3923  		wireType := int(wire & 0x7)
  3924  		if wireType == 4 {
  3925  			return fmt.Errorf("proto: Messages: wiretype end group for non-group")
  3926  		}
  3927  		if fieldNum <= 0 {
  3928  			return fmt.Errorf("proto: Messages: illegal tag %d (wire type %d)", fieldNum, wire)
  3929  		}
  3930  		switch fieldNum {
  3931  		case 1:
  3932  			if wireType != 0 {
  3933  				return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType)
  3934  			}
  3935  			m.BatchId = 0
  3936  			for shift := uint(0); ; shift += 7 {
  3937  				if shift >= 64 {
  3938  					return ErrIntOverflowCanalProtocol
  3939  				}
  3940  				if iNdEx >= l {
  3941  					return io.ErrUnexpectedEOF
  3942  				}
  3943  				b := dAtA[iNdEx]
  3944  				iNdEx++
  3945  				m.BatchId |= int64(b&0x7F) << shift
  3946  				if b < 0x80 {
  3947  					break
  3948  				}
  3949  			}
  3950  		case 2:
  3951  			if wireType != 2 {
  3952  				return fmt.Errorf("proto: wrong wireType = %d for field Messages", wireType)
  3953  			}
  3954  			var byteLen int
  3955  			for shift := uint(0); ; shift += 7 {
  3956  				if shift >= 64 {
  3957  					return ErrIntOverflowCanalProtocol
  3958  				}
  3959  				if iNdEx >= l {
  3960  					return io.ErrUnexpectedEOF
  3961  				}
  3962  				b := dAtA[iNdEx]
  3963  				iNdEx++
  3964  				byteLen |= int(b&0x7F) << shift
  3965  				if b < 0x80 {
  3966  					break
  3967  				}
  3968  			}
  3969  			if byteLen < 0 {
  3970  				return ErrInvalidLengthCanalProtocol
  3971  			}
  3972  			postIndex := iNdEx + byteLen
  3973  			if postIndex < 0 {
  3974  				return ErrInvalidLengthCanalProtocol
  3975  			}
  3976  			if postIndex > l {
  3977  				return io.ErrUnexpectedEOF
  3978  			}
  3979  			m.Messages = append(m.Messages, make([]byte, postIndex-iNdEx))
  3980  			copy(m.Messages[len(m.Messages)-1], dAtA[iNdEx:postIndex])
  3981  			iNdEx = postIndex
  3982  		default:
  3983  			iNdEx = preIndex
  3984  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  3985  			if err != nil {
  3986  				return err
  3987  			}
  3988  			if skippy < 0 {
  3989  				return ErrInvalidLengthCanalProtocol
  3990  			}
  3991  			if (iNdEx + skippy) < 0 {
  3992  				return ErrInvalidLengthCanalProtocol
  3993  			}
  3994  			if (iNdEx + skippy) > l {
  3995  				return io.ErrUnexpectedEOF
  3996  			}
  3997  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  3998  			iNdEx += skippy
  3999  		}
  4000  	}
  4001  
  4002  	if iNdEx > l {
  4003  		return io.ErrUnexpectedEOF
  4004  	}
  4005  	return nil
  4006  }
  4007  func (m *Dump) Unmarshal(dAtA []byte) error {
  4008  	l := len(dAtA)
  4009  	iNdEx := 0
  4010  	for iNdEx < l {
  4011  		preIndex := iNdEx
  4012  		var wire uint64
  4013  		for shift := uint(0); ; shift += 7 {
  4014  			if shift >= 64 {
  4015  				return ErrIntOverflowCanalProtocol
  4016  			}
  4017  			if iNdEx >= l {
  4018  				return io.ErrUnexpectedEOF
  4019  			}
  4020  			b := dAtA[iNdEx]
  4021  			iNdEx++
  4022  			wire |= uint64(b&0x7F) << shift
  4023  			if b < 0x80 {
  4024  				break
  4025  			}
  4026  		}
  4027  		fieldNum := int32(wire >> 3)
  4028  		wireType := int(wire & 0x7)
  4029  		if wireType == 4 {
  4030  			return fmt.Errorf("proto: Dump: wiretype end group for non-group")
  4031  		}
  4032  		if fieldNum <= 0 {
  4033  			return fmt.Errorf("proto: Dump: illegal tag %d (wire type %d)", fieldNum, wire)
  4034  		}
  4035  		switch fieldNum {
  4036  		case 1:
  4037  			if wireType != 2 {
  4038  				return fmt.Errorf("proto: wrong wireType = %d for field Journal", wireType)
  4039  			}
  4040  			var stringLen uint64
  4041  			for shift := uint(0); ; shift += 7 {
  4042  				if shift >= 64 {
  4043  					return ErrIntOverflowCanalProtocol
  4044  				}
  4045  				if iNdEx >= l {
  4046  					return io.ErrUnexpectedEOF
  4047  				}
  4048  				b := dAtA[iNdEx]
  4049  				iNdEx++
  4050  				stringLen |= uint64(b&0x7F) << shift
  4051  				if b < 0x80 {
  4052  					break
  4053  				}
  4054  			}
  4055  			intStringLen := int(stringLen)
  4056  			if intStringLen < 0 {
  4057  				return ErrInvalidLengthCanalProtocol
  4058  			}
  4059  			postIndex := iNdEx + intStringLen
  4060  			if postIndex < 0 {
  4061  				return ErrInvalidLengthCanalProtocol
  4062  			}
  4063  			if postIndex > l {
  4064  				return io.ErrUnexpectedEOF
  4065  			}
  4066  			m.Journal = string(dAtA[iNdEx:postIndex])
  4067  			iNdEx = postIndex
  4068  		case 2:
  4069  			if wireType != 0 {
  4070  				return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType)
  4071  			}
  4072  			m.Position = 0
  4073  			for shift := uint(0); ; shift += 7 {
  4074  				if shift >= 64 {
  4075  					return ErrIntOverflowCanalProtocol
  4076  				}
  4077  				if iNdEx >= l {
  4078  					return io.ErrUnexpectedEOF
  4079  				}
  4080  				b := dAtA[iNdEx]
  4081  				iNdEx++
  4082  				m.Position |= int64(b&0x7F) << shift
  4083  				if b < 0x80 {
  4084  					break
  4085  				}
  4086  			}
  4087  		case 3:
  4088  			if wireType != 0 {
  4089  				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  4090  			}
  4091  			var v int64
  4092  			for shift := uint(0); ; shift += 7 {
  4093  				if shift >= 64 {
  4094  					return ErrIntOverflowCanalProtocol
  4095  				}
  4096  				if iNdEx >= l {
  4097  					return io.ErrUnexpectedEOF
  4098  				}
  4099  				b := dAtA[iNdEx]
  4100  				iNdEx++
  4101  				v |= int64(b&0x7F) << shift
  4102  				if b < 0x80 {
  4103  					break
  4104  				}
  4105  			}
  4106  			m.TimestampPresent = &Dump_Timestamp{v}
  4107  		default:
  4108  			iNdEx = preIndex
  4109  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  4110  			if err != nil {
  4111  				return err
  4112  			}
  4113  			if skippy < 0 {
  4114  				return ErrInvalidLengthCanalProtocol
  4115  			}
  4116  			if (iNdEx + skippy) < 0 {
  4117  				return ErrInvalidLengthCanalProtocol
  4118  			}
  4119  			if (iNdEx + skippy) > l {
  4120  				return io.ErrUnexpectedEOF
  4121  			}
  4122  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  4123  			iNdEx += skippy
  4124  		}
  4125  	}
  4126  
  4127  	if iNdEx > l {
  4128  		return io.ErrUnexpectedEOF
  4129  	}
  4130  	return nil
  4131  }
  4132  func (m *ClientRollback) Unmarshal(dAtA []byte) error {
  4133  	l := len(dAtA)
  4134  	iNdEx := 0
  4135  	for iNdEx < l {
  4136  		preIndex := iNdEx
  4137  		var wire uint64
  4138  		for shift := uint(0); ; shift += 7 {
  4139  			if shift >= 64 {
  4140  				return ErrIntOverflowCanalProtocol
  4141  			}
  4142  			if iNdEx >= l {
  4143  				return io.ErrUnexpectedEOF
  4144  			}
  4145  			b := dAtA[iNdEx]
  4146  			iNdEx++
  4147  			wire |= uint64(b&0x7F) << shift
  4148  			if b < 0x80 {
  4149  				break
  4150  			}
  4151  		}
  4152  		fieldNum := int32(wire >> 3)
  4153  		wireType := int(wire & 0x7)
  4154  		if wireType == 4 {
  4155  			return fmt.Errorf("proto: ClientRollback: wiretype end group for non-group")
  4156  		}
  4157  		if fieldNum <= 0 {
  4158  			return fmt.Errorf("proto: ClientRollback: illegal tag %d (wire type %d)", fieldNum, wire)
  4159  		}
  4160  		switch fieldNum {
  4161  		case 1:
  4162  			if wireType != 2 {
  4163  				return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
  4164  			}
  4165  			var stringLen uint64
  4166  			for shift := uint(0); ; shift += 7 {
  4167  				if shift >= 64 {
  4168  					return ErrIntOverflowCanalProtocol
  4169  				}
  4170  				if iNdEx >= l {
  4171  					return io.ErrUnexpectedEOF
  4172  				}
  4173  				b := dAtA[iNdEx]
  4174  				iNdEx++
  4175  				stringLen |= uint64(b&0x7F) << shift
  4176  				if b < 0x80 {
  4177  					break
  4178  				}
  4179  			}
  4180  			intStringLen := int(stringLen)
  4181  			if intStringLen < 0 {
  4182  				return ErrInvalidLengthCanalProtocol
  4183  			}
  4184  			postIndex := iNdEx + intStringLen
  4185  			if postIndex < 0 {
  4186  				return ErrInvalidLengthCanalProtocol
  4187  			}
  4188  			if postIndex > l {
  4189  				return io.ErrUnexpectedEOF
  4190  			}
  4191  			m.Destination = string(dAtA[iNdEx:postIndex])
  4192  			iNdEx = postIndex
  4193  		case 2:
  4194  			if wireType != 2 {
  4195  				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
  4196  			}
  4197  			var stringLen uint64
  4198  			for shift := uint(0); ; shift += 7 {
  4199  				if shift >= 64 {
  4200  					return ErrIntOverflowCanalProtocol
  4201  				}
  4202  				if iNdEx >= l {
  4203  					return io.ErrUnexpectedEOF
  4204  				}
  4205  				b := dAtA[iNdEx]
  4206  				iNdEx++
  4207  				stringLen |= uint64(b&0x7F) << shift
  4208  				if b < 0x80 {
  4209  					break
  4210  				}
  4211  			}
  4212  			intStringLen := int(stringLen)
  4213  			if intStringLen < 0 {
  4214  				return ErrInvalidLengthCanalProtocol
  4215  			}
  4216  			postIndex := iNdEx + intStringLen
  4217  			if postIndex < 0 {
  4218  				return ErrInvalidLengthCanalProtocol
  4219  			}
  4220  			if postIndex > l {
  4221  				return io.ErrUnexpectedEOF
  4222  			}
  4223  			m.ClientId = string(dAtA[iNdEx:postIndex])
  4224  			iNdEx = postIndex
  4225  		case 3:
  4226  			if wireType != 0 {
  4227  				return fmt.Errorf("proto: wrong wireType = %d for field BatchId", wireType)
  4228  			}
  4229  			m.BatchId = 0
  4230  			for shift := uint(0); ; shift += 7 {
  4231  				if shift >= 64 {
  4232  					return ErrIntOverflowCanalProtocol
  4233  				}
  4234  				if iNdEx >= l {
  4235  					return io.ErrUnexpectedEOF
  4236  				}
  4237  				b := dAtA[iNdEx]
  4238  				iNdEx++
  4239  				m.BatchId |= int64(b&0x7F) << shift
  4240  				if b < 0x80 {
  4241  					break
  4242  				}
  4243  			}
  4244  		default:
  4245  			iNdEx = preIndex
  4246  			skippy, err := skipCanalProtocol(dAtA[iNdEx:])
  4247  			if err != nil {
  4248  				return err
  4249  			}
  4250  			if skippy < 0 {
  4251  				return ErrInvalidLengthCanalProtocol
  4252  			}
  4253  			if (iNdEx + skippy) < 0 {
  4254  				return ErrInvalidLengthCanalProtocol
  4255  			}
  4256  			if (iNdEx + skippy) > l {
  4257  				return io.ErrUnexpectedEOF
  4258  			}
  4259  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  4260  			iNdEx += skippy
  4261  		}
  4262  	}
  4263  
  4264  	if iNdEx > l {
  4265  		return io.ErrUnexpectedEOF
  4266  	}
  4267  	return nil
  4268  }
  4269  func skipCanalProtocol(dAtA []byte) (n int, err error) {
  4270  	l := len(dAtA)
  4271  	iNdEx := 0
  4272  	depth := 0
  4273  	for iNdEx < l {
  4274  		var wire uint64
  4275  		for shift := uint(0); ; shift += 7 {
  4276  			if shift >= 64 {
  4277  				return 0, ErrIntOverflowCanalProtocol
  4278  			}
  4279  			if iNdEx >= l {
  4280  				return 0, io.ErrUnexpectedEOF
  4281  			}
  4282  			b := dAtA[iNdEx]
  4283  			iNdEx++
  4284  			wire |= (uint64(b) & 0x7F) << shift
  4285  			if b < 0x80 {
  4286  				break
  4287  			}
  4288  		}
  4289  		wireType := int(wire & 0x7)
  4290  		switch wireType {
  4291  		case 0:
  4292  			for shift := uint(0); ; shift += 7 {
  4293  				if shift >= 64 {
  4294  					return 0, ErrIntOverflowCanalProtocol
  4295  				}
  4296  				if iNdEx >= l {
  4297  					return 0, io.ErrUnexpectedEOF
  4298  				}
  4299  				iNdEx++
  4300  				if dAtA[iNdEx-1] < 0x80 {
  4301  					break
  4302  				}
  4303  			}
  4304  		case 1:
  4305  			iNdEx += 8
  4306  		case 2:
  4307  			var length int
  4308  			for shift := uint(0); ; shift += 7 {
  4309  				if shift >= 64 {
  4310  					return 0, ErrIntOverflowCanalProtocol
  4311  				}
  4312  				if iNdEx >= l {
  4313  					return 0, io.ErrUnexpectedEOF
  4314  				}
  4315  				b := dAtA[iNdEx]
  4316  				iNdEx++
  4317  				length |= (int(b) & 0x7F) << shift
  4318  				if b < 0x80 {
  4319  					break
  4320  				}
  4321  			}
  4322  			if length < 0 {
  4323  				return 0, ErrInvalidLengthCanalProtocol
  4324  			}
  4325  			iNdEx += length
  4326  		case 3:
  4327  			depth++
  4328  		case 4:
  4329  			if depth == 0 {
  4330  				return 0, ErrUnexpectedEndOfGroupCanalProtocol
  4331  			}
  4332  			depth--
  4333  		case 5:
  4334  			iNdEx += 4
  4335  		default:
  4336  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  4337  		}
  4338  		if iNdEx < 0 {
  4339  			return 0, ErrInvalidLengthCanalProtocol
  4340  		}
  4341  		if depth == 0 {
  4342  			return iNdEx, nil
  4343  		}
  4344  	}
  4345  	return 0, io.ErrUnexpectedEOF
  4346  }
  4347  
  4348  var (
  4349  	ErrInvalidLengthCanalProtocol        = fmt.Errorf("proto: negative length found during unmarshaling")
  4350  	ErrIntOverflowCanalProtocol          = fmt.Errorf("proto: integer overflow")
  4351  	ErrUnexpectedEndOfGroupCanalProtocol = fmt.Errorf("proto: unexpected end of group")
  4352  )