-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
43 lines (38 loc) · 1.04 KB
/
model.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
38
39
40
41
42
43
package main
// A Golts contains all the GoltThreadGroup generated from a configuration file.
type Golts struct {
Golt []GoltThreadGroup
}
// A GoltThreadGroup contains the configuration of a single thread generated
// from a configuration file.
type GoltThreadGroup struct {
Threads int
Timeout int
Repetitions int
Stage int
Requests []GoltRequest
}
// A GoltRequest contains the configuration of a single HTTP request.
type GoltRequest struct {
URL string
Method string
Payload string
Headers map[string]*string
Assert GoltAssert
// TODO: Have the possibility to extract multiple values
Extract GoltExtractor
}
// A GoltAssert contains the configuration of the assertions to be made for a
// GoltRequest.
type GoltAssert struct {
Status int
Type string
}
// A GoltExtractor contains the configuration to extract information of the
// response of a GoltRequest.
type GoltExtractor struct {
Var string
Field string
Regex string
// TODO: Have the possibility to extract the value of a JSON field from the headers/body
}