Documentation ¶
Index ¶
- type Server
- func (s *Server) Close()
- func (s *Server) GetAddressAndPort() (address string, port int, err error)
- func (s *Server) SetResponse(status int, body string)
- func (s *Server) SetResponseForPath(path string, status int, body string)
- func (s *Server) SetResponseJson(status int, v interface{})
- func (s *Server) SetResponseJsonForPath(path string, status int, v interface{})
- type ServerResponseData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { HttpServer *httptest.Server DefaultResponse *ServerResponseData Responses map[string]*ServerResponseData }
func NewTestServer ¶
func NewTestServer() (server *Server)
func NewTlsTestServer ¶
func NewTlsTestServer() (server *Server)
func (*Server) GetAddressAndPort ¶
func (*Server) SetResponse ¶
func (*Server) SetResponseForPath ¶
func (*Server) SetResponseJson ¶
func (*Server) SetResponseJsonForPath ¶
type ServerResponseData ¶
Click to show internal directories.
Click to hide internal directories.