Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayedResponseWriter ¶
type DelayedResponseWriter struct { http.ResponseWriter Delay time.Duration }
type MockServer ¶
func New ¶
func New(spec Specification) (m MockServer)
type Specification ¶
type Specification struct { Name string `yaml:"name"` Port int `yaml:"port"` Rules []SpecificationRule `yaml:"rules"` }
type SpecificationRule ¶
type SpecificationRule struct { Accept string `yaml:"accept"` UseOrigin string `yaml:"use_origin"` MockResponse struct { Status int `yaml:"status"` Body string `yaml:"body"` Headers map[string]string `yaml:"header"` } `yaml:"mock_response"` MockLatency SpecificationRuleLatency `yaml:"mock_latency"` }
Click to show internal directories.
Click to hide internal directories.