Documentation ¶
Index ¶
- Constants
- Variables
- func IsUnknownTypeError(err error) bool
- func NewUnknownTypeError(err error) error
- type AnyToAny
- type AnyToDouble
- type BooleanToBoolean
- type BooleanToBooleanDefault
- type BooleanToBytes
- type BooleanToInt8
- type BooleanToString
- type ChangeItemCanon
- type ContainsColSchemaAdditionalInfo
- type Decimal
- type DurationToInt64
- type FieldReceiver
- type FieldReceiverMarker
- type FieldReceiverMatcher
- type FieldReceiverMatchers
- type Float64ToFloat32
- type Float64ToFloat32Default
- type Float64ToFloat64
- type Float64ToFloat64Default
- type Int16ToInt16
- type Int16ToInt16Default
- type Int16ToInt8
- type Int16ToInt8Default
- type Int16ToUint16
- type Int16ToUint16Default
- type Int16ToUint8
- type Int16ToUint8Default
- type Int64ToInt32
- type Int64ToInt64
- type Int64ToInt64Default
- type Int64ToTime
- type Int64ToUint32
- type Int64ToUint64
- type Int64ToUint64Default
- type Int8ToInt8
- type Int8ToInt8Default
- type Int8ToUint8
- type Int8ToUint8Default
- type IntToInt32
- type IntToInt32Default
- type IntToString
- type IntToStringDefault
- type IntToUint16
- type IntToUint16Default
- type IntToUint32
- type IntToUint32Default
- type KafkaType
- type KafkaTypeDescr
- type KeyValue
- type Message
- type NotDefaultReceiverDescription
- type OriginalTypeInfo
- type Payload
- type Point
- type ResultTypes
- type Schema
- type SchemaParameters
- type Source
- type StringToAny
- type StringToAnyDefault
- type StringToBytes
- type StringToBytesDefault
- type StringToString
- type StringToStringDefault
- type StringToTime
- type StructToFloat64
- type StructToString
- type UnknownTypeError
- type Values
- type VariableScaleDecimal
- type YTTypeAny
- type YTTypeBoolean
- type YTTypeBytes
- type YTTypeDate
- type YTTypeDateTime
- type YTTypeFloat32
- type YTTypeFloat64
- type YTTypeInt16
- type YTTypeInt32
- type YTTypeInt64
- type YTTypeInt8
- type YTTypeInterval
- type YTTypeStorer
- type YTTypeString
- type YTTypeTimestamp
- type YTTypeUint16
- type YTTypeUint32
- type YTTypeUint64
- type YTTypeUint8
Constants ¶
View Source
const DTMatchByFunc = "DATA_TRANSFER_CHECK_BY_FUNC"
Variables ¶
View Source
var KafkaTypeToResultYTTypes = map[KafkaType]ResultTypes{ KafkaTypeInt8: {string(ytschema.TypeInt8), []string{ string(ytschema.TypeUint8), }}, KafkaTypeInt16: {string(ytschema.TypeInt16), []string{ string(ytschema.TypeInt8), string(ytschema.TypeUint8), string(ytschema.TypeUint16), }}, KafkaTypeInt32: {string(ytschema.TypeInt32), []string{ string(ytschema.TypeString), string(ytschema.TypeUint16), string(ytschema.TypeUint32), string(ytschema.TypeDate), }}, KafkaTypeInt64: {string(ytschema.TypeInt64), []string{ string(ytschema.TypeString), string(ytschema.TypeUint32), string(ytschema.TypeInt32), string(ytschema.TypeUint64), string(ytschema.TypeDatetime), string(ytschema.TypeTimestamp), string(ytschema.TypeInterval), string(ytschema.TypeAny), }}, KafkaTypeBoolean: {string(ytschema.TypeBoolean), []string{ string(ytschema.TypeBytes), string(ytschema.TypeAny), }}, KafkaTypeBytes: {string(ytschema.TypeBytes), []string{ string(ytschema.TypeString), string(ytschema.TypeFloat64), string(ytschema.TypeAny), }}, KafkaTypeString: {string(ytschema.TypeString), []string{ string(ytschema.TypeTimestamp), string(ytschema.TypeAny), }}, KafkaTypeFloat32: {string(ytschema.TypeFloat64), []string{ string(ytschema.TypeFloat32), }}, KafkaTypeFloat64: {string(ytschema.TypeFloat64), []string{}}, KafkaTypeStruct: {string(ytschema.TypeFloat64), []string{ string(ytschema.TypeString), string(ytschema.TypeAny), }}, KafkaTypeArray: {string(ytschema.TypeAny), []string{}}, }
View Source
var TypeToDefault = map[KafkaType]FieldReceiver{ KafkaTypeInt8: new(Int8ToInt8Default), KafkaTypeInt16: new(Int16ToInt16Default), KafkaTypeInt32: new(IntToInt32Default), KafkaTypeInt64: new(Int64ToInt64Default), KafkaTypeBoolean: new(BooleanToBooleanDefault), KafkaTypeString: new(StringToStringDefault), KafkaTypeFloat32: new(Float64ToFloat64Default), KafkaTypeFloat64: new(Float64ToFloat64Default), KafkaTypeStruct: &FieldReceiverMatchers{ Matchers: []FieldReceiverMatcher{new(Point), new(VariableScaleDecimal)}, }, KafkaTypeBytes: &FieldReceiverMatchers{ Matchers: []FieldReceiverMatcher{new(Decimal), new(StringToBytesDefault)}, }, }
Functions ¶
func IsUnknownTypeError ¶
func NewUnknownTypeError ¶
Types ¶
type AnyToAny ¶
type AnyToAny interface {
Do(interface{}, *OriginalTypeInfo, *Schema, bool) (interface{}, error) // string ret_val: result_type
}
AnyToAny it's: ArrayToAny & StructToAny
type AnyToDouble ¶
type AnyToDouble interface {
Do(interface{}, *OriginalTypeInfo, *Schema, bool) (json.Number, error)
}
AnyToDouble special for io.debezium.data.VariableScaleDecimal
type BooleanToBoolean ¶
type BooleanToBooleanDefault ¶
type BooleanToBooleanDefault struct { BooleanToBoolean YTTypeBoolean FieldReceiverMarker }
func (*BooleanToBooleanDefault) Do ¶
func (d *BooleanToBooleanDefault) Do(in bool, _ *OriginalTypeInfo, _ *Schema, _ bool) (bool, error)
type BooleanToBytes ¶
type BooleanToInt8 ¶
type BooleanToString ¶
type ChangeItemCanon ¶
type ChangeItemCanon struct { ChangeItem *abstract.ChangeItem DebeziumEvents []KeyValue }
type ContainsColSchemaAdditionalInfo ¶
ContainsColSchemaAdditionalInfo modifies ColSchema, adds special parameters
type Decimal ¶
type Decimal struct { StringToString YTTypeString FieldReceiverMarker }
type DurationToInt64 ¶
type FieldReceiver ¶
type FieldReceiver interface { IsFieldReceiver() YTTypeStorer }
type FieldReceiverMarker ¶
type FieldReceiverMarker struct{}
func (*FieldReceiverMarker) IsFieldReceiver ¶
func (r *FieldReceiverMarker) IsFieldReceiver()
type FieldReceiverMatcher ¶
type FieldReceiverMatcher interface { FieldReceiver IsMatched(originalType *OriginalTypeInfo, schema *Schema) bool }
type FieldReceiverMatchers ¶
type FieldReceiverMatchers struct {
Matchers []FieldReceiverMatcher
}
func (*FieldReceiverMatchers) IsFieldReceiver ¶
func (m *FieldReceiverMatchers) IsFieldReceiver()
func (*FieldReceiverMatchers) YTType ¶
func (m *FieldReceiverMatchers) YTType() string
type Float64ToFloat32 ¶
type Float64ToFloat32Default ¶
type Float64ToFloat32Default struct { Float64ToFloat32 YTTypeFloat32 FieldReceiverMarker }
func (*Float64ToFloat32Default) Do ¶
func (d *Float64ToFloat32Default) Do(in float64, _ *OriginalTypeInfo, _ *Schema, _ bool) (float32, error)
type Float64ToFloat64 ¶
type Float64ToFloat64Default ¶
type Float64ToFloat64Default struct { Float64ToFloat64 YTTypeFloat64 FieldReceiverMarker }
func (*Float64ToFloat64Default) Do ¶
func (d *Float64ToFloat64Default) Do(in float64, _ *OriginalTypeInfo, _ *Schema, _ bool) (float64, error)
type Int16ToInt16 ¶
type Int16ToInt16Default ¶
type Int16ToInt16Default struct { Int16ToInt16 YTTypeInt16 FieldReceiverMarker }
func (*Int16ToInt16Default) Do ¶
func (d *Int16ToInt16Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (int16, error)
type Int16ToInt8 ¶
type Int16ToInt8Default ¶
type Int16ToInt8Default struct { Int16ToInt8 YTTypeInt8 FieldReceiverMarker }
func (*Int16ToInt8Default) Do ¶
func (d *Int16ToInt8Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (int8, error)
type Int16ToUint16 ¶
type Int16ToUint16Default ¶
type Int16ToUint16Default struct { Int16ToUint16 YTTypeUint16 FieldReceiverMarker }
func (*Int16ToUint16Default) Do ¶
func (d *Int16ToUint16Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (uint16, error)
type Int16ToUint8 ¶
type Int16ToUint8Default ¶
type Int16ToUint8Default struct { Int16ToUint8 YTTypeUint8 FieldReceiverMarker }
func (*Int16ToUint8Default) Do ¶
func (d *Int16ToUint8Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (uint8, error)
type Int64ToInt32 ¶
type Int64ToInt64 ¶
type Int64ToInt64Default ¶
type Int64ToInt64Default struct { Int64ToInt64 YTTypeInt64 FieldReceiverMarker }
func (*Int64ToInt64Default) Do ¶
func (d *Int64ToInt64Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (int64, error)
type Int64ToTime ¶
type Int64ToUint32 ¶
type Int64ToUint64 ¶
type Int64ToUint64Default ¶
type Int64ToUint64Default struct { Int64ToUint64 YTTypeUint64 FieldReceiverMarker }
func (*Int64ToUint64Default) Do ¶
func (d *Int64ToUint64Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (uint64, error)
type Int8ToInt8 ¶
type Int8ToInt8Default ¶
type Int8ToInt8Default struct { Int8ToInt8 YTTypeInt8 FieldReceiverMarker }
func (*Int8ToInt8Default) Do ¶
func (d *Int8ToInt8Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (int8, error)
type Int8ToUint8 ¶
type Int8ToUint8Default ¶
type Int8ToUint8Default struct { Int8ToUint8 YTTypeUint8 FieldReceiverMarker }
func (*Int8ToUint8Default) Do ¶
func (d *Int8ToUint8Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (uint8, error)
type IntToInt32 ¶
IntToInt32 special case - generalization Int*ToInt32
type IntToInt32Default ¶
type IntToInt32Default struct { IntToInt32 YTTypeInt32 FieldReceiverMarker }
func (*IntToInt32Default) Do ¶
func (d *IntToInt32Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (int32, error)
type IntToString ¶
IntToString special case - generalization Int*ToString
type IntToStringDefault ¶
type IntToStringDefault struct { IntToString YTTypeString FieldReceiverMarker }
func (*IntToStringDefault) Do ¶
func (d *IntToStringDefault) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (string, error)
type IntToUint16 ¶
type IntToUint16Default ¶
type IntToUint16Default struct { IntToUint16 YTTypeUint16 FieldReceiverMarker }
func (*IntToUint16Default) Do ¶
func (d *IntToUint16Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (uint16, error)
type IntToUint32 ¶
type IntToUint32Default ¶
type IntToUint32Default struct { IntToUint32 YTTypeUint32 FieldReceiverMarker }
func (*IntToUint32Default) Do ¶
func (d *IntToUint32Default) Do(in int64, _ *OriginalTypeInfo, _ *Schema, _ bool) (uint32, error)
type KafkaType ¶
type KafkaType string
const ( KafkaTypeInt8 KafkaType = "int8" KafkaTypeInt16 KafkaType = "int16" KafkaTypeInt32 KafkaType = "int32" KafkaTypeInt64 KafkaType = "int64" KafkaTypeFloat32 KafkaType = "float" KafkaTypeFloat64 KafkaType = "double" KafkaTypeBoolean KafkaType = "boolean" KafkaTypeString KafkaType = "string" KafkaTypeBytes KafkaType = "bytes" KafkaTypeArray KafkaType = "array" KafkaTypeMap KafkaType = "map" KafkaTypeStruct KafkaType = "struct" )
type KafkaTypeDescr ¶
type Message ¶
func UnmarshalMessage ¶
type NotDefaultReceiverDescription ¶
type NotDefaultReceiverDescription map[KafkaType]map[string]FieldReceiver
type OriginalTypeInfo ¶
type OriginalTypeInfo struct { OriginalType string `json:"original_type"` Properties map[string]string `json:"properties,omitempty"` }
func (*OriginalTypeInfo) GetArrElemTypeDescr ¶
func (i *OriginalTypeInfo) GetArrElemTypeDescr() *OriginalTypeInfo
type Payload ¶
type Payload struct { After map[string]interface{} `json:"after"` Before map[string]interface{} `json:"before"` Op string `json:"op"` Source Source `json:"source"` Transaction json.RawMessage `json:"transaction"` TSMs uint64 `json:"ts_ms"` }
func UnmarshalPayload ¶
type Point ¶
type Point struct { AnyToAny YTTypeString FieldReceiverMarker }
type ResultTypes ¶
type Schema ¶
type Schema struct { Field string `json:"field"` Fields []Schema `json:"fields"` Name string `json:"name"` Optional bool `json:"optional"` Parameters *SchemaParameters `json:"parameters,omitempty"` Type string `json:"type"` Version int `json:"version"` Items *Schema `json:"items"` DTOriginalTypeInfo *OriginalTypeInfo `json:"__dt_original_type_info"` }
func UnmarshalSchema ¶
func (*Schema) FindAfterSchema ¶
func (*Schema) FindBeforeSchema ¶
func (*Schema) FindSchemaDescr ¶
type SchemaParameters ¶
type Source ¶
type Source struct { Connector string `json:"connector"` DB string `json:"db"` LSN uint64 `json:"lsn"` Name string `json:"name"` Schema string `json:"schema"` Sequence string `json:"sequence"` Snapshot string `json:"snapshot"` Table string `json:"table"` TSMs uint64 `json:"ts_ms"` TXID uint32 `json:"txId"` Version string `json:"version"` XMin *int `json:"xmin"` }
type StringToAny ¶
type StringToAny interface {
Do(string, *OriginalTypeInfo, *Schema, bool) (interface{}, error)
}
type StringToAnyDefault ¶
type StringToAnyDefault struct { StringToAny YTTypeAny FieldReceiverMarker }
func (*StringToAnyDefault) Do ¶
func (d *StringToAnyDefault) Do(in string, _ *OriginalTypeInfo, _ *Schema, _ bool) (interface{}, error)
type StringToBytes ¶
type StringToBytesDefault ¶
type StringToBytesDefault struct { StringToBytes YTTypeBytes FieldReceiverMarker }
func (*StringToBytesDefault) Do ¶
func (d *StringToBytesDefault) Do(in string, _ *OriginalTypeInfo, _ *Schema, _ bool) ([]byte, error)
func (*StringToBytesDefault) IsMatched ¶
func (d *StringToBytesDefault) IsMatched(_ *OriginalTypeInfo, _ *Schema) bool
type StringToString ¶
type StringToStringDefault ¶
type StringToStringDefault struct { StringToString YTTypeString FieldReceiverMarker }
func (*StringToStringDefault) Do ¶
func (d *StringToStringDefault) Do(in string, _ *OriginalTypeInfo, _ *Schema, _ bool) (string, error)
type StringToTime ¶
type StructToFloat64 ¶
type StructToFloat64 interface {
Do(interface{}, *OriginalTypeInfo, *Schema, bool) (float64, error)
}
type StructToString ¶
type StructToString interface {
Do(interface{}, *OriginalTypeInfo, *Schema, bool) (string, error)
}
type UnknownTypeError ¶
type UnknownTypeError interface { error IsUnknownTypeError() }
type VariableScaleDecimal ¶
type VariableScaleDecimal struct { AnyToDouble YTTypeFloat64 FieldReceiverMarker }
func (*VariableScaleDecimal) Do ¶
func (d *VariableScaleDecimal) Do(in interface{}, _ *OriginalTypeInfo, _ *Schema, _ bool) (json.Number, error)
func (*VariableScaleDecimal) IsMatched ¶
func (d *VariableScaleDecimal) IsMatched(_ *OriginalTypeInfo, schema *Schema) bool
type YTTypeBoolean ¶
type YTTypeBoolean struct{}
func (*YTTypeBoolean) YTType ¶
func (t *YTTypeBoolean) YTType() string
type YTTypeBytes ¶
type YTTypeBytes struct{}
func (*YTTypeBytes) YTType ¶
func (t *YTTypeBytes) YTType() string
type YTTypeDate ¶
type YTTypeDate struct{}
func (*YTTypeDate) YTType ¶
func (t *YTTypeDate) YTType() string
type YTTypeDateTime ¶
type YTTypeDateTime struct{}
func (*YTTypeDateTime) YTType ¶
func (t *YTTypeDateTime) YTType() string
type YTTypeFloat32 ¶
type YTTypeFloat32 struct{}
func (*YTTypeFloat32) YTType ¶
func (t *YTTypeFloat32) YTType() string
type YTTypeFloat64 ¶
type YTTypeFloat64 struct{}
func (*YTTypeFloat64) YTType ¶
func (t *YTTypeFloat64) YTType() string
type YTTypeInt16 ¶
type YTTypeInt16 struct{}
func (*YTTypeInt16) YTType ¶
func (t *YTTypeInt16) YTType() string
type YTTypeInt32 ¶
type YTTypeInt32 struct{}
func (*YTTypeInt32) YTType ¶
func (t *YTTypeInt32) YTType() string
type YTTypeInt64 ¶
type YTTypeInt64 struct{}
func (*YTTypeInt64) YTType ¶
func (t *YTTypeInt64) YTType() string
type YTTypeInt8 ¶
type YTTypeInt8 struct{}
func (*YTTypeInt8) YTType ¶
func (t *YTTypeInt8) YTType() string
type YTTypeInterval ¶
type YTTypeInterval struct{}
func (*YTTypeInterval) YTType ¶
func (t *YTTypeInterval) YTType() string
type YTTypeStorer ¶
type YTTypeStorer interface {
YTType() string
}
type YTTypeString ¶
type YTTypeString struct{}
func (*YTTypeString) YTType ¶
func (t *YTTypeString) YTType() string
type YTTypeTimestamp ¶
type YTTypeTimestamp struct{}
func (*YTTypeTimestamp) YTType ¶
func (t *YTTypeTimestamp) YTType() string
type YTTypeUint16 ¶
type YTTypeUint16 struct{}
func (*YTTypeUint16) YTType ¶
func (t *YTTypeUint16) YTType() string
type YTTypeUint32 ¶
type YTTypeUint32 struct{}
func (*YTTypeUint32) YTType ¶
func (t *YTTypeUint32) YTType() string
type YTTypeUint64 ¶
type YTTypeUint64 struct{}
func (*YTTypeUint64) YTType ¶
func (t *YTTypeUint64) YTType() string
type YTTypeUint8 ¶
type YTTypeUint8 struct{}
func (*YTTypeUint8) YTType ¶
func (t *YTTypeUint8) YTType() string
Click to show internal directories.
Click to hide internal directories.