Documentation ¶
Overview ¶
Package slave_binlog is a generated protocol buffer package.
It is generated from these files:
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) 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
- 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
- type ColumnInfo
- func (*ColumnInfo) Descriptor() ([]byte, []int)
- 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
- 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
- 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
- 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
- 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
- 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
- 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
Constants ¶
View Source
const Default_Column_IsNull bool = false
Variables ¶
View Source
var ( ErrInvalidLengthBinlog = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBinlog = 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"` XXX_unrecognized []byte `json:"-"` }
Binlog contains all the changes in a transaction.
func (*Binlog) Descriptor ¶
func (*Binlog) GetCommitTs ¶
func (*Binlog) GetDdlData ¶
func (*Binlog) GetDmlData ¶
func (*Binlog) GetType ¶
func (m *Binlog) GetType() BinlogType
func (*Binlog) ProtoMessage ¶
func (*Binlog) ProtoMessage()
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_unrecognized []byte `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()
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"` XXX_unrecognized []byte `json:"-"` }
func (*ColumnInfo) Descriptor ¶
func (*ColumnInfo) Descriptor() ([]byte, []int)
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
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_unrecognized []byte `json:"-"` }
func (*DDLData) Descriptor ¶
func (*DDLData) GetDdlQuery ¶
func (*DDLData) GetSchemaName ¶
func (*DDLData) GetTableName ¶
func (*DDLData) ProtoMessage ¶
func (*DDLData) ProtoMessage()
type DMLData ¶
type DMLData struct { // tables contains all the table changes. Tables []*Table `protobuf:"bytes,1,rep,name=tables" json:"tables,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*DMLData) Descriptor ¶
func (*DMLData) ProtoMessage ¶
func (*DMLData) ProtoMessage()
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_unrecognized []byte `json:"-"` }
Key contains Key info.
func (*Key) Descriptor ¶
func (*Key) GetColumnNames ¶
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
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_unrecognized []byte `json:"-"` }
func (*Row) Descriptor ¶
func (*Row) GetColumns ¶
func (*Row) ProtoMessage ¶
func (*Row) ProtoMessage()
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_unrecognized []byte `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()
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_unrecognized []byte `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
Click to show internal directories.
Click to hide internal directories.