Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var METHODS_ALL = []string{ http.MethodDelete, http.MethodGet, http.MethodPatch, http.MethodPost, http.MethodPut, }
Functions ¶
This section is empty.
Types ¶
type HTTPServer ¶
type HTTPServer struct { Port string PathToMockId map[string]string // contains filtered or unexported fields }
HTTPServer represents a http server struct
func NewHTTPServer ¶
func NewHTTPServer( port string, ssl SSL, workingDirectory string, totalNumberRequestsAllowed int, mocker internal.Mocker, logger logsutil.Logger, version string) *HTTPServer
NewHTTPServer creates and initializes a {HTTPServer} struct
func (HTTPServer) Listen ¶
func (s HTTPServer) Listen() error
Listen creates the http server and dispatches the incoming requests
type MockedRequestLightWithLinks ¶
type MockedRequestLightWithLinks struct { internal.MockedRequestLight Links map[string]string `json:"_links,omitempty"` }
type Response ¶
type Response struct { ResponseWriter http.ResponseWriter DelayMax time.Duration }
Response represents a {http.ResponseWriter} from the HTTP request
func NewResponse ¶
func NewResponse(responseWriter http.ResponseWriter, delayMax string) Response
NewResponse creates and initializes a {Response} struct
Click to show internal directories.
Click to hide internal directories.