-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
79 lines (67 loc) · 1.73 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package languagetool
type CheckInput struct {
Text string
Data string
Language string
Dicts string
MotherTongue string
PreferredVariants string
EnabledRules string
DisabledRules string
EnabledCategories string
DisabledCategories string
EnabledOnly bool
Level Level
}
type Level string
const (
LevelDefault Level = ""
LevelPicky Level = "picky"
)
type CheckResult struct {
Software Software `json:"software"`
Warnings Warnings `json:"warnings"`
Language Language `json:"language"`
Matches []Match `json:"matches"`
}
type Warnings struct {
IncompleteResults bool `json:"incompleteResults"`
}
type Software struct {
Name string `json:"name"`
Version string `json:"version"`
BuildDate string `json:"buildDate"`
APIVersion int `json:"apiVersion"`
Status string `json:"status"`
}
type Language struct {
Name string `json:"name"`
Code string `json:"code"`
}
type Match struct {
Message string `json:"message"`
ShortMessage string `json:"shortMessage"`
Replacements []Replacement `json:"replacements"`
Offset int `json:"offset"`
Length int `json:"length"`
Context Context `json:"context"`
Rule Rule `json:"rule"`
}
type Replacement struct {
Value string `json:"value"`
}
type Context struct {
Text string `json:"text"`
Offset int `json:"offset"`
Length int `json:"length"`
}
type Rule struct {
ID string `json:"id"`
Description string `json:"description"`
IssueType string `json:"issueType"`
Category Category `json:"category"`
}
type Category struct {
ID string `json:"id"`
Name string `json:"name"`
}