Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
NewHandler returns a handler sending mock responses.
Types ¶
type HTTP ¶
type HTTP struct{}
HTTP is a protocol type for the mock.
func (*HTTP) NewServer ¶
func (_ *HTTP) NewServer(iter *protocol.MockIterator, l logger.Logger, config interface{}) (protocol.Server, error)
NewServer implements protocol.Protocol interface.
func (HTTP) UnmarshalConfig ¶
UnmarshalConfig implements protocol.Protocol interface.
type HTTPResponse ¶
type HTTPResponse httpprotocol.Expect
HTTPResponse represents an HTTP response.
func (*HTTPResponse) Write ¶
func (resp *HTTPResponse) Write(w http.ResponseWriter) error
Write writes header and body.
type ServerConfig ¶
type ServerConfig struct {
Port int `yaml:"port,omitempty"`
}
ServerConfig represents a server configuration.
Click to show internal directories.
Click to hide internal directories.