# Functions
AdaptStandardHandler allows an http.Hander to be used as an httpx.Handler.
BoolValidator enforces that all input values are parsable as a boolean.
ClientIP attempts to extract the IP address of the user agent from the request.
GenerateID creates a globally unique string for the request.
GetRequest returns a Request instance from the shared pool, ready for (re)use.
HTTPListenerForAddress returns a TCP listener for the given address.
No description provided by the author
No description provided by the author
NewFakeHandlerDefaultError returns an instance of FakeHandler with all hooks configured to call t.Error.
NewFakeHandlerDefaultFatal returns an instance of FakeHandler with all hooks configured to call t.Fatal.
NewFakeHandlerDefaultPanic returns an instance of FakeHandler with all hooks configured to panic.
NewFakeResponseDefaultError returns an instance of FakeResponse with all hooks configured to call t.Error.
NewFakeResponseDefaultFatal returns an instance of FakeResponse with all hooks configured to call t.Fatal.
NewFakeResponseDefaultPanic returns an instance of FakeResponse with all hooks configured to panic.
No description provided by the author
No description provided by the author
NewResponseSerializeInvocation creates a new instance of ResponseSerializeInvocation.
No description provided by the author
No description provided by the author
PutRequest returns the given Request back to the shared pool.
WriteResponse serializes a response instance to the ResponseWriter.
# Constants
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
FakeHandler is a mock implementation of Handler for testing.
FakeResponse is a mock implementation of Response for testing.
FixedStringValidator enforces that all input values match a fixed string.
HandlerServeHTTPInvocation represents a single call of FakeHandler.ServeHTTP.
IntValidator enforces that all input values are parsable as integers.
No description provided by the author
ParameterSchema is the schema to validate a query parameter or request.
PathParameter is a single URL path parameter.
QueryParameter is a single URL query parameter passed to an endpoint.
RegexValidator enforces that all input values match the given regular expression.
No description provided by the author
ResponseAdapter is an adapter for `http.Response` to the `Response` interface.
ResponseErrInvocation represents a single call of FakeResponse.Err.
ResponseHeadersInvocation represents a single call of FakeResponse.Headers.
ResponseInterceptor implements `http.ResponseWriter` to capture the outgoing response status code and size.
ResponseSerializeInvocation represents a single call of FakeResponse.Serialize.
ResponseSnapshot captures details about the response sent to the user agent.
ResponseStatusCodeInvocation represents a single call of FakeResponse.StatusCode.
ResponseTrailersInvocation represents a single call of FakeResponse.Trailers.
StringSliceValidator enforces that all input values match at least one of the given strings.
StringValidator enforces that all input values have a certain length.
TimestampValidator enforces that all input values are parsable as a timestamp with a certain format.
UIntValidator enforces that all input values are parsable as uints.
# Interfaces
HandlerTestingT represents the methods of "testing".T used by charlatan Fakes.
No description provided by the author
ResponseTestingT represents the methods of "testing".T used by charlatan Fakes.
No description provided by the author
# Type aliases
No description provided by the author
ErrorHandler creates a response for the given error condition.
No description provided by the author
Handler is a block of logic to apply to a request.
RequestPredicate examines the given context and request and returns a determination based on that analysis.
StringExtractor is a function type that extracts a string from the given `context.Context` and `*httpx.Request`.
Validator ensures that the given strings all meet certain criteria.