Help us shape the future of Go! Take the 2026 Go Developer Survey

mocks

package
v2.52.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	mock.Mock
}

Storage is an autogenerated mock type for the Storage type

func NewStorage

func NewStorage(t interface {
	mock.TestingT
	Cleanup(func())
}) *Storage

NewStorage creates a new instance of Storage. 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 (*Storage) Backend

func (_m *Storage) Backend() string

Backend provides a mock function with no fields

func (_m *Storage) CreateSymlink(ctx context.Context, oldname string, newname string) error

CreateSymlink provides a mock function with given fields: ctx, oldname, newname

func (*Storage) Delete

func (_m *Storage) Delete(ctx context.Context, path string) error

Delete provides a mock function with given fields: ctx, path

func (*Storage) Download

Download provides a mock function with given fields: ctx, req

func (*Storage) EXPECT

func (_m *Storage) EXPECT() *Storage_Expecter

func (*Storage) Init

func (_m *Storage) Init(ctx context.Context, name string) error

Init provides a mock function with given fields: ctx, name

func (*Storage) ListDir

func (_m *Storage) ListDir(ctx context.Context, path string) ([]*providerv1beta1.ResourceInfo, error)

ListDir provides a mock function with given fields: ctx, path

func (*Storage) MakeDirIfNotExist

func (_m *Storage) MakeDirIfNotExist(ctx context.Context, name string) error

MakeDirIfNotExist provides a mock function with given fields: ctx, name

func (*Storage) ReadDir

func (_m *Storage) ReadDir(ctx context.Context, path string) ([]string, error)

ReadDir provides a mock function with given fields: ctx, path

func (_m *Storage) ResolveSymlink(ctx context.Context, name string) (string, error)

ResolveSymlink provides a mock function with given fields: ctx, name

func (*Storage) SimpleDownload

func (_m *Storage) SimpleDownload(ctx context.Context, path string) ([]byte, error)

SimpleDownload provides a mock function with given fields: ctx, path

func (*Storage) SimpleUpload

func (_m *Storage) SimpleUpload(ctx context.Context, uploadpath string, content []byte) error

SimpleUpload provides a mock function with given fields: ctx, uploadpath, content

func (*Storage) Stat

Stat provides a mock function with given fields: ctx, path

func (*Storage) Upload

Upload provides a mock function with given fields: ctx, req

type Storage_Backend_Call

type Storage_Backend_Call struct {
	*mock.Call
}

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

func (*Storage_Backend_Call) Return

func (*Storage_Backend_Call) Run

func (_c *Storage_Backend_Call) Run(run func()) *Storage_Backend_Call

func (*Storage_Backend_Call) RunAndReturn

func (_c *Storage_Backend_Call) RunAndReturn(run func() string) *Storage_Backend_Call
type Storage_CreateSymlink_Call struct {
	*mock.Call
}

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

func (_c *Storage_CreateSymlink_Call) Run(run func(ctx context.Context, oldname string, newname string)) *Storage_CreateSymlink_Call

type Storage_Delete_Call

type Storage_Delete_Call struct {
	*mock.Call
}

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

func (*Storage_Delete_Call) Return

func (*Storage_Delete_Call) Run

func (_c *Storage_Delete_Call) Run(run func(ctx context.Context, path string)) *Storage_Delete_Call

func (*Storage_Delete_Call) RunAndReturn

func (_c *Storage_Delete_Call) RunAndReturn(run func(context.Context, string) error) *Storage_Delete_Call

type Storage_Download_Call

type Storage_Download_Call struct {
	*mock.Call
}

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

func (*Storage_Download_Call) Return

func (*Storage_Download_Call) Run

func (*Storage_Download_Call) RunAndReturn

type Storage_Expecter

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

func (*Storage_Expecter) Backend

func (_e *Storage_Expecter) Backend() *Storage_Backend_Call

Backend is a helper method to define mock.On call

func (_e *Storage_Expecter) CreateSymlink(ctx interface{}, oldname interface{}, newname interface{}) *Storage_CreateSymlink_Call

CreateSymlink is a helper method to define mock.On call

  • ctx context.Context
  • oldname string
  • newname string

func (*Storage_Expecter) Delete

func (_e *Storage_Expecter) Delete(ctx interface{}, path interface{}) *Storage_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • path string

func (*Storage_Expecter) Download

func (_e *Storage_Expecter) Download(ctx interface{}, req interface{}) *Storage_Download_Call

Download is a helper method to define mock.On call

  • ctx context.Context
  • req metadata.DownloadRequest

func (*Storage_Expecter) Init

func (_e *Storage_Expecter) Init(ctx interface{}, name interface{}) *Storage_Init_Call

Init is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*Storage_Expecter) ListDir

func (_e *Storage_Expecter) ListDir(ctx interface{}, path interface{}) *Storage_ListDir_Call

ListDir is a helper method to define mock.On call

  • ctx context.Context
  • path string

func (*Storage_Expecter) MakeDirIfNotExist

func (_e *Storage_Expecter) MakeDirIfNotExist(ctx interface{}, name interface{}) *Storage_MakeDirIfNotExist_Call

MakeDirIfNotExist is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*Storage_Expecter) ReadDir

func (_e *Storage_Expecter) ReadDir(ctx interface{}, path interface{}) *Storage_ReadDir_Call

ReadDir is a helper method to define mock.On call

  • ctx context.Context
  • path string
func (_e *Storage_Expecter) ResolveSymlink(ctx interface{}, name interface{}) *Storage_ResolveSymlink_Call

ResolveSymlink is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*Storage_Expecter) SimpleDownload

func (_e *Storage_Expecter) SimpleDownload(ctx interface{}, path interface{}) *Storage_SimpleDownload_Call

SimpleDownload is a helper method to define mock.On call

  • ctx context.Context
  • path string

func (*Storage_Expecter) SimpleUpload

func (_e *Storage_Expecter) SimpleUpload(ctx interface{}, uploadpath interface{}, content interface{}) *Storage_SimpleUpload_Call

SimpleUpload is a helper method to define mock.On call

  • ctx context.Context
  • uploadpath string
  • content []byte

func (*Storage_Expecter) Stat

func (_e *Storage_Expecter) Stat(ctx interface{}, path interface{}) *Storage_Stat_Call

Stat is a helper method to define mock.On call

  • ctx context.Context
  • path string

func (*Storage_Expecter) Upload

func (_e *Storage_Expecter) Upload(ctx interface{}, req interface{}) *Storage_Upload_Call

Upload is a helper method to define mock.On call

  • ctx context.Context
  • req metadata.UploadRequest

type Storage_Init_Call

type Storage_Init_Call struct {
	*mock.Call
}

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

func (*Storage_Init_Call) Return

func (_c *Storage_Init_Call) Return(err error) *Storage_Init_Call

func (*Storage_Init_Call) Run

func (_c *Storage_Init_Call) Run(run func(ctx context.Context, name string)) *Storage_Init_Call

func (*Storage_Init_Call) RunAndReturn

func (_c *Storage_Init_Call) RunAndReturn(run func(context.Context, string) error) *Storage_Init_Call

type Storage_ListDir_Call

type Storage_ListDir_Call struct {
	*mock.Call
}

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

func (*Storage_ListDir_Call) Return

func (*Storage_ListDir_Call) Run

func (_c *Storage_ListDir_Call) Run(run func(ctx context.Context, path string)) *Storage_ListDir_Call

func (*Storage_ListDir_Call) RunAndReturn

type Storage_MakeDirIfNotExist_Call

type Storage_MakeDirIfNotExist_Call struct {
	*mock.Call
}

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

func (*Storage_MakeDirIfNotExist_Call) Return

func (*Storage_MakeDirIfNotExist_Call) Run

func (*Storage_MakeDirIfNotExist_Call) RunAndReturn

type Storage_ReadDir_Call

type Storage_ReadDir_Call struct {
	*mock.Call
}

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

func (*Storage_ReadDir_Call) Return

func (_c *Storage_ReadDir_Call) Return(_a0 []string, _a1 error) *Storage_ReadDir_Call

func (*Storage_ReadDir_Call) Run

func (_c *Storage_ReadDir_Call) Run(run func(ctx context.Context, path string)) *Storage_ReadDir_Call

func (*Storage_ReadDir_Call) RunAndReturn

func (_c *Storage_ReadDir_Call) RunAndReturn(run func(context.Context, string) ([]string, error)) *Storage_ReadDir_Call
type Storage_ResolveSymlink_Call struct {
	*mock.Call
}

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

type Storage_SimpleDownload_Call

type Storage_SimpleDownload_Call struct {
	*mock.Call
}

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

func (*Storage_SimpleDownload_Call) Return

func (*Storage_SimpleDownload_Call) Run

func (*Storage_SimpleDownload_Call) RunAndReturn

type Storage_SimpleUpload_Call

type Storage_SimpleUpload_Call struct {
	*mock.Call
}

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

func (*Storage_SimpleUpload_Call) Return

func (*Storage_SimpleUpload_Call) Run

func (_c *Storage_SimpleUpload_Call) Run(run func(ctx context.Context, uploadpath string, content []byte)) *Storage_SimpleUpload_Call

func (*Storage_SimpleUpload_Call) RunAndReturn

type Storage_Stat_Call

type Storage_Stat_Call struct {
	*mock.Call
}

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

func (*Storage_Stat_Call) Return

func (*Storage_Stat_Call) Run

func (_c *Storage_Stat_Call) Run(run func(ctx context.Context, path string)) *Storage_Stat_Call

func (*Storage_Stat_Call) RunAndReturn

type Storage_Upload_Call

type Storage_Upload_Call struct {
	*mock.Call
}

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

func (*Storage_Upload_Call) Return

func (*Storage_Upload_Call) Run

func (*Storage_Upload_Call) RunAndReturn

Jump to

Keyboard shortcuts

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