Documentation
¶
Index ¶
- func CloseFileIgnoreError(f ClosableFile)
- func ExtractTarGz(fileIo FileIO, filename, destDir string) error
- func ExtractTarGzSingleFile(fileIo FileIO, archiveFile, fileToExtract, destDir string) error
- func ExtractTarSingleFile(fileIo FileIO, archiveFile, fileToExtract, destDir string) error
- func GetTableWriter() table.Writer
- func MarkFlagRequired(cmd *cobra.Command, name string)
- func RunCommand(command string, args []string, cmdDir string) error
- func StreamFileFromGzip(reader io.Reader, filename string) (io.Reader, error)
- type ClosableFile
- type Dockerfile
- type DockerfileManager
- type FileIO
- type FilesystemWriter
- func (fs *FilesystemWriter) Create(filename string) (*os.File, error)
- func (fs *FilesystemWriter) CreateAndWrite(filePath string, data []byte, fileType string) error
- func (fs *FilesystemWriter) Exists(path string) bool
- func (fs *FilesystemWriter) IsDirectory(path string) (bool, error)
- func (fs *FilesystemWriter) MkdirAll(path string, perm os.FileMode) error
- func (fs *FilesystemWriter) Open(filename string) (*os.File, error)
- func (fs *FilesystemWriter) OpenAppend(filename string) (*os.File, error)
- func (fs *FilesystemWriter) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (fs *FilesystemWriter) ReadDir(dirname string) ([]os.DirEntry, error)
- func (fs *FilesystemWriter) WriteFile(filename string, data []byte, perm os.FileMode) error
- type MockClosableFile
- type MockClosableFile_Close_Call
- type MockClosableFile_Expecter
- type MockDockerfileManager
- type MockDockerfileManager_Expecter
- type MockDockerfileManager_UpdateFromStatement_Call
- func (_c *MockDockerfileManager_UpdateFromStatement_Call) Return(s string, err error) *MockDockerfileManager_UpdateFromStatement_Call
- func (_c *MockDockerfileManager_UpdateFromStatement_Call) Run(run func(dockerfile io.Reader, baseImage string)) *MockDockerfileManager_UpdateFromStatement_Call
- func (_c *MockDockerfileManager_UpdateFromStatement_Call) RunAndReturn(run func(dockerfile io.Reader, baseImage string) (string, error)) *MockDockerfileManager_UpdateFromStatement_Call
- type MockFileIO
- func (_mock *MockFileIO) Create(filename string) (*os.File, error)
- func (_mock *MockFileIO) CreateAndWrite(filePath string, data []byte, fileType string) error
- func (_m *MockFileIO) EXPECT() *MockFileIO_Expecter
- func (_mock *MockFileIO) Exists(filename string) bool
- func (_mock *MockFileIO) IsDirectory(filename string) (bool, error)
- func (_mock *MockFileIO) MkdirAll(path string, perm os.FileMode) error
- func (_mock *MockFileIO) Open(filename string) (*os.File, error)
- func (_mock *MockFileIO) OpenAppend(filename string) (*os.File, error)
- func (_mock *MockFileIO) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (_mock *MockFileIO) ReadDir(dirname string) ([]os.DirEntry, error)
- func (_mock *MockFileIO) WriteFile(filename string, data []byte, perm os.FileMode) error
- type MockFileIO_CreateAndWrite_Call
- func (_c *MockFileIO_CreateAndWrite_Call) Return(err error) *MockFileIO_CreateAndWrite_Call
- func (_c *MockFileIO_CreateAndWrite_Call) Run(run func(filePath string, data []byte, fileType string)) *MockFileIO_CreateAndWrite_Call
- func (_c *MockFileIO_CreateAndWrite_Call) RunAndReturn(run func(filePath string, data []byte, fileType string) error) *MockFileIO_CreateAndWrite_Call
- type MockFileIO_Create_Call
- type MockFileIO_Exists_Call
- type MockFileIO_Expecter
- func (_e *MockFileIO_Expecter) Create(filename interface{}) *MockFileIO_Create_Call
- func (_e *MockFileIO_Expecter) CreateAndWrite(filePath interface{}, data interface{}, fileType interface{}) *MockFileIO_CreateAndWrite_Call
- func (_e *MockFileIO_Expecter) Exists(filename interface{}) *MockFileIO_Exists_Call
- func (_e *MockFileIO_Expecter) IsDirectory(filename interface{}) *MockFileIO_IsDirectory_Call
- func (_e *MockFileIO_Expecter) MkdirAll(path interface{}, perm interface{}) *MockFileIO_MkdirAll_Call
- func (_e *MockFileIO_Expecter) Open(filename interface{}) *MockFileIO_Open_Call
- func (_e *MockFileIO_Expecter) OpenAppend(filename interface{}) *MockFileIO_OpenAppend_Call
- func (_e *MockFileIO_Expecter) OpenFile(name interface{}, flag interface{}, perm interface{}) *MockFileIO_OpenFile_Call
- func (_e *MockFileIO_Expecter) ReadDir(dirname interface{}) *MockFileIO_ReadDir_Call
- func (_e *MockFileIO_Expecter) WriteFile(filename interface{}, data interface{}, perm interface{}) *MockFileIO_WriteFile_Call
- type MockFileIO_IsDirectory_Call
- func (_c *MockFileIO_IsDirectory_Call) Return(b bool, err error) *MockFileIO_IsDirectory_Call
- func (_c *MockFileIO_IsDirectory_Call) Run(run func(filename string)) *MockFileIO_IsDirectory_Call
- func (_c *MockFileIO_IsDirectory_Call) RunAndReturn(run func(filename string) (bool, error)) *MockFileIO_IsDirectory_Call
- type MockFileIO_MkdirAll_Call
- func (_c *MockFileIO_MkdirAll_Call) Return(err error) *MockFileIO_MkdirAll_Call
- func (_c *MockFileIO_MkdirAll_Call) Run(run func(path string, perm os.FileMode)) *MockFileIO_MkdirAll_Call
- func (_c *MockFileIO_MkdirAll_Call) RunAndReturn(run func(path string, perm os.FileMode) error) *MockFileIO_MkdirAll_Call
- type MockFileIO_OpenAppend_Call
- func (_c *MockFileIO_OpenAppend_Call) Return(file *os.File, err error) *MockFileIO_OpenAppend_Call
- func (_c *MockFileIO_OpenAppend_Call) Run(run func(filename string)) *MockFileIO_OpenAppend_Call
- func (_c *MockFileIO_OpenAppend_Call) RunAndReturn(run func(filename string) (*os.File, error)) *MockFileIO_OpenAppend_Call
- type MockFileIO_OpenFile_Call
- func (_c *MockFileIO_OpenFile_Call) Return(file *os.File, err error) *MockFileIO_OpenFile_Call
- func (_c *MockFileIO_OpenFile_Call) Run(run func(name string, flag int, perm os.FileMode)) *MockFileIO_OpenFile_Call
- func (_c *MockFileIO_OpenFile_Call) RunAndReturn(run func(name string, flag int, perm os.FileMode) (*os.File, error)) *MockFileIO_OpenFile_Call
- type MockFileIO_Open_Call
- type MockFileIO_ReadDir_Call
- func (_c *MockFileIO_ReadDir_Call) Return(vs []os.DirEntry, err error) *MockFileIO_ReadDir_Call
- func (_c *MockFileIO_ReadDir_Call) Run(run func(dirname string)) *MockFileIO_ReadDir_Call
- func (_c *MockFileIO_ReadDir_Call) RunAndReturn(run func(dirname string) ([]os.DirEntry, error)) *MockFileIO_ReadDir_Call
- type MockFileIO_WriteFile_Call
- func (_c *MockFileIO_WriteFile_Call) Return(err error) *MockFileIO_WriteFile_Call
- func (_c *MockFileIO_WriteFile_Call) Run(run func(filename string, data []byte, perm os.FileMode)) *MockFileIO_WriteFile_Call
- func (_c *MockFileIO_WriteFile_Call) RunAndReturn(run func(filename string, data []byte, perm os.FileMode) error) *MockFileIO_WriteFile_Call
- type MockTableWriter
- type MockTableWriter_AppendHeader_Call
- func (_c *MockTableWriter_AppendHeader_Call) Return() *MockTableWriter_AppendHeader_Call
- func (_c *MockTableWriter_AppendHeader_Call) Run(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendHeader_Call
- func (_c *MockTableWriter_AppendHeader_Call) RunAndReturn(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendHeader_Call
- type MockTableWriter_AppendRow_Call
- func (_c *MockTableWriter_AppendRow_Call) Return() *MockTableWriter_AppendRow_Call
- func (_c *MockTableWriter_AppendRow_Call) Run(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendRow_Call
- func (_c *MockTableWriter_AppendRow_Call) RunAndReturn(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendRow_Call
- type MockTableWriter_Expecter
- func (_e *MockTableWriter_Expecter) AppendHeader(row interface{}, configs ...interface{}) *MockTableWriter_AppendHeader_Call
- func (_e *MockTableWriter_Expecter) AppendRow(row interface{}, configs ...interface{}) *MockTableWriter_AppendRow_Call
- func (_e *MockTableWriter_Expecter) Render() *MockTableWriter_Render_Call
- type MockTableWriter_Render_Call
- type TableWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseFileIgnoreError ¶ added in v0.10.0
func CloseFileIgnoreError(f ClosableFile)
Close file and ignore error. This function is to be used with defer only.
func ExtractTarGz ¶ added in v0.10.0
ExtractTarGz takes a path to a .tar.gz file and extracts its contents to the specified destination directory.
func ExtractTarGzSingleFile ¶ added in v0.10.0
ExtractTarGzSingleFile extracts a single specified file from a .tar.gz archive to the destination directory.
func ExtractTarSingleFile ¶ added in v0.10.0
ExtractTarSingleFile extracts a single specified file from a .tar archive to the destination directory.
func GetTableWriter ¶
func MarkFlagRequired ¶ added in v0.9.0
func RunCommand ¶ added in v0.17.0
Types ¶
type ClosableFile ¶ added in v0.10.0
type ClosableFile interface {
Close() error
}
type Dockerfile ¶ added in v0.15.0
type Dockerfile struct{}
func (*Dockerfile) UpdateFromStatement ¶ added in v0.15.0
UpdateFromStatement updates the FROM statement in a Dockerfile with a new base image
type DockerfileManager ¶ added in v0.15.0
type DockerfileManager interface {
UpdateFromStatement(dockerfile io.Reader, baseImage string) (string, error)
}
DockerfileManager provides functionality to parse and modify Dockerfiles
func NewDockerfileManager ¶ added in v0.15.0
func NewDockerfileManager() DockerfileManager
NewDockerfileManager creates a new instance of DockerfileManager
type FileIO ¶ added in v0.10.0
type FileIO interface {
Create(filename string) (*os.File, error)
Open(filename string) (*os.File, error)
OpenAppend(filename string) (*os.File, error)
Exists(filename string) bool
IsDirectory(filename string) (bool, error)
MkdirAll(path string, perm os.FileMode) error
OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
WriteFile(filename string, data []byte, perm os.FileMode) error
ReadDir(dirname string) ([]os.DirEntry, error)
CreateAndWrite(filePath string, data []byte, fileType string) error
}
type FilesystemWriter ¶
type FilesystemWriter struct{}
func NewFilesystemWriter ¶
func NewFilesystemWriter() *FilesystemWriter
func (*FilesystemWriter) Create ¶
func (fs *FilesystemWriter) Create(filename string) (*os.File, error)
func (*FilesystemWriter) CreateAndWrite ¶ added in v0.17.0
func (fs *FilesystemWriter) CreateAndWrite(filePath string, data []byte, fileType string) error
func (*FilesystemWriter) Exists ¶ added in v0.10.0
func (fs *FilesystemWriter) Exists(path string) bool
func (*FilesystemWriter) IsDirectory ¶ added in v0.10.0
func (fs *FilesystemWriter) IsDirectory(path string) (bool, error)
func (*FilesystemWriter) MkdirAll ¶ added in v0.10.0
func (fs *FilesystemWriter) MkdirAll(path string, perm os.FileMode) error
func (*FilesystemWriter) Open ¶ added in v0.10.0
func (fs *FilesystemWriter) Open(filename string) (*os.File, error)
func (*FilesystemWriter) OpenAppend ¶ added in v0.16.0
func (fs *FilesystemWriter) OpenAppend(filename string) (*os.File, error)
type MockClosableFile ¶ added in v0.10.0
MockClosableFile is an autogenerated mock type for the ClosableFile type
func NewMockClosableFile ¶ added in v0.10.0
func NewMockClosableFile(t interface {
mock.TestingT
Cleanup(func())
}) *MockClosableFile
NewMockClosableFile creates a new instance of MockClosableFile. 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 (*MockClosableFile) Close ¶ added in v0.10.0
func (_mock *MockClosableFile) Close() error
Close provides a mock function for the type MockClosableFile
func (*MockClosableFile) EXPECT ¶ added in v0.10.0
func (_m *MockClosableFile) EXPECT() *MockClosableFile_Expecter
type MockClosableFile_Close_Call ¶ added in v0.10.0
MockClosableFile_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockClosableFile_Close_Call) Return ¶ added in v0.10.0
func (_c *MockClosableFile_Close_Call) Return(err error) *MockClosableFile_Close_Call
func (*MockClosableFile_Close_Call) Run ¶ added in v0.10.0
func (_c *MockClosableFile_Close_Call) Run(run func()) *MockClosableFile_Close_Call
func (*MockClosableFile_Close_Call) RunAndReturn ¶ added in v0.10.0
func (_c *MockClosableFile_Close_Call) RunAndReturn(run func() error) *MockClosableFile_Close_Call
type MockClosableFile_Expecter ¶ added in v0.10.0
type MockClosableFile_Expecter struct {
// contains filtered or unexported fields
}
func (*MockClosableFile_Expecter) Close ¶ added in v0.10.0
func (_e *MockClosableFile_Expecter) Close() *MockClosableFile_Close_Call
Close is a helper method to define mock.On call
type MockDockerfileManager ¶ added in v0.15.0
MockDockerfileManager is an autogenerated mock type for the DockerfileManager type
func NewMockDockerfileManager ¶ added in v0.15.0
func NewMockDockerfileManager(t interface {
mock.TestingT
Cleanup(func())
}) *MockDockerfileManager
NewMockDockerfileManager creates a new instance of MockDockerfileManager. 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 (*MockDockerfileManager) EXPECT ¶ added in v0.15.0
func (_m *MockDockerfileManager) EXPECT() *MockDockerfileManager_Expecter
func (*MockDockerfileManager) UpdateFromStatement ¶ added in v0.15.0
func (_mock *MockDockerfileManager) UpdateFromStatement(dockerfile io.Reader, baseImage string) (string, error)
UpdateFromStatement provides a mock function for the type MockDockerfileManager
type MockDockerfileManager_Expecter ¶ added in v0.15.0
type MockDockerfileManager_Expecter struct {
// contains filtered or unexported fields
}
func (*MockDockerfileManager_Expecter) UpdateFromStatement ¶ added in v0.15.0
func (_e *MockDockerfileManager_Expecter) UpdateFromStatement(dockerfile interface{}, baseImage interface{}) *MockDockerfileManager_UpdateFromStatement_Call
UpdateFromStatement is a helper method to define mock.On call
- dockerfile io.Reader
- baseImage string
type MockDockerfileManager_UpdateFromStatement_Call ¶ added in v0.15.0
MockDockerfileManager_UpdateFromStatement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFromStatement'
func (*MockDockerfileManager_UpdateFromStatement_Call) Return ¶ added in v0.15.0
func (_c *MockDockerfileManager_UpdateFromStatement_Call) Return(s string, err error) *MockDockerfileManager_UpdateFromStatement_Call
func (*MockDockerfileManager_UpdateFromStatement_Call) Run ¶ added in v0.15.0
func (_c *MockDockerfileManager_UpdateFromStatement_Call) Run(run func(dockerfile io.Reader, baseImage string)) *MockDockerfileManager_UpdateFromStatement_Call
func (*MockDockerfileManager_UpdateFromStatement_Call) RunAndReturn ¶ added in v0.15.0
func (_c *MockDockerfileManager_UpdateFromStatement_Call) RunAndReturn(run func(dockerfile io.Reader, baseImage string) (string, error)) *MockDockerfileManager_UpdateFromStatement_Call
type MockFileIO ¶ added in v0.10.0
MockFileIO is an autogenerated mock type for the FileIO type
func NewMockFileIO ¶ added in v0.10.0
func NewMockFileIO(t interface {
mock.TestingT
Cleanup(func())
}) *MockFileIO
NewMockFileIO creates a new instance of MockFileIO. 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 (*MockFileIO) Create ¶ added in v0.10.0
func (_mock *MockFileIO) Create(filename string) (*os.File, error)
Create provides a mock function for the type MockFileIO
func (*MockFileIO) CreateAndWrite ¶ added in v0.17.0
func (_mock *MockFileIO) CreateAndWrite(filePath string, data []byte, fileType string) error
CreateAndWrite provides a mock function for the type MockFileIO
func (*MockFileIO) EXPECT ¶ added in v0.10.0
func (_m *MockFileIO) EXPECT() *MockFileIO_Expecter
func (*MockFileIO) Exists ¶ added in v0.10.0
func (_mock *MockFileIO) Exists(filename string) bool
Exists provides a mock function for the type MockFileIO
func (*MockFileIO) IsDirectory ¶ added in v0.10.0
func (_mock *MockFileIO) IsDirectory(filename string) (bool, error)
IsDirectory provides a mock function for the type MockFileIO
func (*MockFileIO) MkdirAll ¶ added in v0.10.0
func (_mock *MockFileIO) MkdirAll(path string, perm os.FileMode) error
MkdirAll provides a mock function for the type MockFileIO
func (*MockFileIO) Open ¶ added in v0.10.0
func (_mock *MockFileIO) Open(filename string) (*os.File, error)
Open provides a mock function for the type MockFileIO
func (*MockFileIO) OpenAppend ¶ added in v0.16.0
func (_mock *MockFileIO) OpenAppend(filename string) (*os.File, error)
OpenAppend provides a mock function for the type MockFileIO
func (*MockFileIO) OpenFile ¶ added in v0.10.0
OpenFile provides a mock function for the type MockFileIO
type MockFileIO_CreateAndWrite_Call ¶ added in v0.17.0
MockFileIO_CreateAndWrite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndWrite'
func (*MockFileIO_CreateAndWrite_Call) Return ¶ added in v0.17.0
func (_c *MockFileIO_CreateAndWrite_Call) Return(err error) *MockFileIO_CreateAndWrite_Call
func (*MockFileIO_CreateAndWrite_Call) Run ¶ added in v0.17.0
func (_c *MockFileIO_CreateAndWrite_Call) Run(run func(filePath string, data []byte, fileType string)) *MockFileIO_CreateAndWrite_Call
func (*MockFileIO_CreateAndWrite_Call) RunAndReturn ¶ added in v0.17.0
func (_c *MockFileIO_CreateAndWrite_Call) RunAndReturn(run func(filePath string, data []byte, fileType string) error) *MockFileIO_CreateAndWrite_Call
type MockFileIO_Create_Call ¶ added in v0.10.0
MockFileIO_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*MockFileIO_Create_Call) Return ¶ added in v0.10.0
func (_c *MockFileIO_Create_Call) Return(file *os.File, err error) *MockFileIO_Create_Call
func (*MockFileIO_Create_Call) Run ¶ added in v0.10.0
func (_c *MockFileIO_Create_Call) Run(run func(filename string)) *MockFileIO_Create_Call
func (*MockFileIO_Create_Call) RunAndReturn ¶ added in v0.10.0
func (_c *MockFileIO_Create_Call) RunAndReturn(run func(filename string) (*os.File, error)) *MockFileIO_Create_Call
type MockFileIO_Exists_Call ¶ added in v0.10.0
MockFileIO_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists'
func (*MockFileIO_Exists_Call) Return ¶ added in v0.10.0
func (_c *MockFileIO_Exists_Call) Return(b bool) *MockFileIO_Exists_Call
func (*MockFileIO_Exists_Call) Run ¶ added in v0.10.0
func (_c *MockFileIO_Exists_Call) Run(run func(filename string)) *MockFileIO_Exists_Call
func (*MockFileIO_Exists_Call) RunAndReturn ¶ added in v0.10.0
func (_c *MockFileIO_Exists_Call) RunAndReturn(run func(filename string) bool) *MockFileIO_Exists_Call
type MockFileIO_Expecter ¶ added in v0.10.0
type MockFileIO_Expecter struct {
// contains filtered or unexported fields
}
func (*MockFileIO_Expecter) Create ¶ added in v0.10.0
func (_e *MockFileIO_Expecter) Create(filename interface{}) *MockFileIO_Create_Call
Create is a helper method to define mock.On call
- filename string
func (*MockFileIO_Expecter) CreateAndWrite ¶ added in v0.17.0
func (_e *MockFileIO_Expecter) CreateAndWrite(filePath interface{}, data interface{}, fileType interface{}) *MockFileIO_CreateAndWrite_Call
CreateAndWrite is a helper method to define mock.On call
- filePath string
- data []byte
- fileType string
func (*MockFileIO_Expecter) Exists ¶ added in v0.10.0
func (_e *MockFileIO_Expecter) Exists(filename interface{}) *MockFileIO_Exists_Call
Exists is a helper method to define mock.On call
- filename string
func (*MockFileIO_Expecter) IsDirectory ¶ added in v0.10.0
func (_e *MockFileIO_Expecter) IsDirectory(filename interface{}) *MockFileIO_IsDirectory_Call
IsDirectory is a helper method to define mock.On call
- filename string
func (*MockFileIO_Expecter) MkdirAll ¶ added in v0.10.0
func (_e *MockFileIO_Expecter) MkdirAll(path interface{}, perm interface{}) *MockFileIO_MkdirAll_Call
MkdirAll is a helper method to define mock.On call
- path string
- perm os.FileMode
func (*MockFileIO_Expecter) Open ¶ added in v0.10.0
func (_e *MockFileIO_Expecter) Open(filename interface{}) *MockFileIO_Open_Call
Open is a helper method to define mock.On call
- filename string
func (*MockFileIO_Expecter) OpenAppend ¶ added in v0.16.0
func (_e *MockFileIO_Expecter) OpenAppend(filename interface{}) *MockFileIO_OpenAppend_Call
OpenAppend is a helper method to define mock.On call
- filename string
func (*MockFileIO_Expecter) OpenFile ¶ added in v0.10.0
func (_e *MockFileIO_Expecter) OpenFile(name interface{}, flag interface{}, perm interface{}) *MockFileIO_OpenFile_Call
OpenFile is a helper method to define mock.On call
- name string
- flag int
- perm os.FileMode
func (*MockFileIO_Expecter) ReadDir ¶ added in v0.14.0
func (_e *MockFileIO_Expecter) ReadDir(dirname interface{}) *MockFileIO_ReadDir_Call
ReadDir is a helper method to define mock.On call
- dirname string
func (*MockFileIO_Expecter) WriteFile ¶ added in v0.15.0
func (_e *MockFileIO_Expecter) WriteFile(filename interface{}, data interface{}, perm interface{}) *MockFileIO_WriteFile_Call
WriteFile is a helper method to define mock.On call
- filename string
- data []byte
- perm os.FileMode
type MockFileIO_IsDirectory_Call ¶ added in v0.10.0
MockFileIO_IsDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDirectory'
func (*MockFileIO_IsDirectory_Call) Return ¶ added in v0.10.0
func (_c *MockFileIO_IsDirectory_Call) Return(b bool, err error) *MockFileIO_IsDirectory_Call
func (*MockFileIO_IsDirectory_Call) Run ¶ added in v0.10.0
func (_c *MockFileIO_IsDirectory_Call) Run(run func(filename string)) *MockFileIO_IsDirectory_Call
func (*MockFileIO_IsDirectory_Call) RunAndReturn ¶ added in v0.10.0
func (_c *MockFileIO_IsDirectory_Call) RunAndReturn(run func(filename string) (bool, error)) *MockFileIO_IsDirectory_Call
type MockFileIO_MkdirAll_Call ¶ added in v0.10.0
MockFileIO_MkdirAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MkdirAll'
func (*MockFileIO_MkdirAll_Call) Return ¶ added in v0.10.0
func (_c *MockFileIO_MkdirAll_Call) Return(err error) *MockFileIO_MkdirAll_Call
func (*MockFileIO_MkdirAll_Call) Run ¶ added in v0.10.0
func (_c *MockFileIO_MkdirAll_Call) Run(run func(path string, perm os.FileMode)) *MockFileIO_MkdirAll_Call
func (*MockFileIO_MkdirAll_Call) RunAndReturn ¶ added in v0.10.0
func (_c *MockFileIO_MkdirAll_Call) RunAndReturn(run func(path string, perm os.FileMode) error) *MockFileIO_MkdirAll_Call
type MockFileIO_OpenAppend_Call ¶ added in v0.16.0
MockFileIO_OpenAppend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenAppend'
func (*MockFileIO_OpenAppend_Call) Return ¶ added in v0.16.0
func (_c *MockFileIO_OpenAppend_Call) Return(file *os.File, err error) *MockFileIO_OpenAppend_Call
func (*MockFileIO_OpenAppend_Call) Run ¶ added in v0.16.0
func (_c *MockFileIO_OpenAppend_Call) Run(run func(filename string)) *MockFileIO_OpenAppend_Call
func (*MockFileIO_OpenAppend_Call) RunAndReturn ¶ added in v0.16.0
func (_c *MockFileIO_OpenAppend_Call) RunAndReturn(run func(filename string) (*os.File, error)) *MockFileIO_OpenAppend_Call
type MockFileIO_OpenFile_Call ¶ added in v0.10.0
MockFileIO_OpenFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenFile'
func (*MockFileIO_OpenFile_Call) Return ¶ added in v0.10.0
func (_c *MockFileIO_OpenFile_Call) Return(file *os.File, err error) *MockFileIO_OpenFile_Call
func (*MockFileIO_OpenFile_Call) Run ¶ added in v0.10.0
func (_c *MockFileIO_OpenFile_Call) Run(run func(name string, flag int, perm os.FileMode)) *MockFileIO_OpenFile_Call
func (*MockFileIO_OpenFile_Call) RunAndReturn ¶ added in v0.10.0
func (_c *MockFileIO_OpenFile_Call) RunAndReturn(run func(name string, flag int, perm os.FileMode) (*os.File, error)) *MockFileIO_OpenFile_Call
type MockFileIO_Open_Call ¶ added in v0.10.0
MockFileIO_Open_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Open'
func (*MockFileIO_Open_Call) Return ¶ added in v0.10.0
func (_c *MockFileIO_Open_Call) Return(file *os.File, err error) *MockFileIO_Open_Call
func (*MockFileIO_Open_Call) Run ¶ added in v0.10.0
func (_c *MockFileIO_Open_Call) Run(run func(filename string)) *MockFileIO_Open_Call
func (*MockFileIO_Open_Call) RunAndReturn ¶ added in v0.10.0
func (_c *MockFileIO_Open_Call) RunAndReturn(run func(filename string) (*os.File, error)) *MockFileIO_Open_Call
type MockFileIO_ReadDir_Call ¶ added in v0.14.0
MockFileIO_ReadDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDir'
func (*MockFileIO_ReadDir_Call) Return ¶ added in v0.14.0
func (_c *MockFileIO_ReadDir_Call) Return(vs []os.DirEntry, err error) *MockFileIO_ReadDir_Call
func (*MockFileIO_ReadDir_Call) Run ¶ added in v0.14.0
func (_c *MockFileIO_ReadDir_Call) Run(run func(dirname string)) *MockFileIO_ReadDir_Call
func (*MockFileIO_ReadDir_Call) RunAndReturn ¶ added in v0.14.0
func (_c *MockFileIO_ReadDir_Call) RunAndReturn(run func(dirname string) ([]os.DirEntry, error)) *MockFileIO_ReadDir_Call
type MockFileIO_WriteFile_Call ¶ added in v0.15.0
MockFileIO_WriteFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteFile'
func (*MockFileIO_WriteFile_Call) Return ¶ added in v0.15.0
func (_c *MockFileIO_WriteFile_Call) Return(err error) *MockFileIO_WriteFile_Call
func (*MockFileIO_WriteFile_Call) Run ¶ added in v0.15.0
func (_c *MockFileIO_WriteFile_Call) Run(run func(filename string, data []byte, perm os.FileMode)) *MockFileIO_WriteFile_Call
func (*MockFileIO_WriteFile_Call) RunAndReturn ¶ added in v0.15.0
func (_c *MockFileIO_WriteFile_Call) RunAndReturn(run func(filename string, data []byte, perm os.FileMode) error) *MockFileIO_WriteFile_Call
type MockTableWriter ¶
MockTableWriter is an autogenerated mock type for the TableWriter type
func NewMockTableWriter ¶
func NewMockTableWriter(t interface {
mock.TestingT
Cleanup(func())
}) *MockTableWriter
NewMockTableWriter creates a new instance of MockTableWriter. 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 (*MockTableWriter) AppendHeader ¶
func (_mock *MockTableWriter) AppendHeader(row table.Row, configs ...table.RowConfig)
AppendHeader provides a mock function for the type MockTableWriter
func (*MockTableWriter) AppendRow ¶
func (_mock *MockTableWriter) AppendRow(row table.Row, configs ...table.RowConfig)
AppendRow provides a mock function for the type MockTableWriter
func (*MockTableWriter) EXPECT ¶
func (_m *MockTableWriter) EXPECT() *MockTableWriter_Expecter
func (*MockTableWriter) Render ¶
func (_mock *MockTableWriter) Render() string
Render provides a mock function for the type MockTableWriter
type MockTableWriter_AppendHeader_Call ¶
MockTableWriter_AppendHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppendHeader'
func (*MockTableWriter_AppendHeader_Call) Return ¶
func (_c *MockTableWriter_AppendHeader_Call) Return() *MockTableWriter_AppendHeader_Call
func (*MockTableWriter_AppendHeader_Call) Run ¶
func (_c *MockTableWriter_AppendHeader_Call) Run(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendHeader_Call
func (*MockTableWriter_AppendHeader_Call) RunAndReturn ¶
func (_c *MockTableWriter_AppendHeader_Call) RunAndReturn(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendHeader_Call
type MockTableWriter_AppendRow_Call ¶
MockTableWriter_AppendRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppendRow'
func (*MockTableWriter_AppendRow_Call) Return ¶
func (_c *MockTableWriter_AppendRow_Call) Return() *MockTableWriter_AppendRow_Call
func (*MockTableWriter_AppendRow_Call) Run ¶
func (_c *MockTableWriter_AppendRow_Call) Run(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendRow_Call
func (*MockTableWriter_AppendRow_Call) RunAndReturn ¶
func (_c *MockTableWriter_AppendRow_Call) RunAndReturn(run func(row table.Row, configs ...table.RowConfig)) *MockTableWriter_AppendRow_Call
type MockTableWriter_Expecter ¶
type MockTableWriter_Expecter struct {
// contains filtered or unexported fields
}
func (*MockTableWriter_Expecter) AppendHeader ¶
func (_e *MockTableWriter_Expecter) AppendHeader(row interface{}, configs ...interface{}) *MockTableWriter_AppendHeader_Call
AppendHeader is a helper method to define mock.On call
- row table.Row
- configs ...table.RowConfig
func (*MockTableWriter_Expecter) AppendRow ¶
func (_e *MockTableWriter_Expecter) AppendRow(row interface{}, configs ...interface{}) *MockTableWriter_AppendRow_Call
AppendRow is a helper method to define mock.On call
- row table.Row
- configs ...table.RowConfig
func (*MockTableWriter_Expecter) Render ¶
func (_e *MockTableWriter_Expecter) Render() *MockTableWriter_Render_Call
Render is a helper method to define mock.On call
type MockTableWriter_Render_Call ¶
MockTableWriter_Render_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Render'
func (*MockTableWriter_Render_Call) Return ¶
func (_c *MockTableWriter_Render_Call) Return(s string) *MockTableWriter_Render_Call
func (*MockTableWriter_Render_Call) Run ¶
func (_c *MockTableWriter_Render_Call) Run(run func()) *MockTableWriter_Render_Call
func (*MockTableWriter_Render_Call) RunAndReturn ¶
func (_c *MockTableWriter_Render_Call) RunAndReturn(run func() string) *MockTableWriter_Render_Call