Documentation ¶
Index ¶
- Constants
- func NewSchemaBuilder(treatTinyIntAsBoolean bool) lib.SchemaBuilder
- type CheckConnection
- type ConfigurationForm
- type ConverterFunc
- type FiveTranSchemaBuilder
- func (s *FiveTranSchemaBuilder) BuildResponse() (*fivetransdk.SchemaResponse, error)
- func (s *FiveTranSchemaBuilder) BuildUpdateResponse() (*SchemaWithMetadata, error)
- func (s *FiveTranSchemaBuilder) OnColumns(keyspaceName, tableName string, columns []lib.MysqlColumn)
- func (s *FiveTranSchemaBuilder) OnKeyspace(keyspaceName string)
- func (s *FiveTranSchemaBuilder) OnTable(keyspaceName, tableName string)
- type LogSender
- type Schema
- type SchemaEnumsAndSets
- type SchemaWithMetadata
- type Serializer
- type Sync
- type ValueMap
Constants ¶
View Source
const CheckConnectionTestName string = "check_connection"
Variables ¶
This section is empty.
Functions ¶
func NewSchemaBuilder ¶
func NewSchemaBuilder(treatTinyIntAsBoolean bool) lib.SchemaBuilder
Types ¶
type CheckConnection ¶
type CheckConnection struct{}
func (CheckConnection) Handle ¶
func (CheckConnection) Handle(ctx context.Context, database lib.ConnectClient, s string, source *lib.PlanetScaleSource) (*fivetransdk.TestResponse, error)
type ConfigurationForm ¶
type ConfigurationForm struct{}
func (ConfigurationForm) Handle ¶
func (ConfigurationForm) Handle(ctx context.Context, _ *fivetransdk.ConfigurationFormRequest) (*fivetransdk.ConfigurationFormResponse, error)
type ConverterFunc ¶
type ConverterFunc func(sqltypes.Value) (*fivetransdk.ValueType, error)
func GetConverter ¶
func GetConverter(dataType fivetransdk.DataType) (ConverterFunc, error)
func GetEnumConverter ¶
func GetEnumConverter(enumValues []string) (ConverterFunc, error)
func GetSetConverter ¶
func GetSetConverter(setValues []string) (ConverterFunc, error)
type FiveTranSchemaBuilder ¶
type FiveTranSchemaBuilder struct {
// contains filtered or unexported fields
}
func (*FiveTranSchemaBuilder) BuildResponse ¶
func (s *FiveTranSchemaBuilder) BuildResponse() (*fivetransdk.SchemaResponse, error)
func (*FiveTranSchemaBuilder) BuildUpdateResponse ¶
func (s *FiveTranSchemaBuilder) BuildUpdateResponse() (*SchemaWithMetadata, error)
BuildUpdateResponse returns a schema with extra metadata needed during the Update phase. This includes enum and set mappings not available on the fivetransdk Column type.
func (*FiveTranSchemaBuilder) OnColumns ¶
func (s *FiveTranSchemaBuilder) OnColumns(keyspaceName, tableName string, columns []lib.MysqlColumn)
func (*FiveTranSchemaBuilder) OnKeyspace ¶
func (s *FiveTranSchemaBuilder) OnKeyspace(keyspaceName string)
func (*FiveTranSchemaBuilder) OnTable ¶
func (s *FiveTranSchemaBuilder) OnTable(keyspaceName, tableName string)
type LogSender ¶
type LogSender interface {
Send(*fivetransdk.UpdateResponse) error
}
type Schema ¶
type Schema struct{}
func (Schema) Handle ¶
func (Schema) Handle(ctx context.Context, psc *lib.PlanetScaleSource, db *lib.MysqlClient) (*fivetransdk.SchemaResponse, error)
type SchemaWithMetadata ¶
type SchemaWithMetadata struct { SchemaList *fivetransdk.SchemaList EnumsAndSets SchemaEnumsAndSets }
type Serializer ¶
type Serializer interface { Info(string) Log(fivetransdk.LogLevel, string) error Record(*sqltypes.Result, *fivetransdk.SchemaSelection, *fivetransdk.TableSelection, lib.Operation) error State(lib.SyncState) error Update(*lib.UpdatedRow, *fivetransdk.SchemaSelection, *fivetransdk.TableSelection) error Truncate(*fivetransdk.SchemaSelection, *fivetransdk.TableSelection) error }
func NewSchemaAwareSerializer ¶
func NewSchemaAwareSerializer(sender LogSender, prefix string, serializeTinyIntAsBool bool, schemaList *fivetransdk.SchemaList, enumsAndSets SchemaEnumsAndSets) Serializer
type Sync ¶
type Sync struct{}
func (*Sync) Handle ¶
func (s *Sync) Handle(psc *lib.PlanetScaleSource, db *lib.ConnectClient, logger Serializer, state *lib.SyncState, schema *fivetransdk.Selection_WithSchema) error
Click to show internal directories.
Click to hide internal directories.