mocks

package
v6.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient added in v6.19.0

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. 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 (*Client) Chmod added in v6.19.0

func (_m *Client) Chmod(path string, mode os.FileMode) error

Chmod provides a mock function with given fields: path, mode

func (*Client) Chtimes

func (_m *Client) Chtimes(path string, atime time.Time, mtime time.Time) error

Chtimes provides a mock function with given fields: path, atime, mtime

func (*Client) Close

func (_m *Client) Close() error

Close provides a mock function with given fields:

func (*Client) Create

func (_m *Client) Create(path string) (*pkgsftp.File, error)

Create provides a mock function with given fields: path

func (*Client) EXPECT added in v6.19.0

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) MkdirAll

func (_m *Client) MkdirAll(path string) error

MkdirAll provides a mock function with given fields: path

func (*Client) OpenFile

func (_m *Client) OpenFile(path string, f int) (*pkgsftp.File, error)

OpenFile provides a mock function with given fields: path, f

func (*Client) ReadDir

func (_m *Client) ReadDir(p string) ([]os.FileInfo, error)

ReadDir provides a mock function with given fields: p

func (*Client) Remove

func (_m *Client) Remove(path string) error

Remove provides a mock function with given fields: path

func (*Client) Rename

func (_m *Client) Rename(oldname string, newname string) error

Rename provides a mock function with given fields: oldname, newname

func (*Client) Stat

func (_m *Client) Stat(p string) (os.FileInfo, error)

Stat provides a mock function with given fields: p

type Client_Chmod_Call added in v6.19.0

type Client_Chmod_Call struct {
	*mock.Call
}

Client_Chmod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Chmod'

func (*Client_Chmod_Call) Return added in v6.19.0

func (_c *Client_Chmod_Call) Return(_a0 error) *Client_Chmod_Call

func (*Client_Chmod_Call) Run added in v6.19.0

func (_c *Client_Chmod_Call) Run(run func(path string, mode os.FileMode)) *Client_Chmod_Call

func (*Client_Chmod_Call) RunAndReturn added in v6.19.0

func (_c *Client_Chmod_Call) RunAndReturn(run func(string, os.FileMode) error) *Client_Chmod_Call

type Client_Chtimes_Call added in v6.19.0

type Client_Chtimes_Call struct {
	*mock.Call
}

Client_Chtimes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Chtimes'

func (*Client_Chtimes_Call) Return added in v6.19.0

func (*Client_Chtimes_Call) Run added in v6.19.0

func (_c *Client_Chtimes_Call) Run(run func(path string, atime time.Time, mtime time.Time)) *Client_Chtimes_Call

func (*Client_Chtimes_Call) RunAndReturn added in v6.19.0

func (_c *Client_Chtimes_Call) RunAndReturn(run func(string, time.Time, time.Time) error) *Client_Chtimes_Call

type Client_Close_Call added in v6.19.0

type Client_Close_Call struct {
	*mock.Call
}

Client_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*Client_Close_Call) Return added in v6.19.0

func (_c *Client_Close_Call) Return(_a0 error) *Client_Close_Call

func (*Client_Close_Call) Run added in v6.19.0

func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call

func (*Client_Close_Call) RunAndReturn added in v6.19.0

func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call

type Client_Create_Call added in v6.19.0

type Client_Create_Call struct {
	*mock.Call
}

Client_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'

func (*Client_Create_Call) Return added in v6.19.0

func (_c *Client_Create_Call) Return(_a0 *pkgsftp.File, _a1 error) *Client_Create_Call

func (*Client_Create_Call) Run added in v6.19.0

func (_c *Client_Create_Call) Run(run func(path string)) *Client_Create_Call

func (*Client_Create_Call) RunAndReturn added in v6.19.0

func (_c *Client_Create_Call) RunAndReturn(run func(string) (*pkgsftp.File, error)) *Client_Create_Call

type Client_Expecter added in v6.19.0

type Client_Expecter struct {
	// contains filtered or unexported fields
}

func (*Client_Expecter) Chmod added in v6.19.0

func (_e *Client_Expecter) Chmod(path interface{}, mode interface{}) *Client_Chmod_Call

Chmod is a helper method to define mock.On call

  • path string
  • mode os.FileMode

func (*Client_Expecter) Chtimes added in v6.19.0

func (_e *Client_Expecter) Chtimes(path interface{}, atime interface{}, mtime interface{}) *Client_Chtimes_Call

Chtimes is a helper method to define mock.On call

  • path string
  • atime time.Time
  • mtime time.Time

func (*Client_Expecter) Close added in v6.19.0

func (_e *Client_Expecter) Close() *Client_Close_Call

Close is a helper method to define mock.On call

func (*Client_Expecter) Create added in v6.19.0

func (_e *Client_Expecter) Create(path interface{}) *Client_Create_Call

Create is a helper method to define mock.On call

  • path string

func (*Client_Expecter) MkdirAll added in v6.19.0

func (_e *Client_Expecter) MkdirAll(path interface{}) *Client_MkdirAll_Call

MkdirAll is a helper method to define mock.On call

  • path string

func (*Client_Expecter) OpenFile added in v6.19.0

func (_e *Client_Expecter) OpenFile(path interface{}, f interface{}) *Client_OpenFile_Call

OpenFile is a helper method to define mock.On call

  • path string
  • f int

func (*Client_Expecter) ReadDir added in v6.19.0

func (_e *Client_Expecter) ReadDir(p interface{}) *Client_ReadDir_Call

ReadDir is a helper method to define mock.On call

  • p string

func (*Client_Expecter) Remove added in v6.19.0

func (_e *Client_Expecter) Remove(path interface{}) *Client_Remove_Call

Remove is a helper method to define mock.On call

  • path string

func (*Client_Expecter) Rename added in v6.19.0

func (_e *Client_Expecter) Rename(oldname interface{}, newname interface{}) *Client_Rename_Call

Rename is a helper method to define mock.On call

  • oldname string
  • newname string

func (*Client_Expecter) Stat added in v6.19.0

func (_e *Client_Expecter) Stat(p interface{}) *Client_Stat_Call

Stat is a helper method to define mock.On call

  • p string

type Client_MkdirAll_Call added in v6.19.0

type Client_MkdirAll_Call struct {
	*mock.Call
}

Client_MkdirAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MkdirAll'

func (*Client_MkdirAll_Call) Return added in v6.19.0

func (*Client_MkdirAll_Call) Run added in v6.19.0

func (_c *Client_MkdirAll_Call) Run(run func(path string)) *Client_MkdirAll_Call

func (*Client_MkdirAll_Call) RunAndReturn added in v6.19.0

func (_c *Client_MkdirAll_Call) RunAndReturn(run func(string) error) *Client_MkdirAll_Call

type Client_OpenFile_Call added in v6.19.0

type Client_OpenFile_Call struct {
	*mock.Call
}

Client_OpenFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OpenFile'

func (*Client_OpenFile_Call) Return added in v6.19.0

func (*Client_OpenFile_Call) Run added in v6.19.0

func (_c *Client_OpenFile_Call) Run(run func(path string, f int)) *Client_OpenFile_Call

func (*Client_OpenFile_Call) RunAndReturn added in v6.19.0

func (_c *Client_OpenFile_Call) RunAndReturn(run func(string, int) (*pkgsftp.File, error)) *Client_OpenFile_Call

type Client_ReadDir_Call added in v6.19.0

type Client_ReadDir_Call struct {
	*mock.Call
}

Client_ReadDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadDir'

func (*Client_ReadDir_Call) Return added in v6.19.0

func (_c *Client_ReadDir_Call) Return(_a0 []os.FileInfo, _a1 error) *Client_ReadDir_Call

func (*Client_ReadDir_Call) Run added in v6.19.0

func (_c *Client_ReadDir_Call) Run(run func(p string)) *Client_ReadDir_Call

func (*Client_ReadDir_Call) RunAndReturn added in v6.19.0

func (_c *Client_ReadDir_Call) RunAndReturn(run func(string) ([]os.FileInfo, error)) *Client_ReadDir_Call

type Client_Remove_Call added in v6.19.0

type Client_Remove_Call struct {
	*mock.Call
}

Client_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'

func (*Client_Remove_Call) Return added in v6.19.0

func (_c *Client_Remove_Call) Return(_a0 error) *Client_Remove_Call

func (*Client_Remove_Call) Run added in v6.19.0

func (_c *Client_Remove_Call) Run(run func(path string)) *Client_Remove_Call

func (*Client_Remove_Call) RunAndReturn added in v6.19.0

func (_c *Client_Remove_Call) RunAndReturn(run func(string) error) *Client_Remove_Call

type Client_Rename_Call added in v6.19.0

type Client_Rename_Call struct {
	*mock.Call
}

Client_Rename_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Rename'

func (*Client_Rename_Call) Return added in v6.19.0

func (_c *Client_Rename_Call) Return(_a0 error) *Client_Rename_Call

func (*Client_Rename_Call) Run added in v6.19.0

func (_c *Client_Rename_Call) Run(run func(oldname string, newname string)) *Client_Rename_Call

func (*Client_Rename_Call) RunAndReturn added in v6.19.0

func (_c *Client_Rename_Call) RunAndReturn(run func(string, string) error) *Client_Rename_Call

type Client_Stat_Call added in v6.19.0

type Client_Stat_Call struct {
	*mock.Call
}

Client_Stat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stat'

func (*Client_Stat_Call) Return added in v6.19.0

func (_c *Client_Stat_Call) Return(_a0 os.FileInfo, _a1 error) *Client_Stat_Call

func (*Client_Stat_Call) Run added in v6.19.0

func (_c *Client_Stat_Call) Run(run func(p string)) *Client_Stat_Call

func (*Client_Stat_Call) RunAndReturn added in v6.19.0

func (_c *Client_Stat_Call) RunAndReturn(run func(string) (os.FileInfo, error)) *Client_Stat_Call

type FileInfo

type FileInfo struct {
	mock.Mock
}

FileInfo is an autogenerated mock type for the FileInfo type

func NewFileInfo added in v6.19.0

func NewFileInfo(t interface {
	mock.TestingT
	Cleanup(func())
}) *FileInfo

NewFileInfo creates a new instance of FileInfo. 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 (*FileInfo) EXPECT added in v6.19.0

func (_m *FileInfo) EXPECT() *FileInfo_Expecter

func (*FileInfo) IsDir

func (_m *FileInfo) IsDir() bool

IsDir provides a mock function with given fields:

func (*FileInfo) ModTime

func (_m *FileInfo) ModTime() time.Time

ModTime provides a mock function with given fields:

func (*FileInfo) Mode

func (_m *FileInfo) Mode() fs.FileMode

Mode provides a mock function with given fields:

func (*FileInfo) Name

func (_m *FileInfo) Name() string

Name provides a mock function with given fields:

func (*FileInfo) Size

func (_m *FileInfo) Size() int64

Size provides a mock function with given fields:

func (*FileInfo) Sys

func (_m *FileInfo) Sys() any

Sys provides a mock function with given fields:

type FileInfo_Expecter added in v6.19.0

type FileInfo_Expecter struct {
	// contains filtered or unexported fields
}

func (*FileInfo_Expecter) IsDir added in v6.19.0

IsDir is a helper method to define mock.On call

func (*FileInfo_Expecter) ModTime added in v6.19.0

ModTime is a helper method to define mock.On call

func (*FileInfo_Expecter) Mode added in v6.19.0

Mode is a helper method to define mock.On call

func (*FileInfo_Expecter) Name added in v6.19.0

Name is a helper method to define mock.On call

func (*FileInfo_Expecter) Size added in v6.19.0

Size is a helper method to define mock.On call

func (*FileInfo_Expecter) Sys added in v6.19.0

Sys is a helper method to define mock.On call

type FileInfo_IsDir_Call added in v6.19.0

type FileInfo_IsDir_Call struct {
	*mock.Call
}

FileInfo_IsDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDir'

func (*FileInfo_IsDir_Call) Return added in v6.19.0

func (_c *FileInfo_IsDir_Call) Return(_a0 bool) *FileInfo_IsDir_Call

func (*FileInfo_IsDir_Call) Run added in v6.19.0

func (_c *FileInfo_IsDir_Call) Run(run func()) *FileInfo_IsDir_Call

func (*FileInfo_IsDir_Call) RunAndReturn added in v6.19.0

func (_c *FileInfo_IsDir_Call) RunAndReturn(run func() bool) *FileInfo_IsDir_Call

type FileInfo_ModTime_Call added in v6.19.0

type FileInfo_ModTime_Call struct {
	*mock.Call
}

FileInfo_ModTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ModTime'

func (*FileInfo_ModTime_Call) Return added in v6.19.0

func (*FileInfo_ModTime_Call) Run added in v6.19.0

func (_c *FileInfo_ModTime_Call) Run(run func()) *FileInfo_ModTime_Call

func (*FileInfo_ModTime_Call) RunAndReturn added in v6.19.0

func (_c *FileInfo_ModTime_Call) RunAndReturn(run func() time.Time) *FileInfo_ModTime_Call

type FileInfo_Mode_Call added in v6.19.0

type FileInfo_Mode_Call struct {
	*mock.Call
}

FileInfo_Mode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Mode'

func (*FileInfo_Mode_Call) Return added in v6.19.0

func (*FileInfo_Mode_Call) Run added in v6.19.0

func (_c *FileInfo_Mode_Call) Run(run func()) *FileInfo_Mode_Call

func (*FileInfo_Mode_Call) RunAndReturn added in v6.19.0

func (_c *FileInfo_Mode_Call) RunAndReturn(run func() fs.FileMode) *FileInfo_Mode_Call

type FileInfo_Name_Call added in v6.19.0

type FileInfo_Name_Call struct {
	*mock.Call
}

FileInfo_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'

func (*FileInfo_Name_Call) Return added in v6.19.0

func (_c *FileInfo_Name_Call) Return(_a0 string) *FileInfo_Name_Call

func (*FileInfo_Name_Call) Run added in v6.19.0

func (_c *FileInfo_Name_Call) Run(run func()) *FileInfo_Name_Call

func (*FileInfo_Name_Call) RunAndReturn added in v6.19.0

func (_c *FileInfo_Name_Call) RunAndReturn(run func() string) *FileInfo_Name_Call

type FileInfo_Size_Call added in v6.19.0

type FileInfo_Size_Call struct {
	*mock.Call
}

FileInfo_Size_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Size'

func (*FileInfo_Size_Call) Return added in v6.19.0

func (_c *FileInfo_Size_Call) Return(_a0 int64) *FileInfo_Size_Call

func (*FileInfo_Size_Call) Run added in v6.19.0

func (_c *FileInfo_Size_Call) Run(run func()) *FileInfo_Size_Call

func (*FileInfo_Size_Call) RunAndReturn added in v6.19.0

func (_c *FileInfo_Size_Call) RunAndReturn(run func() int64) *FileInfo_Size_Call

type FileInfo_Sys_Call added in v6.19.0

type FileInfo_Sys_Call struct {
	*mock.Call
}

FileInfo_Sys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sys'

func (*FileInfo_Sys_Call) Return added in v6.19.0

func (_c *FileInfo_Sys_Call) Return(_a0 any) *FileInfo_Sys_Call

func (*FileInfo_Sys_Call) Run added in v6.19.0

func (_c *FileInfo_Sys_Call) Run(run func()) *FileInfo_Sys_Call

func (*FileInfo_Sys_Call) RunAndReturn added in v6.19.0

func (_c *FileInfo_Sys_Call) RunAndReturn(run func() any) *FileInfo_Sys_Call

type ReadWriteSeekCloser added in v6.19.0

type ReadWriteSeekCloser struct {
	mock.Mock
}

ReadWriteSeekCloser is an autogenerated mock type for the ReadWriteSeekCloser type

func NewReadWriteSeekCloser added in v6.19.0

func NewReadWriteSeekCloser(t interface {
	mock.TestingT
	Cleanup(func())
}) *ReadWriteSeekCloser

NewReadWriteSeekCloser creates a new instance of ReadWriteSeekCloser. 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 (*ReadWriteSeekCloser) Close added in v6.19.0

func (_m *ReadWriteSeekCloser) Close() error

Close provides a mock function with given fields:

func (*ReadWriteSeekCloser) EXPECT added in v6.19.0

func (*ReadWriteSeekCloser) Read added in v6.19.0

func (_m *ReadWriteSeekCloser) Read(p []byte) (int, error)

Read provides a mock function with given fields: p

func (*ReadWriteSeekCloser) Seek added in v6.19.0

func (_m *ReadWriteSeekCloser) Seek(offset int64, whence int) (int64, error)

Seek provides a mock function with given fields: offset, whence

func (*ReadWriteSeekCloser) Write added in v6.19.0

func (_m *ReadWriteSeekCloser) Write(p []byte) (int, error)

Write provides a mock function with given fields: p

type ReadWriteSeekCloser_Close_Call added in v6.19.0

type ReadWriteSeekCloser_Close_Call struct {
	*mock.Call
}

ReadWriteSeekCloser_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*ReadWriteSeekCloser_Close_Call) Return added in v6.19.0

func (*ReadWriteSeekCloser_Close_Call) Run added in v6.19.0

func (*ReadWriteSeekCloser_Close_Call) RunAndReturn added in v6.19.0

type ReadWriteSeekCloser_Expecter added in v6.19.0

type ReadWriteSeekCloser_Expecter struct {
	// contains filtered or unexported fields
}

func (*ReadWriteSeekCloser_Expecter) Close added in v6.19.0

Close is a helper method to define mock.On call

func (*ReadWriteSeekCloser_Expecter) Read added in v6.19.0

Read is a helper method to define mock.On call

  • p []byte

func (*ReadWriteSeekCloser_Expecter) Seek added in v6.19.0

func (_e *ReadWriteSeekCloser_Expecter) Seek(offset interface{}, whence interface{}) *ReadWriteSeekCloser_Seek_Call

Seek is a helper method to define mock.On call

  • offset int64
  • whence int

func (*ReadWriteSeekCloser_Expecter) Write added in v6.19.0

Write is a helper method to define mock.On call

  • p []byte

type ReadWriteSeekCloser_Read_Call added in v6.19.0

type ReadWriteSeekCloser_Read_Call struct {
	*mock.Call
}

ReadWriteSeekCloser_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read'

func (*ReadWriteSeekCloser_Read_Call) Return added in v6.19.0

func (*ReadWriteSeekCloser_Read_Call) Run added in v6.19.0

func (*ReadWriteSeekCloser_Read_Call) RunAndReturn added in v6.19.0

func (_c *ReadWriteSeekCloser_Read_Call) RunAndReturn(run func([]byte) (int, error)) *ReadWriteSeekCloser_Read_Call

type ReadWriteSeekCloser_Seek_Call added in v6.19.0

type ReadWriteSeekCloser_Seek_Call struct {
	*mock.Call
}

ReadWriteSeekCloser_Seek_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Seek'

func (*ReadWriteSeekCloser_Seek_Call) Return added in v6.19.0

func (*ReadWriteSeekCloser_Seek_Call) Run added in v6.19.0

func (_c *ReadWriteSeekCloser_Seek_Call) Run(run func(offset int64, whence int)) *ReadWriteSeekCloser_Seek_Call

func (*ReadWriteSeekCloser_Seek_Call) RunAndReturn added in v6.19.0

type ReadWriteSeekCloser_Write_Call added in v6.19.0

type ReadWriteSeekCloser_Write_Call struct {
	*mock.Call
}

ReadWriteSeekCloser_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write'

func (*ReadWriteSeekCloser_Write_Call) Return added in v6.19.0

func (*ReadWriteSeekCloser_Write_Call) Run added in v6.19.0

func (*ReadWriteSeekCloser_Write_Call) RunAndReturn added in v6.19.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL