pull

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db2DataSourceFactory added in v1.4.0

type Db2DataSourceFactory struct{}

Db2DataSourceFactory exposes methods to create new Db2 pullers.

func NewDb2DataSourceFactory added in v1.4.0

func NewDb2DataSourceFactory() *Db2DataSourceFactory

NewDb2DataSourceFactory creates a new oracle datasource factory.

func (*Db2DataSourceFactory) New added in v1.4.0

func (e *Db2DataSourceFactory) New(url string, schema string) pull.DataSource

New return a Db2 puller

type Db2Dialect added in v1.4.0

type Db2Dialect struct{}

PostgresDialect implement postgres SQL variations

func (Db2Dialect) Limit added in v1.4.0

func (od Db2Dialect) Limit(limit uint) string

func (Db2Dialect) Placeholder added in v1.4.0

func (od Db2Dialect) Placeholder(position int) string

type Event

type Event struct {
	Duration int64  `json:"duration"`
	Index    uint   `json:"index"`
	Entry    string `json:"entry"`
	Follow   string `json:"follow"`
	Filter   string `json:"filter"`
}

Event is catch by json tracer

type HTTPDataSource added in v1.7.0

type HTTPDataSource struct {
	// contains filtered or unexported fields
}

HTTPDataSource to read in the pull process.

func (*HTTPDataSource) Close added in v1.7.0

func (ds *HTTPDataSource) Close() error

Close a connection to the HTTP DB

func (*HTTPDataSource) Open added in v1.7.0

func (ds *HTTPDataSource) Open() error

Open a connection to the HTTP DB

func (*HTTPDataSource) Read added in v1.10.0

func (ds *HTTPDataSource) Read(source pull.Table, filter pull.Filter) (pull.RowSet, error)

func (*HTTPDataSource) RowReader added in v1.7.0

func (ds *HTTPDataSource) RowReader(source pull.Table, filter pull.Filter) (pull.RowReader, error)

RowReader iterate over rows in table with filter

type HTTPDataSourceFactory added in v1.7.0

type HTTPDataSourceFactory struct{}

HTTPDataSourceFactory exposes methods to create new HTTP pullers.

func NewHTTPDataSourceFactory added in v1.7.0

func NewHTTPDataSourceFactory() *HTTPDataSourceFactory

NewHTTPDataSourceFactory creates a new HTTP datasource factory.

func (*HTTPDataSourceFactory) New added in v1.7.0

func (e *HTTPDataSourceFactory) New(url string, schema string) pull.DataSource

New return a HTTP puller

type JSONRowExporter

type JSONRowExporter struct {
	// contains filtered or unexported fields
}

JSONRowExporter export rows to JSON format.

func NewJSONRowExporter

func NewJSONRowExporter(file io.Writer) *JSONRowExporter

NewJSONRowExporter creates a new JSONRowExporter.

func (*JSONRowExporter) Export

func (re *JSONRowExporter) Export(r pull.ExportedRow) error

Export rows in JSON format.

type JSONRowReader

type JSONRowReader struct {
	// contains filtered or unexported fields
}

JSONRowJSONRowReader read row from JSONLine file

func NewJSONRowReader

func NewJSONRowReader(file io.Reader) *JSONRowReader

NNewJSONRowReader create a new JSONRowReader

func (*JSONRowReader) Error

func (jrr *JSONRowReader) Error() error

func (*JSONRowReader) Next

func (jrr *JSONRowReader) Next() bool

Next return true if Next Value is present

func (*JSONRowReader) Value

func (jrr *JSONRowReader) Value() pull.Row

Value return the current Row

type JSONTraceListener

type JSONTraceListener struct {
	// contains filtered or unexported fields
}

JSONTraceListener JSON event tracer

func NewJSONTraceListener

func NewJSONTraceListener(file *os.File) JSONTraceListener

NewJSONTraceListener create JsonTraceListner

func (JSONTraceListener) TraceStep

func (t JSONTraceListener) TraceStep(s pull.Step) pull.TraceListener

TraceStep catch Step event.

type MariadbDataSourceFactory added in v1.10.0

type MariadbDataSourceFactory struct{}

MariadbDataSourceFactory exposes methods to create new Mariadb pullers.

func NewMariadbDataSourceFactory added in v1.10.0

func NewMariadbDataSourceFactory() *MariadbDataSourceFactory

NewMariadbDataSourceFactory creates a new mariadb datasource factory.

func (*MariadbDataSourceFactory) New added in v1.10.0

New return a Mariadb puller

type MariadbDialect added in v1.10.0

type MariadbDialect struct{}

MariadbDialect implement mariadb SQL variations

func (MariadbDialect) Limit added in v1.10.0

func (pd MariadbDialect) Limit(limit uint) string

func (MariadbDialect) Placeholder added in v1.10.0

func (pd MariadbDialect) Placeholder(position int) string

type MockSQLDialect

type MockSQLDialect struct {
	mock.Mock
}

MockSQLDialect is an autogenerated mock type for the SQLDialect type

func (*MockSQLDialect) Limit

func (_m *MockSQLDialect) Limit(_a0 uint) string

Limit provides a mock function with given fields: _a0

func (*MockSQLDialect) Placeholder

func (_m *MockSQLDialect) Placeholder(_a0 int) string

Placeholder provides a mock function with given fields: _a0

type OracleDataSourceFactory

type OracleDataSourceFactory struct{}

OracleDataSourceFactory exposes methods to create new Oracle pullers.

func NewOracleDataSourceFactory

func NewOracleDataSourceFactory() *OracleDataSourceFactory

NewOracleDataSourceFactory creates a new oracle datasource factory.

func (*OracleDataSourceFactory) New

func (e *OracleDataSourceFactory) New(url string, schema string) pull.DataSource

New return a Oracle puller

type OracleDialect

type OracleDialect struct{}

PostgresDialect implement postgres SQL variations

func (OracleDialect) Limit

func (od OracleDialect) Limit(limit uint) string

func (OracleDialect) Placeholder

func (od OracleDialect) Placeholder(position int) string

type PostgresDataSourceFactory

type PostgresDataSourceFactory struct{}

PostgresDataSourceFactory exposes methods to create new Postgres pullers.

func NewPostgresDataSourceFactory

func NewPostgresDataSourceFactory() *PostgresDataSourceFactory

NewPostgresDataSourceFactory creates a new postgres datasource factory.

func (*PostgresDataSourceFactory) New

New return a Postgres puller

type PostgresDialect

type PostgresDialect struct{}

PostgresDialect implement postgres SQL variations

func (PostgresDialect) Limit

func (pd PostgresDialect) Limit(limit uint) string

func (PostgresDialect) Placeholder

func (pd PostgresDialect) Placeholder(position int) string

type SQLDataIterator

type SQLDataIterator struct {
	// contains filtered or unexported fields
}

SQLDataIterator read data from a SQL database.

func (*SQLDataIterator) Error

func (di *SQLDataIterator) Error() error

Error returns the iterator error

func (*SQLDataIterator) Next

func (di *SQLDataIterator) Next() bool

Next reads the next rows if it exists.

func (*SQLDataIterator) Value

func (di *SQLDataIterator) Value() pull.Row

Value returns the last read row.

type SQLDataSource

type SQLDataSource struct {
	// contains filtered or unexported fields
}

SQLDataSource to read in the pull process.

func (*SQLDataSource) Close

func (ds *SQLDataSource) Close() error

Close a connection to the SQL DB

func (*SQLDataSource) Open

func (ds *SQLDataSource) Open() error

Open a connection to the SQL DB

func (*SQLDataSource) Read added in v1.10.0

func (ds *SQLDataSource) Read(source pull.Table, filter pull.Filter) (pull.RowSet, error)

func (*SQLDataSource) RowReader

func (ds *SQLDataSource) RowReader(source pull.Table, filter pull.Filter) (pull.RowReader, error)

RowReader iterate over rows in table with filter

type SQLDialect

type SQLDialect interface {

	// Placeholder format variable in query
	Placeholder(int) string
	// Limit format limitation clause
	Limit(uint) string
}

SQLDialect to inject SQL variations

Jump to

Keyboard shortcuts

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