Documentation
¶
Index ¶
- Constants
- func ConvertSQLServerUUID(sqlBytes []byte) []byte
- func GeneratePKCS8StringSupress(key *rsa.PrivateKey) string
- func GetMVRVars(prefix string) map[string]string
- func ParseAndExecuteTemplate(data []byte, config *StreamConfig) ([]byte, error)
- func ParsePEMPrivateKey(pemKey string) (*rsa.PrivateKey, error)
- func SortKeys(params []string)
- func TypeAlias(columnType string) string
- type Batch
- type BatchWriter
- type Column
- type DBExec
- type DBReaderConn
- type DataStream
- type DataWriter
- type MultiStreamConfig
- type Param
- type RawStreamConfig
- type StreamConfig
- type TemplateString
Constants ¶
View Source
const ( RFC3339MicroNoTZ = "2006-01-02T15:04:05.999999" RFC3339MicroTZ = "2006-01-02T15:04:05.999999Z07:00" )
Variables ¶
This section is empty.
Functions ¶
func ConvertSQLServerUUID ¶ added in v0.5.0
func GeneratePKCS8StringSupress ¶ added in v0.17.0
func GeneratePKCS8StringSupress(key *rsa.PrivateKey) string
func GetMVRVars ¶
func ParseAndExecuteTemplate ¶ added in v0.9.0
func ParseAndExecuteTemplate(data []byte, config *StreamConfig) ([]byte, error)
func ParsePEMPrivateKey ¶ added in v0.17.0
func ParsePEMPrivateKey(pemKey string) (*rsa.PrivateKey, error)
func TypeAlias ¶ added in v0.19.0
TypeAlias corrects for the various ways that Postgres types are named the goal is to only have the name column from this table https://www.postgresql.org/docs/current/datatype.html#DATATYPE-TABLE
Types ¶
type BatchWriter ¶ added in v0.13.0
type Column ¶
type Column struct { Name string `json:"name" yaml:"name"` DatabaseType string `json:"database_type" yaml:"database_type"` Type string `json:"type" yaml:"type"` Length int64 `json:"length,omitempty" yaml:"length,omitempty"` Nullable bool `json:"nullable" yaml:"nullable"` Position int `json:"position" yaml:"position"` Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"` Precision int64 `json:"precision,omitempty" yaml:"precision,omitempty"` }
func OverrideColumns ¶
type DBReaderConn ¶ added in v0.1.0
type DBReaderConn interface { CreateDataStream(ctx context.Context, cs *url.URL, config *StreamConfig) (*DataStream, error) ExecuteDataStream(ctx context.Context, ds *DataStream, config *StreamConfig) error Close() error }
type DataStream ¶
type DataStream struct { TotalRows int Mux sync.Mutex BatchChan chan Batch BatchSize int Columns []Column DestColumns []Column }
func (*DataStream) BatchesToWriter ¶
func (ds *DataStream) BatchesToWriter(ctx context.Context, writer BatchWriter) error
type DataWriter ¶
type DataWriter interface { CreateBatchWriter() BatchWriter Flush() error Close() error }
type MultiStreamConfig ¶ added in v0.12.0
type MultiStreamConfig struct { StreamConfig `json:",inline" yaml:",inline"` Tables []StreamConfig `json:"tables" yaml:"tables"` }
type RawStreamConfig ¶ added in v0.11.0
type RawStreamConfig struct { Filename TemplateString `yaml:"filename"` BatchSize int `yaml:"batch_size"` }
type StreamConfig ¶
type StreamConfig struct { StreamName string `json:"stream_name,omitempty" yaml:"stream_name,omitempty"` Filename string `json:"filename,omitempty" yaml:"filename,omitempty"` Format string `json:"format,omitempty" yaml:"format,omitempty"` SQL string `json:"sql,omitempty" yaml:"sql,omitempty"` Compression string `json:"compression,omitempty" yaml:"compression,omitempty"` Columns []Column `json:"columns,omitempty" yaml:"columns,omitempty"` Params map[string]Param `json:"params,omitempty" yaml:"params,omitempty"` ParamKeys []string BatchSize int `json:"batch_size,omitempty" yaml:"batch_size,omitempty"` BatchCount int `json:"batch_count,omitempty" yaml:"batch_count,omitempty"` }
func BuildConfig ¶ added in v0.9.0
func BuildConfig(data []byte, cliArgs *StreamConfig) (*StreamConfig, error)
func NewStreamConfigFromYaml ¶
func NewStreamConfigFromYaml(data []byte) (*StreamConfig, error)
func (*StreamConfig) GetBatchCount ¶ added in v0.13.0
func (sc *StreamConfig) GetBatchCount() int
func (*StreamConfig) GetBatchSize ¶ added in v0.10.0
func (sc *StreamConfig) GetBatchSize() int
func (*StreamConfig) OverrideValues ¶ added in v0.9.0
func (sc *StreamConfig) OverrideValues(cliArgs *StreamConfig)
func (*StreamConfig) Validate ¶ added in v0.9.0
func (sc *StreamConfig) Validate() error
type TemplateString ¶ added in v0.11.0
type TemplateString struct {
Raw string
}
func (*TemplateString) UnmarshalYAML ¶ added in v0.11.0
func (t *TemplateString) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.