mock

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrResponseIsNotDefined = errors.New("response is not defined")

Functions

This section is empty.

Types

type Handler added in v0.2.0

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

func NewMockHandler added in v0.2.0

func NewMockHandler(options ...HandlerOption) *Handler

func (*Handler) ServeHTTP added in v0.2.0

func (h *Handler) ServeHTTP(writer contracts.ResponseWriter, request *contracts.Request)

type HandlerOption added in v0.2.0

type HandlerOption = func(*Handler)

func WithAfter

func WithAfter(after func(duration time.Duration) <-chan time.Time) HandlerOption

func WithFileSystem

func WithFileSystem(fs afero.Fs) HandlerOption

func WithLogger

func WithLogger(logger contracts.Logger) HandlerOption

func WithResponse

func WithResponse(response config.Response) HandlerOption

Jump to

Keyboard shortcuts

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