Documentation ¶
Index ¶
- func GetMockFuncArgumentValue[T any](args []MockFuncArgument, name string) (T, bool)
- type MockFileIo
- func (f MockFileIo) Checksum(path string, method helpers_io.ChecksumMethod) (string, error)
- func (f MockFileIo) CopyDir(source, destination string) error
- func (f MockFileIo) CopyFile(source, destination string) error
- func (f MockFileIo) CreateDir(folderPath string, mode os.FileMode) error
- func (f MockFileIo) DeleteDir(path string) error
- func (f MockFileIo) DeleteFile(path string) error
- func (f MockFileIo) DirExists(folderPath string) bool
- func (f MockFileIo) FileExists(path string) bool
- func (f MockFileIo) GetExecutionPath() string
- func (f MockFileIo) GetOperatingSystem() helpers_io.OperatingSystem
- func (f MockFileIo) GetOsPathSeparator() string
- func (f MockFileIo) JoinPath(parts ...string) string
- func (f *MockFileIo) On(op MockOperation) *MockOperation
- func (f MockFileIo) ReadBufferedFile(path string, from, to int) ([]byte, error)
- func (f MockFileIo) ReadDir(path string) ([]fs.DirEntry, error)
- func (f MockFileIo) ReadFile(path string) ([]byte, error)
- func (f MockFileIo) ToOsPath(path string) string
- func (f MockFileIo) WriteBufferedFile(path string, data []byte, bufferSize int, mode os.FileMode) error
- func (f MockFileIo) WriteFile(path string, data []byte, mode os.FileMode) error
- type MockFuncArgument
- type MockOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMockFuncArgumentValue ¶
func GetMockFuncArgumentValue[T any](args []MockFuncArgument, name string) (T, bool)
Types ¶
type MockFileIo ¶
type MockFileIo struct {
// contains filtered or unexported fields
}
func NewMockFileIo ¶
func NewMockFileIo() *MockFileIo
func (MockFileIo) Checksum ¶
func (f MockFileIo) Checksum(path string, method helpers_io.ChecksumMethod) (string, error)
func (MockFileIo) CopyDir ¶
func (f MockFileIo) CopyDir(source, destination string) error
func (MockFileIo) CopyFile ¶
func (f MockFileIo) CopyFile(source, destination string) error
func (MockFileIo) CreateDir ¶
func (f MockFileIo) CreateDir(folderPath string, mode os.FileMode) error
func (MockFileIo) DeleteDir ¶
func (f MockFileIo) DeleteDir(path string) error
func (MockFileIo) DeleteFile ¶
func (f MockFileIo) DeleteFile(path string) error
func (MockFileIo) DirExists ¶
func (f MockFileIo) DirExists(folderPath string) bool
func (MockFileIo) FileExists ¶
func (f MockFileIo) FileExists(path string) bool
func (MockFileIo) GetExecutionPath ¶
func (f MockFileIo) GetExecutionPath() string
func (MockFileIo) GetOperatingSystem ¶
func (f MockFileIo) GetOperatingSystem() helpers_io.OperatingSystem
func (MockFileIo) GetOsPathSeparator ¶
func (f MockFileIo) GetOsPathSeparator() string
func (MockFileIo) JoinPath ¶
func (f MockFileIo) JoinPath(parts ...string) string
func (*MockFileIo) On ¶
func (f *MockFileIo) On(op MockOperation) *MockOperation
func (MockFileIo) ReadBufferedFile ¶
func (f MockFileIo) ReadBufferedFile(path string, from, to int) ([]byte, error)
func (MockFileIo) ToOsPath ¶
func (f MockFileIo) ToOsPath(path string) string
func (MockFileIo) WriteBufferedFile ¶
type MockFuncArgument ¶
type MockFuncArgument struct { Name string Value interface{} }
type MockOperation ¶
type MockOperation struct { Method string Func func(args ...MockFuncArgument) interface{} FuncWithErr func(args ...MockFuncArgument) (interface{}, error) ReturnError error CalledWith []MockFuncArgument ReturnValue interface{} }
Click to show internal directories.
Click to hide internal directories.