forked from Arrim/http-api-mock
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mock.go
35 lines (30 loc) · 882 Bytes
/
mock.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
package definition
type Control struct {
Priority int `json:"priority"`
Delay int `json:"delay"`
Crazy bool `json:"crazy"`
ProxyBaseURL string `json:"proxyBaseURL"`
}
type Actions map[string]string
type Requests []Request
type Persist struct {
EntityID string `json:"entity-id"`
Entity string `json:"entity"`
Collection string `json:"collection"`
Actions Actions `json:"actions"`
Engine string `json:"engine"`
}
type Notify struct {
Amqp AMQPPublishing `json:"amqp"`
Http Requests `json:"http"`
}
//Mock contains the user mock definition
type Mock struct {
Name string
Description string `json:"description"`
Request Request `json:"request"`
Response Response `json:"response"`
Persist Persist `json:"persist"`
Notify Notify `json:"notify"`
Control Control `json:"control"`
}