This repository has been archived by the owner on Dec 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
searches.go
380 lines (323 loc) · 16.1 KB
/
searches.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
package responses
// AQLSearchResponse represents a AQL response
type AQLSearchResponse struct {
Results []struct {
Repo string `json:"repo"`
Path string `json:"path"`
Name string `json:"name"`
Type string `json:"type"`
Size int `json:"size"`
Created *JSONTime `json:"created"`
CreatedBy string `json:"created_by"`
Modified *JSONTime `json:"modified"`
ModifiedBy string `json:"modified_by"`
Updated *JSONTime `json:"updated"`
Archives []struct {
Entries []struct {
EntryName string `json:"entry.name"`
EntryPath string `json:"entry.path"`
}
} `json:"archives,omitempty"`
} `json:"results"`
Range struct {
StartPos int `json:"start_pos"`
EndPos int `json:"end_pos"`
Total int `json:"total"`
} `json:"range"`
}
// AQLSearchResponseTestData is test data for AQLResponse
const AQLSearchResponseTestData = "aql_search.json"
// AQLSearchResponseWithArchiveTestData is test data for AQLResponse
const AQLSearchResponseWithArchiveTestData = "aql_search_with_archive.json"
func (r AQLSearchResponse) minVersion() Version { return versionMustParse("3.5.0") }
func (r AQLSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r AQLSearchResponse) deprecated() bool { return false }
// ArtifactSearchResponse represents a ArtifactSearch response
type ArtifactSearchResponse struct {
Results []struct {
URI string `json:"uri"`
} `json:"results"`
}
// ArtifactSearchResponseTestData is test data for ArtifactSearchResponse
const ArtifactSearchResponseTestData = "artifact_search.json"
func (r ArtifactSearchResponse) minVersion() Version { return versionMustParse("2.2.0") }
func (r ArtifactSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r ArtifactSearchResponse) deprecated() bool { return false }
// ArchiveEntriesSearchResponse represents a ArchiveEntriesSearch response
type ArchiveEntriesSearchResponse struct {
Results []struct {
Entry string `json:"entry"`
ArchiveURIS []string `json:"archiveUris"`
} `json:"results"`
}
// ArchiveEntriesSearchResponseTestData is test data for ArchiveEntriesSearchResponse
const ArchiveEntriesSearchResponseTestData = "archive_entries_search.json"
func (r ArchiveEntriesSearchResponse) minVersion() Version { return versionMustParse("2.2.0") }
func (r ArchiveEntriesSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r ArchiveEntriesSearchResponse) deprecated() bool { return false }
// GAVCSearchResponse represents a GAVCSearch response
type GAVCSearchResponse struct {
Results []struct {
Repo string `json:"repo"`
Path string `json:"path"`
Created *JSONTime `json:"created"`
CreatedBy string `json:"createdBy"`
LastModified *JSONTime `json:"lastModified"`
LastUpdated *JSONTime `json:"lastUpdated"`
ModifiedBy string `json:"modifiedBy"`
Properties map[string][]string `json:"properties,omitempty"`
DownloadURI string `json:"downloadUri"`
RemoteURL string `json:"remoteUrl,omitempty"`
MimeType string `json:"mimeType"`
Size string `json:"size"`
URI string `json:"uri"`
Checksums struct {
SHA1 string `json:"sha1,omitempty"`
MD5 string `json:"md5,omitempty"`
SHA256 string `json:"sha256,omitempty"`
} `json:"checksums"`
OriginalChecksums struct {
SHA1 string `json:"sha1,omitempty"`
MD5 string `json:"md5,omitempty"`
SHA256 string `json:"sha256,omitempty"`
} `json:"originalChecksums"`
} `json:"results"`
}
// GAVCSearchResponseTestData is test data for GAVCSearchResponse
const GAVCSearchResponseTestData = "gavc_search.json"
func (r GAVCSearchResponse) minVersion() Version { return versionMustParse("2.2.0") }
func (r GAVCSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r GAVCSearchResponse) deprecated() bool { return false }
// PropertySearchResponse represents a PropertySearch response
type PropertySearchResponse struct {
Results []struct {
Repo string `json:"repo"`
Path string `json:"path"`
Created *JSONTime `json:"created"`
CreatedBy string `json:"createdBy"`
LastModified *JSONTime `json:"lastModified"`
LastUpdated *JSONTime `json:"lastUpdated"`
ModifiedBy string `json:"modifiedBy"`
Properties map[string][]string `json:"properties,omitempty"`
DownloadURI string `json:"downloadUri"`
RemoteURL string `json:"remoteUrl,omitempty"`
MimeType string `json:"mimeType"`
Size string `json:"size"`
URI string `json:"uri"`
Checksums struct {
SHA1 string `json:"sha1,omitempty"`
MD5 string `json:"md5,omitempty"`
SHA256 string `json:"sha256,omitempty"`
} `json:"checksums"`
OriginalChecksums struct {
SHA1 string `json:"sha1,omitempty"`
MD5 string `json:"md5,omitempty"`
SHA256 string `json:"sha256,omitempty"`
} `json:"originalChecksums"`
} `json:"results"`
}
// PropertySearchResponseTestData is test data for PropertySearchResponse
const PropertySearchResponseTestData = "property_search.json"
func (r PropertySearchResponse) minVersion() Version { return versionMustParse("2.2.0") }
func (r PropertySearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r PropertySearchResponse) deprecated() bool { return false }
// ChecksumSearchResponse represents a ChecksumSearch response
type ChecksumSearchResponse struct {
Results []struct {
Repo string `json:"repo"`
Path string `json:"path"`
Created *JSONTime `json:"created"`
CreatedBy string `json:"createdBy"`
LastModified *JSONTime `json:"lastModified"`
LastUpdated *JSONTime `json:"lastUpdated"`
ModifiedBy string `json:"modifiedBy"`
Properties map[string][]string `json:"properties,omitempty"`
DownloadURI string `json:"downloadUri"`
RemoteURL string `json:"remoteUrl,omitempty"`
MimeType string `json:"mimeType"`
Size string `json:"size"`
URI string `json:"uri"`
Checksums struct {
SHA1 string `json:"sha1,omitempty"`
MD5 string `json:"md5,omitempty"`
SHA256 string `json:"sha256,omitempty"`
} `json:"checksums"`
OriginalChecksums struct {
SHA1 string `json:"sha1,omitempty"`
MD5 string `json:"md5,omitempty"`
SHA256 string `json:"sha256,omitempty"`
} `json:"originalChecksums"`
} `json:"results"`
}
// ChecksumSearchResponseTestData is test data for ChecksumSearchResponse
const ChecksumSearchResponseTestData = "checksum_search.json"
func (r ChecksumSearchResponse) minVersion() Version { return versionMustParse("2.3.0") }
func (r ChecksumSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r ChecksumSearchResponse) deprecated() bool { return false }
// BadChecksumSearchResponse represents a BadChecksumSearch response
type BadChecksumSearchResponse struct {
Results []struct {
URI string `json:"uri"`
ServerMD5 string `json:"serverMd5"`
ClientMD5 string `json:"clientMd5"`
} `json:"results"`
}
// BadChecksumSearchResponseTestData is test data for BadChecksumSearchResponse
const BadChecksumSearchResponseTestData = "bad_checksum_search.json"
func (r BadChecksumSearchResponse) minVersion() Version { return versionMustParse("2.3.4") }
func (r BadChecksumSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r BadChecksumSearchResponse) deprecated() bool { return false }
// ArtifactsNotDownloadedSinceSearchResponse represents a ArtifactsNotDownloadedSinceSearch response
type ArtifactsNotDownloadedSinceSearchResponse struct {
Results []struct {
URI string `json:"uri"`
LastDownload *JSONTime `json:"lastDownloaded"`
DownloadCount int `json:"downloadCount"`
RemoteLastDownloaded *JSONTime `json:"remoteLastDownloaded"`
RemoteDownloadCount int `json:"remoteDownloadCount"`
} `json:"results"`
}
// ArtifactsNotDownloadedSinceSearchResponseTestData is test data for ArtifactsNotDownloadedSinceSearchResponse
const ArtifactsNotDownloadedSinceSearchResponseTestData = "artifacts_not_downloaded_since_search.json"
func (r ArtifactsNotDownloadedSinceSearchResponse) minVersion() Version {
return versionMustParse("2.2.4")
}
func (r ArtifactsNotDownloadedSinceSearchResponse) maxVersion() Version {
return versionMustParse(CurrentVersion)
}
func (r ArtifactsNotDownloadedSinceSearchResponse) deprecated() bool { return false }
// ArtifactsWithDataInRangeSearchResponse represents a ArtifactsWithDataInRangeSearch response
type ArtifactsWithDataInRangeSearchResponse struct {
Results []struct {
URI string `json:"uri"`
Created *JSONTime `json:"created"`
LastModified *JSONTime `json:"lastModified"`
LastDownloaded *JSONTime `json:"lastDownloaded"`
} `json:"results"`
}
// ArtifactsWithDataInRangeSearchResponseTestData is test data for ArtifactsWithDataInRangeSearchResponse
const ArtifactsWithDataInRangeSearchResponseTestData = "artifacts_with_date_in_range_search.json"
func (r ArtifactsWithDataInRangeSearchResponse) minVersion() Version { return versionMustParse("3.2.1") }
func (r ArtifactsWithDataInRangeSearchResponse) maxVersion() Version {
return versionMustParse(CurrentVersion)
}
func (r ArtifactsWithDataInRangeSearchResponse) deprecated() bool { return false }
// ArtifactsCreatedInDateRangeSearchResponse represents a ArtifactsCreatedInDateRangeSearch response
type ArtifactsCreatedInDateRangeSearchResponse struct {
Results []struct {
URI string `json:"uri"`
Created *JSONTime `json:"created"`
} `json:"results"`
}
// ArtifactsCreatedInDateRangeSearchResponseTestData is test data for ArtifactsCreatedInDateRangeSearchResponse
const ArtifactsCreatedInDateRangeSearchResponseTestData = "artifacts_created_in_date_range_search.json"
func (r ArtifactsCreatedInDateRangeSearchResponse) minVersion() Version {
return versionMustParse("2.2.0")
}
func (r ArtifactsCreatedInDateRangeSearchResponse) maxVersion() Version {
return versionMustParse(CurrentVersion)
}
func (r ArtifactsCreatedInDateRangeSearchResponse) deprecated() bool { return false }
// PatternSearchResponse represents a PatternSearch response
type PatternSearchResponse struct {
RepoURI string `json:"repoUri"`
SourcePattern string `json:"sourcePattern"`
Files []string `json:"files"`
}
// PatternSearchResponseTestData is test data for PatternSearchResponse
const PatternSearchResponseTestData = "pattern_search.json"
func (r PatternSearchResponse) minVersion() Version { return versionMustParse("2.3.4") }
func (r PatternSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r PatternSearchResponse) deprecated() bool { return false }
// BuildsForDependencyResponse represents a BuildsForDepdency response
type BuildsForDependencyResponse struct {
Results []struct {
URI string `json:"uri"`
} `json:"results"`
}
// BuildsForDependencyResponseTestData is test data for BuildsForDepdencyResponse
const BuildsForDependencyResponseTestData = "build_for_dependency.json"
func (r BuildsForDependencyResponse) minVersion() Version { return versionMustParse("2.3.4") }
func (r BuildsForDependencyResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r BuildsForDependencyResponse) deprecated() bool { return false }
// LicenseSearchResponse represents a LicenseSearch response
type LicenseSearchResponse struct {
Results []struct {
URI string `json:"uri"`
License string `json:"license"`
Found string `json:"found"`
Status string `json:"status"`
} `json:"results"`
}
// LicenseSearchResponseTestData is test data for LicenseSearchResponse
const LicenseSearchResponseTestData = "license_search.json"
func (r LicenseSearchResponse) minVersion() Version { return versionMustParse("2.3.0") }
func (r LicenseSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r LicenseSearchResponse) deprecated() bool { return false }
// ArtifactVersionSearchResponse represents a ArtifactVersionSearch response
type ArtifactVersionSearchResponse struct {
Results []struct {
Version string `json:"version"`
Integration bool `json:"integration"`
} `json:"results"`
}
// ArtifactVersionSearchResponseTestData is test data for ArtifactVersionSearchResponse
const ArtifactVersionSearchResponseTestData = "artifact_version_search.json"
func (r ArtifactVersionSearchResponse) minVersion() Version { return versionMustParse("2.6.0") }
func (r ArtifactVersionSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r ArtifactVersionSearchResponse) deprecated() bool { return false }
// ArtifactLatestVersionBasedOnLayoutSearchResponse represents a ArtifactLatestVersionBasedOnLayout response
type ArtifactLatestVersionBasedOnLayoutSearchResponse struct{}
func (r ArtifactLatestVersionBasedOnLayoutSearchResponse) minVersion() Version {
return versionMustParse("2.6.0")
}
func (r ArtifactLatestVersionBasedOnLayoutSearchResponse) maxVersion() Version {
return versionMustParse(CurrentVersion)
}
func (r ArtifactLatestVersionBasedOnLayoutSearchResponse) deprecated() bool { return false }
// ArtifactLatestVersionBasedOnPropertiesSearchResponse represents a ArtifactLatestVersionBasedOnPropertiesSearch response
type ArtifactLatestVersionBasedOnPropertiesSearchResponse struct {
Version string `json:"version"`
Artifacts []struct {
URI string `json:"uri"`
} `json:"artifacts"`
}
// ArtifactLatestVersionBasedOnPropertiesSearchResponseTestData is test data for ArtifactLatestVersionBasedOnPropertiesSearchResponse
const ArtifactLatestVersionBasedOnPropertiesSearchResponseTestData = "artifact_latest_version_by_props_search.json"
func (r ArtifactLatestVersionBasedOnPropertiesSearchResponse) minVersion() Version {
return versionMustParse("3.1.1")
}
func (r ArtifactLatestVersionBasedOnPropertiesSearchResponse) maxVersion() Version {
return versionMustParse(CurrentVersion)
}
func (r ArtifactLatestVersionBasedOnPropertiesSearchResponse) deprecated() bool { return false }
// BuildArtifactsSearchResponse represents a BuildArtifactsSearch response
type BuildArtifactsSearchResponse struct {
Results []struct {
DownloadURI string `json:"downloadUri"`
} `json:"results"`
}
// BuildArtifactsSearchResponseTestData is test data for BuildArtifactsSearchResponse
const BuildArtifactsSearchResponseTestData = "build_artifacts_search.json"
func (r BuildArtifactsSearchResponse) minVersion() Version { return versionMustParse("2.6.5") }
func (r BuildArtifactsSearchResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r BuildArtifactsSearchResponse) deprecated() bool { return false }
// ListDockerRepositoriesResponse represents a ListDockerRepositories response
type ListDockerRepositoriesResponse struct {
Repositories []string `json:"repositories"`
}
// ListDockerRepositoriesResponseTestData is test data for ListDockerRepositoriesResponse
const ListDockerRepositoriesResponseTestData = "list_docker_repos.json"
func (r ListDockerRepositoriesResponse) minVersion() Version { return versionMustParse("4.4.3") }
func (r ListDockerRepositoriesResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r ListDockerRepositoriesResponse) deprecated() bool { return false }
// ListDockerTagsResponse represents a ListDockerTags response
type ListDockerTagsResponse struct {
Name string `json:"name"`
Tags []string `json:"tags"`
}
// ListDockerTagsResponseTestData is test data for ListDockerTagsResponse
const ListDockerTagsResponseTestData = "list_docker_tags.json"
func (r ListDockerTagsResponse) minVersion() Version { return versionMustParse("4.4.3") }
func (r ListDockerTagsResponse) maxVersion() Version { return versionMustParse(CurrentVersion) }
func (r ListDockerTagsResponse) deprecated() bool { return false }