package
0.0.0-20250227233008-6305ea83e4e1
Repository: https://github.com/bhatti/api-mock-service.git
Documentation: pkg.go.dev
# Functions
BuildMockScenarioKeyData creates api-scenario key from HTTP request.
GetHeaderParamOrEnvValue searches key in map or env variables.
No description provided by the author
NewAuthAdapter constructor.
NewAWSSigner constructor.
NewDefaultAPIContext constructor.
NewDefaultWebServer creates new instance of web server.
NewHTTPClient creates structure for HTTPClient.
NewStubContext - creates stubbed server.
NewStubHTTPClient - creates structure for HTTPClient.
NewStubHTTPResponse creates stubbed response.
NewStubHTTPResponseError creates stubbed response with error.
NewStubWebServer creates stubbed web server.
NewWebServerAdapter constructor.
WrapHandler wraps `http.Handler` into `echo.HandlerFunc`.
# Constants
AWSAccessKey constant.
AWSSecretKey constant.
AWSSecurityToken constant.
AWSSessionToken constant.
# Variables
IgnoredRequestHeaders headers.
# Structs
DefaultAPIContext struct for defining APIContext using http request/response.
DefaultHTTPClient implements HTTPClient.
DefaultWebServer defines default web server.
MethodPathHandler mapping.
ServerAdapter struct.
StubHTTPClient implements HTTPClient for stubbed response.
StubHTTPResponse defines stub response.
StubResponseWriter wraps the standard http.ResponseWriter allowing for more verbose logging.
No description provided by the author
No description provided by the author
# Interfaces
Adapter defines methods to delegate HTTP APIs.
APIContext interface.
AuthAdapter is an interface to make testing http.Client calls easier.
AWSSigner is an interface to make testing http.Client calls easier.
HTTPClient defines methods for http get and post methods.
Server defines methods for binding http methods.
# Type aliases
HandlerFunc defines a function to serve HTTP requests.