-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtypes.go
283 lines (240 loc) · 9.2 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
package main
type EntityType string
type ImportType string
type TemplateScope string
type Filter struct {
Type ImportType `json:"importType"`
AppId string `json:"appId"`
TriggerIds []string `json:"triggerIds"`
WorkflowIds []string `json:"workflowIds"`
PipelineIds []string `json:"pipelineIds"`
Ids []string `json:"ids"`
ServiceIds []string `json:"serviceIds"`
EnvironmentIds []string `json:"environmentIds"`
Scope TemplateScope `json:"scope"`
}
type DestinationDetails struct {
GatewayUrl string `json:"gatewayUrl"`
AccountIdentifier string `json:"accountIdentifier"`
AuthToken string `json:"authToken"`
ProjectIdentifier string `json:"projectIdentifier"`
OrgIdentifier string `json:"orgIdentifier"`
}
type EntityDefaults struct {
Scope string `json:"scope"`
WorkflowAsPipeline bool `json:"workflowAsPipeline"`
}
type Defaults struct {
SecretManagerTemplate EntityDefaults `json:"SECRET_MANAGER_TEMPLATE"`
SecretManager EntityDefaults `json:"SECRET_MANAGER"`
Secret EntityDefaults `json:"SECRET"`
Connector EntityDefaults `json:"CONNECTOR"`
Workflow EntityDefaults `json:"WORKFLOW"`
Template EntityDefaults `json:"TEMPLATE"`
UserGroup EntityDefaults `json:"USER_GROUP"`
Environment EntityDefaults `json:"ENVIRONMENT"`
}
type Setting struct {
Type string `json:"type"`
Value string `json:"value"`
}
type Inputs struct {
Replace map[string]string `json:"replace"`
Overrides map[string]EntityOverrideInput `json:"overrides"`
Expressions map[string]string `json:"expressions"`
Defaults Defaults `json:"defaults"`
Settings []Setting `json:"settings"`
}
type EntityOverrideInput struct {
Identifier *string `json:"identifier"`
Name *string `json:"name"`
Scope *string `json:"scope"`
}
type OverrideFileData struct {
Overrides []EntityOverride `json:"overrides"`
Settings []Setting `json:"settings"`
}
type EntityOverride struct {
ID string `json:"id" yaml:"id"`
FirstGenName string `json:"firstGenName" yaml:"firstGenName"`
Type string `json:"type" yaml:"type"`
Identifier *string `json:"identifier" yaml:"identifier"`
Name *string `json:"name" yaml:"name"`
Scope *string `json:"scope" yaml:"scope"`
}
type OrgDetails struct {
Identifier string `json:"identifier"`
Name string `json:"name"`
Description string `json:"description"`
}
type ProjectDetails struct {
OrgIdentifier string `json:"orgIdentifier"`
Identifier string `json:"identifier"`
Name string `json:"name"`
Color string `json:"color"`
Modules []string `json:"modules"`
Description string `json:"description"`
}
type BulkProjectResult struct {
AppName string `json:"appName"`
AppId string `json:"appId"`
ProjectIdentifier string `json:"projectIdentifier"`
ProjectName string `json:"projectName"`
Error UpgradeError `json:"error"`
}
type BulkCreateBody struct {
DestinationAccountIdentifier string `json:"destinationAccountIdentifier"`
DestinationGatewayUrl string `json:"destinationGatewayUrl"`
DestinationAuthToken string `json:"destinationAuthToken"`
Org string `json:"orgIdentifier"`
IdentifierCaseFormat string `json:"identifierCaseFormat"`
}
type ProjectBody struct {
Project ProjectDetails `json:"project"`
}
type ProjectListBody struct {
Projects []ProjectBody `json:"content"`
}
type OrgListBody struct {
Organisations []OrgResponse `json:"content"`
}
type OrgResponse struct {
Org OrgBody `json:"organizationResponse"`
}
type OrgBody struct {
Org OrgDetails `json:"organization"`
}
type TemplateListBody struct {
Templates []TemplateDetails `json:"content"`
}
type TemplateDetails struct {
Identifier string `json:"identifier"`
Name string `json:"name"`
Description string `json:"description"`
VersionLabel string `json:"versionLabel"`
}
type PipelineListBody struct {
Pipelines []PipelineDetails `json:"content"`
}
type PipelineDetails struct {
Identifier string `json:"identifier"`
Name string `json:"name"`
Description string `json:"description"`
}
type FilterRequestBody struct {
FilterType string `json:"filterType"`
TemplateIdentifiers []string `json:"templateIdentifiers"`
}
type TemplateDeleteBody struct {
TemplateVersionLabels []string `json:"templateVersionLabels"`
}
type RequestBody struct {
DestinationDetails DestinationDetails `json:"destinationDetails"`
EntityType EntityType `json:"entityType"`
Filter Filter `json:"filter"`
Inputs Inputs `json:"inputs"`
IdentifierCaseFormat string `json:"identifierCaseFormat"`
Flags []string `json:"flags"`
}
type CurrentGenEntity struct {
Id string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
AppId string `json:"appId"`
}
type SkipDetail struct {
Entity CurrentGenEntity `json:"cgBasicInfo"`
Reason string `json:"reason"`
}
type NGSkipDetail struct {
Type string `json:"type"`
Reason string `json:"reason"`
}
type UpgradeError struct {
Message string `json:"message"`
Entity CurrentGenEntity `json:"entity"`
}
type MigrationStats struct {
SuccessfullyMigrated int64 `json:"successfullyMigrated"`
AlreadyMigrated int64 `json:"alreadyMigrated"`
}
type Resource struct {
RequestId string `json:"requestId"`
Stats map[string]MigrationStats `json:"stats"`
Errors []UpgradeError `json:"errors"`
Status string `json:"status"`
ResponsePayload interface{} `json:"responsePayload"`
SkipDetails []NGSkipDetail `json:"skipDetails"`
SuccessfullyMigratedDetails []SuccessfullyMigratedDetail `json:"successfullyMigratedDetails"`
}
type SuccessfullyMigratedDetail struct {
CgEntityDetail interface{} `json:"cgEntityDetail"` // Assuming cgEntityDetail can be nil or of a specific type
NgEntityDetail NgEntityDetail `json:"ngEntityDetail"`
AdditionalInfo string `json:"additionalInfo"`
}
type NgEntityDetail struct {
EntityType string `json:"entityType"`
Identifier string `json:"identifier"`
OrgIdentifier string `json:"orgIdentifier"`
ProjectIdentifier string `json:"projectIdentifier"`
}
type ResponseBody struct {
Code string `json:"code"`
Message string `json:"message"`
Status string `json:"status"`
Data interface{} `json:"data"`
Resource interface{} `json:"resource"`
Messages []ResponseMessages `json:"responseMessages"`
}
type ResponseMessages struct {
Code string `json:"code"`
Level string `json:"level"`
Message string `json:"message"`
Exception interface{} `json:"exception"`
FailureTypes interface{} `json:"failureTypes"`
}
type SaveSummary struct {
Stats map[string]MigrationStats `json:"stats"`
Errors []UpgradeError `json:"errors"`
SkipDetails []SkipDetail `json:"skipDetails"`
SkippedExpressionsList []SkippedExpressionDetail `json:"skippedExpressions"`
}
type SkippedExpressionDetail struct {
EntityType string `json:"entityType"`
Identifier string `json:"identifier"`
OrgIdentifier string `json:"orgIdentifier"`
ProjectIdentifier string `json:"projectIdentifier"`
Expressions []string `json:"expressions"`
}
type SummaryResponse struct {
Summary map[string]EntitySummary `json:"summary"`
}
type SummaryDetails struct {
Count int64 `json:"count"`
Status string `json:"status"`
}
type EntitySummary struct {
Name string `json:"name"`
Count int64 `json:"count"`
TypeSummary map[string]int64 `json:"typeSummary"`
TypesSummary map[string]SummaryDetails `json:"typesSummary"`
StepTypeSummary map[string]int64 `json:"stepTypeSummary"`
StepsSummary map[string]SummaryDetails `json:"stepsSummary"`
KindSummary map[string]int64 `json:"kindSummary"`
StoreSummary map[string]int64 `json:"storeSummary"`
DeploymentTypeSummary map[string]int64 `json:"deploymentTypeSummary"`
DeploymentsSummary map[string]SummaryDetails `json:"deploymentsSummary"`
ArtifactsSummary map[string]SummaryDetails `json:"artifactsSummary"`
CloudProviderTypeSummary map[string]int64 `json:"cloudProviderTypeSummary"`
Expressions []string `json:"expressions"`
}
type BaseEntityDetail struct {
Id string `json:"id"`
Name string `json:"name"`
}
type ProjectCSV struct {
AppName string `json:"appName"`
ProjectName string `json:"projectName"`
ProjectIdentifier string `json:"projectIdentifier"`
OrgIdentifier string `json:"orgIdentifier"`
}