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 ¶ added in v1.17.0
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 ¶ added in v1.17.0
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 ¶ added in v1.17.0
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 ¶ added in v1.18.0
type MockFile struct {
// contains filtered or unexported fields
}
MockFile is a mock of File interface.
func NewMockFile ¶ added in v1.18.0
func NewMockFile(ctrl *gomock.Controller) *MockFile
NewMockFile creates a new mock instance.
func (*MockFile) EXPECT ¶ added in v1.18.0
func (m *MockFile) EXPECT() *MockFileMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockFileMockRecorder ¶ added in v1.18.0
type MockFileMockRecorder struct {
// contains filtered or unexported fields
}
MockFileMockRecorder is the mock recorder for MockFile.
func (*MockFileMockRecorder) Close ¶ added in v1.18.0
func (mr *MockFileMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockFileMockRecorder) Read ¶ added in v1.18.0
func (mr *MockFileMockRecorder) Read(p any) *gomock.Call
Read indicates an expected call of Read.
func (*MockFileMockRecorder) ReadAll ¶ added in v1.18.0
func (mr *MockFileMockRecorder) ReadAll() *gomock.Call
ReadAll indicates an expected call of ReadAll.
func (*MockFileMockRecorder) ReadAt ¶ added in v1.18.0
func (mr *MockFileMockRecorder) ReadAt(p, off any) *gomock.Call
ReadAt indicates an expected call of ReadAt.
func (*MockFileMockRecorder) Seek ¶ added in v1.18.0
func (mr *MockFileMockRecorder) Seek(offset, whence any) *gomock.Call
Seek indicates an expected call of Seek.
type MockFileSystem ¶ added in v1.18.0
type MockFileSystem struct {
// contains filtered or unexported fields
}
MockFileSystem is a mock of FileSystem interface.
func NewMockFileSystem ¶ added in v1.18.0
func NewMockFileSystem(ctrl *gomock.Controller) *MockFileSystem
NewMockFileSystem creates a new mock instance.
func (*MockFileSystem) Create ¶ added in v1.18.0
func (m *MockFileSystem) Create(name string) (File, error)
Create mocks base method.
func (*MockFileSystem) EXPECT ¶ added in v1.18.0
func (m *MockFileSystem) EXPECT() *MockFileSystemMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFileSystem) Mkdir ¶ added in v1.18.0
func (m *MockFileSystem) Mkdir(name string, perm os.FileMode) error
Mkdir mocks base method.
func (*MockFileSystem) MkdirAll ¶ added in v1.18.0
func (m *MockFileSystem) MkdirAll(path string, perm os.FileMode) error
MkdirAll mocks base method.
func (*MockFileSystem) Open ¶ added in v1.18.0
func (m *MockFileSystem) Open(name string) (File, error)
Open mocks base method.
func (*MockFileSystem) Remove ¶ added in v1.18.0
func (m *MockFileSystem) Remove(name string) error
Remove mocks base method.
func (*MockFileSystem) RemoveAll ¶ added in v1.18.0
func (m *MockFileSystem) RemoveAll(path string) error
RemoveAll mocks base method.
func (*MockFileSystem) Rename ¶ added in v1.18.0
func (m *MockFileSystem) Rename(oldname, newname string) error
Rename mocks base method.
type MockFileSystemMockRecorder ¶ added in v1.18.0
type MockFileSystemMockRecorder struct {
// contains filtered or unexported fields
}
MockFileSystemMockRecorder is the mock recorder for MockFileSystem.
func (*MockFileSystemMockRecorder) Create ¶ added in v1.18.0
func (mr *MockFileSystemMockRecorder) Create(name any) *gomock.Call
Create indicates an expected call of Create.
func (*MockFileSystemMockRecorder) Mkdir ¶ added in v1.18.0
func (mr *MockFileSystemMockRecorder) Mkdir(name, perm any) *gomock.Call
Mkdir indicates an expected call of Mkdir.
func (*MockFileSystemMockRecorder) MkdirAll ¶ added in v1.18.0
func (mr *MockFileSystemMockRecorder) MkdirAll(path, perm any) *gomock.Call
MkdirAll indicates an expected call of MkdirAll.
func (*MockFileSystemMockRecorder) Open ¶ added in v1.18.0
func (mr *MockFileSystemMockRecorder) Open(name any) *gomock.Call
Open indicates an expected call of Open.
func (*MockFileSystemMockRecorder) OpenFile ¶ added in v1.18.0
func (mr *MockFileSystemMockRecorder) OpenFile(name, flag, perm any) *gomock.Call
OpenFile indicates an expected call of OpenFile.
func (*MockFileSystemMockRecorder) Remove ¶ added in v1.18.0
func (mr *MockFileSystemMockRecorder) Remove(name any) *gomock.Call
Remove indicates an expected call of Remove.
type MockFileSystemProvider ¶ added in v1.17.0
type MockFileSystemProvider struct {
// contains filtered or unexported fields
}
MockFileSystemProvider is a mock of FileSystemProvider interface.
func NewMockFileSystemProvider ¶ added in v1.17.0
func NewMockFileSystemProvider(ctrl *gomock.Controller) *MockFileSystemProvider
NewMockFileSystemProvider creates a new mock instance.
func (*MockFileSystemProvider) ChDir ¶ added in v1.18.0
func (m *MockFileSystemProvider) ChDir(arg0 string) error
ChDir mocks base method.
func (*MockFileSystemProvider) Connect ¶ added in v1.17.0
func (m *MockFileSystemProvider) Connect()
Connect mocks base method.
func (*MockFileSystemProvider) Create ¶ added in v1.17.0
func (m *MockFileSystemProvider) Create(name string) (File, error)
Create mocks base method.
func (*MockFileSystemProvider) EXPECT ¶ added in v1.17.0
func (m *MockFileSystemProvider) EXPECT() *MockFileSystemProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFileSystemProvider) Getwd ¶ added in v1.18.0
func (m *MockFileSystemProvider) Getwd() (string, error)
Getwd mocks base method.
func (*MockFileSystemProvider) Mkdir ¶ added in v1.17.0
func (m *MockFileSystemProvider) Mkdir(name string, perm os.FileMode) error
Mkdir mocks base method.
func (*MockFileSystemProvider) MkdirAll ¶ added in v1.17.0
func (m *MockFileSystemProvider) MkdirAll(path string, perm os.FileMode) error
MkdirAll mocks base method.
func (*MockFileSystemProvider) Open ¶ added in v1.17.0
func (m *MockFileSystemProvider) Open(name string) (File, error)
Open mocks base method.
func (*MockFileSystemProvider) ReadDir ¶ added in v1.18.0
func (m *MockFileSystemProvider) ReadDir(arg0 string) ([]FileInfo, error)
ReadDir mocks base method.
func (*MockFileSystemProvider) Remove ¶ added in v1.17.0
func (m *MockFileSystemProvider) Remove(name string) error
Remove mocks base method.
func (*MockFileSystemProvider) RemoveAll ¶ added in v1.17.0
func (m *MockFileSystemProvider) RemoveAll(path string) error
RemoveAll mocks base method.
func (*MockFileSystemProvider) Rename ¶ added in v1.17.0
func (m *MockFileSystemProvider) Rename(oldname, newname string) error
Rename mocks base method.
func (*MockFileSystemProvider) Stat ¶ added in v1.18.0
func (m *MockFileSystemProvider) Stat(arg0 string) (FileInfo, error)
Stat mocks base method.
func (*MockFileSystemProvider) UseLogger ¶ added in v1.17.0
func (m *MockFileSystemProvider) UseLogger(logger any)
UseLogger mocks base method.
func (*MockFileSystemProvider) UseMetrics ¶ added in v1.17.0
func (m *MockFileSystemProvider) UseMetrics(metrics any)
UseMetrics mocks base method.
type MockFileSystemProviderMockRecorder ¶ added in v1.17.0
type MockFileSystemProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockFileSystemProviderMockRecorder is the mock recorder for MockFileSystemProvider.
func (*MockFileSystemProviderMockRecorder) ChDir ¶ added in v1.18.0
func (mr *MockFileSystemProviderMockRecorder) ChDir(arg0 any) *gomock.Call
ChDir indicates an expected call of ChDir.
func (*MockFileSystemProviderMockRecorder) Connect ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) Connect() *gomock.Call
Connect indicates an expected call of Connect.
func (*MockFileSystemProviderMockRecorder) Create ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) Create(name any) *gomock.Call
Create indicates an expected call of Create.
func (*MockFileSystemProviderMockRecorder) Getwd ¶ added in v1.18.0
func (mr *MockFileSystemProviderMockRecorder) Getwd() *gomock.Call
Getwd indicates an expected call of Getwd.
func (*MockFileSystemProviderMockRecorder) Mkdir ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) Mkdir(name, perm any) *gomock.Call
Mkdir indicates an expected call of Mkdir.
func (*MockFileSystemProviderMockRecorder) MkdirAll ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) MkdirAll(path, perm any) *gomock.Call
MkdirAll indicates an expected call of MkdirAll.
func (*MockFileSystemProviderMockRecorder) Open ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) Open(name any) *gomock.Call
Open indicates an expected call of Open.
func (*MockFileSystemProviderMockRecorder) OpenFile ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) OpenFile(name, flag, perm any) *gomock.Call
OpenFile indicates an expected call of OpenFile.
func (*MockFileSystemProviderMockRecorder) ReadDir ¶ added in v1.18.0
func (mr *MockFileSystemProviderMockRecorder) ReadDir(arg0 any) *gomock.Call
ReadDir indicates an expected call of ReadDir.
func (*MockFileSystemProviderMockRecorder) Remove ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) Remove(name any) *gomock.Call
Remove indicates an expected call of Remove.
func (*MockFileSystemProviderMockRecorder) RemoveAll ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) RemoveAll(path any) *gomock.Call
RemoveAll indicates an expected call of RemoveAll.
func (*MockFileSystemProviderMockRecorder) Rename ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) Rename(oldname, newname any) *gomock.Call
Rename indicates an expected call of Rename.
func (*MockFileSystemProviderMockRecorder) Stat ¶ added in v1.18.0
func (mr *MockFileSystemProviderMockRecorder) Stat(arg0 any) *gomock.Call
Stat indicates an expected call of Stat.
func (*MockFileSystemProviderMockRecorder) UseLogger ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) UseLogger(logger any) *gomock.Call
UseLogger indicates an expected call of UseLogger.
func (*MockFileSystemProviderMockRecorder) UseMetrics ¶ added in v1.17.0
func (mr *MockFileSystemProviderMockRecorder) UseMetrics(metrics any) *gomock.Call
UseMetrics indicates an expected call of UseMetrics.
type MockRowReader ¶ added in v1.18.0
type MockRowReader struct {
// contains filtered or unexported fields
}
MockRowReader is a mock of RowReader interface.
func NewMockRowReader ¶ added in v1.18.0
func NewMockRowReader(ctrl *gomock.Controller) *MockRowReader
NewMockRowReader creates a new mock instance.
func (*MockRowReader) EXPECT ¶ added in v1.18.0
func (m *MockRowReader) EXPECT() *MockRowReaderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRowReader) Next ¶ added in v1.18.0
func (m *MockRowReader) Next() bool
Next mocks base method.
func (*MockRowReader) Scan ¶ added in v1.18.0
func (m *MockRowReader) Scan(arg0 any) error
Scan mocks base method.
type MockRowReaderMockRecorder ¶ added in v1.18.0
type MockRowReaderMockRecorder struct {
// contains filtered or unexported fields
}
MockRowReaderMockRecorder is the mock recorder for MockRowReader.
func (*MockRowReaderMockRecorder) Next ¶ added in v1.18.0
func (mr *MockRowReaderMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next.