mocks

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 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

func NewClient(t NewClientT) *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.

func (*Client) Call

func (_m *Client) Call(request *http.Request, structure interface{}) (*models.ResponseScheme, error)

Call provides a mock function with given fields: request, structure

func (*Client) NewFormRequest

func (_m *Client) NewFormRequest(ctx context.Context, method string, apiEndpoint string, contentType string, payload io.Reader) (*http.Request, error)

NewFormRequest provides a mock function with given fields: ctx, method, apiEndpoint, contentType, payload

func (*Client) NewRequest

func (_m *Client) NewRequest(ctx context.Context, method string, apiEndpoint string, payload io.Reader) (*http.Request, error)

NewRequest provides a mock function with given fields: ctx, method, apiEndpoint, payload

func (*Client) TransformStructToReader

func (_m *Client) TransformStructToReader(structure interface{}) (io.Reader, error)

TransformStructToReader provides a mock function with given fields: structure

func (*Client) TransformTheHTTPResponse

func (_m *Client) TransformTheHTTPResponse(response *http.Response, structure interface{}) (*models.ResponseScheme, error)

TransformTheHTTPResponse provides a mock function with given fields: response, structure

type HttpClient

type HttpClient struct {
	mock.Mock
}

HttpClient is an autogenerated mock type for the HttpClient type

func NewHttpClient

func NewHttpClient(t NewHttpClientT) *HttpClient

NewHttpClient creates a new instance of HttpClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*HttpClient) Do

func (_m *HttpClient) Do(request *http.Request) (*http.Response, error)

Do provides a mock function with given fields: request

type NewClientT

type NewClientT interface {
	mock.TestingT
	Cleanup(func())
}

type NewHttpClientT

type NewHttpClientT interface {
	mock.TestingT
	Cleanup(func())
}

Jump to

Keyboard shortcuts

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