pb_binlog

package
v0.0.0-...-552cffb Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

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

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

func (*Binlog) GetCommitTs

func (m *Binlog) GetCommitTs() int64

func (*Binlog) GetDdlQuery

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

func (*Binlog) GetDmlData

func (m *Binlog) GetDmlData() *DMLData

func (*Binlog) GetTp

func (m *Binlog) GetTp() 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 {
	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) Descriptor() ([]byte, []int)

func (*Column) GetChangedValue

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

func (*Column) GetMysqlType

func (m *Column) GetMysqlType() string

func (*Column) GetName

func (m *Column) GetName() string

func (*Column) GetTp

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

func (*Column) GetValue

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

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

func (*DMLData) GetEvents

func (m *DMLData) GetEvents() []Event

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

func (*Event) GetRow

func (m *Event) GetRow() [][]byte

func (*Event) GetSchemaName

func (m *Event) GetSchemaName() string

func (*Event) GetTableName

func (m *Event) GetTableName() string

func (*Event) GetTp

func (m *Event) GetTp() EventType

func (*Event) Marshal

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

func (*Event) MarshalTo

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

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) Size

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

func (*Event) String

func (m *Event) String() string

func (*Event) Unmarshal

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

type EventType

type EventType int32
const (
	EventType_Insert EventType = 0
	EventType_Update EventType = 1
	EventType_Delete EventType = 2
)

func (EventType) Enum

func (x EventType) Enum() *EventType

func (EventType) EnumDescriptor

func (EventType) EnumDescriptor() ([]byte, []int)

func (EventType) String

func (x EventType) String() string

func (*EventType) UnmarshalJSON

func (x *EventType) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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