Documentation ¶
Index ¶
- Constants
- func NewRequestHandlerHelper() internal.RequestHandlerHelper
- type BodyMock
- type Client
- type ClientMock
- type MethodType
- type Native
- type NativeMock
- type RequestBroker
- type RequestBrokerMock
- func (_m *RequestBrokerMock) Body(body string) RequestBroker
- func (_m *RequestBrokerMock) CreateRequest(ctx context.Context) (*nethttp.Request, error)
- func (_m *RequestBrokerMock) Delete() RequestBroker
- func (_m *RequestBrokerMock) Do(ctx context.Context) (io.Reader, error)
- func (_m *RequestBrokerMock) DoAndUnmarshal(ctx context.Context, v interface{}) error
- func (_m *RequestBrokerMock) Get() RequestBroker
- func (_m *RequestBrokerMock) Header(key string, value string) RequestBroker
- func (_m *RequestBrokerMock) Post() RequestBroker
- func (_m *RequestBrokerMock) Put() RequestBroker
- func (_m *RequestBrokerMock) Query(key string, value string) RequestBroker
- func (_m *RequestBrokerMock) URL(url string, v ...interface{}) RequestBroker
- type RequestHandler
- type RequestHandlerFunc
Constants ¶
const ( MethodPost = http.MethodPost MethodGet = http.MethodGet MethodPut = http.MethodPut MethodDelete = http.MethodDelete MethodOptions = http.MethodOptions )
Variables ¶
This section is empty.
Functions ¶
func NewRequestHandlerHelper ¶
func NewRequestHandlerHelper() internal.RequestHandlerHelper
Types ¶
type BodyMock ¶
BodyMock is an autogenerated mock type for the ReadCloser type
func NewBodyMock ¶
NewBodyMock creates a new instance of BodyMock. 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.
type Client ¶
type ClientMock ¶
ClientMock is an autogenerated mock type for the Client type
func NewClientMock ¶
func NewClientMock(t interface { mock.TestingT Cleanup(func()) }) *ClientMock
NewClientMock creates a new instance of ClientMock. 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 (*ClientMock) DoAndUnmarshal ¶
func (_m *ClientMock) DoAndUnmarshal(req *nethttp.Request, v interface{}) error
DoAndUnmarshal provides a mock function with given fields: req, v
type MethodType ¶
type MethodType string
type Native ¶
func NewNativeClient ¶
func NewNativeClient() Native
type NativeMock ¶
NativeMock is an autogenerated mock type for the Native type
func NewNativeMock ¶
func NewNativeMock(t interface { mock.TestingT Cleanup(func()) }) *NativeMock
NewNativeMock creates a new instance of NativeMock. 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.
type RequestBroker ¶
type RequestBroker interface { DoAndUnmarshal(ctx context.Context, v interface{}) error Do(ctx context.Context) (io.Reader, error) Post() RequestBroker Get() RequestBroker Put() RequestBroker Delete() RequestBroker URL(url string, v ...any) RequestBroker Query(key string, value string) RequestBroker Header(key string, value string) RequestBroker Body(body string) RequestBroker CreateRequest(ctx context.Context) (*native.Request, error) }
func NewRequest ¶
func NewRequest(client Client) RequestBroker
type RequestBrokerMock ¶
RequestBrokerMock is an autogenerated mock type for the RequestBroker type
func NewRequestBrokerMock ¶
func NewRequestBrokerMock(t interface { mock.TestingT Cleanup(func()) }) *RequestBrokerMock
NewRequestBrokerMock creates a new instance of RequestBrokerMock. 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 (*RequestBrokerMock) Body ¶ added in v2.0.1
func (_m *RequestBrokerMock) Body(body string) RequestBroker
Body provides a mock function with given fields: body
func (*RequestBrokerMock) CreateRequest ¶ added in v2.0.1
CreateRequest provides a mock function with given fields: ctx
func (*RequestBrokerMock) Delete ¶
func (_m *RequestBrokerMock) Delete() RequestBroker
Delete provides a mock function with given fields:
func (*RequestBrokerMock) DoAndUnmarshal ¶ added in v2.0.1
func (_m *RequestBrokerMock) DoAndUnmarshal(ctx context.Context, v interface{}) error
DoAndUnmarshal provides a mock function with given fields: ctx, v
func (*RequestBrokerMock) Get ¶
func (_m *RequestBrokerMock) Get() RequestBroker
Get provides a mock function with given fields:
func (*RequestBrokerMock) Header ¶
func (_m *RequestBrokerMock) Header(key string, value string) RequestBroker
Header provides a mock function with given fields: key, value
func (*RequestBrokerMock) Post ¶
func (_m *RequestBrokerMock) Post() RequestBroker
Post provides a mock function with given fields:
func (*RequestBrokerMock) Put ¶
func (_m *RequestBrokerMock) Put() RequestBroker
Put provides a mock function with given fields:
func (*RequestBrokerMock) Query ¶
func (_m *RequestBrokerMock) Query(key string, value string) RequestBroker
Query provides a mock function with given fields: key, value
func (*RequestBrokerMock) URL ¶ added in v2.0.1
func (_m *RequestBrokerMock) URL(url string, v ...interface{}) RequestBroker
URL provides a mock function with given fields: url, v
type RequestHandler ¶
type RequestHandler interface { Handle(f RequestHandlerFunc) http.HandlerFunc MarshalAndVerify(r *http.Request, dst interface{}) error }
func NewRequestHandler ¶
func NewRequestHandler(helper internal.RequestHandlerHelper) RequestHandler