harbor2_client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +186 -0
  4. data/Rakefile +8 -0
  5. data/docs/AdditionLink.md +9 -0
  6. data/docs/AdditionLinks.md +7 -0
  7. data/docs/Annotations.md +7 -0
  8. data/docs/Artifact.md +25 -0
  9. data/docs/ArtifactApi.md +694 -0
  10. data/docs/AuditLog.md +13 -0
  11. data/docs/AuditlogApi.md +69 -0
  12. data/docs/CVEAllowlist.md +13 -0
  13. data/docs/CVEAllowlistItem.md +8 -0
  14. data/docs/Error.md +9 -0
  15. data/docs/Errors.md +8 -0
  16. data/docs/Execution.md +17 -0
  17. data/docs/ExtraAttrs.md +7 -0
  18. data/docs/Icon.md +9 -0
  19. data/docs/IconApi.md +66 -0
  20. data/docs/Instance.md +19 -0
  21. data/docs/Label.md +15 -0
  22. data/docs/Metadata.md +13 -0
  23. data/docs/Metrics.md +14 -0
  24. data/docs/NativeReportSummary.md +15 -0
  25. data/docs/Platform.md +12 -0
  26. data/docs/PreheatApi.md +1176 -0
  27. data/docs/PreheatPolicy.md +18 -0
  28. data/docs/Project.md +22 -0
  29. data/docs/ProjectApi.md +542 -0
  30. data/docs/ProjectDeletable.md +9 -0
  31. data/docs/ProjectMetadata.md +14 -0
  32. data/docs/ProjectReq.md +13 -0
  33. data/docs/ProjectSummary.md +16 -0
  34. data/docs/ProjectSummaryQuota.md +9 -0
  35. data/docs/ProviderUnderProject.md +11 -0
  36. data/docs/Reference.md +13 -0
  37. data/docs/Registry.md +17 -0
  38. data/docs/RegistryCredential.md +10 -0
  39. data/docs/Repository.md +15 -0
  40. data/docs/RepositoryApi.md +256 -0
  41. data/docs/ResourceList.md +7 -0
  42. data/docs/ScanApi.md +138 -0
  43. data/docs/ScanOverview.md +7 -0
  44. data/docs/Tag.md +15 -0
  45. data/docs/Task.md +17 -0
  46. data/docs/VulnerabilitySummary.md +10 -0
  47. data/git_push.sh +55 -0
  48. data/harbor2_client.gemspec +46 -0
  49. data/lib/harbor2_client.rb +81 -0
  50. data/lib/harbor2_client/api/artifact_api.rb +848 -0
  51. data/lib/harbor2_client/api/auditlog_api.rb +91 -0
  52. data/lib/harbor2_client/api/icon_api.rb +84 -0
  53. data/lib/harbor2_client/api/preheat_api.rb +1327 -0
  54. data/lib/harbor2_client/api/project_api.rb +601 -0
  55. data/lib/harbor2_client/api/repository_api.rb +302 -0
  56. data/lib/harbor2_client/api/scan_api.rb +174 -0
  57. data/lib/harbor2_client/api_client.rb +391 -0
  58. data/lib/harbor2_client/api_error.rb +38 -0
  59. data/lib/harbor2_client/configuration.rb +209 -0
  60. data/lib/harbor2_client/models/addition_link.rb +195 -0
  61. data/lib/harbor2_client/models/addition_links.rb +175 -0
  62. data/lib/harbor2_client/models/annotations.rb +175 -0
  63. data/lib/harbor2_client/models/artifact.rb +355 -0
  64. data/lib/harbor2_client/models/audit_log.rb +235 -0
  65. data/lib/harbor2_client/models/cve_allowlist.rb +237 -0
  66. data/lib/harbor2_client/models/cve_allowlist_item.rb +186 -0
  67. data/lib/harbor2_client/models/error.rb +196 -0
  68. data/lib/harbor2_client/models/errors.rb +187 -0
  69. data/lib/harbor2_client/models/execution.rb +273 -0
  70. data/lib/harbor2_client/models/extra_attrs.rb +175 -0
  71. data/lib/harbor2_client/models/icon.rb +195 -0
  72. data/lib/harbor2_client/models/instance.rb +297 -0
  73. data/lib/harbor2_client/models/label.rb +255 -0
  74. data/lib/harbor2_client/models/metadata.rb +237 -0
  75. data/lib/harbor2_client/models/metrics.rb +245 -0
  76. data/lib/harbor2_client/models/native_report_summary.rb +255 -0
  77. data/lib/harbor2_client/models/platform.rb +227 -0
  78. data/lib/harbor2_client/models/preheat_policy.rb +285 -0
  79. data/lib/harbor2_client/models/project.rb +327 -0
  80. data/lib/harbor2_client/models/project_deletable.rb +195 -0
  81. data/lib/harbor2_client/models/project_metadata.rb +245 -0
  82. data/lib/harbor2_client/models/project_req.rb +235 -0
  83. data/lib/harbor2_client/models/project_summary.rb +263 -0
  84. data/lib/harbor2_client/models/project_summary_quota.rb +195 -0
  85. data/lib/harbor2_client/models/provider_under_project.rb +211 -0
  86. data/lib/harbor2_client/models/reference.rb +235 -0
  87. data/lib/harbor2_client/models/registry.rb +274 -0
  88. data/lib/harbor2_client/models/registry_credential.rb +205 -0
  89. data/lib/harbor2_client/models/repository.rb +255 -0
  90. data/lib/harbor2_client/models/resource_list.rb +175 -0
  91. data/lib/harbor2_client/models/scan_overview.rb +176 -0
  92. data/lib/harbor2_client/models/tag.rb +255 -0
  93. data/lib/harbor2_client/models/task.rb +274 -0
  94. data/lib/harbor2_client/models/vulnerability_summary.rb +208 -0
  95. data/lib/harbor2_client/version.rb +15 -0
  96. data/spec/api/artifact_api_spec.rb +209 -0
  97. data/spec/api/auditlog_api_spec.rb +50 -0
  98. data/spec/api/icon_api_spec.rb +48 -0
  99. data/spec/api/preheat_api_spec.rb +311 -0
  100. data/spec/api/project_api_spec.rb +160 -0
  101. data/spec/api/repository_api_spec.rb +94 -0
  102. data/spec/api/scan_api_spec.rb +66 -0
  103. data/spec/api_client_spec.rb +243 -0
  104. data/spec/configuration_spec.rb +42 -0
  105. data/spec/models/addition_link_spec.rb +47 -0
  106. data/spec/models/addition_links_spec.rb +35 -0
  107. data/spec/models/annotations_spec.rb +35 -0
  108. data/spec/models/artifact_spec.rb +143 -0
  109. data/spec/models/audit_log_spec.rb +71 -0
  110. data/spec/models/cve_allowlist_item_spec.rb +41 -0
  111. data/spec/models/cve_allowlist_spec.rb +71 -0
  112. data/spec/models/error_spec.rb +47 -0
  113. data/spec/models/errors_spec.rb +41 -0
  114. data/spec/models/execution_spec.rb +95 -0
  115. data/spec/models/extra_attrs_spec.rb +35 -0
  116. data/spec/models/icon_spec.rb +47 -0
  117. data/spec/models/instance_spec.rb +107 -0
  118. data/spec/models/label_spec.rb +83 -0
  119. data/spec/models/metadata_spec.rb +71 -0
  120. data/spec/models/metrics_spec.rb +77 -0
  121. data/spec/models/native_report_summary_spec.rb +83 -0
  122. data/spec/models/platform_spec.rb +65 -0
  123. data/spec/models/preheat_policy_spec.rb +101 -0
  124. data/spec/models/project_deletable_spec.rb +47 -0
  125. data/spec/models/project_metadata_spec.rb +77 -0
  126. data/spec/models/project_req_spec.rb +71 -0
  127. data/spec/models/project_spec.rb +125 -0
  128. data/spec/models/project_summary_quota_spec.rb +47 -0
  129. data/spec/models/project_summary_spec.rb +89 -0
  130. data/spec/models/provider_under_project_spec.rb +59 -0
  131. data/spec/models/reference_spec.rb +71 -0
  132. data/spec/models/registry_credential_spec.rb +53 -0
  133. data/spec/models/registry_spec.rb +95 -0
  134. data/spec/models/repository_spec.rb +83 -0
  135. data/spec/models/resource_list_spec.rb +35 -0
  136. data/spec/models/scan_overview_spec.rb +35 -0
  137. data/spec/models/tag_spec.rb +83 -0
  138. data/spec/models/task_spec.rb +95 -0
  139. data/spec/models/vulnerability_summary_spec.rb +53 -0
  140. data/spec/spec_helper.rb +111 -0
  141. metadata +428 -0
@@ -0,0 +1,9 @@
1
+ # Harbor2Client::ProjectDeletable
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **deletable** | **BOOLEAN** | Whether the project can be deleted. | [optional]
7
+ **message** | **String** | The detail message when the project can not be deleted. | [optional]
8
+
9
+
@@ -0,0 +1,14 @@
1
+ # Harbor2Client::ProjectMetadata
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **public** | **String** | The public status of the project. The valid values are \"true\", \"false\". | [optional]
7
+ **enable_content_trust** | **String** | Whether content trust is enabled or not. If it is enabled, user can't pull unsigned images from this project. The valid values are \"true\", \"false\". | [optional]
8
+ **prevent_vul** | **String** | Whether prevent the vulnerable images from running. The valid values are \"true\", \"false\". | [optional]
9
+ **severity** | **String** | If the vulnerability is high than severity defined here, the images can't be pulled. The valid values are \"none\", \"low\", \"medium\", \"high\", \"critical\". | [optional]
10
+ **auto_scan** | **String** | Whether scan images automatically when pushing. The valid values are \"true\", \"false\". | [optional]
11
+ **reuse_sys_cve_allowlist** | **String** | Whether this project reuse the system level CVE allowlist as the allowlist of its own. The valid values are \"true\", \"false\". If it is set to \"true\" the actual allowlist associate with this project, if any, will be ignored. | [optional]
12
+ **retention_id** | **String** | The ID of the tag retention policy for the project | [optional]
13
+
14
+
@@ -0,0 +1,13 @@
1
+ # Harbor2Client::ProjectReq
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **project_name** | **String** | The name of the project. | [optional]
7
+ **public** | **BOOLEAN** | deprecated, reserved for project creation in replication | [optional]
8
+ **metadata** | [**ProjectMetadata**](ProjectMetadata.md) | The metadata of the project. | [optional]
9
+ **cve_allowlist** | [**CVEAllowlist**](CVEAllowlist.md) | The CVE allowlist of the project. | [optional]
10
+ **storage_limit** | **Integer** | The storage quota of the project. | [optional]
11
+ **registry_id** | **Integer** | The ID of referenced registry when creating the proxy cache project | [optional]
12
+
13
+
@@ -0,0 +1,16 @@
1
+ # Harbor2Client::ProjectSummary
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **repo_count** | **Integer** | The number of the repositories under this project. | [optional]
7
+ **chart_count** | **Integer** | The total number of charts under this project. | [optional]
8
+ **project_admin_count** | **Integer** | The total number of project admin members. | [optional]
9
+ **maintainer_count** | **Integer** | The total number of maintainer members. | [optional]
10
+ **developer_count** | **Integer** | The total number of developer members. | [optional]
11
+ **guest_count** | **Integer** | The total number of guest members. | [optional]
12
+ **limited_guest_count** | **Integer** | The total number of limited guest members. | [optional]
13
+ **quota** | [**ProjectSummaryQuota**](ProjectSummaryQuota.md) | | [optional]
14
+ **registry** | [**Registry**](Registry.md) | | [optional]
15
+
16
+
@@ -0,0 +1,9 @@
1
+ # Harbor2Client::ProjectSummaryQuota
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **hard** | [**ResourceList**](ResourceList.md) | The hard limits of the quota | [optional]
7
+ **used** | [**ResourceList**](ResourceList.md) | The used status of the quota | [optional]
8
+
9
+
@@ -0,0 +1,11 @@
1
+ # Harbor2Client::ProviderUnderProject
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | | [optional]
7
+ **provider** | **String** | | [optional]
8
+ **enabled** | **BOOLEAN** | | [optional]
9
+ **default** | **BOOLEAN** | | [optional]
10
+
11
+
@@ -0,0 +1,13 @@
1
+ # Harbor2Client::Reference
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **parent_id** | **Integer** | The parent ID of the reference | [optional]
7
+ **child_id** | **Integer** | The child ID of the reference | [optional]
8
+ **child_digest** | **String** | The digest of the child artifact | [optional]
9
+ **platform** | [**Platform**](Platform.md) | | [optional]
10
+ **annotations** | [**Annotations**](Annotations.md) | | [optional]
11
+ **urls** | **Array<String>** | The download URLs | [optional]
12
+
13
+
@@ -0,0 +1,17 @@
1
+ # Harbor2Client::Registry
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | The registry ID. | [optional]
7
+ **url** | **String** | The registry URL string. | [optional]
8
+ **name** | **String** | The registry name. | [optional]
9
+ **credential** | [**RegistryCredential**](RegistryCredential.md) | | [optional]
10
+ **type** | **String** | Type of the registry, e.g. 'harbor'. | [optional]
11
+ **insecure** | **BOOLEAN** | Whether or not the certificate will be verified when Harbor tries to access the server. | [optional]
12
+ **description** | **String** | Description of the registry. | [optional]
13
+ **status** | **String** | Health status of the registry. | [optional]
14
+ **creation_time** | **String** | The create time of the policy. | [optional]
15
+ **update_time** | **String** | The update time of the policy. | [optional]
16
+
17
+
@@ -0,0 +1,10 @@
1
+ # Harbor2Client::RegistryCredential
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **type** | **String** | Credential type, such as 'basic', 'oauth'. | [optional]
7
+ **access_key** | **String** | Access key, e.g. user name when credential type is 'basic'. | [optional]
8
+ **access_secret** | **String** | Access secret, e.g. password when credential type is 'basic'. | [optional]
9
+
10
+
@@ -0,0 +1,15 @@
1
+ # Harbor2Client::Repository
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | The ID of the repository | [optional]
7
+ **project_id** | **Integer** | The ID of the project that the repository belongs to | [optional]
8
+ **name** | **String** | The name of the repository | [optional]
9
+ **description** | **String** | The description of the repository | [optional]
10
+ **artifact_count** | **Integer** | The count of the artifacts inside the repository | [optional]
11
+ **pull_count** | **Integer** | The count that the artifact inside the repository pulled | [optional]
12
+ **creation_time** | **DateTime** | The creation time of the repository | [optional]
13
+ **update_time** | **DateTime** | The update time of the repository | [optional]
14
+
15
+
@@ -0,0 +1,256 @@
1
+ # Harbor2Client::RepositoryApi
2
+
3
+ All URIs are relative to *http://localhost/api/v2.0*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**delete_repository**](RepositoryApi.md#delete_repository) | **DELETE** /projects/{project_name}/repositories/{repository_name} | Delete repository
8
+ [**get_repository**](RepositoryApi.md#get_repository) | **GET** /projects/{project_name}/repositories/{repository_name} | Get repository
9
+ [**list_repositories**](RepositoryApi.md#list_repositories) | **GET** /projects/{project_name}/repositories | List repositories
10
+ [**update_repository**](RepositoryApi.md#update_repository) | **PUT** /projects/{project_name}/repositories/{repository_name} | Update repository
11
+
12
+
13
+ # **delete_repository**
14
+ > delete_repository(project_namerepository_name, , opts)
15
+
16
+ Delete repository
17
+
18
+ Delete the repository specified by name
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'harbor2_client'
24
+ # setup authorization
25
+ Harbor2Client.configure do |config|
26
+ # Configure HTTP basic authorization: basic
27
+ config.username = 'YOUR USERNAME'
28
+ config.password = 'YOUR PASSWORD'
29
+ end
30
+
31
+ api_instance = Harbor2Client::RepositoryApi.new
32
+
33
+ project_name = 'project_name_example' # String | The name of the project
34
+
35
+ repository_name = 'repository_name_example' # String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
36
+
37
+ opts = {
38
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
39
+ }
40
+
41
+ begin
42
+ #Delete repository
43
+ api_instance.delete_repository(project_namerepository_name, , opts)
44
+ rescue Harbor2Client::ApiError => e
45
+ puts "Exception when calling RepositoryApi->delete_repository: #{e}"
46
+ end
47
+ ```
48
+
49
+ ### Parameters
50
+
51
+ Name | Type | Description | Notes
52
+ ------------- | ------------- | ------------- | -------------
53
+ **project_name** | **String**| The name of the project |
54
+ **repository_name** | **String**| The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb |
55
+ **x_request_id** | **String**| An unique ID for the request | [optional]
56
+
57
+ ### Return type
58
+
59
+ nil (empty response body)
60
+
61
+ ### Authorization
62
+
63
+ [basic](../README.md#basic)
64
+
65
+ ### HTTP request headers
66
+
67
+ - **Content-Type**: application/json
68
+ - **Accept**: application/json
69
+
70
+
71
+
72
+ # **get_repository**
73
+ > Repository get_repository(project_namerepository_name, , opts)
74
+
75
+ Get repository
76
+
77
+ Get the repository specified by name
78
+
79
+ ### Example
80
+ ```ruby
81
+ # load the gem
82
+ require 'harbor2_client'
83
+ # setup authorization
84
+ Harbor2Client.configure do |config|
85
+ # Configure HTTP basic authorization: basic
86
+ config.username = 'YOUR USERNAME'
87
+ config.password = 'YOUR PASSWORD'
88
+ end
89
+
90
+ api_instance = Harbor2Client::RepositoryApi.new
91
+
92
+ project_name = 'project_name_example' # String | The name of the project
93
+
94
+ repository_name = 'repository_name_example' # String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
95
+
96
+ opts = {
97
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
98
+ }
99
+
100
+ begin
101
+ #Get repository
102
+ result = api_instance.get_repository(project_namerepository_name, , opts)
103
+ p result
104
+ rescue Harbor2Client::ApiError => e
105
+ puts "Exception when calling RepositoryApi->get_repository: #{e}"
106
+ end
107
+ ```
108
+
109
+ ### Parameters
110
+
111
+ Name | Type | Description | Notes
112
+ ------------- | ------------- | ------------- | -------------
113
+ **project_name** | **String**| The name of the project |
114
+ **repository_name** | **String**| The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb |
115
+ **x_request_id** | **String**| An unique ID for the request | [optional]
116
+
117
+ ### Return type
118
+
119
+ [**Repository**](Repository.md)
120
+
121
+ ### Authorization
122
+
123
+ [basic](../README.md#basic)
124
+
125
+ ### HTTP request headers
126
+
127
+ - **Content-Type**: application/json
128
+ - **Accept**: application/json
129
+
130
+
131
+
132
+ # **list_repositories**
133
+ > Array<Repository> list_repositories(project_name, opts)
134
+
135
+ List repositories
136
+
137
+ List repositories of the specified project
138
+
139
+ ### Example
140
+ ```ruby
141
+ # load the gem
142
+ require 'harbor2_client'
143
+ # setup authorization
144
+ Harbor2Client.configure do |config|
145
+ # Configure HTTP basic authorization: basic
146
+ config.username = 'YOUR USERNAME'
147
+ config.password = 'YOUR PASSWORD'
148
+ end
149
+
150
+ api_instance = Harbor2Client::RepositoryApi.new
151
+
152
+ project_name = 'project_name_example' # String | The name of the project
153
+
154
+ opts = {
155
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
156
+ q: 'q_example' # String | Query string to query resources. Supported query patterns are \"exact match(k=v)\", \"fuzzy match(k=~v)\", \"range(k=[min~max])\", \"list with union releationship(k={v1 v2 v3})\" and \"list with intersetion relationship(k=(v1 v2 v3))\". The value of range and list can be string(enclosed by \" or '), integer or time(in format \"2020-04-09 02:36:00\"). All of these query patterns should be put in the query string \"q=xxx\" and splitted by \",\". e.g. q=k1=v1,k2=~v2,k3=[min~max]
157
+ page: 1, # Integer | The page number
158
+ page_size: 10, # Integer | The size of per page
159
+ }
160
+
161
+ begin
162
+ #List repositories
163
+ result = api_instance.list_repositories(project_name, opts)
164
+ p result
165
+ rescue Harbor2Client::ApiError => e
166
+ puts "Exception when calling RepositoryApi->list_repositories: #{e}"
167
+ end
168
+ ```
169
+
170
+ ### Parameters
171
+
172
+ Name | Type | Description | Notes
173
+ ------------- | ------------- | ------------- | -------------
174
+ **project_name** | **String**| The name of the project |
175
+ **x_request_id** | **String**| An unique ID for the request | [optional]
176
+ **q** | **String**| Query string to query resources. Supported query patterns are \"exact match(k=v)\", \"fuzzy match(k=~v)\", \"range(k=[min~max])\", \"list with union releationship(k={v1 v2 v3})\" and \"list with intersetion relationship(k=(v1 v2 v3))\". The value of range and list can be string(enclosed by \" or '), integer or time(in format \"2020-04-09 02:36:00\"). All of these query patterns should be put in the query string \"q=xxx\" and splitted by \",\". e.g. q=k1=v1,k2=~v2,k3=[min~max] | [optional]
177
+ **page** | **Integer**| The page number | [optional] [default to 1]
178
+ **page_size** | **Integer**| The size of per page | [optional] [default to 10]
179
+
180
+ ### Return type
181
+
182
+ [**Array<Repository>**](Repository.md)
183
+
184
+ ### Authorization
185
+
186
+ [basic](../README.md#basic)
187
+
188
+ ### HTTP request headers
189
+
190
+ - **Content-Type**: application/json
191
+ - **Accept**: application/json
192
+
193
+
194
+
195
+ # **update_repository**
196
+ > update_repository(project_namerepository_name, repository, opts)
197
+
198
+ Update repository
199
+
200
+ Update the repository specified by name
201
+
202
+ ### Example
203
+ ```ruby
204
+ # load the gem
205
+ require 'harbor2_client'
206
+ # setup authorization
207
+ Harbor2Client.configure do |config|
208
+ # Configure HTTP basic authorization: basic
209
+ config.username = 'YOUR USERNAME'
210
+ config.password = 'YOUR PASSWORD'
211
+ end
212
+
213
+ api_instance = Harbor2Client::RepositoryApi.new
214
+
215
+ project_name = 'project_name_example' # String | The name of the project
216
+
217
+ repository_name = 'repository_name_example' # String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
218
+
219
+ repository = Harbor2Client::Repository.new # Repository | The JSON object of repository.
220
+
221
+ opts = {
222
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
223
+ }
224
+
225
+ begin
226
+ #Update repository
227
+ api_instance.update_repository(project_namerepository_name, repository, opts)
228
+ rescue Harbor2Client::ApiError => e
229
+ puts "Exception when calling RepositoryApi->update_repository: #{e}"
230
+ end
231
+ ```
232
+
233
+ ### Parameters
234
+
235
+ Name | Type | Description | Notes
236
+ ------------- | ------------- | ------------- | -------------
237
+ **project_name** | **String**| The name of the project |
238
+ **repository_name** | **String**| The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb |
239
+ **repository** | [**Repository**](Repository.md)| The JSON object of repository. |
240
+ **x_request_id** | **String**| An unique ID for the request | [optional]
241
+
242
+ ### Return type
243
+
244
+ nil (empty response body)
245
+
246
+ ### Authorization
247
+
248
+ [basic](../README.md#basic)
249
+
250
+ ### HTTP request headers
251
+
252
+ - **Content-Type**: application/json
253
+ - **Accept**: application/json
254
+
255
+
256
+
@@ -0,0 +1,7 @@
1
+ # Harbor2Client::ResourceList
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,138 @@
1
+ # Harbor2Client::ScanApi
2
+
3
+ All URIs are relative to *http://localhost/api/v2.0*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_report_log**](ScanApi.md#get_report_log) | **GET** /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/{report_id}/log | Get the log of the scan report
8
+ [**scan_artifact**](ScanApi.md#scan_artifact) | **POST** /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan | Scan the artifact
9
+
10
+
11
+ # **get_report_log**
12
+ > String get_report_log(project_namerepository_name, reference, report_id, opts)
13
+
14
+ Get the log of the scan report
15
+
16
+ Get the log of the scan report
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'harbor2_client'
22
+ # setup authorization
23
+ Harbor2Client.configure do |config|
24
+ # Configure HTTP basic authorization: basic
25
+ config.username = 'YOUR USERNAME'
26
+ config.password = 'YOUR PASSWORD'
27
+ end
28
+
29
+ api_instance = Harbor2Client::ScanApi.new
30
+
31
+ project_name = 'project_name_example' # String | The name of the project
32
+
33
+ repository_name = 'repository_name_example' # String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
34
+
35
+ reference = 'reference_example' # String | The reference of the artifact, can be digest or tag
36
+
37
+ report_id = 'report_id_example' # String | The report id to get the log
38
+
39
+ opts = {
40
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
41
+ }
42
+
43
+ begin
44
+ #Get the log of the scan report
45
+ result = api_instance.get_report_log(project_namerepository_name, reference, report_id, opts)
46
+ p result
47
+ rescue Harbor2Client::ApiError => e
48
+ puts "Exception when calling ScanApi->get_report_log: #{e}"
49
+ end
50
+ ```
51
+
52
+ ### Parameters
53
+
54
+ Name | Type | Description | Notes
55
+ ------------- | ------------- | ------------- | -------------
56
+ **project_name** | **String**| The name of the project |
57
+ **repository_name** | **String**| The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb |
58
+ **reference** | **String**| The reference of the artifact, can be digest or tag |
59
+ **report_id** | **String**| The report id to get the log |
60
+ **x_request_id** | **String**| An unique ID for the request | [optional]
61
+
62
+ ### Return type
63
+
64
+ **String**
65
+
66
+ ### Authorization
67
+
68
+ [basic](../README.md#basic)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: application/json
73
+ - **Accept**: text/plain
74
+
75
+
76
+
77
+ # **scan_artifact**
78
+ > scan_artifact(project_namerepository_name, reference, , opts)
79
+
80
+ Scan the artifact
81
+
82
+ Scan the specified artifact
83
+
84
+ ### Example
85
+ ```ruby
86
+ # load the gem
87
+ require 'harbor2_client'
88
+ # setup authorization
89
+ Harbor2Client.configure do |config|
90
+ # Configure HTTP basic authorization: basic
91
+ config.username = 'YOUR USERNAME'
92
+ config.password = 'YOUR PASSWORD'
93
+ end
94
+
95
+ api_instance = Harbor2Client::ScanApi.new
96
+
97
+ project_name = 'project_name_example' # String | The name of the project
98
+
99
+ repository_name = 'repository_name_example' # String | The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb
100
+
101
+ reference = 'reference_example' # String | The reference of the artifact, can be digest or tag
102
+
103
+ opts = {
104
+ x_request_id: 'x_request_id_example' # String | An unique ID for the request
105
+ }
106
+
107
+ begin
108
+ #Scan the artifact
109
+ api_instance.scan_artifact(project_namerepository_name, reference, , opts)
110
+ rescue Harbor2Client::ApiError => e
111
+ puts "Exception when calling ScanApi->scan_artifact: #{e}"
112
+ end
113
+ ```
114
+
115
+ ### Parameters
116
+
117
+ Name | Type | Description | Notes
118
+ ------------- | ------------- | ------------- | -------------
119
+ **project_name** | **String**| The name of the project |
120
+ **repository_name** | **String**| The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb |
121
+ **reference** | **String**| The reference of the artifact, can be digest or tag |
122
+ **x_request_id** | **String**| An unique ID for the request | [optional]
123
+
124
+ ### Return type
125
+
126
+ nil (empty response body)
127
+
128
+ ### Authorization
129
+
130
+ [basic](../README.md#basic)
131
+
132
+ ### HTTP request headers
133
+
134
+ - **Content-Type**: application/json
135
+ - **Accept**: application/json
136
+
137
+
138
+