-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
540 lines (496 loc) · 20.7 KB
/
models.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
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
package xilution
// Link Label -
type LinkLabel struct {
Default string `json:"default"`
En string `json:"en,omitempty"`
}
// Links -
type Link struct {
Href string `json:"href"`
Rel string `json:"rel,omitempty"`
Label LinkLabel `json:"label,omitempty"`
Type string `json:"type,omitempty"`
}
// Organization -
type Organization struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
Name string `json:"name"`
Logo string `json:"logo,omitempty"`
Domain string `json:"domain,omitempty"`
AuthClientId string `json:"authClientId,omitempty"`
OrganizationId string `json:"organizationId"`
Active bool `json:"active"`
Url string `json:"url,omitempty"`
AutoAuth bool `json:"autoAuth,omitempty"`
ShowSignUp bool `json:"showSignUp,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch Organizations Response -
type FetchOrganizationsResponse struct {
Content []Organization
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// Client -
type Client struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
Name string `json:"name"`
Grants []string `json:"grants"`
RedirectUris []string `json:"redirectUris"`
ClientUserId string `json:"clientUserId"`
OrganizationId string `json:"organizationId"`
Active bool `json:"active"`
Secret string `json:"secret,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch Clients Response -
type FetchClientsResponse struct {
Content []Client
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// User -
type User struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
Username string `json:"username"`
OrganizationId string `json:"organizationId"`
Active bool `json:"active"`
Links []Link `json:"links,omitempty"`
}
// Fetch Users Response -
type FetchUsersResponse struct {
Content []User
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// Git Account -
type GitAccount struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
Provider string `json:"provider"`
Name string `json:"name"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Status string `json:"status,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch Git Accounts Response -
type FetchGitAccountsResponse struct {
Content []GitAccount
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// Git Repo -
type GitRepo struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
GitAccountId string `json:"gitAccountId"`
Name string `json:"name"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Status string `json:"status,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch Git Repos Response -
type FetchGitReposResponse struct {
Content []GitRepo
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// Git Repo Event -
type GitRepoEvent struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
GitAccountId string `json:"gitAccountId"`
GitRepoId string `json:"gitRepoId"`
EventType string `json:"eventType"`
Parameters map[string]interface{} `json:"parameters"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Links []Link `json:"links,omitempty"`
}
// Fetch Git Repo Events Response -
type FetchGitRepoEventsResponse struct {
Content []GitRepoEvent
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// Cloud Provider -
type CloudProvider struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
Provider string `json:"provider"`
Name string `json:"name"`
AccountId string `json:"accountId"`
Region string `json:"region"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Status string `json:"status,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch Cloud Providers Response -
type FetchCloudProvidersResponse struct {
Content []CloudProvider
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// Continuous Integration Status -
type ContinuousIntegrationStatus struct {
LatestDownExecutionStatus string `json:"latestDownExecutionStatus,omitempty"`
LatestUpExecutionStatus string `json:"latestUpExecutionStatus,omitempty"`
}
// Pipeline Status -
type PipelineStatus struct {
ContinuousIntegrationStatus *ContinuousIntegrationStatus `json:"continuousIntegrationStatus,omitempty"`
InfrastructureStatus string `json:"infrastructureStatus,omitempty"`
}
// VPC Pipelines -
type VpcPipeline struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
Name string `json:"name"`
PipelineType string `json:"pipelineType"`
CloudProviderId string `json:"cloudProviderId"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Status *PipelineStatus `json:"status,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch VPC Pipelines Response -
type FetchVpcPipelinesResponse struct {
Content []VpcPipeline
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// K8s Pipelines -
type K8sPipeline struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
Name string `json:"name"`
PipelineType string `json:"pipelineType"`
VpcPipelineId string `json:"gazellePipelineId"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Status *PipelineStatus `json:"status,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch K8s Pipelines Response -
type FetchK8sPipelinesResponse struct {
Content []K8sPipeline
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// WordPress Stage -
type WordPressStage struct {
Name string `json:"name"`
Links []Link `json:"links,omitempty"`
SiteUrl string `json:"siteUrl,omitempty"`
}
// WordPress Pipelines -
type WordPressPipeline struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
Name string `json:"name"`
PipelineType string `json:"pipelineType"`
K8sPipelineId string `json:"gazellePipelineId"`
GitRepoId string `json:"gitRepoId"`
Branch string `json:"branch"`
Stages []WordPressStage `json:"stages"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Status *PipelineStatus `json:"status,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch WordPress Pipelines Response -
type FetchWordPressPipelinesResponse struct {
Content []WordPressPipeline
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// Static Content Stage -
type StaticContentStage struct {
Name string `json:"name"`
Links []Link `json:"links,omitempty"`
SiteUrl string `json:"siteUrl,omitempty"`
}
// Static Content Pipelines -
type StaticContentPipeline struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
Name string `json:"name"`
PipelineType string `json:"pipelineType"`
CloudProviderId string `json:"cloudProviderId"`
GitRepoId string `json:"gitRepoId"`
Branch string `json:"branch"`
Stages []StaticContentStage `json:"stages"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Status *PipelineStatus `json:"status,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch Static Content Pipelines Response -
type FetchStaticContentPipelinesResponse struct {
Content []StaticContentPipeline
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// API Stage -
type ApiStage struct {
Name string `json:"name"`
Links []Link `json:"links,omitempty"`
ApiBaseUrl string `json:"apiBaseUrl,omitempty"`
}
// API Pipelines -
type ApiPipeline struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
Name string `json:"name"`
PipelineType string `json:"pipelineType"`
VpcPipelineId string `json:"gazellePipelineId"`
GitRepoId string `json:"gitRepoId"`
Branch string `json:"branch"`
Stages []ApiStage `json:"stages"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Status *PipelineStatus `json:"status,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch API Pipelines Response -
type FetchApiPipelinesResponse struct {
Content []ApiPipeline
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// Pipeline Event -
type PipelineEvent struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
OrganizationId string `json:"organizationId"`
PipelineId string `json:"pipelineId"`
EventType string `json:"eventType"`
Parameters map[string]interface{} `json:"parameters,omitempty"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch Pipeline Events Response -
type FetchPipelineEventsResponse struct {
Content []PipelineEvent
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}
// Translation -
type Translation struct {
Default string `json:"default"`
En string `json:"en,omitempty"`
}
// DecomposedParameterDefinition -
type DecomposedParameterDefinition struct {
Name string `json:"name"`
ValueExpression string `json:"valueExpression"`
}
// DecompositionDefinition -
type DecompositionDefinition struct {
Uri string `json:"uri"`
DecomposedParameterDefinitions []DecomposedParameterDefinition `json:"decomposedParameterDefinitions"`
}
// Validation -
type Validation struct {
FunctionName string `json:"functionName"`
Parameters interface{} `json:"parameters,omitempty"`
}
// Option -
type Option struct {
Name Translation `json:"name"`
Value interface{} `json:"value,omitempty"`
Disabled bool `json:"disabled,omitempty"`
}
// OptionsRef -
type OptionsRef struct {
Id string `json:"id"`
NameExpression string `json:"nameExpression"`
ValueExpression string `json:"valueExpression"`
}
// ParameterDefinition -
type ParameterDefinition struct {
Name string `json:"name"`
Label Translation `json:"label"`
HelpText *Translation `json:"helpText,omitempty"`
Type string `json:"type,omitempty"`
Validation *Validation `json:"validation,omitempty"`
AutoComplete string `json:"autoComplete,omitempty"`
ReadOnly bool `json:"readOnly,omitempty"`
Placeholder *Translation `json:"placeholder,omitempty"`
InitialValue string `json:"initialValue,omitempty"`
Options []Option `json:"options,omitempty"`
OptionsRef *OptionsRef `json:"optionsRef,omitempty"`
DecompositionDefinition *DecompositionDefinition `json:"decompositionDefinition,omitempty"`
}
// ParameterDefinition -
type Reference struct {
FilterExpression string `json:"filterExpression"`
Id string `json:"id"`
Required bool `json:"required"`
Uri string `json:"uri"`
}
// Terraform -
type Terraform struct {
SubPath string `json:"subPath"`
SwanRepoId string `json:"swanRepoId"`
}
// Pipeline Prototype -
type PipelinePrototype struct {
Type string `json:"@type"`
ID string `json:"id,omitempty"`
Name string `json:"name"`
Active bool `json:"active"`
Description string `json:"description"`
ParameterDefinitions []ParameterDefinition `json:"parameterDefinitions"`
References []Reference `json:"references"`
Terraform Terraform `json:"terraform"`
Version string `json:"version"`
OwningUserId string `json:"owningUserId"`
CreatedAt string `json:"createdAt,omitempty"`
ModifiedAt string `json:"modifiedAt,omitempty"`
OrganizationId string `json:"organizationId"`
Status *PipelineStatus `json:"status,omitempty"`
Links []Link `json:"links,omitempty"`
}
// Fetch Pipeline Prototype Response -
type FetchPipelinePrototypesResponse struct {
Content []PipelinePrototype
PageSize int `json:"pageSize,omitempty"`
PageNumber int `json:"pageNumber,omitempty"`
TotalPages int `json:"totalPages"`
NumberOfElements int `json:"numberOfElements,omitempty"`
TotalElements int `json:"totalElements"`
FirstPage bool `json:"firstPage"`
LastPage bool `json:"lastPage"`
ID Link `json:"link"`
Links []Link `json:"links,omitempty"`
}