Documentation ¶
Index ¶
- type Fs
- type MockFs
- func (_m *MockFs) CopyToFile(destination io.Writer, source io.Reader) (int64, error)
- func (_m *MockFs) CreateDirectory(path string, perm fs.FileMode) error
- func (_m *MockFs) CreateFile(name string) (io.WriteCloser, error)
- func (_m *MockFs) EXPECT() *MockFs_Expecter
- func (_m *MockFs) FindFiles(pattern string) ([]string, error)
- func (_m *MockFs) OpenFile(name string, flag int, perm fs.FileMode) (*os.File, error)
- func (_m *MockFs) OpenZip(name string) (*zip.ReadCloser, error)
- func (_m *MockFs) ReadFile(name string) ([]byte, error)
- func (_m *MockFs) ReadZipFile(file *zip.File) (io.ReadCloser, error)
- func (_m *MockFs) RemoveDirectory(path string) error
- func (_m *MockFs) Unzip(source string, destination string) error
- func (_m *MockFs) UnzipFile(zipFile *zip.File, destination string) error
- type MockFs_CopyToFile_Call
- func (_c *MockFs_CopyToFile_Call) Return(_a0 int64, _a1 error) *MockFs_CopyToFile_Call
- func (_c *MockFs_CopyToFile_Call) Run(run func(destination io.Writer, source io.Reader)) *MockFs_CopyToFile_Call
- func (_c *MockFs_CopyToFile_Call) RunAndReturn(run func(io.Writer, io.Reader) (int64, error)) *MockFs_CopyToFile_Call
- type MockFs_CreateDirectory_Call
- func (_c *MockFs_CreateDirectory_Call) Return(_a0 error) *MockFs_CreateDirectory_Call
- func (_c *MockFs_CreateDirectory_Call) Run(run func(path string, perm fs.FileMode)) *MockFs_CreateDirectory_Call
- func (_c *MockFs_CreateDirectory_Call) RunAndReturn(run func(string, fs.FileMode) error) *MockFs_CreateDirectory_Call
- type MockFs_CreateFile_Call
- type MockFs_Expecter
- func (_e *MockFs_Expecter) CopyToFile(destination interface{}, source interface{}) *MockFs_CopyToFile_Call
- func (_e *MockFs_Expecter) CreateDirectory(path interface{}, perm interface{}) *MockFs_CreateDirectory_Call
- func (_e *MockFs_Expecter) CreateFile(name interface{}) *MockFs_CreateFile_Call
- func (_e *MockFs_Expecter) FindFiles(pattern interface{}) *MockFs_FindFiles_Call
- func (_e *MockFs_Expecter) OpenFile(name interface{}, flag interface{}, perm interface{}) *MockFs_OpenFile_Call
- func (_e *MockFs_Expecter) OpenZip(name interface{}) *MockFs_OpenZip_Call
- func (_e *MockFs_Expecter) ReadFile(name interface{}) *MockFs_ReadFile_Call
- func (_e *MockFs_Expecter) ReadZipFile(file interface{}) *MockFs_ReadZipFile_Call
- func (_e *MockFs_Expecter) RemoveDirectory(path interface{}) *MockFs_RemoveDirectory_Call
- func (_e *MockFs_Expecter) Unzip(source interface{}, destination interface{}) *MockFs_Unzip_Call
- func (_e *MockFs_Expecter) UnzipFile(zipFile interface{}, destination interface{}) *MockFs_UnzipFile_Call
- type MockFs_FindFiles_Call
- type MockFs_OpenFile_Call
- func (_c *MockFs_OpenFile_Call) Return(_a0 *os.File, _a1 error) *MockFs_OpenFile_Call
- func (_c *MockFs_OpenFile_Call) Run(run func(name string, flag int, perm fs.FileMode)) *MockFs_OpenFile_Call
- func (_c *MockFs_OpenFile_Call) RunAndReturn(run func(string, int, fs.FileMode) (*os.File, error)) *MockFs_OpenFile_Call
- type MockFs_OpenZip_Call
- type MockFs_ReadFile_Call
- type MockFs_ReadZipFile_Call
- func (_c *MockFs_ReadZipFile_Call) Return(_a0 io.ReadCloser, _a1 error) *MockFs_ReadZipFile_Call
- func (_c *MockFs_ReadZipFile_Call) Run(run func(file *zip.File)) *MockFs_ReadZipFile_Call
- func (_c *MockFs_ReadZipFile_Call) RunAndReturn(run func(*zip.File) (io.ReadCloser, error)) *MockFs_ReadZipFile_Call
- type MockFs_RemoveDirectory_Call
- type MockFs_UnzipFile_Call
- type MockFs_Unzip_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fs ¶
type Fs interface { CopyToFile(destination io.Writer, source io.Reader) (int64, error) CreateDirectory(path string, perm os.FileMode) error CreateFile(name string) (io.WriteCloser, error) FindFiles(pattern string) ([]string, error) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) OpenZip(name string) (*zip.ReadCloser, error) ReadFile(name string) ([]byte, error) ReadZipFile(file *zip.File) (io.ReadCloser, error) RemoveDirectory(path string) error Unzip(source, destination string) error UnzipFile(zipFile *zip.File, destination string) error }
type MockFs ¶
MockFs is an autogenerated mock type for the Fs type
func NewMockFs ¶
NewMockFs creates a new instance of MockFs. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockFs) CopyToFile ¶
CopyToFile provides a mock function with given fields: destination, source
func (*MockFs) CreateDirectory ¶
CreateDirectory provides a mock function with given fields: path, perm
func (*MockFs) CreateFile ¶
func (_m *MockFs) CreateFile(name string) (io.WriteCloser, error)
CreateFile provides a mock function with given fields: name
func (*MockFs) EXPECT ¶
func (_m *MockFs) EXPECT() *MockFs_Expecter
func (*MockFs) OpenZip ¶
func (_m *MockFs) OpenZip(name string) (*zip.ReadCloser, error)
OpenZip provides a mock function with given fields: name
func (*MockFs) ReadZipFile ¶
ReadZipFile provides a mock function with given fields: file
func (*MockFs) RemoveDirectory ¶
RemoveDirectory provides a mock function with given fields: path
type MockFs_CopyToFile_Call ¶
MockFs_CopyToFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyToFile'
func (*MockFs_CopyToFile_Call) Return ¶
func (_c *MockFs_CopyToFile_Call) Return(_a0 int64, _a1 error) *MockFs_CopyToFile_Call
func (*MockFs_CopyToFile_Call) Run ¶
func (_c *MockFs_CopyToFile_Call) Run(run func(destination io.Writer, source io.Reader)) *MockFs_CopyToFile_Call
func (*MockFs_CopyToFile_Call) RunAndReturn ¶
func (_c *MockFs_CopyToFile_Call) RunAndReturn(run func(io.Writer, io.Reader) (int64, error)) *MockFs_CopyToFile_Call
type MockFs_CreateDirectory_Call ¶
MockFs_CreateDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDirectory'
func (*MockFs_CreateDirectory_Call) Return ¶
func (_c *MockFs_CreateDirectory_Call) Return(_a0 error) *MockFs_CreateDirectory_Call
func (*MockFs_CreateDirectory_Call) Run ¶
func (_c *MockFs_CreateDirectory_Call) Run(run func(path string, perm fs.FileMode)) *MockFs_CreateDirectory_Call
func (*MockFs_CreateDirectory_Call) RunAndReturn ¶
func (_c *MockFs_CreateDirectory_Call) RunAndReturn(run func(string, fs.FileMode) error) *MockFs_CreateDirectory_Call
type MockFs_CreateFile_Call ¶
MockFs_CreateFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateFile'
func (*MockFs_CreateFile_Call) Return ¶
func (_c *MockFs_CreateFile_Call) Return(_a0 io.WriteCloser, _a1 error) *MockFs_CreateFile_Call
func (*MockFs_CreateFile_Call) Run ¶
func (_c *MockFs_CreateFile_Call) Run(run func(name string)) *MockFs_CreateFile_Call
func (*MockFs_CreateFile_Call) RunAndReturn ¶
func (_c *MockFs_CreateFile_Call) RunAndReturn(run func(string) (io.WriteCloser, error)) *MockFs_CreateFile_Call
type MockFs_Expecter ¶
type MockFs_Expecter struct {
// contains filtered or unexported fields
}
func (*MockFs_Expecter) CopyToFile ¶
func (_e *MockFs_Expecter) CopyToFile(destination interface{}, source interface{}) *MockFs_CopyToFile_Call
CopyToFile is a helper method to define mock.On call
- destination io.Writer
- source io.Reader
func (*MockFs_Expecter) CreateDirectory ¶
func (_e *MockFs_Expecter) CreateDirectory(path interface{}, perm interface{}) *MockFs_CreateDirectory_Call
CreateDirectory is a helper method to define mock.On call
- path string
- perm fs.FileMode
func (*MockFs_Expecter) CreateFile ¶
func (_e *MockFs_Expecter) CreateFile(name interface{}) *MockFs_CreateFile_Call
CreateFile is a helper method to define mock.On call
- name string
func (*MockFs_Expecter) FindFiles ¶
func (_e *MockFs_Expecter) FindFiles(pattern interface{}) *MockFs_FindFiles_Call
FindFiles is a helper method to define mock.On call
- pattern string
func (*MockFs_Expecter) OpenFile ¶
func (_e *MockFs_Expecter) OpenFile(name interface{}, flag interface{}, perm interface{}) *MockFs_OpenFile_Call
OpenFile is a helper method to define mock.On call
- name string
- flag int
- perm fs.FileMode
func (*MockFs_Expecter) OpenZip ¶
func (_e *MockFs_Expecter) OpenZip(name interface{}) *MockFs_OpenZip_Call
OpenZip is a helper method to define mock.On call
- name string
func (*MockFs_Expecter) ReadFile ¶
func (_e *MockFs_Expecter) ReadFile(name interface{}) *MockFs_ReadFile_Call
ReadFile is a helper method to define mock.On call
- name string
func (*MockFs_Expecter) ReadZipFile ¶
func (_e *MockFs_Expecter) ReadZipFile(file interface{}) *MockFs_ReadZipFile_Call
ReadZipFile is a helper method to define mock.On call
- file *zip.File
func (*MockFs_Expecter) RemoveDirectory ¶
func (_e *MockFs_Expecter) RemoveDirectory(path interface{}) *MockFs_RemoveDirectory_Call
RemoveDirectory is a helper method to define mock.On call
- path string
func (*MockFs_Expecter) Unzip ¶
func (_e *MockFs_Expecter) Unzip(source interface{}, destination interface{}) *MockFs_Unzip_Call
Unzip is a helper method to define mock.On call
- source string
- destination string
func (*MockFs_Expecter) UnzipFile ¶
func (_e *MockFs_Expecter) UnzipFile(zipFile interface{}, destination interface{}) *MockFs_UnzipFile_Call
UnzipFile is a helper method to define mock.On call
- zipFile *zip.File
- destination string
type MockFs_FindFiles_Call ¶
MockFs_FindFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindFiles'
func (*MockFs_FindFiles_Call) Return ¶
func (_c *MockFs_FindFiles_Call) Return(_a0 []string, _a1 error) *MockFs_FindFiles_Call
func (*MockFs_FindFiles_Call) Run ¶
func (_c *MockFs_FindFiles_Call) Run(run func(pattern string)) *MockFs_FindFiles_Call
func (*MockFs_FindFiles_Call) RunAndReturn ¶
func (_c *MockFs_FindFiles_Call) RunAndReturn(run func(string) ([]string, error)) *MockFs_FindFiles_Call
type MockFs_OpenFile_Call ¶
MockFs_OpenFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenFile'
func (*MockFs_OpenFile_Call) Return ¶
func (_c *MockFs_OpenFile_Call) Return(_a0 *os.File, _a1 error) *MockFs_OpenFile_Call
func (*MockFs_OpenFile_Call) Run ¶
func (_c *MockFs_OpenFile_Call) Run(run func(name string, flag int, perm fs.FileMode)) *MockFs_OpenFile_Call
func (*MockFs_OpenFile_Call) RunAndReturn ¶
func (_c *MockFs_OpenFile_Call) RunAndReturn(run func(string, int, fs.FileMode) (*os.File, error)) *MockFs_OpenFile_Call
type MockFs_OpenZip_Call ¶
MockFs_OpenZip_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenZip'
func (*MockFs_OpenZip_Call) Return ¶
func (_c *MockFs_OpenZip_Call) Return(_a0 *zip.ReadCloser, _a1 error) *MockFs_OpenZip_Call
func (*MockFs_OpenZip_Call) Run ¶
func (_c *MockFs_OpenZip_Call) Run(run func(name string)) *MockFs_OpenZip_Call
func (*MockFs_OpenZip_Call) RunAndReturn ¶
func (_c *MockFs_OpenZip_Call) RunAndReturn(run func(string) (*zip.ReadCloser, error)) *MockFs_OpenZip_Call
type MockFs_ReadFile_Call ¶
MockFs_ReadFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadFile'
func (*MockFs_ReadFile_Call) Return ¶
func (_c *MockFs_ReadFile_Call) Return(_a0 []byte, _a1 error) *MockFs_ReadFile_Call
func (*MockFs_ReadFile_Call) Run ¶
func (_c *MockFs_ReadFile_Call) Run(run func(name string)) *MockFs_ReadFile_Call
func (*MockFs_ReadFile_Call) RunAndReturn ¶
func (_c *MockFs_ReadFile_Call) RunAndReturn(run func(string) ([]byte, error)) *MockFs_ReadFile_Call
type MockFs_ReadZipFile_Call ¶
MockFs_ReadZipFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadZipFile'
func (*MockFs_ReadZipFile_Call) Return ¶
func (_c *MockFs_ReadZipFile_Call) Return(_a0 io.ReadCloser, _a1 error) *MockFs_ReadZipFile_Call
func (*MockFs_ReadZipFile_Call) Run ¶
func (_c *MockFs_ReadZipFile_Call) Run(run func(file *zip.File)) *MockFs_ReadZipFile_Call
func (*MockFs_ReadZipFile_Call) RunAndReturn ¶
func (_c *MockFs_ReadZipFile_Call) RunAndReturn(run func(*zip.File) (io.ReadCloser, error)) *MockFs_ReadZipFile_Call
type MockFs_RemoveDirectory_Call ¶
MockFs_RemoveDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveDirectory'
func (*MockFs_RemoveDirectory_Call) Return ¶
func (_c *MockFs_RemoveDirectory_Call) Return(_a0 error) *MockFs_RemoveDirectory_Call
func (*MockFs_RemoveDirectory_Call) Run ¶
func (_c *MockFs_RemoveDirectory_Call) Run(run func(path string)) *MockFs_RemoveDirectory_Call
func (*MockFs_RemoveDirectory_Call) RunAndReturn ¶
func (_c *MockFs_RemoveDirectory_Call) RunAndReturn(run func(string) error) *MockFs_RemoveDirectory_Call
type MockFs_UnzipFile_Call ¶
MockFs_UnzipFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnzipFile'
func (*MockFs_UnzipFile_Call) Return ¶
func (_c *MockFs_UnzipFile_Call) Return(_a0 error) *MockFs_UnzipFile_Call
func (*MockFs_UnzipFile_Call) Run ¶
func (_c *MockFs_UnzipFile_Call) Run(run func(zipFile *zip.File, destination string)) *MockFs_UnzipFile_Call
func (*MockFs_UnzipFile_Call) RunAndReturn ¶
func (_c *MockFs_UnzipFile_Call) RunAndReturn(run func(*zip.File, string) error) *MockFs_UnzipFile_Call
type MockFs_Unzip_Call ¶
MockFs_Unzip_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unzip'
func (*MockFs_Unzip_Call) Return ¶
func (_c *MockFs_Unzip_Call) Return(_a0 error) *MockFs_Unzip_Call
func (*MockFs_Unzip_Call) Run ¶
func (_c *MockFs_Unzip_Call) Run(run func(source string, destination string)) *MockFs_Unzip_Call
func (*MockFs_Unzip_Call) RunAndReturn ¶
func (_c *MockFs_Unzip_Call) RunAndReturn(run func(string, string) error) *MockFs_Unzip_Call