Skip to content

Commit

Permalink
Merge pull request #1 from liger1978/harbor2.3.3
Browse files Browse the repository at this point in the history
Update for harbor v2.3.3, add build script & swagger-codegen-cli conf
  • Loading branch information
liger1978 authored Oct 6, 2021
2 parents 9c8b1a4 + 545e9b9 commit 398c354
Show file tree
Hide file tree
Showing 481 changed files with 51,068 additions and 225 deletions.
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.17
2.4.22
260 changes: 241 additions & 19 deletions README.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/Access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Harbor2Client::Access

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**resource** | **String** | The resource of the access | [optional]
**action** | **String** | The action of the access | [optional]
**effect** | **String** | The effect of the access | [optional]


78 changes: 76 additions & 2 deletions docs/ArtifactApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Method | HTTP request | Description
[**delete_tag**](ArtifactApi.md#delete_tag) | **DELETE** /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags/{tag_name} | Delete tag
[**get_addition**](ArtifactApi.md#get_addition) | **GET** /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/additions/{addition} | Get the addition of the specific artifact
[**get_artifact**](ArtifactApi.md#get_artifact) | **GET** /projects/{project_name}/repositories/{repository_name}/artifacts/{reference} | Get the specific artifact
[**get_vulnerabilities_addition**](ArtifactApi.md#get_vulnerabilities_addition) | **GET** /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/additions/vulnerabilities | Get the vulnerabilities addition of the specific artifact
[**list_artifacts**](ArtifactApi.md#list_artifacts) | **GET** /projects/{project_name}/repositories/{repository_name}/artifacts | List artifacts
[**list_tags**](ArtifactApi.md#list_tags) | **GET** /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/tags | List tags
[**remove_label**](ArtifactApi.md#remove_label) | **DELETE** /projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/labels/{label_id} | Remove label from artifact
Expand Down Expand Up @@ -431,6 +432,7 @@ opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
page: 1, # Integer | The page number
page_size: 10, # Integer | The size of per page
x_accept_vulnerabilities: 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' # String | A comma-separated lists of MIME types for the scan report or scan summary. The first mime type will be used when the report found for it. Currently the mime type supports 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' and 'application/vnd.security.vulnerability.report; version=1.1'
with_tag: true, # BOOLEAN | Specify whether the tags are inclued inside the returning artifacts
with_label: false, # BOOLEAN | Specify whether the labels are inclued inside the returning artifacts
with_scan_overview: false, # BOOLEAN | Specify whether the scan overview is inclued inside the returning artifacts
Expand All @@ -457,6 +459,7 @@ Name | Type | Description | Notes
**x_request_id** | **String**| An unique ID for the request | [optional]
**page** | **Integer**| The page number | [optional] [default to 1]
**page_size** | **Integer**| The size of per page | [optional] [default to 10]
**x_accept_vulnerabilities** | **String**| A comma-separated lists of MIME types for the scan report or scan summary. The first mime type will be used when the report found for it. Currently the mime type supports 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' and 'application/vnd.security.vulnerability.report; version=1.1' | [optional] [default to application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0]
**with_tag** | **BOOLEAN**| Specify whether the tags are inclued inside the returning artifacts | [optional] [default to true]
**with_label** | **BOOLEAN**| Specify whether the labels are inclued inside the returning artifacts | [optional] [default to false]
**with_scan_overview** | **BOOLEAN**| Specify whether the scan overview is inclued inside the returning artifacts | [optional] [default to false]
Expand All @@ -478,6 +481,71 @@ Name | Type | Description | Notes



# **get_vulnerabilities_addition**
> String get_vulnerabilities_addition(project_namerepository_name, reference, , opts)
Get the vulnerabilities addition of the specific artifact

Get the vulnerabilities addition of the artifact specified by the reference under the project and repository.

### Example
```ruby
# load the gem
require 'harbor2_client'
# setup authorization
Harbor2Client.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end

api_instance = Harbor2Client::ArtifactApi.new

project_name = 'project_name_example' # String | The name of the project

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

reference = 'reference_example' # String | The reference of the artifact, can be digest or tag

opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
x_accept_vulnerabilities: 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' # String | A comma-separated lists of MIME types for the scan report or scan summary. The first mime type will be used when the report found for it. Currently the mime type supports 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' and 'application/vnd.security.vulnerability.report; version=1.1'
}

begin
#Get the vulnerabilities addition of the specific artifact
result = api_instance.get_vulnerabilities_addition(project_namerepository_name, reference, , opts)
p result
rescue Harbor2Client::ApiError => e
puts "Exception when calling ArtifactApi->get_vulnerabilities_addition: #{e}"
end
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_name** | **String**| The name of the project |
**repository_name** | **String**| The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb |
**reference** | **String**| The reference of the artifact, can be digest or tag |
**x_request_id** | **String**| An unique ID for the request | [optional]
**x_accept_vulnerabilities** | **String**| A comma-separated lists of MIME types for the scan report or scan summary. The first mime type will be used when the report found for it. Currently the mime type supports 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' and 'application/vnd.security.vulnerability.report; version=1.1' | [optional] [default to application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0]

### Return type

**String**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json



# **list_artifacts**
> Array<Artifact> list_artifacts(project_namerepository_name, , opts)
Expand All @@ -504,9 +572,11 @@ repository_name = 'repository_name_example' # String | The name of the repositor

opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
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]
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]
sort: 'sort_example', # String | Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with \"sort=field1,-field2\"
page: 1, # Integer | The page number
page_size: 10, # Integer | The size of per page
x_accept_vulnerabilities: 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' # String | A comma-separated lists of MIME types for the scan report or scan summary. The first mime type will be used when the report found for it. Currently the mime type supports 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' and 'application/vnd.security.vulnerability.report; version=1.1'
with_tag: true, # BOOLEAN | Specify whether the tags are included inside the returning artifacts
with_label: false, # BOOLEAN | Specify whether the labels are included inside the returning artifacts
with_scan_overview: false, # BOOLEAN | Specify whether the scan overview is included inside the returning artifacts
Expand All @@ -531,8 +601,10 @@ Name | Type | Description | Notes
**repository_name** | **String**| The name of the repository. If it contains slash, encode it with URL encoding. e.g. a/b -> a%252Fb |
**x_request_id** | **String**| An unique ID for the request | [optional]
**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]
**sort** | **String**| Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with \"sort=field1,-field2\" | [optional]
**page** | **Integer**| The page number | [optional] [default to 1]
**page_size** | **Integer**| The size of per page | [optional] [default to 10]
**x_accept_vulnerabilities** | **String**| A comma-separated lists of MIME types for the scan report or scan summary. The first mime type will be used when the report found for it. Currently the mime type supports 'application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' and 'application/vnd.security.vulnerability.report; version=1.1' | [optional] [default to application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0]
**with_tag** | **BOOLEAN**| Specify whether the tags are included inside the returning artifacts | [optional] [default to true]
**with_label** | **BOOLEAN**| Specify whether the labels are included inside the returning artifacts | [optional] [default to false]
**with_scan_overview** | **BOOLEAN**| Specify whether the scan overview is included inside the returning artifacts | [optional] [default to false]
Expand Down Expand Up @@ -582,7 +654,8 @@ reference = 'reference_example' # String | The reference of the artifact, can be

opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
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]
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]
sort: 'sort_example', # String | Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with \"sort=field1,-field2\"
page: 1, # Integer | The page number
page_size: 10, # Integer | The size of per page
with_signature: false, # BOOLEAN | Specify whether the signature is included inside the returning tags
Expand All @@ -607,6 +680,7 @@ Name | Type | Description | Notes
**reference** | **String**| The reference of the artifact, can be digest or tag |
**x_request_id** | **String**| An unique ID for the request | [optional]
**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]
**sort** | **String**| Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with \"sort=field1,-field2\" | [optional]
**page** | **Integer**| The page number | [optional] [default to 1]
**page_size** | **Integer**| The size of per page | [optional] [default to 10]
**with_signature** | **BOOLEAN**| Specify whether the signature is included inside the returning tags | [optional] [default to false]
Expand Down
4 changes: 3 additions & 1 deletion docs/AuditlogApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ api_instance = Harbor2Client::AuditlogApi.new

opts = {
x_request_id: 'x_request_id_example' # String | An unique ID for the request
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]
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]
sort: 'sort_example', # String | Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with \"sort=field1,-field2\"
page: 1, # Integer | The page number
page_size: 10, # Integer | The size of per page
}
Expand All @@ -49,6 +50,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**x_request_id** | **String**| An unique ID for the request | [optional]
**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]
**sort** | **String**| Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending orderr and field2 in descending order with \"sort=field1,-field2\" | [optional]
**page** | **Integer**| The page number | [optional] [default to 1]
**page_size** | **Integer**| The size of per page | [optional] [default to 10]

Expand Down
12 changes: 12 additions & 0 deletions docs/AuthproxySetting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Harbor2Client::AuthproxySetting

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**endpoint** | **String** | The fully qualified URI of login endpoint of authproxy, such as 'https://192.168.1.2:8443/login' | [optional]
**tokenreivew_endpoint** | **String** | The fully qualified URI of token review endpoint of authproxy, such as 'https://192.168.1.2:8443/tokenreview' | [optional]
**skip_search** | **BOOLEAN** | The flag to determine whether Harbor can skip search the user/group when adding him as a member. | [optional]
**verify_cert** | **BOOLEAN** | The flag to determine whether Harbor should verify the certificate when connecting to the auth proxy. | [optional]
**server_certificate** | **String** | The certificate to be pinned when connecting auth proxy. | [optional]


8 changes: 8 additions & 0 deletions docs/Body.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Harbor2Client::Body

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**dry_run** | **BOOLEAN** | | [optional]


8 changes: 8 additions & 0 deletions docs/Body1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Harbor2Client::Body1

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**action** | **String** | | [optional]


9 changes: 9 additions & 0 deletions docs/BoolConfigItem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Harbor2Client::BoolConfigItem

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **BOOLEAN** | The boolean value of current config item | [optional]
**editable** | **BOOLEAN** | The configure item can be updated or not | [optional]


18 changes: 18 additions & 0 deletions docs/ChartMetadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Harbor2Client::ChartMetadata

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | The name of the chart |
**home** | **String** | The URL to the relevant project page | [optional]
**sources** | **Array<String>** | The URL to the source code of chart | [optional]
**version** | **String** | A SemVer 2 version of chart |
**description** | **String** | A one-sentence description of chart | [optional]
**keywords** | **Array<String>** | A list of string keywords | [optional]
**engine** | **String** | The name of template engine |
**icon** | **String** | The URL to an icon file |
**api_version** | **String** | The API version of this chart |
**app_version** | **String** | The version of the application enclosed in the chart |
**deprecated** | **BOOLEAN** | Whether or not this chart is deprecated | [optional]


Loading

0 comments on commit 398c354

Please sign in to comment.