-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
437 lines (404 loc) · 16.9 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
package jenkins
import "fmt"
type JobJson struct {
Class string `json:"_class"`
Actions []Actions `json:"actions"`
Description string `json:"description"`
DisplayName string `json:"displayName"`
DisplayNameOrNull interface{} `json:"displayNameOrNull"`
FullDisplayName string `json:"fullDisplayName"`
FullName string `json:"fullName"`
Name string `json:"name"`
URL string `json:"url"`
Buildable bool `json:"buildable"`
Builds []*BuildJson `json:"builds"`
Color string `json:"color"`
FirstBuild *BuildJson `json:"firstBuild"`
HealthReport []HealthReport `json:"healthReport"`
InQueue bool `json:"inQueue"`
KeepDependencies bool `json:"keepDependencies"`
LastBuild *BuildJson `json:"lastBuild"`
LastCompletedBuild *BuildJson `json:"lastCompletedBuild"`
LastFailedBuild *BuildJson `json:"lastFailedBuild"`
LastStableBuild *BuildJson `json:"lastStableBuild"`
LastSuccessfulBuild *BuildJson `json:"lastSuccessfulBuild"`
LastUnstableBuild *BuildJson `json:"lastUnstableBuild"`
LastUnsuccessfulBuild *BuildJson `json:"lastUnsuccessfulBuild"`
NextBuildNumber int `json:"nextBuildNumber"`
Property []*Property `json:"property"`
QueueItem interface{} `json:"queueItem"`
ConcurrentBuild bool `json:"concurrentBuild"`
ResumeBlocked bool `json:"resumeBlocked"`
Jobs []*JobJson `json:"jobs"`
PrimaryView *PrimaryView `json:"primaryView"`
Views []*ViewJson `json:"views"`
}
type BuildJson struct {
Class string `json:"_class"`
Actions []Actions `json:"actions"`
Artifacts []Artifacts `json:"artifacts"`
Building bool `json:"building"`
Description interface{} `json:"description"`
DisplayName string `json:"displayName"`
Duration int `json:"duration"`
EstimatedDuration int `json:"estimatedDuration"`
Executor interface{} `json:"executor"`
FullDisplayName string `json:"fullDisplayName"`
ID string `json:"id"`
KeepLog bool `json:"keepLog"`
Number int `json:"number"`
QueueID int `json:"queueId"`
Result string `json:"result"`
Timestamp int64 `json:"timestamp"`
URL string `json:"url"`
ChangeSets []ChangeSets `json:"changeSets"`
Culprits []Culprits `json:"culprits"`
NextBuild *BuildJson `json:"nextBuild"`
PreviousBuild *BuildJson `json:"previousBuild"`
}
type Parameters struct {
Class string `json:"_class"`
Name string `json:"name"`
Value string `json:"value"`
}
type Causes struct {
Class string `json:"_class"`
ShortDescription string `json:"shortDescription"`
UserID string `json:"userId"`
UserName string `json:"userName"`
}
type Branch struct {
SHA1 string `json:"SHA1"`
Name string `json:"name"`
}
type Marked struct {
SHA1 string `json:"SHA1"`
Branch []Branch `json:"branch"`
}
type Revision struct {
SHA1 string `json:"SHA1"`
Branch []Branch `json:"branch"`
}
type RefsRemotesOriginDev struct {
Class string `json:"_class"`
BuildNumber int `json:"buildNumber"`
BuildResult interface{} `json:"buildResult"`
Marked Marked `json:"marked"`
Revision Revision `json:"revision"`
}
type LastBuiltRevision struct {
SHA1 string `json:"SHA1"`
Branch []Branch `json:"branch"`
}
type RefsRemotesOriginDevFramework struct {
Class string `json:"_class"`
BuildNumber int `json:"buildNumber"`
BuildResult interface{} `json:"buildResult"`
Marked Marked `json:"marked"`
Revision Revision `json:"revision"`
}
type RefsRemotesOriginDevHush struct {
Class string `json:"_class"`
BuildNumber int `json:"buildNumber"`
BuildResult interface{} `json:"buildResult"`
Marked Marked `json:"marked"`
Revision Revision `json:"revision"`
}
type BuildsByBranchName struct {
RefsRemotesOriginDevFramework RefsRemotesOriginDevFramework `json:"refs/remotes/origin/dev_framework"`
RefsRemotesOriginDevHush RefsRemotesOriginDevHush `json:"refs/remotes/origin/dev_hush"`
}
type RefsRemotesOriginMPlayer struct {
Class string `json:"_class"`
BuildNumber int `json:"buildNumber"`
BuildResult interface{} `json:"buildResult"`
Marked Marked `json:"marked"`
Revision Revision `json:"revision"`
}
type Actions struct {
Class string `json:"_class,omitempty"`
Parameters []Parameters `json:"parameters,omitempty"`
Causes []Causes `json:"causes,omitempty"`
BlockedDurationMillis int `json:"blockedDurationMillis,omitempty"`
BlockedTimeMillis int `json:"blockedTimeMillis,omitempty"`
BuildableDurationMillis int `json:"buildableDurationMillis,omitempty"`
BuildableTimeMillis int `json:"buildableTimeMillis,omitempty"`
BuildingDurationMillis int `json:"buildingDurationMillis,omitempty"`
ExecutingTimeMillis int `json:"executingTimeMillis,omitempty"`
ExecutorUtilization float64 `json:"executorUtilization,omitempty"`
SubTaskCount int `json:"subTaskCount,omitempty"`
WaitingDurationMillis int `json:"waitingDurationMillis,omitempty"`
WaitingTimeMillis int `json:"waitingTimeMillis,omitempty"`
BuildsByBranchName BuildsByBranchName `json:"buildsByBranchName,omitempty"`
LastBuiltRevision LastBuiltRevision `json:"lastBuiltRevision,omitempty"`
RemoteUrls []string `json:"remoteUrls,omitempty"`
ScmName string `json:"scmName,omitempty"`
}
type Artifacts struct {
DisplayPath string `json:"displayPath"`
FileName string `json:"fileName"`
RelativePath string `json:"relativePath"`
}
type Author struct {
AbsoluteURL string `json:"absoluteUrl"`
FullName string `json:"fullName"`
}
type Paths struct {
EditType string `json:"editType"`
File string `json:"file"`
}
type Items struct {
Class string `json:"_class"`
AffectedPaths []string `json:"affectedPaths"`
CommitID string `json:"commitId"`
Timestamp int64 `json:"timestamp"`
Author Author `json:"author"`
AuthorEmail string `json:"authorEmail"`
Comment string `json:"comment"`
Date string `json:"date"`
ID string `json:"id"`
Msg string `json:"msg"`
Paths []Paths `json:"paths"`
}
type ChangeSets struct {
Class string `json:"_class"`
Items []Items `json:"items"`
Kind string `json:"kind"`
}
type Culprits struct {
AbsoluteURL string `json:"absoluteUrl"`
FullName string `json:"fullName"`
}
type PrimaryView struct {
Class string `json:"_class"`
Name string `json:"name"`
URL string `json:"url"`
}
type ViewJson struct {
Class string `json:"_class"`
Name string `json:"name"`
URL string `json:"url"`
Description string `json:"description"`
Jobs []*JobJson `json:"jobs"`
Property []string `json:"property"`
}
func (v ViewJson) String() string {
return fmt.Sprintf("<%s: %s>", parseClass(v.Class), v.URL)
}
type HealthReport struct {
Description string `json:"description"`
IconClassName string `json:"iconClassName"`
IconURL string `json:"iconUrl"`
Score int `json:"score"`
}
type DefaultParameterValue struct {
Class string `json:"_class"`
Name string `json:"name"`
Value string `json:"value"`
}
type ParameterDefinition struct {
Class string `json:"_class"`
DefaultParameterValue DefaultParameterValue `json:"defaultParameterValue"`
Description string `json:"description"`
Name string `json:"name"`
Type string `json:"type"`
Choices []string `json:"choices"`
}
type Property struct {
Class string `json:"_class"`
ParameterDefinitions []*ParameterDefinition `json:"parameterDefinitions,omitempty"`
}
type ComputerSet struct {
Class string `json:"_class"`
BusyExecutors int `json:"busyExecutors"`
Computers []*Computer `json:"computer"`
DisplayName string `json:"displayName"`
TotalExecutors int `json:"totalExecutors"`
}
type NodesJson struct {
Class string `json:"_class"`
AssignedLabels []AssignedLabels `json:"assignedLabels"`
Mode string `json:"mode"`
NodeDescription string `json:"nodeDescription"`
NodeName string `json:"nodeName"`
NumExecutors int `json:"numExecutors"`
Description interface{} `json:"description"`
Jobs []interface{} `json:"jobs"`
PrimaryView PrimaryView `json:"primaryView"`
QuietingDown bool `json:"quietingDown"`
SlaveAgentPort int `json:"slaveAgentPort"`
URL string `json:"url"`
UseCrumbs bool `json:"useCrumbs"`
UseSecurity bool `json:"useSecurity"`
Views []*ViewJson `json:"views"`
}
type AssignedLabels struct {
Actions []Actions `json:"actions"`
BusyExecutors int `json:"busyExecutors"`
Clouds []interface{} `json:"clouds"`
Description interface{} `json:"description"`
IdleExecutors int `json:"idleExecutors"`
Name string `json:"name"`
Nodes []NodesJson `json:"nodes"`
Offline bool `json:"offline"`
TiedJobs []interface{} `json:"tiedJobs"`
TotalExecutors int `json:"totalExecutors"`
PropertiesList []interface{} `json:"propertiesList"`
}
type ChangeSet struct {
Class string `json:"_class"`
Items []interface{} `json:"items"`
Kind interface{} `json:"kind"`
}
type Executor struct {
Idle bool `json:"idle"`
LikelyStuck bool `json:"likelyStuck"`
Number int `json:"number"`
Progress int `json:"progress"`
CurrentExecutable *CurrentExecutable `json:"currentExecutable,omitempty"`
}
type HudsonNodeMonitorsSwapSpaceMonitor struct {
Class string `json:"_class"`
AvailablePhysicalMemory int `json:"availablePhysicalMemory"`
AvailableSwapSpace int `json:"availableSwapSpace"`
TotalPhysicalMemory int `json:"totalPhysicalMemory"`
TotalSwapSpace int `json:"totalSwapSpace"`
}
type HudsonNodeMonitorsTemporarySpaceMonitor struct {
Class string `json:"_class"`
Timestamp int64 `json:"timestamp"`
Path string `json:"path"`
Size int64 `json:"size"`
}
type HudsonNodeMonitorsDiskSpaceMonitor struct {
Class string `json:"_class"`
Timestamp int64 `json:"timestamp"`
Path string `json:"path"`
Size int64 `json:"size"`
}
type HudsonNodeMonitorsResponseTimeMonitor struct {
Class string `json:"_class"`
Timestamp int64 `json:"timestamp"`
Average int `json:"average"`
}
type HudsonNodeMonitorsClockMonitor struct {
Class string `json:"_class"`
Diff int `json:"diff"`
}
type MonitorData struct {
HudsonNodeMonitorsSwapSpaceMonitor HudsonNodeMonitorsSwapSpaceMonitor `json:"hudson.node_monitors.SwapSpaceMonitor"`
HudsonNodeMonitorsTemporarySpaceMonitor HudsonNodeMonitorsTemporarySpaceMonitor `json:"hudson.node_monitors.TemporarySpaceMonitor"`
HudsonNodeMonitorsDiskSpaceMonitor HudsonNodeMonitorsDiskSpaceMonitor `json:"hudson.node_monitors.DiskSpaceMonitor"`
HudsonNodeMonitorsArchitectureMonitor string `json:"hudson.node_monitors.ArchitectureMonitor"`
HudsonNodeMonitorsResponseTimeMonitor HudsonNodeMonitorsResponseTimeMonitor `json:"hudson.node_monitors.ResponseTimeMonitor"`
HudsonNodeMonitorsClockMonitor HudsonNodeMonitorsClockMonitor `json:"hudson.node_monitors.ClockMonitor"`
}
type PreviousBuild struct {
Number int `json:"number"`
URL string `json:"url"`
}
type CurrentExecutable struct {
Class string `json:"_class"`
Actions []Actions `json:"actions"`
Artifacts []interface{} `json:"artifacts"`
Building bool `json:"building"`
Description interface{} `json:"description"`
DisplayName string `json:"displayName"`
Duration int `json:"duration"`
EstimatedDuration int `json:"estimatedDuration"`
FullDisplayName string `json:"fullDisplayName"`
ID string `json:"id"`
KeepLog bool `json:"keepLog"`
Number int `json:"number"`
QueueID int `json:"queueId"`
Result interface{} `json:"result"`
Timestamp int64 `json:"timestamp"`
URL string `json:"url"`
ChangeSets []interface{} `json:"changeSets"`
Culprits []interface{} `json:"culprits"`
NextBuild interface{} `json:"nextBuild"`
PreviousBuild PreviousBuild `json:"previousBuild"`
}
type OneOffExecutor struct {
CurrentExecutable CurrentExecutable `json:"currentExecutable"`
Idle bool `json:"idle"`
LikelyStuck bool `json:"likelyStuck"`
Number int `json:"number"`
Progress int `json:"progress"`
}
type Computer struct {
Class string `json:"_class"`
Actions []Actions `json:"actions"`
AssignedLabels []AssignedLabels `json:"assignedLabels"`
Description string `json:"description"`
DisplayName string `json:"displayName"`
Executors []*Executor `json:"executors"`
Icon string `json:"icon"`
IconClassName string `json:"iconClassName"`
Idle bool `json:"idle"`
JnlpAgent bool `json:"jnlpAgent"`
LaunchSupported bool `json:"launchSupported"`
ManualLaunchAllowed bool `json:"manualLaunchAllowed"`
MonitorData MonitorData `json:"monitorData"`
NumExecutors int `json:"numExecutors"`
Offline bool `json:"offline"`
OfflineCause interface{} `json:"offlineCause"`
OfflineCauseReason string `json:"offlineCauseReason"`
OneOffExecutors []*Executor `json:"oneOffExecutors"`
TemporarilyOffline bool `json:"temporarilyOffline"`
AbsoluteRemotePath interface{} `json:"absoluteRemotePath,omitempty"`
}
func (c Computer) String() string {
return fmt.Sprintf("<%s: %s>", parseClass(c.Class), c.DisplayName)
}
type QueueJson struct {
Class string `json:"_class"`
DiscoverableItems []interface{} `json:"discoverableItems"`
Items []*QueueItem `json:"items"`
}
type QueueItem struct {
Class string `json:"_class"`
Actions []Actions `json:"actions"`
Blocked bool `json:"blocked"`
Buildable bool `json:"buildable"`
ID int `json:"id"`
InQueueSince int64 `json:"inQueueSince"`
Params string `json:"params"`
Stuck bool `json:"stuck"`
Task Task `json:"task"`
URL string `json:"url"`
Why interface{} `json:"why"`
Cancelled bool `json:"cancelled"`
Executable Executable `json:"executable"`
}
type Task struct {
Class string `json:"_class"`
Name string `json:"name"`
URL string `json:"url"`
Color string `json:"color"`
}
type Executable struct {
Class string `json:"_class"`
Number int `json:"number"`
URL string `json:"url"`
}
type CredentialsJson struct {
Class string `json:"_class"`
Credentials []*CredentialJson `json:"credentials"`
Description string `json:"description"`
DisplayName string `json:"displayName"`
FullDisplayName string `json:"fullDisplayName"`
FullName string `json:"fullName"`
Global bool `json:"global"`
URLName string `json:"urlName"`
}
type CredentialJson struct {
Description string `json:"description"`
DisplayName string `json:"displayName"`
FullName string `json:"fullName"`
ID string `json:"id"`
TypeName string `json:"typeName"`
}
func (c CredentialJson) String() string {
return fmt.Sprintf("<%s: %s (%s)>", c.TypeName, c.FullName, c.Description)
}