mock

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSeed = errors.New("invalid $__uncors__seed parameter")
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 WithGenerator added in v0.4.0

func WithGenerator(generator fakedata.Generator) 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