forked from tears-of-noobs/gojira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
136 lines (116 loc) · 3.55 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
package gojira
import "strings"
type ApiError struct {
ErrorMessages []string `json:"errorMessages"`
Errors interface{} `json:"errors"`
}
func (e ApiError) String() string {
return strings.Join(e.ErrorMessages, " ")
}
type JiraSearchIssues struct {
SearchHead
Issues []Issue `json:"issues"`
}
type Comments struct {
SearchHead
Comments []Comment `json:"comments"`
}
type Worklogs struct {
SearchHead
Worklogs []Worklog `json:worklogs"`
}
type SearchHead struct {
StartAt int `json:"startAt"`
MaxResults int `json:"maxResults"`
Total int `json:"total"`
}
type Comment struct {
BaseFields
Author IssueFieldCreator `json:"author"`
Body string `json:"body"`
UpdateAuthor IssueFieldCreator `json:"updateAuthor"`
Created string `json:"created"`
Updated string `json:"updated"`
Visibility map[string]string `json:"visibility"`
}
type Worklog struct {
BaseFields
Author IssueFieldCreator `json:"author"`
UpdateAuthor IssueFieldCreator `json:"updateAuthor"`
Comment string `json:"comment"`
Visibility map[string]string `json:"visibility"`
Started string `json:"started"`
TimeSpent string `json:"timeSpent"`
TimeSpentSeconds int64 `json:"timeSpentSeconds"`
}
type Issue struct {
BaseFields
Key string `json:"key"`
Fields IssueFields `json:fields"`
}
type BaseFields struct {
Id string `json:"id"`
Self string `json:"self"`
}
type IssueFields struct {
Summary string `json:"summary"`
Progress IssueFieldProgress `json:"progress"`
IssueType IssueType `json:"issuetype"`
ResolutionDate interface{} `json:"resolutiondate"`
Timespent interface{} `json:"timespent"`
Creator IssueFieldCreator `json:"creator"`
Created string `json:"created"`
Updated string `json:"updated"`
Labels []string `json:"labels"`
Description interface{} `json:"description"`
IssueLinks []IssueLink `json:"issueLinks"`
Status IssueStatus `json:"status"`
}
type IssueFieldProgress struct {
Progress int `json:"progress"`
Total int `json:"total"`
}
type IssueFieldCreator struct {
Self string `json:"self"`
Name string `json:"name"`
EmailAddress string `json:"emailAddress"`
AvatarUrls map[string]string `json:"avatarUrls"`
DisplayName string `json:"displayName"`
Active bool `json:"active"`
}
type IssueType struct {
BaseFields
Description string `json:"description"`
IconUrl string `json:"iconURL"`
Name string `json:"name"`
Subtask bool `json:"subtask"`
}
type JiraProject struct {
BaseFields
}
type IssueLink struct {
BaseFields
Type map[string]string `json:"type"`
InwardIssue Issue `json:"inwardIssue"`
OutwardIssue Issue `json:"outwardIssue"`
}
type IssueStatus struct {
BaseFields
Name string `json:"name"`
}
type Transitions struct {
Expand string `json:"expand"`
Transitions []Transition `json:"transitions"`
}
type Transition struct {
BaseFields
Name string `json:"name"`
To TransitionFields `json:"to"`
}
type TransitionFields struct {
BaseFields
Description string `json:"description"`
IconUrl string `json:"iconURL"`
Name string `json:"name"`
StatusCategory map[string]interface{} `json:"statusCategory"`
}