Documentation
¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: osutils_unix.go
Generated by this command:
mockgen -package os -destination=mock_osutils_unix.go -source osutils_unix.go
Package os is a generated GoMock package.
Index ¶
- type MockOSWrapper
- func (m *MockOSWrapper) EXPECT() *MockOSWrapperMockRecorder
- func (m *MockOSWrapper) Exists(linkBehavior path.LinkTreatment, filename string) (bool, error)
- func (m *MockOSWrapper) IsNotExist(err error) bool
- func (m *MockOSWrapper) MkdirAll(path string, perm os.FileMode) error
- func (m *MockOSWrapper) Open(path string) (*os.File, error)
- func (m *MockOSWrapper) RemoveAll(path string) error
- func (m *MockOSWrapper) Stat(name string) (os.FileInfo, error)
- func (m *MockOSWrapper) Statfs(path string, buf *unix.Statfs_t) error
- type MockOSWrapperMockRecorder
- func (mr *MockOSWrapperMockRecorder) Exists(linkBehavior, filename any) *gomock.Call
- func (mr *MockOSWrapperMockRecorder) IsNotExist(err any) *gomock.Call
- func (mr *MockOSWrapperMockRecorder) MkdirAll(path, perm any) *gomock.Call
- func (mr *MockOSWrapperMockRecorder) Open(path any) *gomock.Call
- func (mr *MockOSWrapperMockRecorder) RemoveAll(path any) *gomock.Call
- func (mr *MockOSWrapperMockRecorder) Stat(name any) *gomock.Call
- func (mr *MockOSWrapperMockRecorder) Statfs(path, buf any) *gomock.Call
- type OSWrapper
- type OsOps
- func (o OsOps) Exists(linkBehavior utilpath.LinkTreatment, filename string) (bool, error)
- func (o OsOps) IsNotExist(err error) bool
- func (o OsOps) MkdirAll(path string, perm os.FileMode) error
- func (o OsOps) Open(path string) (*os.File, error)
- func (o OsOps) RemoveAll(name string) error
- func (o OsOps) Stat(path string) (os.FileInfo, error)
- func (o OsOps) Statfs(path string, buf *unix.Statfs_t) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockOSWrapper ¶
type MockOSWrapper struct {
// contains filtered or unexported fields
}
MockOSWrapper is a mock of OSWrapper interface.
func NewMockOSWrapper ¶
func NewMockOSWrapper(ctrl *gomock.Controller) *MockOSWrapper
NewMockOSWrapper creates a new mock instance.
func (*MockOSWrapper) EXPECT ¶
func (m *MockOSWrapper) EXPECT() *MockOSWrapperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockOSWrapper) Exists ¶ added in v0.1.5
func (m *MockOSWrapper) Exists(linkBehavior path.LinkTreatment, filename string) (bool, error)
Exists mocks base method.
func (*MockOSWrapper) IsNotExist ¶
func (m *MockOSWrapper) IsNotExist(err error) bool
IsNotExist mocks base method.
func (*MockOSWrapper) MkdirAll ¶
func (m *MockOSWrapper) MkdirAll(path string, perm os.FileMode) error
MkdirAll mocks base method.
func (*MockOSWrapper) Open ¶ added in v0.1.5
func (m *MockOSWrapper) Open(path string) (*os.File, error)
Open mocks base method.
func (*MockOSWrapper) RemoveAll ¶
func (m *MockOSWrapper) RemoveAll(path string) error
RemoveAll mocks base method.
type MockOSWrapperMockRecorder ¶
type MockOSWrapperMockRecorder struct {
// contains filtered or unexported fields
}
MockOSWrapperMockRecorder is the mock recorder for MockOSWrapper.
func (*MockOSWrapperMockRecorder) Exists ¶ added in v0.1.5
func (mr *MockOSWrapperMockRecorder) Exists(linkBehavior, filename any) *gomock.Call
Exists indicates an expected call of Exists.
func (*MockOSWrapperMockRecorder) IsNotExist ¶
func (mr *MockOSWrapperMockRecorder) IsNotExist(err any) *gomock.Call
IsNotExist indicates an expected call of IsNotExist.
func (*MockOSWrapperMockRecorder) MkdirAll ¶
func (mr *MockOSWrapperMockRecorder) MkdirAll(path, perm any) *gomock.Call
MkdirAll indicates an expected call of MkdirAll.
func (*MockOSWrapperMockRecorder) Open ¶ added in v0.1.5
func (mr *MockOSWrapperMockRecorder) Open(path any) *gomock.Call
Open indicates an expected call of Open.
func (*MockOSWrapperMockRecorder) RemoveAll ¶
func (mr *MockOSWrapperMockRecorder) RemoveAll(path any) *gomock.Call
RemoveAll indicates an expected call of RemoveAll.
type OSWrapper ¶
type OSWrapper interface { MkdirAll(path string, perm os.FileMode) error RemoveAll(path string) error Stat(name string) (os.FileInfo, error) IsNotExist(err error) bool Open(path string) (*os.File, error) Statfs(path string, buf *unix.Statfs_t) (err error) Exists(linkBehavior utilpath.LinkTreatment, filename string) (bool, error) }
OSWrapper is the interface having os package methods implemented by OsOps. Defined it explicitly so that it can be mocked.