mocks

package
v0.0.0-...-96ff8f7 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. 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 (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) Get

func (_m *MockClient) Get(uri string) ([]byte, error)

Get provides a mock function with given fields: uri

func (*MockClient) Post

func (_m *MockClient) Post(uri string, body interface{}) ([]byte, error)

Post provides a mock function with given fields: uri, body

type MockClient_Expecter

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

func (*MockClient_Expecter) Get

func (_e *MockClient_Expecter) Get(uri interface{}) *MockClient_Get_Call

Get is a helper method to define mock.On call

  • uri string

func (*MockClient_Expecter) Post

func (_e *MockClient_Expecter) Post(uri interface{}, body interface{}) *MockClient_Post_Call

Post is a helper method to define mock.On call

  • uri string
  • body interface{}

type MockClient_Get_Call

type MockClient_Get_Call struct {
	*mock.Call
}

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

func (*MockClient_Get_Call) Return

func (_c *MockClient_Get_Call) Return(_a0 []byte, _a1 error) *MockClient_Get_Call

func (*MockClient_Get_Call) Run

func (_c *MockClient_Get_Call) Run(run func(uri string)) *MockClient_Get_Call

func (*MockClient_Get_Call) RunAndReturn

func (_c *MockClient_Get_Call) RunAndReturn(run func(string) ([]byte, error)) *MockClient_Get_Call

type MockClient_Post_Call

type MockClient_Post_Call struct {
	*mock.Call
}

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

func (*MockClient_Post_Call) Return

func (_c *MockClient_Post_Call) Return(_a0 []byte, _a1 error) *MockClient_Post_Call

func (*MockClient_Post_Call) Run

func (_c *MockClient_Post_Call) Run(run func(uri string, body interface{})) *MockClient_Post_Call

func (*MockClient_Post_Call) RunAndReturn

func (_c *MockClient_Post_Call) RunAndReturn(run func(string, interface{}) ([]byte, error)) *MockClient_Post_Call

type MockHttpClient

type MockHttpClient struct {
	mock.Mock
}

MockHttpClient is an autogenerated mock type for the HttpClient type

func NewMockHttpClient

func NewMockHttpClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockHttpClient

NewMockHttpClient creates a new instance of MockHttpClient. 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 (*MockHttpClient) Do

func (_m *MockHttpClient) Do(_a0 *http.Request) (*http.Response, error)

Do provides a mock function with given fields: _a0

func (*MockHttpClient) EXPECT

type MockHttpClient_Do_Call

type MockHttpClient_Do_Call struct {
	*mock.Call
}

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

func (*MockHttpClient_Do_Call) Return

func (*MockHttpClient_Do_Call) Run

func (_c *MockHttpClient_Do_Call) Run(run func(_a0 *http.Request)) *MockHttpClient_Do_Call

func (*MockHttpClient_Do_Call) RunAndReturn

func (_c *MockHttpClient_Do_Call) RunAndReturn(run func(*http.Request) (*http.Response, error)) *MockHttpClient_Do_Call

type MockHttpClient_Expecter

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

func (*MockHttpClient_Expecter) Do

func (_e *MockHttpClient_Expecter) Do(_a0 interface{}) *MockHttpClient_Do_Call

Do is a helper method to define mock.On call

  • _a0 *http.Request

Jump to

Keyboard shortcuts

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