mocks

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockStorage

type MockStorage struct {
	mock.Mock
}

MockStorage is an autogenerated mock type for the Storage type

func NewMockStorage

func NewMockStorage(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStorage

NewMockStorage creates a new instance of MockStorage. 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 (*MockStorage) Delete

func (_mock *MockStorage) Delete(filePath string) error

Delete provides a mock function for the type MockStorage

func (*MockStorage) EXPECT

func (_m *MockStorage) EXPECT() *MockStorage_Expecter

func (*MockStorage) GetURL

func (_mock *MockStorage) GetURL(filePath string) string

GetURL provides a mock function for the type MockStorage

func (*MockStorage) Open added in v1.1.3

func (_mock *MockStorage) Open(filePath string) (io.ReadCloser, error)

Open provides a mock function for the type MockStorage

func (*MockStorage) Save

func (_mock *MockStorage) Save(filename string, reader io.Reader) (string, error)

Save provides a mock function for the type MockStorage

type MockStorage_Delete_Call

type MockStorage_Delete_Call struct {
	*mock.Call
}

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

func (*MockStorage_Delete_Call) Return

func (*MockStorage_Delete_Call) Run

func (_c *MockStorage_Delete_Call) Run(run func(filePath string)) *MockStorage_Delete_Call

func (*MockStorage_Delete_Call) RunAndReturn

func (_c *MockStorage_Delete_Call) RunAndReturn(run func(filePath string) error) *MockStorage_Delete_Call

type MockStorage_Expecter

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

func (*MockStorage_Expecter) Delete

func (_e *MockStorage_Expecter) Delete(filePath any) *MockStorage_Delete_Call

Delete is a helper method to define mock.On call

  • filePath string

func (*MockStorage_Expecter) GetURL

func (_e *MockStorage_Expecter) GetURL(filePath any) *MockStorage_GetURL_Call

GetURL is a helper method to define mock.On call

  • filePath string

func (*MockStorage_Expecter) Open added in v1.1.3

func (_e *MockStorage_Expecter) Open(filePath any) *MockStorage_Open_Call

Open is a helper method to define mock.On call

  • filePath string

func (*MockStorage_Expecter) Save

func (_e *MockStorage_Expecter) Save(filename any, reader any) *MockStorage_Save_Call

Save is a helper method to define mock.On call

  • filename string
  • reader io.Reader

type MockStorage_GetURL_Call

type MockStorage_GetURL_Call struct {
	*mock.Call
}

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

func (*MockStorage_GetURL_Call) Return

func (*MockStorage_GetURL_Call) Run

func (_c *MockStorage_GetURL_Call) Run(run func(filePath string)) *MockStorage_GetURL_Call

func (*MockStorage_GetURL_Call) RunAndReturn

func (_c *MockStorage_GetURL_Call) RunAndReturn(run func(filePath string) string) *MockStorage_GetURL_Call

type MockStorage_Open_Call added in v1.1.3

type MockStorage_Open_Call struct {
	*mock.Call
}

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

func (*MockStorage_Open_Call) Return added in v1.1.3

func (_c *MockStorage_Open_Call) Return(readCloser io.ReadCloser, err error) *MockStorage_Open_Call

func (*MockStorage_Open_Call) Run added in v1.1.3

func (_c *MockStorage_Open_Call) Run(run func(filePath string)) *MockStorage_Open_Call

func (*MockStorage_Open_Call) RunAndReturn added in v1.1.3

func (_c *MockStorage_Open_Call) RunAndReturn(run func(filePath string) (io.ReadCloser, error)) *MockStorage_Open_Call

type MockStorage_Save_Call

type MockStorage_Save_Call struct {
	*mock.Call
}

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

func (*MockStorage_Save_Call) Return

func (*MockStorage_Save_Call) Run

func (_c *MockStorage_Save_Call) Run(run func(filename string, reader io.Reader)) *MockStorage_Save_Call

func (*MockStorage_Save_Call) RunAndReturn

func (_c *MockStorage_Save_Call) RunAndReturn(run func(filename string, reader io.Reader) (string, error)) *MockStorage_Save_Call

Jump to

Keyboard shortcuts

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