Documentation ¶
Overview ¶
Package slave_binlog is a generated protocol buffer package.
It is generated from these files:
secondary_binlog.proto
It has these top-level messages:
Column ColumnInfo Row Table Key TableMutation DMLData DDLData Binlog
Index ¶
- Constants
- Variables
- type Binlog
- func (*Binlog) Descriptor() ([]byte, []int)
- func (m *Binlog) GetCommitTs() int64
- func (m *Binlog) GetDdlData() *DDLData
- func (m *Binlog) GetDmlData() *DMLData
- func (m *Binlog) GetTimeZone() string
- func (m *Binlog) GetType() BinlogType
- func (m *Binlog) Marshal() (dAtA []byte, err error)
- func (m *Binlog) MarshalTo(dAtA []byte) (int, error)
- func (*Binlog) ProtoMessage()
- func (m *Binlog) Reset()
- func (m *Binlog) Size() (n int)
- func (m *Binlog) String() string
- func (m *Binlog) Unmarshal(dAtA []byte) error
- func (m *Binlog) XXX_DiscardUnknown()
- func (m *Binlog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Binlog) XXX_Merge(src proto.Message)
- func (m *Binlog) XXX_Size() int
- func (m *Binlog) XXX_Unmarshal(b []byte) error
- type BinlogType
- type Column
- func (*Column) Descriptor() ([]byte, []int)
- func (m *Column) GetBytesValue() []byte
- func (m *Column) GetDoubleValue() float64
- func (m *Column) GetInt64Value() int64
- func (m *Column) GetIsNull() bool
- func (m *Column) GetStringValue() string
- func (m *Column) GetUint64Value() uint64
- func (m *Column) Marshal() (dAtA []byte, err error)
- func (m *Column) MarshalTo(dAtA []byte) (int, error)
- func (*Column) ProtoMessage()
- func (m *Column) Reset()
- func (m *Column) Size() (n int)
- func (m *Column) String() string
- func (m *Column) Unmarshal(dAtA []byte) error
- func (m *Column) XXX_DiscardUnknown()
- func (m *Column) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Column) XXX_Merge(src proto.Message)
- func (m *Column) XXX_Size() int
- func (m *Column) XXX_Unmarshal(b []byte) error
- type ColumnInfo
- func (*ColumnInfo) Descriptor() ([]byte, []int)
- func (m *ColumnInfo) GetDecimal() int32
- func (m *ColumnInfo) GetFlen() int32
- func (m *ColumnInfo) GetIsPrimaryKey() bool
- func (m *ColumnInfo) GetMysqlType() string
- func (m *ColumnInfo) GetName() string
- func (m *ColumnInfo) Marshal() (dAtA []byte, err error)
- func (m *ColumnInfo) MarshalTo(dAtA []byte) (int, error)
- func (*ColumnInfo) ProtoMessage()
- func (m *ColumnInfo) Reset()
- func (m *ColumnInfo) Size() (n int)
- func (m *ColumnInfo) String() string
- func (m *ColumnInfo) Unmarshal(dAtA []byte) error
- func (m *ColumnInfo) XXX_DiscardUnknown()
- func (m *ColumnInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ColumnInfo) XXX_Merge(src proto.Message)
- func (m *ColumnInfo) XXX_Size() int
- func (m *ColumnInfo) XXX_Unmarshal(b []byte) error
- type DDLData
- func (*DDLData) Descriptor() ([]byte, []int)
- func (m *DDLData) GetDdlQuery() []byte
- func (m *DDLData) GetSchemaName() string
- func (m *DDLData) GetTableName() string
- func (m *DDLData) Marshal() (dAtA []byte, err error)
- func (m *DDLData) MarshalTo(dAtA []byte) (int, error)
- func (*DDLData) ProtoMessage()
- func (m *DDLData) Reset()
- func (m *DDLData) Size() (n int)
- func (m *DDLData) String() string
- func (m *DDLData) Unmarshal(dAtA []byte) error
- func (m *DDLData) XXX_DiscardUnknown()
- func (m *DDLData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DDLData) XXX_Merge(src proto.Message)
- func (m *DDLData) XXX_Size() int
- func (m *DDLData) XXX_Unmarshal(b []byte) error
- type DMLData
- func (*DMLData) Descriptor() ([]byte, []int)
- func (m *DMLData) GetTables() []*Table
- func (m *DMLData) Marshal() (dAtA []byte, err error)
- func (m *DMLData) MarshalTo(dAtA []byte) (int, error)
- func (*DMLData) ProtoMessage()
- func (m *DMLData) Reset()
- func (m *DMLData) Size() (n int)
- func (m *DMLData) String() string
- func (m *DMLData) Unmarshal(dAtA []byte) error
- func (m *DMLData) XXX_DiscardUnknown()
- func (m *DMLData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DMLData) XXX_Merge(src proto.Message)
- func (m *DMLData) XXX_Size() int
- func (m *DMLData) XXX_Unmarshal(b []byte) error
- type Key
- func (*Key) Descriptor() ([]byte, []int)
- func (m *Key) GetColumnNames() []string
- func (m *Key) GetName() string
- func (m *Key) Marshal() (dAtA []byte, err error)
- func (m *Key) MarshalTo(dAtA []byte) (int, error)
- func (*Key) ProtoMessage()
- func (m *Key) Reset()
- func (m *Key) Size() (n int)
- func (m *Key) String() string
- func (m *Key) Unmarshal(dAtA []byte) error
- func (m *Key) XXX_DiscardUnknown()
- func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Key) XXX_Merge(src proto.Message)
- func (m *Key) XXX_Size() int
- func (m *Key) XXX_Unmarshal(b []byte) error
- type MutationType
- type Row
- func (*Row) Descriptor() ([]byte, []int)
- func (m *Row) GetColumns() []*Column
- func (m *Row) Marshal() (dAtA []byte, err error)
- func (m *Row) MarshalTo(dAtA []byte) (int, error)
- func (*Row) ProtoMessage()
- func (m *Row) Reset()
- func (m *Row) Size() (n int)
- func (m *Row) String() string
- func (m *Row) Unmarshal(dAtA []byte) error
- func (m *Row) XXX_DiscardUnknown()
- func (m *Row) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Row) XXX_Merge(src proto.Message)
- func (m *Row) XXX_Size() int
- func (m *Row) XXX_Unmarshal(b []byte) error
- type Table
- func (*Table) Descriptor() ([]byte, []int)
- func (m *Table) GetColumnInfo() []*ColumnInfo
- func (m *Table) GetMutations() []*TableMutation
- func (m *Table) GetSchemaName() string
- func (m *Table) GetTableName() string
- func (m *Table) GetUniqueKeys() []*Key
- func (m *Table) Marshal() (dAtA []byte, err error)
- func (m *Table) MarshalTo(dAtA []byte) (int, error)
- func (*Table) ProtoMessage()
- func (m *Table) Reset()
- func (m *Table) Size() (n int)
- func (m *Table) String() string
- func (m *Table) Unmarshal(dAtA []byte) error
- func (m *Table) XXX_DiscardUnknown()
- func (m *Table) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Table) XXX_Merge(src proto.Message)
- func (m *Table) XXX_Size() int
- func (m *Table) XXX_Unmarshal(b []byte) error
- type TableMutation
- func (*TableMutation) Descriptor() ([]byte, []int)
- func (m *TableMutation) GetChangeRow() *Row
- func (m *TableMutation) GetRow() *Row
- func (m *TableMutation) GetType() MutationType
- func (m *TableMutation) Marshal() (dAtA []byte, err error)
- func (m *TableMutation) MarshalTo(dAtA []byte) (int, error)
- func (*TableMutation) ProtoMessage()
- func (m *TableMutation) Reset()
- func (m *TableMutation) Size() (n int)
- func (m *TableMutation) String() string
- func (m *TableMutation) Unmarshal(dAtA []byte) error
- func (m *TableMutation) XXX_DiscardUnknown()
- func (m *TableMutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TableMutation) XXX_Merge(src proto.Message)
- func (m *TableMutation) XXX_Size() int
- func (m *TableMutation) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const Default_Column_IsNull bool = false
Variables ¶
View Source
var ( ErrInvalidLengthSecondaryBinlog = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSecondaryBinlog = fmt.Errorf("proto: integer overflow") )
View Source
var BinlogType_name = map[int32]string{
0: "DML",
1: "DDL",
}
View Source
var BinlogType_value = map[string]int32{
"DML": 0,
"DDL": 1,
}
View Source
var MutationType_name = map[int32]string{
0: "Insert",
1: "Update",
2: "Delete",
}
View Source
var MutationType_value = map[string]int32{
"Insert": 0,
"Update": 1,
"Delete": 2,
}
Functions ¶
This section is empty.
Types ¶
type Binlog ¶
type Binlog struct { Type BinlogType `protobuf:"varint,1,opt,name=type,enum=slave.binlog.BinlogType" json:"type"` CommitTs int64 `protobuf:"varint,2,opt,name=commit_ts,json=commitTs" json:"commit_ts"` // dml_data is marshalled from DML type DmlData *DMLData `protobuf:"bytes,3,opt,name=dml_data,json=dmlData" json:"dml_data,omitempty"` DdlData *DDLData `protobuf:"bytes,4,opt,name=ddl_data,json=ddlData" json:"ddl_data,omitempty"` // time_zone is the time zone of timestamp value TimeZone *string `protobuf:"bytes,5,opt,name=time_zone,json=timeZone" json:"time_zone,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Binlog contains all the changes in a transaction.
func (*Binlog) Descriptor ¶
func (*Binlog) GetCommitTs ¶
func (*Binlog) GetDdlData ¶
func (*Binlog) GetDmlData ¶
func (*Binlog) GetTimeZone ¶
func (*Binlog) GetType ¶
func (m *Binlog) GetType() BinlogType
func (*Binlog) ProtoMessage ¶
func (*Binlog) ProtoMessage()
func (*Binlog) XXX_DiscardUnknown ¶
func (m *Binlog) XXX_DiscardUnknown()
func (*Binlog) XXX_Marshal ¶
func (*Binlog) XXX_Unmarshal ¶
type BinlogType ¶
type BinlogType int32
const ( BinlogType_DML BinlogType = 0 BinlogType_DDL BinlogType = 1 )
func (BinlogType) Enum ¶
func (x BinlogType) Enum() *BinlogType
func (BinlogType) EnumDescriptor ¶
func (BinlogType) EnumDescriptor() ([]byte, []int)
func (BinlogType) String ¶
func (x BinlogType) String() string
func (*BinlogType) UnmarshalJSON ¶
func (x *BinlogType) UnmarshalJSON(data []byte) error
type Column ¶
type Column struct { IsNull *bool `protobuf:"varint,1,opt,name=is_null,json=isNull,def=0" json:"is_null,omitempty"` Int64Value *int64 `protobuf:"varint,2,opt,name=int64_value,json=int64Value" json:"int64_value,omitempty"` Uint64Value *uint64 `protobuf:"varint,3,opt,name=uint64_value,json=uint64Value" json:"uint64_value,omitempty"` DoubleValue *float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` BytesValue []byte `protobuf:"bytes,5,opt,name=bytes_value,json=bytesValue" json:"bytes_value,omitempty"` StringValue *string `protobuf:"bytes,6,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
for text and char type, string_value is set for blob and binary type, bytes_value is set for enum, set, uint64_value is set for json, bytes_value is set
func (*Column) Descriptor ¶
func (*Column) GetBytesValue ¶
func (*Column) GetDoubleValue ¶
func (*Column) GetInt64Value ¶
func (*Column) GetStringValue ¶
func (*Column) GetUint64Value ¶
func (*Column) ProtoMessage ¶
func (*Column) ProtoMessage()
func (*Column) XXX_DiscardUnknown ¶
func (m *Column) XXX_DiscardUnknown()
func (*Column) XXX_Marshal ¶
func (*Column) XXX_Unmarshal ¶
type ColumnInfo ¶
type ColumnInfo struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name"` // lower case column field type in mysql // https://dev.mysql.com/doc/refman/8.0/en/data-types.html // for numeric type: int bigint smallint tinyint float double decimal bit // for string type: text longtext mediumtext char tinytext varchar // blob longblob mediumblob binary tinyblob varbinary // enum set // for json type: json MysqlType string `protobuf:"bytes,2,opt,name=mysql_type,json=mysqlType" json:"mysql_type"` IsPrimaryKey bool `protobuf:"varint,3,opt,name=is_primary_key,json=isPrimaryKey" json:"is_primary_key"` Flen int32 `protobuf:"varint,4,opt,name=flen" json:"flen"` Decimal int32 `protobuf:"varint,5,opt,name=decimal" json:"decimal"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ColumnInfo) Descriptor ¶
func (*ColumnInfo) Descriptor() ([]byte, []int)
func (*ColumnInfo) GetDecimal ¶
func (m *ColumnInfo) GetDecimal() int32
func (*ColumnInfo) GetFlen ¶
func (m *ColumnInfo) GetFlen() int32
func (*ColumnInfo) GetIsPrimaryKey ¶
func (m *ColumnInfo) GetIsPrimaryKey() bool
func (*ColumnInfo) GetMysqlType ¶
func (m *ColumnInfo) GetMysqlType() string
func (*ColumnInfo) GetName ¶
func (m *ColumnInfo) GetName() string
func (*ColumnInfo) Marshal ¶
func (m *ColumnInfo) Marshal() (dAtA []byte, err error)
func (*ColumnInfo) ProtoMessage ¶
func (*ColumnInfo) ProtoMessage()
func (*ColumnInfo) Reset ¶
func (m *ColumnInfo) Reset()
func (*ColumnInfo) Size ¶
func (m *ColumnInfo) Size() (n int)
func (*ColumnInfo) String ¶
func (m *ColumnInfo) String() string
func (*ColumnInfo) Unmarshal ¶
func (m *ColumnInfo) Unmarshal(dAtA []byte) error
func (*ColumnInfo) XXX_DiscardUnknown ¶
func (m *ColumnInfo) XXX_DiscardUnknown()
func (*ColumnInfo) XXX_Marshal ¶
func (m *ColumnInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ColumnInfo) XXX_Merge ¶
func (m *ColumnInfo) XXX_Merge(src proto.Message)
func (*ColumnInfo) XXX_Size ¶
func (m *ColumnInfo) XXX_Size() int
func (*ColumnInfo) XXX_Unmarshal ¶
func (m *ColumnInfo) XXX_Unmarshal(b []byte) error
type DDLData ¶
type DDLData struct { // the current database use SchemaName *string `protobuf:"bytes,1,opt,name=schema_name,json=schemaName" json:"schema_name,omitempty"` // the relate table TableName *string `protobuf:"bytes,2,opt,name=table_name,json=tableName" json:"table_name,omitempty"` // ddl_query is the original ddl statement query. DdlQuery []byte `protobuf:"bytes,3,opt,name=ddl_query,json=ddlQuery" json:"ddl_query,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DDLData) Descriptor ¶
func (*DDLData) GetDdlQuery ¶
func (*DDLData) GetSchemaName ¶
func (*DDLData) GetTableName ¶
func (*DDLData) ProtoMessage ¶
func (*DDLData) ProtoMessage()
func (*DDLData) XXX_DiscardUnknown ¶
func (m *DDLData) XXX_DiscardUnknown()
func (*DDLData) XXX_Marshal ¶
func (*DDLData) XXX_Unmarshal ¶
type DMLData ¶
type DMLData struct { // tables contains all the table changes. Tables []*Table `protobuf:"bytes,1,rep,name=tables" json:"tables,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DMLData) Descriptor ¶
func (*DMLData) ProtoMessage ¶
func (*DMLData) ProtoMessage()
func (*DMLData) XXX_DiscardUnknown ¶
func (m *DMLData) XXX_DiscardUnknown()
func (*DMLData) XXX_Marshal ¶
func (*DMLData) XXX_Unmarshal ¶
type Key ¶
type Key struct { // name will be PRIMARY if it's the primary key. Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` ColumnNames []string `protobuf:"bytes,2,rep,name=column_names,json=columnNames" json:"column_names,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Key contains Key info.
func (*Key) Descriptor ¶
func (*Key) GetColumnNames ¶
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
func (*Key) XXX_DiscardUnknown ¶
func (m *Key) XXX_DiscardUnknown()
func (*Key) XXX_Unmarshal ¶
type MutationType ¶
type MutationType int32
const ( MutationType_Insert MutationType = 0 MutationType_Update MutationType = 1 MutationType_Delete MutationType = 2 )
func (MutationType) Enum ¶
func (x MutationType) Enum() *MutationType
func (MutationType) EnumDescriptor ¶
func (MutationType) EnumDescriptor() ([]byte, []int)
func (MutationType) String ¶
func (x MutationType) String() string
func (*MutationType) UnmarshalJSON ¶
func (x *MutationType) UnmarshalJSON(data []byte) error
type Row ¶
type Row struct { Columns []*Column `protobuf:"bytes,1,rep,name=columns" json:"columns,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Row) Descriptor ¶
func (*Row) GetColumns ¶
func (*Row) ProtoMessage ¶
func (*Row) ProtoMessage()
func (*Row) XXX_DiscardUnknown ¶
func (m *Row) XXX_DiscardUnknown()
func (*Row) XXX_Unmarshal ¶
type Table ¶
type Table struct { SchemaName *string `protobuf:"bytes,1,opt,name=schema_name,json=schemaName" json:"schema_name,omitempty"` TableName *string `protobuf:"bytes,2,opt,name=table_name,json=tableName" json:"table_name,omitempty"` ColumnInfo []*ColumnInfo `protobuf:"bytes,3,rep,name=column_info,json=columnInfo" json:"column_info,omitempty"` Mutations []*TableMutation `protobuf:"bytes,4,rep,name=mutations" json:"mutations,omitempty"` // will only be set with version >= 3.0.9 UniqueKeys []*Key `protobuf:"bytes,5,rep,name=unique_keys,json=uniqueKeys" json:"unique_keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Table contains mutations in a table.
func (*Table) Descriptor ¶
func (*Table) GetColumnInfo ¶
func (m *Table) GetColumnInfo() []*ColumnInfo
func (*Table) GetMutations ¶
func (m *Table) GetMutations() []*TableMutation
func (*Table) GetSchemaName ¶
func (*Table) GetTableName ¶
func (*Table) GetUniqueKeys ¶
func (*Table) ProtoMessage ¶
func (*Table) ProtoMessage()
func (*Table) XXX_DiscardUnknown ¶
func (m *Table) XXX_DiscardUnknown()
func (*Table) XXX_Marshal ¶
func (*Table) XXX_Unmarshal ¶
type TableMutation ¶
type TableMutation struct { Type *MutationType `protobuf:"varint,1,req,name=type,enum=slave.binlog.MutationType" json:"type,omitempty"` Row *Row `protobuf:"bytes,2,req,name=row" json:"row,omitempty"` // for Update MutationType only ChangeRow *Row `protobuf:"bytes,3,opt,name=change_row,json=changeRow" json:"change_row,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TableMutation) Descriptor ¶
func (*TableMutation) Descriptor() ([]byte, []int)
func (*TableMutation) GetChangeRow ¶
func (m *TableMutation) GetChangeRow() *Row
func (*TableMutation) GetRow ¶
func (m *TableMutation) GetRow() *Row
func (*TableMutation) GetType ¶
func (m *TableMutation) GetType() MutationType
func (*TableMutation) Marshal ¶
func (m *TableMutation) Marshal() (dAtA []byte, err error)
func (*TableMutation) ProtoMessage ¶
func (*TableMutation) ProtoMessage()
func (*TableMutation) Reset ¶
func (m *TableMutation) Reset()
func (*TableMutation) Size ¶
func (m *TableMutation) Size() (n int)
func (*TableMutation) String ¶
func (m *TableMutation) String() string
func (*TableMutation) Unmarshal ¶
func (m *TableMutation) Unmarshal(dAtA []byte) error
func (*TableMutation) XXX_DiscardUnknown ¶
func (m *TableMutation) XXX_DiscardUnknown()
func (*TableMutation) XXX_Marshal ¶
func (m *TableMutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TableMutation) XXX_Merge ¶
func (m *TableMutation) XXX_Merge(src proto.Message)
func (*TableMutation) XXX_Size ¶
func (m *TableMutation) XXX_Size() int
func (*TableMutation) XXX_Unmarshal ¶
func (m *TableMutation) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.