Documentation
¶
Overview ¶
Package pb_binlog is a generated protocol buffer package.
It is generated from these files:
pb_binlog.proto
It has these top-level messages:
Column Event DMLData Binlog
Index ¶
- Variables
- type Binlog
- func (*Binlog) Descriptor() ([]byte, []int)
- func (m *Binlog) GetCommitTs() int64
- func (m *Binlog) GetDdlQuery() []byte
- func (m *Binlog) GetDmlData() *DMLData
- func (m *Binlog) GetTp() 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) GetChangedValue() []byte
- func (m *Column) GetMysqlType() string
- func (m *Column) GetName() string
- func (m *Column) GetTp() []byte
- func (m *Column) GetValue() []byte
- 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 DMLData
- func (*DMLData) Descriptor() ([]byte, []int)
- func (m *DMLData) GetEvents() []Event
- 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 Event
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetRow() [][]byte
- func (m *Event) GetSchemaName() string
- func (m *Event) GetTableName() string
- func (m *Event) GetTp() EventType
- func (m *Event) Marshal() (dAtA []byte, err error)
- func (m *Event) MarshalTo(dAtA []byte) (int, error)
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) Size() (n int)
- func (m *Event) String() string
- func (m *Event) Unmarshal(dAtA []byte) error
- type EventType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthPbBinlog = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPbBinlog = 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 EventType_name = map[int32]string{
0: "Insert",
1: "Update",
2: "Delete",
}
View Source
var EventType_value = map[string]int32{
"Insert": 0,
"Update": 1,
"Delete": 2,
}
Functions ¶
This section is empty.
Types ¶
type Binlog ¶
type Binlog struct { Tp BinlogType `protobuf:"varint,1,opt,name=tp,enum=pb_binlog.BinlogType" json:"tp"` CommitTs int64 `protobuf:"varint,2,opt,name=commit_ts" json:"commit_ts"` // dml_data is marshalled from DML type, DmlData *DMLData `protobuf:"bytes,3,opt,name=dml_data" json:"dml_data,omitempty"` // ddl_query is the original ddl statement query. DdlQuery []byte `protobuf:"bytes,4,opt,name=ddl_query" json:"ddl_query,omitempty"` XXX_unrecognized []byte `json:"-"` }
Binlog contains all the changes in a transaction.
func (*Binlog) Descriptor ¶
func (*Binlog) GetCommitTs ¶
func (*Binlog) GetDdlQuery ¶
func (*Binlog) GetDmlData ¶
func (*Binlog) GetTp ¶
func (m *Binlog) GetTp() 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 { Name string `protobuf:"bytes,1,opt,name=name" json:"name"` // tp[0] is the column field type in binlog, used for decode column value Tp []byte `protobuf:"bytes,2,opt,name=tp" json:"tp,omitempty"` // column field type in mysql MysqlType string `protobuf:"bytes,3,opt,name=mysql_type" json:"mysql_type"` Value []byte `protobuf:"bytes,4,opt,name=value" json:"value,omitempty"` // changed_value is the changed value in update ChangedValue []byte `protobuf:"bytes,5,opt,name=changed_value" json:"changed_value,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Column) Descriptor ¶
func (*Column) GetChangedValue ¶
func (*Column) GetMysqlType ¶
func (*Column) ProtoMessage ¶
func (*Column) ProtoMessage()
type DMLData ¶
type DMLData struct { // mutations contains all the row changes. Events []Event `protobuf:"bytes,1,rep,name=events" json:"events"` XXX_unrecognized []byte `json:"-"` }
func (*DMLData) Descriptor ¶
func (*DMLData) ProtoMessage ¶
func (*DMLData) ProtoMessage()
type Event ¶
type Event struct { SchemaName *string `protobuf:"bytes,1,opt,name=schema_name" json:"schema_name,omitempty"` TableName *string `protobuf:"bytes,2,opt,name=table_name" json:"table_name,omitempty"` Tp EventType `protobuf:"varint,3,opt,name=tp,enum=pb_binlog.EventType" json:"tp"` Row [][]byte `protobuf:"bytes,4,rep,name=row" json:"row,omitempty"` XXX_unrecognized []byte `json:"-"` }
TableMutation contains mutations in a table.
func (*Event) Descriptor ¶
func (*Event) GetSchemaName ¶
func (*Event) GetTableName ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
type EventType ¶
type EventType int32
func (EventType) EnumDescriptor ¶
func (*EventType) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.