source

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package source is a generated GoMock package.

Index

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"`
	WithHeader bool   `yaml:"withHeader,omitempty"`
	LazyQuotes bool   `yaml:"lazyQuotes,omitempty"`
}

type Config

type Config struct {
	Local *LocalConfig `yaml:",inline"`
	S3    *S3Config    `yaml:"s3,omitempty"`
	OSS   *OSSConfig   `yaml:"oss,omitempty"`
	FTP   *FTPConfig   `yaml:"ftp,omitempty"`
	SFTP  *SFTPConfig  `yaml:"sftp,omitempty"`
	HDFS  *HDFSConfig  `yaml:"hdfs,omitempty"`
	GCS   *GCSConfig   `yaml:"gcs,omitempty"`
	// The following is format information
	CSV *CSVConfig `yaml:"csv,omitempty"`
}

func (*Config) Clone

func (c *Config) Clone() *Config

type FTPConfig

type FTPConfig struct {
	Host     string `yaml:"host,omitempty"`
	Port     int    `yaml:"port,omitempty"`
	User     string `yaml:"user,omitempty"`
	Password string `yaml:"password,omitempty"`
	Path     string `yaml:"path,omitempty"`
}

func (*FTPConfig) String

func (c *FTPConfig) String() string

type GCSConfig added in v4.1.0

type GCSConfig struct {
	Endpoint              string `yaml:"endpoint,omitempty"`
	CredentialsFile       string `yaml:"credentialsFile,omitempty"`
	CredentialsJSON       string `yaml:"credentialsJSON,omitempty"`
	WithoutAuthentication bool   `yaml:"withoutAuthentication,omitempty"`
	Bucket                string `yaml:"bucket,omitempty"`
	Key                   string `yaml:"key,omitempty"`
}

func (*GCSConfig) String added in v4.1.0

func (c *GCSConfig) String() string

type Globber added in v4.1.0

type Globber interface {
	Glob() ([]*Config, error)
}

type HDFSConfig

type HDFSConfig struct {
	Address                string `yaml:"address,omitempty"`
	User                   string `yaml:"user,omitempty"`
	ServicePrincipalName   string `yaml:"servicePrincipalName,omitempty"`
	Krb5ConfigFile         string `yaml:"krb5ConfigFile,omitempty"`
	CCacheFile             string `yaml:"ccacheFile,omitempty"`
	KeyTabFile             string `yaml:"keyTabFile,omitempty"`
	Password               string `yaml:"password,omitempty"`
	DataTransferProtection string `yaml:"dataTransferProtection,omitempty"`
	DisablePAFXFAST        bool   `yaml:"disablePAFXFAST,omitempty"`
	Path                   string `yaml:"path,omitempty"`
}

func (*HDFSConfig) String

func (c *HDFSConfig) String() string

type LocalConfig

type LocalConfig struct {
	Path string `yaml:"path,omitempty"`
}

func (*LocalConfig) String

func (c *LocalConfig) String() string

type MockGlobber added in v4.1.0

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

MockGlobber is a mock of Globber interface.

func NewMockGlobber added in v4.1.0

func NewMockGlobber(ctrl *gomock.Controller) *MockGlobber

NewMockGlobber creates a new mock instance.

func (*MockGlobber) EXPECT added in v4.1.0

func (m *MockGlobber) EXPECT() *MockGlobberMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGlobber) Glob added in v4.1.0

func (m *MockGlobber) Glob() ([]*Config, error)

Glob mocks base method.

type MockGlobberMockRecorder added in v4.1.0

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

MockGlobberMockRecorder is the mock recorder for MockGlobber.

func (*MockGlobberMockRecorder) Glob added in v4.1.0

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.

func (*MockSizer) Size

func (m *MockSizer) Size() (int64, error)

Size mocks base method.

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) Close

func (m *MockSource) Close() error

Close mocks base method.

func (*MockSource) Config

func (m *MockSource) Config() *Config

Config mocks base method.

func (*MockSource) EXPECT

func (m *MockSource) EXPECT() *MockSourceMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSource) Name

func (m *MockSource) Name() string

Name mocks base method.

func (*MockSource) Open

func (m *MockSource) Open() error

Open mocks base method.

func (*MockSource) Read

func (m *MockSource) Read(p []byte) (int, error)

Read mocks base method.

func (*MockSource) Size

func (m *MockSource) Size() (int64, error)

Size mocks base method.

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"`
	AccessKeyID     string `yaml:"accessKeyID,omitempty"`
	AccessKeySecret string `yaml:"accessKeySecret,omitempty"`
	Bucket          string `yaml:"bucket,omitempty"`
	Key             string `yaml:"key,omitempty"`
}

func (*OSSConfig) String

func (c *OSSConfig) String() string

type S3Config

type S3Config struct {
	Endpoint        string `yaml:"endpoint,omitempty"`
	Region          string `yaml:"region,omitempty"`
	AccessKeyID     string `yaml:"accessKeyID,omitempty"`
	AccessKeySecret string `yaml:"accessKeySecret,omitempty"`
	Token           string `yaml:"token,omitempty"`
	Bucket          string `yaml:"bucket,omitempty"`
	Key             string `yaml:"key,omitempty"`
}

func (*S3Config) String

func (c *S3Config) String() string

type SFTPConfig

type SFTPConfig struct {
	Host       string `yaml:"host,omitempty"`
	Port       int    `yaml:"port,omitempty"`
	User       string `yaml:"user,omitempty"`
	Password   string `yaml:"password,omitempty"`
	KeyFile    string `yaml:"keyFile,omitempty"`
	KeyData    string `yaml:"keyData,omitempty"`
	Passphrase string `yaml:"passphrase,omitempty"`
	Path       string `yaml:"path,omitempty"`
}

func (*SFTPConfig) String

func (c *SFTPConfig) String() string

type Sizer

type Sizer interface {
	Size() (int64, error)
}

type Source

type Source interface {
	Config() *Config
	Name() string
	Open() error
	Sizer
	io.Reader
	io.Closer
}

func New

func New(c *Config) (Source, error)

Jump to

Keyboard shortcuts

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