-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodel.go
More file actions
50 lines (42 loc) · 901 Bytes
/
model.go
File metadata and controls
50 lines (42 loc) · 901 Bytes
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
38
39
40
41
42
43
44
45
46
47
48
49
50
package main
import (
"regexp"
)
type Har struct {
Log Log `json:"log"`
}
type Log struct {
Entries []Entry `json:"entries"`
}
type Entry struct {
Request Request `json:"request"`
Response Response `json:"response"`
}
type Header struct {
Name string `json:"name"`
Value string `json:"value"`
}
type Request struct {
Url string `json:"url"`
Headers []Header `json:'headers'`
Method string `json:"method"`
PostData PostData `json:"postData"`
}
type PostData struct {
MimeType string `json:"mimeType"`
Text string `json:"text"`
}
type Response struct {
Content Content `json:"content"`
Headers []Header `json:"headers"`
Status int `json:"status"`
StatusText string `json:"statusText"`
}
type Content struct {
MimeType string `json:"mimeType"`
Text string `json:"text"`
}
type MatchedEntry struct {
Entry Entry
RegEx *regexp.Regexp
}