@@ -16,54 +16,59 @@ limitations under the License.
1616package mock
1717
1818type Object struct {
19- Name string `yaml:"name" json:"name"`
20- InitCount * int `yaml:"initCount" json:"initCount"`
21- Sample string `yaml:"sample" json:"sample"`
19+ Name string `yaml:"name" json:"name"`
20+ InitCount * int `yaml:"initCount" json:"initCount"`
21+ Sample string `yaml:"sample" json:"sample"`
2222}
2323
2424type Item struct {
25- Name string `yaml:"name" json:"name"`
26- Request Request `yaml:"request" json:"request"`
27- Response Response `yaml:"response" json:"response"`
28- Param map [string ]string
25+ Name string `yaml:"name" json:"name"`
26+ Request Request `yaml:"request" json:"request"`
27+ Response Response `yaml:"response" json:"response"`
28+ Param map [string ]string
2929}
3030
3131type Request struct {
32- Path string `yaml:"path" json:"path"`
33- Method string `yaml:"method" json:"method"`
34- Header map [string ]string `yaml:"header" json:"header"`
35- Body string `yaml:"body" json:"body"`
32+ Path string `yaml:"path" json:"path"`
33+ Method string `yaml:"method" json:"method"`
34+ Header map [string ]string `yaml:"header" json:"header"`
35+ Body string `yaml:"body" json:"body"`
3636}
3737
3838type RequestWithAuth struct {
39- Request `yaml:",inline"`
40- BearerAPI string `yaml:"bearerAPI" json:"bearerAPI"`
41- Username string `yaml:"username" json:"username"`
42- Password string `yaml:"password" json:"password"`
39+ Request `yaml:",inline"`
40+ BearerAPI string `yaml:"bearerAPI" json:"bearerAPI"`
41+ Username string `yaml:"username" json:"username"`
42+ Password string `yaml:"password" json:"password"`
4343}
4444
4545type Response struct {
46- Encoder string `yaml:"encoder" json:"encoder"`
47- Body string `yaml:"body" json:"body"`
48- Header map [string ]string `yaml:"header" json:"header"`
49- StatusCode int `yaml:"statusCode" json:"statusCode"`
50- BodyData []byte
46+ Encoder string `yaml:"encoder" json:"encoder"`
47+ Body string `yaml:"body" json:"body"`
48+ Header map [string ]string `yaml:"header" json:"header"`
49+ StatusCode int `yaml:"statusCode" json:"statusCode"`
50+ BodyData []byte
5151}
5252
5353type Webhook struct {
54- Name string `yaml:"name" json:"name"`
55- Timer string `yaml:"timer" json:"timer"`
56- Request RequestWithAuth `yaml:"request" json:"request"`
54+ Name string `yaml:"name" json:"name"`
55+ Timer string `yaml:"timer" json:"timer"`
56+ Request RequestWithAuth `yaml:"request" json:"request"`
5757}
5858
5959type Proxy struct {
60- Path string `yaml:"path" json:"path"`
61- Target string `yaml:"target" json:"target"`
60+ Path string `yaml:"path" json:"path"`
61+ Target string `yaml:"target" json:"target"`
62+ RequestAmend RequestAmend `yaml:"requestAmend" json:"requestAmend"`
63+ }
64+
65+ type RequestAmend struct {
66+ BodyPatch string `yaml:"bodyPatch" json:"bodyPatch"`
6267}
6368
6469type Server struct {
65- Objects []Object `yaml:"objects" json:"objects"`
66- Items []Item `yaml:"items" json:"items"`
67- Proxies []Proxy `yaml:"proxies" json:"proxies"`
68- Webhooks []Webhook `yaml:"webhooks" json:"webhooks"`
70+ Objects []Object `yaml:"objects" json:"objects"`
71+ Items []Item `yaml:"items" json:"items"`
72+ Proxies []Proxy `yaml:"proxies" json:"proxies"`
73+ Webhooks []Webhook `yaml:"webhooks" json:"webhooks"`
6974}
0 commit comments