Documentation ¶
Overview ¶
Package source is a generated GoMock package.
Index ¶
- type CSVConfig
- type Config
- type FTPConfig
- type GCSConfig
- type Globber
- type HDFSConfig
- type LocalConfig
- type MockGlobber
- type MockGlobberMockRecorder
- type MockSizer
- type MockSizerMockRecorder
- type MockSource
- type MockSourceMockRecorder
- func (mr *MockSourceMockRecorder) Close() *gomock.Call
- func (mr *MockSourceMockRecorder) Config() *gomock.Call
- func (mr *MockSourceMockRecorder) Name() *gomock.Call
- func (mr *MockSourceMockRecorder) Open() *gomock.Call
- func (mr *MockSourceMockRecorder) Read(p interface{}) *gomock.Call
- func (mr *MockSourceMockRecorder) Size() *gomock.Call
- type OSSConfig
- type S3Config
- type SFTPConfig
- type SQLConfig
- type SQLId
- type SQLSource
- func (s *SQLSource) BuildCountSQL() (countSQL string, err error)
- func (s *SQLSource) BuildQuerySQL(lastId string, batch int) string
- func (s *SQLSource) Close() error
- func (s *SQLSource) Config() *Config
- func (s *SQLSource) Connect(dbname string) (db *sql.DB, err error)
- func (s *SQLSource) Name() string
- func (s *SQLSource) Open() (err error)
- func (s *SQLSource) Read(p []byte) (int, error)
- func (s *SQLSource) Size() (total int64, err error)
- func (s *SQLSource) String() string
- type SQLTable
- type Sizer
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVConfig ¶
type CSVConfig struct { Delimiter string `yaml:"delimiter,omitempty" json:"delimiter,omitempty,optional"` Comment string `yaml:"comment,omitempty" json:"comment,omitempty,optional"` WithHeader bool `yaml:"withHeader,omitempty" json:"withHeader,omitempty,optional"` LazyQuotes bool `yaml:"lazyQuotes,omitempty" json:"lazyQuotes,omitempty,optional"` }
type Config ¶
type Config struct { Local *LocalConfig `yaml:"local,omitempty" json:"local,omitempty,optional"` S3 *S3Config `yaml:"s3,omitempty" json:"s3,omitempty,optional"` OSS *OSSConfig `yaml:"oss,omitempty" json:"oss,omitempty,optional"` FTP *FTPConfig `yaml:"ftp,omitempty" json:"ftp,omitempty,optional"` SFTP *SFTPConfig `yaml:"sftp,omitempty" json:"sftp,omitempty,optional"` HDFS *HDFSConfig `yaml:"hdfs,omitempty" json:"hdfs,omitempty,optional"` GCS *GCSConfig `yaml:"gcs,omitempty" json:"gcs,omitempty,optional"` SQL *SQLConfig `yaml:"sql,omitempty" json:"sql,omitempty,optional"` // The following is format information CSV *CSVConfig `yaml:"csv,omitempty" json:"csv,omitempty,optional"` }
type FTPConfig ¶
type FTPConfig struct { Host string `yaml:"host,omitempty" json:"host,omitempty,optional"` Port int `yaml:"port,omitempty" json:"port,omitempty,optional"` User string `yaml:"user,omitempty" json:"user,omitempty,optional"` Password string `yaml:"password,omitempty" json:"password,omitempty,optional"` Path string `yaml:"path,omitempty" json:"path,omitempty,optional"` }
type GCSConfig ¶
type GCSConfig struct { Endpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty,optional"` CredentialsFile string `yaml:"credentialsFile,omitempty" json:"credentialsFile,omitempty,optional"` CredentialsJSON string `yaml:"credentialsJSON,omitempty" json:"credentialsJSON,omitempty,optional"` WithoutAuthentication bool `yaml:"withoutAuthentication,omitempty" json:"withoutAuthentication,omitempty,optional"` Bucket string `yaml:"bucket,omitempty" json:"bucket,omitempty,optional"` Key string `yaml:"key,omitempty" json:"key,omitempty,optional"` }
type HDFSConfig ¶
type HDFSConfig struct { Address string `yaml:"address,omitempty" json:"address,omitempty,optional"` User string `yaml:"user,omitempty" json:"user,omitempty,optional"` ServicePrincipalName string `yaml:"servicePrincipalName,omitempty" json:"servicePrincipalName,omitempty,optional"` Krb5ConfigFile string `yaml:"krb5ConfigFile,omitempty" json:"krb5ConfigFile,omitempty,optional"` CCacheFile string `yaml:"ccacheFile,omitempty" json:"ccacheFile,omitempty,optional"` KeyTabFile string `yaml:"keyTabFile,omitempty" json:"keyTabFile,omitempty,optional"` Password string `yaml:"password,omitempty" json:"password,omitempty,optional"` DataTransferProtection string `yaml:"dataTransferProtection,omitempty" json:"dataTransferProtection,omitempty,optional"` DisablePAFXFAST bool `yaml:"disablePAFXFAST,omitempty" json:"disablePAFXFAST,omitempty,optional"` Path string `yaml:"path,omitempty" json:"path,omitempty,optional"` }
func (*HDFSConfig) String ¶
func (c *HDFSConfig) String() string
type LocalConfig ¶
type LocalConfig struct {
Path string `yaml:"path,omitempty" json:"path,omitempty,optional"`
}
func (*LocalConfig) String ¶
func (c *LocalConfig) String() string
type MockGlobber ¶
type MockGlobber struct {
// contains filtered or unexported fields
}
MockGlobber is a mock of Globber interface.
func NewMockGlobber ¶
func NewMockGlobber(ctrl *gomock.Controller) *MockGlobber
NewMockGlobber creates a new mock instance.
func (*MockGlobber) EXPECT ¶
func (m *MockGlobber) EXPECT() *MockGlobberMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockGlobberMockRecorder ¶
type MockGlobberMockRecorder struct {
// contains filtered or unexported fields
}
MockGlobberMockRecorder is the mock recorder for MockGlobber.
func (*MockGlobberMockRecorder) Glob ¶
func (mr *MockGlobberMockRecorder) Glob() *gomock.Call
Glob indicates an expected call of Glob.
type MockSizer ¶
type MockSizer struct {
// contains filtered or unexported fields
}
MockSizer is a mock of Sizer interface.
func NewMockSizer ¶
func NewMockSizer(ctrl *gomock.Controller) *MockSizer
NewMockSizer creates a new mock instance.
func (*MockSizer) EXPECT ¶
func (m *MockSizer) EXPECT() *MockSizerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockSizerMockRecorder ¶
type MockSizerMockRecorder struct {
// contains filtered or unexported fields
}
MockSizerMockRecorder is the mock recorder for MockSizer.
func (*MockSizerMockRecorder) Size ¶
func (mr *MockSizerMockRecorder) Size() *gomock.Call
Size indicates an expected call of Size.
type MockSource ¶
type MockSource struct {
// contains filtered or unexported fields
}
MockSource is a mock of Source interface.
func NewMockSource ¶
func NewMockSource(ctrl *gomock.Controller) *MockSource
NewMockSource creates a new mock instance.
func (*MockSource) EXPECT ¶
func (m *MockSource) EXPECT() *MockSourceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockSourceMockRecorder ¶
type MockSourceMockRecorder struct {
// contains filtered or unexported fields
}
MockSourceMockRecorder is the mock recorder for MockSource.
func (*MockSourceMockRecorder) Close ¶
func (mr *MockSourceMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockSourceMockRecorder) Config ¶
func (mr *MockSourceMockRecorder) Config() *gomock.Call
Config indicates an expected call of Config.
func (*MockSourceMockRecorder) Name ¶
func (mr *MockSourceMockRecorder) Name() *gomock.Call
Name indicates an expected call of Name.
func (*MockSourceMockRecorder) Open ¶
func (mr *MockSourceMockRecorder) Open() *gomock.Call
Open indicates an expected call of Open.
func (*MockSourceMockRecorder) Read ¶
func (mr *MockSourceMockRecorder) Read(p interface{}) *gomock.Call
Read indicates an expected call of Read.
func (*MockSourceMockRecorder) Size ¶
func (mr *MockSourceMockRecorder) Size() *gomock.Call
Size indicates an expected call of Size.
type OSSConfig ¶
type OSSConfig struct { Endpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty,optional"` AccessKeyID string `yaml:"accessKeyID,omitempty" json:"accessKeyID,omitempty,optional"` AccessKeySecret string `yaml:"accessKeySecret,omitempty" json:"accessKeySecret,omitempty,optional"` Bucket string `yaml:"bucket,omitempty" json:"bucket,omitempty,optional"` Key string `yaml:"key,omitempty" json:"key,omitempty,optional"` }
type S3Config ¶
type S3Config struct { Endpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty,optional"` Region string `yaml:"region,omitempty" json:"region,omitempty,optional"` AccessKeyID string `yaml:"accessKeyID,omitempty" json:"accessKeyID,omitempty,optional"` AccessKeySecret string `yaml:"accessKeySecret,omitempty" json:"accessKeySecret,omitempty,optional"` S3ForcePathStyle bool `yaml:"s3ForcePathStyle,omitempty" json:"s3ForcePathStyle,omitempty,optional,default=true"` Token string `yaml:"token,omitempty" json:"token,omitempty,optional"` Bucket string `yaml:"bucket,omitempty" json:"bucket,omitempty,optional"` Key string `yaml:"key,omitempty" json:"key,omitempty,optional"` }
type SFTPConfig ¶
type SFTPConfig struct { Host string `yaml:"host,omitempty" json:"host,omitempty,optional"` Port int `yaml:"port,omitempty" json:"port,omitempty,optional"` User string `yaml:"user,omitempty" json:"user,omitempty,optional"` Password string `yaml:"password,omitempty" json:"password,omitempty,optional"` KeyFile string `yaml:"keyFile,omitempty" json:"keyFile,omitempty,optional"` KeyData string `yaml:"keyData,omitempty" json:"keyData,omitempty,optional"` Passphrase string `yaml:"passphrase,omitempty" json:"passphrase,omitempty,optional"` Path string `yaml:"path,omitempty" json:"path,omitempty,optional"` }
func (*SFTPConfig) String ¶
func (c *SFTPConfig) String() string
type SQLConfig ¶ added in v1.0.9
type SQLConfig struct { Endpoint string `yaml:"endpoint,omitempty" json:"endpoint"` DbName string `yaml:"dbName,omitempty" json:"dbName"` DbTable SQLTable `yaml:"dbTable" json:"dbTable"` Username string `yaml:"username,omitempty" json:"username"` Password string `yaml:"password,omitempty" json:"password"` UrlQuery string `yaml:"urlQuery,omitempty" json:"urlQuery,omitempty,optional"` DriverName string `yaml:"driverName,omitempty" json:"driverName,omitempty,optional,default=mysql"` MaxConnections int `yaml:"maxConnections,omitempty" json:"maxConnections,omitempty,optional,default=100"` MaxIdleConns int `yaml:"maxIdleConns,omitempty" json:"maxIdleConns,omitempty,optional,default=20"` MaxLifetimeMills int `yaml:"maxLifetimeMills,omitempty" json:"maxLifetimeMills,omitempty,optional,default=3600000000000"` MaxIdleTimeMills int `yaml:"maxIdleTimeMills,omitempty" json:"maxIdleTimeMills,omitempty,optional,default=30000000000"` }
type SQLSource ¶ added in v1.0.9
func (*SQLSource) BuildCountSQL ¶ added in v1.1.24
func (*SQLSource) BuildQuerySQL ¶ added in v1.1.24
type SQLTable ¶ added in v1.0.9
type SQLTable struct { Id SQLId `yaml:"id" json:"id"` Name string `yaml:"name,omitempty" json:"name,omitempty,optional"` Fields []string `yaml:"fields,omitempty" json:"fields,omitempty,optional"` Query string `yaml:"query,omitempty" json:"query,omitempty,optional"` Count string `yaml:"count,omitempty" json:"count,omitempty,optional"` Filter string `yaml:"filter,omitempty" json:"filter,omitempty,optional"` }