Documentation ¶
Overview ¶
Package mock provides Mock filter.
Index ¶
Constants ¶
View Source
const (
// Kind is the kind of Mock.
Kind = "Mock"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchRule ¶
type MatchRule struct { Path string `json:"path,omitempty" jsonschema:"omitempty,pattern=^/"` PathPrefix string `json:"pathPrefix,omitempty" jsonschema:"omitempty,pattern=^/"` Headers map[string]*stringtool.StringMatcher `json:"headers" jsonschema:"omitempty"` MatchAllHeaders bool `json:"matchAllHeaders" jsonschema:"omitempty"` }
MatchRule is the rule to match a request
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
Mock is filter Mock.
type Rule ¶
type Rule struct { Match MatchRule `json:"match" jsonschema:"required"` Code int `json:"code" jsonschema:"required,format=httpcode"` Headers map[string]string `json:"headers" jsonschema:"omitempty"` Body string `json:"body" jsonschema:"omitempty"` Delay string `json:"delay" jsonschema:"omitempty,format=duration"` // contains filtered or unexported fields }
Rule is the mock rule.
Click to show internal directories.
Click to hide internal directories.