Documentation ¶
Overview ¶
Package file is a generated GoMock package.
Index ¶
- Variables
- type File
- type FileInfo
- type FileSystem
- type FileSystemProvider
- type MockFile
- func (m *MockFile) Close() error
- func (m *MockFile) EXPECT() *MockFileMockRecorder
- func (m *MockFile) Read(p []byte) (int, error)
- func (m *MockFile) ReadAll() (RowReader, error)
- func (m *MockFile) ReadAt(p []byte, off int64) (int, error)
- func (m *MockFile) Seek(offset int64, whence int) (int64, error)
- func (m *MockFile) Write(p []byte) (int, error)
- func (m *MockFile) WriteAt(p []byte, off int64) (int, error)
- type MockFileMockRecorder
- func (mr *MockFileMockRecorder) Close() *gomock.Call
- func (mr *MockFileMockRecorder) Read(p any) *gomock.Call
- func (mr *MockFileMockRecorder) ReadAll() *gomock.Call
- func (mr *MockFileMockRecorder) ReadAt(p, off any) *gomock.Call
- func (mr *MockFileMockRecorder) Seek(offset, whence any) *gomock.Call
- func (mr *MockFileMockRecorder) Write(p any) *gomock.Call
- func (mr *MockFileMockRecorder) WriteAt(p, off any) *gomock.Call
- type MockFileSystem
- func (m *MockFileSystem) Create(name string) (File, error)
- func (m *MockFileSystem) EXPECT() *MockFileSystemMockRecorder
- func (m *MockFileSystem) Mkdir(name string, perm os.FileMode) error
- func (m *MockFileSystem) MkdirAll(path string, perm os.FileMode) error
- func (m *MockFileSystem) Open(name string) (File, error)
- func (m *MockFileSystem) OpenFile(name string, flag int, perm os.FileMode) (File, error)
- func (m *MockFileSystem) Remove(name string) error
- func (m *MockFileSystem) RemoveAll(path string) error
- func (m *MockFileSystem) Rename(oldname, newname string) error
- type MockFileSystemMockRecorder
- func (mr *MockFileSystemMockRecorder) Create(name any) *gomock.Call
- func (mr *MockFileSystemMockRecorder) Mkdir(name, perm any) *gomock.Call
- func (mr *MockFileSystemMockRecorder) MkdirAll(path, perm any) *gomock.Call
- func (mr *MockFileSystemMockRecorder) Open(name any) *gomock.Call
- func (mr *MockFileSystemMockRecorder) OpenFile(name, flag, perm any) *gomock.Call
- func (mr *MockFileSystemMockRecorder) Remove(name any) *gomock.Call
- func (mr *MockFileSystemMockRecorder) RemoveAll(path any) *gomock.Call
- func (mr *MockFileSystemMockRecorder) Rename(oldname, newname any) *gomock.Call
- type MockFileSystemProvider
- func (m *MockFileSystemProvider) ChDir(arg0 string) error
- func (m *MockFileSystemProvider) Connect()
- func (m *MockFileSystemProvider) Create(name string) (File, error)
- func (m *MockFileSystemProvider) EXPECT() *MockFileSystemProviderMockRecorder
- func (m *MockFileSystemProvider) Getwd() (string, error)
- func (m *MockFileSystemProvider) Mkdir(name string, perm os.FileMode) error
- func (m *MockFileSystemProvider) MkdirAll(path string, perm os.FileMode) error
- func (m *MockFileSystemProvider) Open(name string) (File, error)
- func (m *MockFileSystemProvider) OpenFile(name string, flag int, perm os.FileMode) (File, error)
- func (m *MockFileSystemProvider) ReadDir(arg0 string) ([]FileInfo, error)
- func (m *MockFileSystemProvider) Remove(name string) error
- func (m *MockFileSystemProvider) RemoveAll(path string) error
- func (m *MockFileSystemProvider) Rename(oldname, newname string) error
- func (m *MockFileSystemProvider) Stat(arg0 string) (FileInfo, error)
- func (m *MockFileSystemProvider) UseLogger(logger any)
- func (m *MockFileSystemProvider) UseMetrics(metrics any)
- type MockFileSystemProviderMockRecorder
- func (mr *MockFileSystemProviderMockRecorder) ChDir(arg0 any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) Connect() *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) Create(name any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) Getwd() *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) Mkdir(name, perm any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) MkdirAll(path, perm any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) Open(name any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) OpenFile(name, flag, perm any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) ReadDir(arg0 any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) Remove(name any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) RemoveAll(path any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) Rename(oldname, newname any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) Stat(arg0 any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) UseLogger(logger any) *gomock.Call
- func (mr *MockFileSystemProviderMockRecorder) UseMetrics(metrics any) *gomock.Call
- type MockRowReader
- type MockRowReaderMockRecorder
- type RowReader
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type File ¶
type File interface { io.Closer io.Reader io.ReaderAt io.Seeker io.Writer io.WriterAt ReadAll() (RowReader, error) }
File represents a file in the filesystem.
type FileSystem ¶
type FileSystem interface { // Create creates a file in the filesystem, returning the file and an // error, if any happens. Create(name string) (File, error) // TODO - Lets make bucket constant for MkdirAll as well, we might create buckets from migrations // Mkdir creates a directory in the filesystem, return an error if any // happens. Mkdir(name string, perm os.FileMode) error // MkdirAll creates a directory path and all parents that does not exist // yet. MkdirAll(path string, perm os.FileMode) error // Open opens a file, returning it or an error, if any happens. Open(name string) (File, error) // OpenFile opens a file using the given flags and the given mode. OpenFile(name string, flag int, perm os.FileMode) (File, error) // Remove removes a file identified by name, returning an error, if any // happens. Remove(name string) error // RemoveAll removes a directory path and any children it contains. It // does not fail if the path does not exist (return nil). RemoveAll(path string) error // Rename renames a file. Rename(oldname, newname string) error // ReadDir returns a list of files/directories present in the directory. ReadDir(dir string) ([]FileInfo, error) // Stat returns the file/directory information in the directory. Stat(name string) (FileInfo, error) // ChDir changes the current directory. ChDir(dirname string) error // Getwd returns the path of the current directory. Getwd() (string, error) }
FileSystem : Any simulated or real filesystem should implement this interface.
func New ¶
func New(logger datasource.Logger) FileSystem
New initializes local filesystem with logger.
type FileSystemProvider ¶
type FileSystemProvider interface { FileSystem // UseLogger sets the logger for the FileSystem client. UseLogger(logger interface{}) // UseMetrics sets the metrics for the FileSystem client. UseMetrics(metrics interface{}) // Connect establishes a connection to FileSystem and registers metrics using the provided configuration when the client was Created. Connect() }
type MockFile ¶
type MockFile struct {
// contains filtered or unexported fields
}
MockFile is a mock of File interface.
func NewMockFile ¶
func NewMockFile(ctrl *gomock.Controller) *MockFile
NewMockFile creates a new mock instance.
func (*MockFile) EXPECT ¶
func (m *MockFile) EXPECT() *MockFileMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockFileMockRecorder ¶
type MockFileMockRecorder struct {
// contains filtered or unexported fields
}
MockFileMockRecorder is the mock recorder for MockFile.
func (*MockFileMockRecorder) Close ¶
func (mr *MockFileMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockFileMockRecorder) Read ¶
func (mr *MockFileMockRecorder) Read(p any) *gomock.Call
Read indicates an expected call of Read.
func (*MockFileMockRecorder) ReadAll ¶
func (mr *MockFileMockRecorder) ReadAll() *gomock.Call
ReadAll indicates an expected call of ReadAll.
func (*MockFileMockRecorder) ReadAt ¶
func (mr *MockFileMockRecorder) ReadAt(p, off any) *gomock.Call
ReadAt indicates an expected call of ReadAt.
func (*MockFileMockRecorder) Seek ¶
func (mr *MockFileMockRecorder) Seek(offset, whence any) *gomock.Call
Seek indicates an expected call of Seek.
type MockFileSystem ¶
type MockFileSystem struct {
// contains filtered or unexported fields
}
MockFileSystem is a mock of FileSystem interface.
func NewMockFileSystem ¶
func NewMockFileSystem(ctrl *gomock.Controller) *MockFileSystem
NewMockFileSystem creates a new mock instance.
func (*MockFileSystem) Create ¶
func (m *MockFileSystem) Create(name string) (File, error)
Create mocks base method.
func (*MockFileSystem) EXPECT ¶
func (m *MockFileSystem) EXPECT() *MockFileSystemMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFileSystem) Mkdir ¶
func (m *MockFileSystem) Mkdir(name string, perm os.FileMode) error
Mkdir mocks base method.
func (*MockFileSystem) MkdirAll ¶
func (m *MockFileSystem) MkdirAll(path string, perm os.FileMode) error
MkdirAll mocks base method.
func (*MockFileSystem) Open ¶
func (m *MockFileSystem) Open(name string) (File, error)
Open mocks base method.
func (*MockFileSystem) Remove ¶
func (m *MockFileSystem) Remove(name string) error
Remove mocks base method.
func (*MockFileSystem) RemoveAll ¶
func (m *MockFileSystem) RemoveAll(path string) error
RemoveAll mocks base method.
func (*MockFileSystem) Rename ¶
func (m *MockFileSystem) Rename(oldname, newname string) error
Rename mocks base method.
type MockFileSystemMockRecorder ¶
type MockFileSystemMockRecorder struct {
// contains filtered or unexported fields
}
MockFileSystemMockRecorder is the mock recorder for MockFileSystem.
func (*MockFileSystemMockRecorder) Create ¶
func (mr *MockFileSystemMockRecorder) Create(name any) *gomock.Call
Create indicates an expected call of Create.
func (*MockFileSystemMockRecorder) Mkdir ¶
func (mr *MockFileSystemMockRecorder) Mkdir(name, perm any) *gomock.Call
Mkdir indicates an expected call of Mkdir.
func (*MockFileSystemMockRecorder) MkdirAll ¶
func (mr *MockFileSystemMockRecorder) MkdirAll(path, perm any) *gomock.Call
MkdirAll indicates an expected call of MkdirAll.
func (*MockFileSystemMockRecorder) Open ¶
func (mr *MockFileSystemMockRecorder) Open(name any) *gomock.Call
Open indicates an expected call of Open.
func (*MockFileSystemMockRecorder) OpenFile ¶
func (mr *MockFileSystemMockRecorder) OpenFile(name, flag, perm any) *gomock.Call
OpenFile indicates an expected call of OpenFile.
func (*MockFileSystemMockRecorder) Remove ¶
func (mr *MockFileSystemMockRecorder) Remove(name any) *gomock.Call
Remove indicates an expected call of Remove.
type MockFileSystemProvider ¶
type MockFileSystemProvider struct {
// contains filtered or unexported fields
}
MockFileSystemProvider is a mock of FileSystemProvider interface.
func NewMockFileSystemProvider ¶
func NewMockFileSystemProvider(ctrl *gomock.Controller) *MockFileSystemProvider
NewMockFileSystemProvider creates a new mock instance.
func (*MockFileSystemProvider) ChDir ¶
func (m *MockFileSystemProvider) ChDir(arg0 string) error
ChDir mocks base method.
func (*MockFileSystemProvider) Connect ¶
func (m *MockFileSystemProvider) Connect()
Connect mocks base method.
func (*MockFileSystemProvider) Create ¶
func (m *MockFileSystemProvider) Create(name string) (File, error)
Create mocks base method.
func (*MockFileSystemProvider) EXPECT ¶
func (m *MockFileSystemProvider) EXPECT() *MockFileSystemProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFileSystemProvider) Getwd ¶
func (m *MockFileSystemProvider) Getwd() (string, error)
Getwd mocks base method.
func (*MockFileSystemProvider) Mkdir ¶
func (m *MockFileSystemProvider) Mkdir(name string, perm os.FileMode) error
Mkdir mocks base method.
func (*MockFileSystemProvider) MkdirAll ¶
func (m *MockFileSystemProvider) MkdirAll(path string, perm os.FileMode) error
MkdirAll mocks base method.
func (*MockFileSystemProvider) Open ¶
func (m *MockFileSystemProvider) Open(name string) (File, error)
Open mocks base method.
func (*MockFileSystemProvider) ReadDir ¶
func (m *MockFileSystemProvider) ReadDir(arg0 string) ([]FileInfo, error)
ReadDir mocks base method.
func (*MockFileSystemProvider) Remove ¶
func (m *MockFileSystemProvider) Remove(name string) error
Remove mocks base method.
func (*MockFileSystemProvider) RemoveAll ¶
func (m *MockFileSystemProvider) RemoveAll(path string) error
RemoveAll mocks base method.
func (*MockFileSystemProvider) Rename ¶
func (m *MockFileSystemProvider) Rename(oldname, newname string) error
Rename mocks base method.
func (*MockFileSystemProvider) Stat ¶
func (m *MockFileSystemProvider) Stat(arg0 string) (FileInfo, error)
Stat mocks base method.
func (*MockFileSystemProvider) UseLogger ¶
func (m *MockFileSystemProvider) UseLogger(logger any)
UseLogger mocks base method.
func (*MockFileSystemProvider) UseMetrics ¶
func (m *MockFileSystemProvider) UseMetrics(metrics any)
UseMetrics mocks base method.
type MockFileSystemProviderMockRecorder ¶
type MockFileSystemProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockFileSystemProviderMockRecorder is the mock recorder for MockFileSystemProvider.
func (*MockFileSystemProviderMockRecorder) ChDir ¶
func (mr *MockFileSystemProviderMockRecorder) ChDir(arg0 any) *gomock.Call
ChDir indicates an expected call of ChDir.
func (*MockFileSystemProviderMockRecorder) Connect ¶
func (mr *MockFileSystemProviderMockRecorder) Connect() *gomock.Call
Connect indicates an expected call of Connect.
func (*MockFileSystemProviderMockRecorder) Create ¶
func (mr *MockFileSystemProviderMockRecorder) Create(name any) *gomock.Call
Create indicates an expected call of Create.
func (*MockFileSystemProviderMockRecorder) Getwd ¶
func (mr *MockFileSystemProviderMockRecorder) Getwd() *gomock.Call
Getwd indicates an expected call of Getwd.
func (*MockFileSystemProviderMockRecorder) Mkdir ¶
func (mr *MockFileSystemProviderMockRecorder) Mkdir(name, perm any) *gomock.Call
Mkdir indicates an expected call of Mkdir.
func (*MockFileSystemProviderMockRecorder) MkdirAll ¶
func (mr *MockFileSystemProviderMockRecorder) MkdirAll(path, perm any) *gomock.Call
MkdirAll indicates an expected call of MkdirAll.
func (*MockFileSystemProviderMockRecorder) Open ¶
func (mr *MockFileSystemProviderMockRecorder) Open(name any) *gomock.Call
Open indicates an expected call of Open.
func (*MockFileSystemProviderMockRecorder) OpenFile ¶
func (mr *MockFileSystemProviderMockRecorder) OpenFile(name, flag, perm any) *gomock.Call
OpenFile indicates an expected call of OpenFile.
func (*MockFileSystemProviderMockRecorder) ReadDir ¶
func (mr *MockFileSystemProviderMockRecorder) ReadDir(arg0 any) *gomock.Call
ReadDir indicates an expected call of ReadDir.
func (*MockFileSystemProviderMockRecorder) Remove ¶
func (mr *MockFileSystemProviderMockRecorder) Remove(name any) *gomock.Call
Remove indicates an expected call of Remove.
func (*MockFileSystemProviderMockRecorder) RemoveAll ¶
func (mr *MockFileSystemProviderMockRecorder) RemoveAll(path any) *gomock.Call
RemoveAll indicates an expected call of RemoveAll.
func (*MockFileSystemProviderMockRecorder) Rename ¶
func (mr *MockFileSystemProviderMockRecorder) Rename(oldname, newname any) *gomock.Call
Rename indicates an expected call of Rename.
func (*MockFileSystemProviderMockRecorder) Stat ¶
func (mr *MockFileSystemProviderMockRecorder) Stat(arg0 any) *gomock.Call
Stat indicates an expected call of Stat.
func (*MockFileSystemProviderMockRecorder) UseLogger ¶
func (mr *MockFileSystemProviderMockRecorder) UseLogger(logger any) *gomock.Call
UseLogger indicates an expected call of UseLogger.
func (*MockFileSystemProviderMockRecorder) UseMetrics ¶
func (mr *MockFileSystemProviderMockRecorder) UseMetrics(metrics any) *gomock.Call
UseMetrics indicates an expected call of UseMetrics.
type MockRowReader ¶
type MockRowReader struct {
// contains filtered or unexported fields
}
MockRowReader is a mock of RowReader interface.
func NewMockRowReader ¶
func NewMockRowReader(ctrl *gomock.Controller) *MockRowReader
NewMockRowReader creates a new mock instance.
func (*MockRowReader) EXPECT ¶
func (m *MockRowReader) EXPECT() *MockRowReaderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockRowReaderMockRecorder ¶
type MockRowReaderMockRecorder struct {
// contains filtered or unexported fields
}
MockRowReaderMockRecorder is the mock recorder for MockRowReader.
func (*MockRowReaderMockRecorder) Next ¶
func (mr *MockRowReaderMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next.