Documentation ¶
Overview ¶
Package msgpb is a generated protocol buffer package.
It is generated from these files:
protocol/msgpb/message.proto
It has these top-level messages:
Position Msg DMLMsg DDLMsg MySQLColumnValue MySQLColumnData
Index ¶
- Variables
- func NewMySQLValidColumnDataMapInt64(d map[string]string) map[string]*MySQLColumnData
- type DDLMsg
- func (*DDLMsg) Descriptor() ([]byte, []int)
- func (m *DDLMsg) GetSQL() string
- func (m *DDLMsg) Marshal() (dAtA []byte, err error)
- func (m *DDLMsg) MarshalTo(dAtA []byte) (int, error)
- func (*DDLMsg) ProtoMessage()
- func (m *DDLMsg) Reset()
- func (m *DDLMsg) Size() (n int)
- func (m *DDLMsg) String() string
- func (m *DDLMsg) Unmarshal(dAtA []byte) error
- type DMLMsg
- func (*DMLMsg) Descriptor() ([]byte, []int)
- func (m *DMLMsg) GetData() map[string]*MySQLColumnData
- func (m *DMLMsg) GetMongoBsonBytes() map[string][]byte
- func (m *DMLMsg) GetOld() map[string]*MySQLColumnData
- func (m *DMLMsg) GetPks() map[string]*MySQLColumnData
- func (m *DMLMsg) Marshal() (dAtA []byte, err error)
- func (m *DMLMsg) MarshalTo(dAtA []byte) (int, error)
- func (*DMLMsg) ProtoMessage()
- func (m *DMLMsg) Reset()
- func (m *DMLMsg) Size() (n int)
- func (m *DMLMsg) String() string
- func (m *DMLMsg) Unmarshal(dAtA []byte) error
- type DataSourceType
- type Msg
- func (*Msg) Descriptor() ([]byte, []int)
- func (m *Msg) GetDatabase() string
- func (m *Msg) GetDdlMsg() *DDLMsg
- func (m *Msg) GetDmlMsg() *DMLMsg
- func (m *Msg) GetGravityID() int32
- func (m *Msg) GetGravitySentTimestamp() string
- func (m *Msg) GetHost() string
- func (m *Msg) GetMsgType() MsgType
- func (m *Msg) GetPosition() *Position
- func (m *Msg) GetSourceType() DataSourceType
- func (m *Msg) GetTable() string
- func (m *Msg) GetTimeZone() string
- func (m *Msg) GetTimestamp() int64
- func (m *Msg) GetUniqueSourceName() string
- func (m *Msg) GetVersion() string
- func (m *Msg) Marshal() (dAtA []byte, err error)
- func (m *Msg) MarshalTo(dAtA []byte) (int, error)
- func (*Msg) ProtoMessage()
- func (m *Msg) Reset()
- func (m *Msg) Size() (n int)
- func (m *Msg) String() string
- func (m *Msg) Unmarshal(dAtA []byte) error
- type MsgType
- type MySQLColumnData
- func (*MySQLColumnData) Descriptor() ([]byte, []int)
- func (m *MySQLColumnData) GetColumnType() MySQLColumnType
- func (m *MySQLColumnData) GetDefaultValue() *MySQLColumnValue
- func (m *MySQLColumnData) GetValue() *MySQLColumnValue
- func (m *MySQLColumnData) Marshal() (dAtA []byte, err error)
- func (m *MySQLColumnData) MarshalTo(dAtA []byte) (int, error)
- func (*MySQLColumnData) ProtoMessage()
- func (m *MySQLColumnData) Reset()
- func (m *MySQLColumnData) Size() (n int)
- func (m *MySQLColumnData) String() string
- func (m *MySQLColumnData) Unmarshal(dAtA []byte) error
- type MySQLColumnType
- type MySQLColumnValue
- func (*MySQLColumnValue) Descriptor() ([]byte, []int)
- func (m *MySQLColumnValue) GetIsNull() bool
- func (m *MySQLColumnValue) GetValueString() string
- func (m *MySQLColumnValue) Marshal() (dAtA []byte, err error)
- func (m *MySQLColumnValue) MarshalTo(dAtA []byte) (int, error)
- func (*MySQLColumnValue) ProtoMessage()
- func (m *MySQLColumnValue) Reset()
- func (m *MySQLColumnValue) Size() (n int)
- func (m *MySQLColumnValue) String() string
- func (m *MySQLColumnValue) Unmarshal(dAtA []byte) error
- type Position
- func (*Position) Descriptor() ([]byte, []int)
- func (m *Position) GetBinlogFile() string
- func (m *Position) GetBinlogGTIDSet() string
- func (m *Position) GetBinlogPosition() int32
- func (m *Position) GetMongoTimestamp() int64
- func (m *Position) Marshal() (dAtA []byte, err error)
- func (m *Position) MarshalTo(dAtA []byte) (int, error)
- func (*Position) ProtoMessage()
- func (m *Position) Reset()
- func (m *Position) Size() (n int)
- func (m *Position) String() string
- func (m *Position) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") )
View Source
var DataSourceType_name = map[int32]string{
0: "UNKNOWN_DATA_SOURCE",
1: "MYSQL",
2: "MONGODB",
3: "TIDB",
4: "REDIS",
5: "CODIS",
}
View Source
var DataSourceType_value = map[string]int32{
"UNKNOWN_DATA_SOURCE": 0,
"MYSQL": 1,
"MONGODB": 2,
"TIDB": 3,
"REDIS": 4,
"CODIS": 5,
}
View Source
var MsgType_name = map[int32]string{
0: "UNKNOWN_MSG",
1: "CREATE",
2: "UPDATE",
3: "DELETE",
4: "CREATE_DATABASE",
5: "DROP_DATABASE",
6: "CREATE_TABLE",
7: "DROP_TABLE",
8: "ALTER_TABLE",
9: "TRUNCATE_TABLE",
10: "RENAME_TABLE",
11: "CREATE_INDEX",
12: "DROP_INDEX",
13: "GENERAL_DDL",
}
View Source
var MsgType_value = map[string]int32{
"UNKNOWN_MSG": 0,
"CREATE": 1,
"UPDATE": 2,
"DELETE": 3,
"CREATE_DATABASE": 4,
"DROP_DATABASE": 5,
"CREATE_TABLE": 6,
"DROP_TABLE": 7,
"ALTER_TABLE": 8,
"TRUNCATE_TABLE": 9,
"RENAME_TABLE": 10,
"CREATE_INDEX": 11,
"DROP_INDEX": 12,
"GENERAL_DDL": 13,
}
View Source
var MySQLColumnType_name = map[int32]string{
0: "UNKNOWN",
1: "INT64",
2: "FLOAT64",
3: "BOOL",
4: "BYTES",
5: "STRING",
6: "TIMESTAMP",
7: "DATETIME",
8: "UINT64",
}
View Source
var MySQLColumnType_value = map[string]int32{
"UNKNOWN": 0,
"INT64": 1,
"FLOAT64": 2,
"BOOL": 3,
"BYTES": 4,
"STRING": 5,
"TIMESTAMP": 6,
"DATETIME": 7,
"UINT64": 8,
}
Functions ¶
func NewMySQLValidColumnDataMapInt64 ¶
func NewMySQLValidColumnDataMapInt64(d map[string]string) map[string]*MySQLColumnData
Types ¶
type DDLMsg ¶
type DDLMsg struct { // The DdlMsg SQL SQL string `protobuf:"bytes,2,opt,name=SQL,proto3" json:"SQL,omitempty"` }
DDLMsg is not available for Mongo?
func (*DDLMsg) Descriptor ¶
func (*DDLMsg) ProtoMessage ¶
func (*DDLMsg) ProtoMessage()
type DMLMsg ¶
type DMLMsg struct { // Data is the changed data Data map[string]*MySQLColumnData `` /* 135-byte string literal not displayed */ // Old is the original data (if it is not empty) Old map[string]*MySQLColumnData `` /* 133-byte string literal not displayed */ // Pks is the pkColumnName -> pkColumnValue mapping, Pks map[string]*MySQLColumnData `` /* 133-byte string literal not displayed */ MongoBsonBytes map[string][]byte `` /* 162-byte string literal not displayed */ }
func (*DMLMsg) Descriptor ¶
func (*DMLMsg) GetData ¶
func (m *DMLMsg) GetData() map[string]*MySQLColumnData
func (*DMLMsg) GetMongoBsonBytes ¶
func (*DMLMsg) GetOld ¶
func (m *DMLMsg) GetOld() map[string]*MySQLColumnData
func (*DMLMsg) GetPks ¶
func (m *DMLMsg) GetPks() map[string]*MySQLColumnData
func (*DMLMsg) ProtoMessage ¶
func (*DMLMsg) ProtoMessage()
type DataSourceType ¶
type DataSourceType int32
const ( DataSourceType_UNKNOWN_DATA_SOURCE DataSourceType = 0 DataSourceType_MYSQL DataSourceType = 1 DataSourceType_MONGODB DataSourceType = 2 DataSourceType_TIDB DataSourceType = 3 DataSourceType_REDIS DataSourceType = 4 DataSourceType_CODIS DataSourceType = 5 )
func (DataSourceType) EnumDescriptor ¶
func (DataSourceType) EnumDescriptor() ([]byte, []int)
func (DataSourceType) String ¶
func (x DataSourceType) String() string
type Msg ¶
type Msg struct { // Version is the Msg definition version Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // Database is the database/schema name for MySQL // is the database for Mongo Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"` // Table is the table name for MySQL // is the collection name for Mongo Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` // MsgType is the message type MsgType MsgType `protobuf:"varint,4,opt,name=msgType,proto3,enum=msgpb.MsgType" json:"msgType,omitempty"` // Timestamp is the binlog event header timestamp for MySQL // It is to be decided for Mongo Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Position is the GTID Set for MySQL // and is timestamp? for Mongo Position *Position `protobuf:"bytes,6,opt,name=position" json:"position,omitempty"` // GravityID is the gravity server id GravityID int32 `protobuf:"varint,7,opt,name=gravityID,proto3" json:"gravityID,omitempty"` // UniqueSourceName is the Unique Name of the data source UniqueSourceName string `protobuf:"bytes,8,opt,name=uniqueSourceName,proto3" json:"uniqueSourceName,omitempty"` // SourceType is the database type of the data source SourceType DataSourceType `protobuf:"varint,9,opt,name=sourceType,proto3,enum=msgpb.DataSourceType" json:"sourceType,omitempty"` // TimeZone is the Time zone of the data source TimeZone string `protobuf:"bytes,10,opt,name=timeZone,proto3" json:"timeZone,omitempty"` // Host is the Host name or IP address of the data source Host string `protobuf:"bytes,11,opt,name=host,proto3" json:"host,omitempty"` DmlMsg *DMLMsg `protobuf:"bytes,12,opt,name=dmlMsg" json:"dmlMsg,omitempty"` DdlMsg *DDLMsg `protobuf:"bytes,13,opt,name=ddlMsg" json:"ddlMsg,omitempty"` GravitySentTimestamp string `protobuf:"bytes,14,opt,name=gravitySentTimestamp,proto3" json:"gravitySentTimestamp,omitempty"` }
func (*Msg) Descriptor ¶
func (*Msg) GetDatabase ¶
func (*Msg) GetGravityID ¶
func (*Msg) GetGravitySentTimestamp ¶
func (*Msg) GetMsgType ¶
func (*Msg) GetPosition ¶
func (*Msg) GetSourceType ¶
func (m *Msg) GetSourceType() DataSourceType
func (*Msg) GetTimeZone ¶
func (*Msg) GetTimestamp ¶
func (*Msg) GetUniqueSourceName ¶
func (*Msg) GetVersion ¶
func (*Msg) ProtoMessage ¶
func (*Msg) ProtoMessage()
type MsgType ¶
type MsgType int32
const ( MsgType_UNKNOWN_MSG MsgType = 0 // below are DmlMsg types MsgType_CREATE MsgType = 1 MsgType_UPDATE MsgType = 2 MsgType_DELETE MsgType = 3 // below are DdlMsg types MsgType_CREATE_DATABASE MsgType = 4 MsgType_DROP_DATABASE MsgType = 5 MsgType_CREATE_TABLE MsgType = 6 MsgType_DROP_TABLE MsgType = 7 MsgType_ALTER_TABLE MsgType = 8 MsgType_TRUNCATE_TABLE MsgType = 9 MsgType_RENAME_TABLE MsgType = 10 MsgType_CREATE_INDEX MsgType = 11 MsgType_DROP_INDEX MsgType = 12 MsgType_GENERAL_DDL MsgType = 13 )
func (MsgType) EnumDescriptor ¶
type MySQLColumnData ¶
type MySQLColumnData struct { ColumnType MySQLColumnType `protobuf:"varint,1,opt,name=columnType,proto3,enum=msgpb.MySQLColumnType" json:"columnType,omitempty"` Value *MySQLColumnValue `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` DefaultValue *MySQLColumnValue `protobuf:"bytes,3,opt,name=defaultValue" json:"defaultValue,omitempty"` }
func NewMySQLNULLData ¶
func NewMySQLNULLData() *MySQLColumnData
func NewMySQLValidColumnDataInt64 ¶
func NewMySQLValidColumnDataInt64(d string) *MySQLColumnData
func NewMySQLValidColumnDataString ¶
func NewMySQLValidColumnDataString(d string) *MySQLColumnData
func (*MySQLColumnData) Descriptor ¶
func (*MySQLColumnData) Descriptor() ([]byte, []int)
func (*MySQLColumnData) GetColumnType ¶
func (m *MySQLColumnData) GetColumnType() MySQLColumnType
func (*MySQLColumnData) GetDefaultValue ¶
func (m *MySQLColumnData) GetDefaultValue() *MySQLColumnValue
func (*MySQLColumnData) GetValue ¶
func (m *MySQLColumnData) GetValue() *MySQLColumnValue
func (*MySQLColumnData) Marshal ¶
func (m *MySQLColumnData) Marshal() (dAtA []byte, err error)
func (*MySQLColumnData) ProtoMessage ¶
func (*MySQLColumnData) ProtoMessage()
func (*MySQLColumnData) Reset ¶
func (m *MySQLColumnData) Reset()
func (*MySQLColumnData) Size ¶
func (m *MySQLColumnData) Size() (n int)
func (*MySQLColumnData) String ¶
func (m *MySQLColumnData) String() string
func (*MySQLColumnData) Unmarshal ¶
func (m *MySQLColumnData) Unmarshal(dAtA []byte) error
type MySQLColumnType ¶
type MySQLColumnType int32
const ( MySQLColumnType_UNKNOWN MySQLColumnType = 0 MySQLColumnType_INT64 MySQLColumnType = 1 MySQLColumnType_FLOAT64 MySQLColumnType = 2 MySQLColumnType_BOOL MySQLColumnType = 3 MySQLColumnType_BYTES MySQLColumnType = 4 MySQLColumnType_STRING MySQLColumnType = 5 MySQLColumnType_TIMESTAMP MySQLColumnType = 6 MySQLColumnType_DATETIME MySQLColumnType = 7 MySQLColumnType_UINT64 MySQLColumnType = 8 )
func (MySQLColumnType) EnumDescriptor ¶
func (MySQLColumnType) EnumDescriptor() ([]byte, []int)
func (MySQLColumnType) String ¶
func (x MySQLColumnType) String() string
type MySQLColumnValue ¶
type MySQLColumnValue struct { ValueString string `protobuf:"bytes,1,opt,name=valueString,proto3" json:"valueString,omitempty"` IsNull bool `protobuf:"varint,2,opt,name=isNull,proto3" json:"isNull,omitempty"` }
func (*MySQLColumnValue) Descriptor ¶
func (*MySQLColumnValue) Descriptor() ([]byte, []int)
func (*MySQLColumnValue) GetIsNull ¶
func (m *MySQLColumnValue) GetIsNull() bool
func (*MySQLColumnValue) GetValueString ¶
func (m *MySQLColumnValue) GetValueString() string
func (*MySQLColumnValue) Marshal ¶
func (m *MySQLColumnValue) Marshal() (dAtA []byte, err error)
func (*MySQLColumnValue) ProtoMessage ¶
func (*MySQLColumnValue) ProtoMessage()
func (*MySQLColumnValue) Reset ¶
func (m *MySQLColumnValue) Reset()
func (*MySQLColumnValue) Size ¶
func (m *MySQLColumnValue) Size() (n int)
func (*MySQLColumnValue) String ¶
func (m *MySQLColumnValue) String() string
func (*MySQLColumnValue) Unmarshal ¶
func (m *MySQLColumnValue) Unmarshal(dAtA []byte) error
type Position ¶
type Position struct { BinlogFile string `protobuf:"bytes,1,opt,name=binlogFile,proto3" json:"binlogFile,omitempty"` BinlogPosition int32 `protobuf:"varint,2,opt,name=binlogPosition,proto3" json:"binlogPosition,omitempty"` BinlogGTIDSet string `protobuf:"bytes,3,opt,name=binlogGTIDSet,proto3" json:"binlogGTIDSet,omitempty"` MongoTimestamp int64 `protobuf:"varint,4,opt,name=mongoTimestamp,proto3" json:"mongoTimestamp,omitempty"` }
Position is binlog-file + binlog-position + gtidset for MySQL and is the timestamp for mongo
func (*Position) Descriptor ¶
func (*Position) GetBinlogFile ¶
func (*Position) GetBinlogGTIDSet ¶
func (*Position) GetBinlogPosition ¶
func (*Position) GetMongoTimestamp ¶
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.