slave_binlog

package
v2.1.8+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

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
TableMutation
DMLData
DDLData
Binlog

Index

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) Descriptor() ([]byte, []int)

func (*Binlog) GetCommitTs

func (m *Binlog) GetCommitTs() int64

func (*Binlog) GetDdlData

func (m *Binlog) GetDdlData() *DDLData

func (*Binlog) GetDmlData

func (m *Binlog) GetDmlData() *DMLData

func (*Binlog) GetType

func (m *Binlog) GetType() BinlogType

func (*Binlog) Marshal

func (m *Binlog) Marshal() (dAtA []byte, err error)

func (*Binlog) MarshalTo

func (m *Binlog) MarshalTo(dAtA []byte) (int, error)

func (*Binlog) ProtoMessage

func (*Binlog) ProtoMessage()

func (*Binlog) Reset

func (m *Binlog) Reset()

func (*Binlog) Size

func (m *Binlog) Size() (n int)

func (*Binlog) String

func (m *Binlog) String() string

func (*Binlog) Unmarshal

func (m *Binlog) Unmarshal(dAtA []byte) error

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) Descriptor() ([]byte, []int)

func (*Column) GetBytesValue

func (m *Column) GetBytesValue() []byte

func (*Column) GetDoubleValue

func (m *Column) GetDoubleValue() float64

func (*Column) GetInt64Value

func (m *Column) GetInt64Value() int64

func (*Column) GetIsNull

func (m *Column) GetIsNull() bool

func (*Column) GetStringValue

func (m *Column) GetStringValue() string

func (*Column) GetUint64Value

func (m *Column) GetUint64Value() uint64

func (*Column) Marshal

func (m *Column) Marshal() (dAtA []byte, err error)

func (*Column) MarshalTo

func (m *Column) MarshalTo(dAtA []byte) (int, error)

func (*Column) ProtoMessage

func (*Column) ProtoMessage()

func (*Column) Reset

func (m *Column) Reset()

func (*Column) Size

func (m *Column) Size() (n int)

func (*Column) String

func (m *Column) String() string

func (*Column) Unmarshal

func (m *Column) Unmarshal(dAtA []byte) error

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 longblog mediumblog 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) MarshalTo

func (m *ColumnInfo) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*DDLData) GetDdlQuery

func (m *DDLData) GetDdlQuery() []byte

func (*DDLData) GetSchemaName

func (m *DDLData) GetSchemaName() string

func (*DDLData) GetTableName

func (m *DDLData) GetTableName() string

func (*DDLData) Marshal

func (m *DDLData) Marshal() (dAtA []byte, err error)

func (*DDLData) MarshalTo

func (m *DDLData) MarshalTo(dAtA []byte) (int, error)

func (*DDLData) ProtoMessage

func (*DDLData) ProtoMessage()

func (*DDLData) Reset

func (m *DDLData) Reset()

func (*DDLData) Size

func (m *DDLData) Size() (n int)

func (*DDLData) String

func (m *DDLData) String() string

func (*DDLData) Unmarshal

func (m *DDLData) Unmarshal(dAtA []byte) error

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) Descriptor() ([]byte, []int)

func (*DMLData) GetTables

func (m *DMLData) GetTables() []*Table

func (*DMLData) Marshal

func (m *DMLData) Marshal() (dAtA []byte, err error)

func (*DMLData) MarshalTo

func (m *DMLData) MarshalTo(dAtA []byte) (int, error)

func (*DMLData) ProtoMessage

func (*DMLData) ProtoMessage()

func (*DMLData) Reset

func (m *DMLData) Reset()

func (*DMLData) Size

func (m *DMLData) Size() (n int)

func (*DMLData) String

func (m *DMLData) String() string

func (*DMLData) Unmarshal

func (m *DMLData) Unmarshal(dAtA []byte) error

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) Descriptor() ([]byte, []int)

func (*Row) GetColumns

func (m *Row) GetColumns() []*Column

func (*Row) Marshal

func (m *Row) Marshal() (dAtA []byte, err error)

func (*Row) MarshalTo

func (m *Row) MarshalTo(dAtA []byte) (int, error)

func (*Row) ProtoMessage

func (*Row) ProtoMessage()

func (*Row) Reset

func (m *Row) Reset()

func (*Row) Size

func (m *Row) Size() (n int)

func (*Row) String

func (m *Row) String() string

func (*Row) Unmarshal

func (m *Row) Unmarshal(dAtA []byte) error

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"`
	XXX_unrecognized []byte           `json:"-"`
}

Table contains mutations in a table.

func (*Table) Descriptor

func (*Table) Descriptor() ([]byte, []int)

func (*Table) GetColumnInfo

func (m *Table) GetColumnInfo() []*ColumnInfo

func (*Table) GetMutations

func (m *Table) GetMutations() []*TableMutation

func (*Table) GetSchemaName

func (m *Table) GetSchemaName() string

func (*Table) GetTableName

func (m *Table) GetTableName() string

func (*Table) Marshal

func (m *Table) Marshal() (dAtA []byte, err error)

func (*Table) MarshalTo

func (m *Table) MarshalTo(dAtA []byte) (int, error)

func (*Table) ProtoMessage

func (*Table) ProtoMessage()

func (*Table) Reset

func (m *Table) Reset()

func (*Table) Size

func (m *Table) Size() (n int)

func (*Table) String

func (m *Table) String() string

func (*Table) Unmarshal

func (m *Table) Unmarshal(dAtA []byte) error

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) MarshalTo

func (m *TableMutation) MarshalTo(dAtA []byte) (int, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL