Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeServer ¶
type FakeServer struct {
// contains filtered or unexported fields
}
FakeServer allows setting up HTTP handlers for testing purposes
func NewFakeServer ¶
func NewFakeServer(responses map[string]Payload) *FakeServer
NewFakeServer creates new instance of fake server
func (*FakeServer) AddResponse ¶
func (s *FakeServer) AddResponse(method string, path string, requestBody map[string]interface{}, responseBody map[string]interface{}, responseCode int)
AddResponse adds a response mapping
func (*FakeServer) DisableDebug ¶
func (s *FakeServer) DisableDebug()
DisableDebug disables debugging
func (*FakeServer) ServeHTTP ¶
func (s *FakeServer) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP implements http.Handler interface
Click to show internal directories.
Click to hide internal directories.