Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockLoader ¶
type MockLoader struct { MockName string Content []map[string]string CurrentRow int ErrorClose error ErrorLoad error }
MockLoader specifc state for database Saver provider.
func (*MockLoader) Close ¶
func (ml *MockLoader) Close(log *logrus.Entry) error
Close closes the datasource.
func (*MockLoader) Name ¶
func (ml *MockLoader) Name() string
Name give the name of the destination.
func (*MockLoader) Next ¶
func (ml *MockLoader) Next() bool
Next moves to next record and return false if there is no more records.
type MockProvider ¶
type MockProvider struct { ErrorLoader error LoaderToFail int CurrentLoader int ErrorSaver error SaverToFail int CurrentSaver int Loader *MockLoader Savers []*MockSaver }
MockProvider implement the Provider interface with mocked actions.
func (*MockProvider) NewLoader ¶
func (p *MockProvider) NewLoader(ctx context.Context, log *logrus.Entry, ds datasource.Datasourcer, table string, where string) (provider.Loader, error)
NewLoader analyze the datasource and return mock object implementing Loader.
func (*MockProvider) NewSaver ¶
func (p *MockProvider) NewSaver(ctx context.Context, log *logrus.Entry, ds datasource.Datasourcer, table string, key string, mode string) (provider.Saver, error)
NewSaver analyze the datasource and return mock object implementing Saver.
type MockSaver ¶
type MockSaver struct { MockName string Content []map[string]string ErrorClose error ErrorReset error ErrorSave error }
MockSaver specifc state for database Saver provider.
Click to show internal directories.
Click to hide internal directories.