mocks

package
v0.0.0-...-c0d1a14 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNoOpHandler

func NewNoOpHandler() http.Handler

Types

type MockHTTPHandler

type MockHTTPHandler struct {
	mock.Mock
}

func (*MockHTTPHandler) ServeHTTP

func (m *MockHTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ReaderFailureMock

type ReaderFailureMock struct{}

func (*ReaderFailureMock) Read

func (r *ReaderFailureMock) Read(p []byte) (int, error)

type ReaderMock

type ReaderMock struct {
	PayloadSize    int
	ReadTotal      int
	WaitBeforeRead time.Duration
}

func (*ReaderMock) Read

func (r *ReaderMock) Read(p []byte) (int, error)

type ResponseWriterMock

type ResponseWriterMock struct {
	io.Writer
}

func (*ResponseWriterMock) Flush

func (w *ResponseWriterMock) Flush()

func (*ResponseWriterMock) Header

func (w *ResponseWriterMock) Header() http.Header

func (*ResponseWriterMock) WriteHeader

func (w *ResponseWriterMock) WriteHeader(int)

type WriterFailureMock

type WriterFailureMock struct{}

func (*WriterFailureMock) Write

func (w *WriterFailureMock) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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