-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
51 lines (46 loc) · 1.37 KB
/
types.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
44
45
46
47
48
49
50
51
package tester
// Lister stores List configurtions
type Lister struct {
Server string `json:"server"`
ProtoPath string `json:"proto_path"`
ProtoFile string `json:"proto_file"`
TLS bool `json:"tls"`
}
// Runner stores Run configurtions
type Runner struct {
Lister
Endpoint string `json:"endpoint"`
Data []any `json:"-"`
GrpcurlFlags string `json:"-"`
StreamPayload bool `json:"stream_payload"`
testerCall bool
}
// Endpoint stores tests configurations of multiple endpoints
type Endpoint struct {
Runner
Skip bool `json:"skip"`
Tests []T `json:"tests"`
}
// T stores multiple test case configurtions per endpoint
type T struct {
ID string `json:"id"`
Description string `json:"description"`
Requests []any `json:"requests"`
Queries []string `json:"jqq"`
Compare bool `json:"compare"`
Expectations []any `json:"expectations"`
Skip bool `json:"skip"`
Response []any `json:"response"`
Print bool `json:"print"`
GrpcurlFlags string `json:"grpcurl_flags"`
IgnoreOrder bool `json:"ignore_order"`
Pass bool `json:"-"`
State
}
// State stores variables(extracted data) state
type State struct {
Replace []string `json:"replace"`
ReplaceFrom []string `json:"replace_from"`
Extract []string `json:"extract"`
ExtractTo []string `json:"extract_to"`
}