forked from SpectoLabs/hoverfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simulation_views_v2.go
37 lines (32 loc) · 1.39 KB
/
simulation_views_v2.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package v2
type SimulationViewV2 struct {
DataViewV2 `json:"data"`
MetaView `json:"meta"`
}
type DataViewV2 struct {
RequestResponsePairs []RequestMatcherResponsePairViewV2 `json:"pairs"`
GlobalActions GlobalActionsView `json:"globalActions"`
}
type RequestMatcherResponsePairViewV2 struct {
Response ResponseDetailsView `json:"response"`
RequestMatcher RequestMatcherViewV2 `json:"request"`
}
type RequestFieldMatchersView struct {
ExactMatch *string `json:"exactMatch,omitempty"`
XmlMatch *string `json:"xmlMatch,omitempty"`
XpathMatch *string `json:"xpathMatch,omitempty"`
JsonMatch *string `json:"jsonMatch,omitempty"`
JsonPathMatch *string `json:"jsonPathMatch,omitempty"`
RegexMatch *string `json:"regexMatch,omitempty"`
GlobMatch *string `json:"globMatch,omitempty"`
}
// RequestDetailsView is used when marshalling and unmarshalling RequestDetails
type RequestMatcherViewV2 struct {
Path *RequestFieldMatchersView `json:"path,omitempty"`
Method *RequestFieldMatchersView `json:"method,omitempty"`
Destination *RequestFieldMatchersView `json:"destination,omitempty"`
Scheme *RequestFieldMatchersView `json:"scheme,omitempty"`
Query *RequestFieldMatchersView `json:"query,omitempty"`
Body *RequestFieldMatchersView `json:"body,omitempty"`
Headers map[string][]string `json:"headers,omitempty"`
}