httpx

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package httpx is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientItf

type ClientItf interface {
	// Do sends http request and returns the response.
	Do(req *http.Request) (*http.Response, error)
}

ClientItf is a http client.

type Dummy

type Dummy struct {
	ReadErr  error
	CloseErr error
}

Dummy is a dummy that implement io.ReadCloser interface to mock response body.

func NewDummy

func NewDummy(err error) *Dummy

NewDummy returns a dummy http.

func (*Dummy) Close

func (d *Dummy) Close() error

Close return response based on CloseErr.

func (*Dummy) Read

func (d *Dummy) Read([]byte) (n int, err error)

Read return response based on ReadErr.

type MockClientItf

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

MockClientItf is a mock of ClientItf interface.

func NewMockClientItf

func NewMockClientItf(ctrl *gomock.Controller) *MockClientItf

NewMockClientItf creates a new mock instance.

func (*MockClientItf) Do

func (m *MockClientItf) Do(req *http.Request) (*http.Response, error)

Do mocks base method.

func (*MockClientItf) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockClientItfMockRecorder

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

MockClientItfMockRecorder is the mock recorder for MockClientItf.

func (*MockClientItfMockRecorder) Do

func (mr *MockClientItfMockRecorder) Do(req interface{}) *gomock.Call

Do indicates an expected call of Do.

type MockReadCloserItf

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

MockReadCloserItf is a mock of ReadCloserItf interface.

func NewMockReadCloserItf

func NewMockReadCloserItf(ctrl *gomock.Controller) *MockReadCloserItf

NewMockReadCloserItf creates a new mock instance.

func (*MockReadCloserItf) Close

func (m *MockReadCloserItf) Close() error

Close mocks base method.

func (*MockReadCloserItf) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockReadCloserItf) Read

func (m *MockReadCloserItf) Read(arg0 []byte) (int, error)

Read mocks base method.

type MockReadCloserItfMockRecorder

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

MockReadCloserItfMockRecorder is the mock recorder for MockReadCloserItf.

func (*MockReadCloserItfMockRecorder) Close

Close indicates an expected call of Close.

func (*MockReadCloserItfMockRecorder) Read

func (mr *MockReadCloserItfMockRecorder) Read(arg0 interface{}) *gomock.Call

Read indicates an expected call of Read.

type ReadCloserItf

type ReadCloserItf interface {
	Read([]byte) (n int, err error)
	Close() error
}

ReadCloserItf is interface for io.ReadCloser.

Directories

Path Synopsis
mux

Jump to

Keyboard shortcuts

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