diff --git a/bin/lfs/swagger-codegen-cli-2.2.3.jar b/bin/lfs/swagger-codegen-cli-2.2.3.jar
deleted file mode 100755
index 7aa3f0ca..00000000
--- a/bin/lfs/swagger-codegen-cli-2.2.3.jar
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:3ea8eb8ef7b2f321a184ebfe344e2ac35cd7ba4b288810f7e55678566d97edc1
-size 13827124
diff --git a/bin/lfs/swagger-codegen-cli-2.4.26.jar b/bin/lfs/swagger-codegen-cli-2.4.26.jar
new file mode 100644
index 00000000..7d0a6094
Binary files /dev/null and b/bin/lfs/swagger-codegen-cli-2.4.26.jar differ
diff --git a/bin/swagger-codegen-cli.jar b/bin/swagger-codegen-cli.jar
index 24ce3a31..f7a326cb 120000
--- a/bin/swagger-codegen-cli.jar
+++ b/bin/swagger-codegen-cli.jar
@@ -1 +1 @@
-lfs/swagger-codegen-cli-2.2.3.jar
\ No newline at end of file
+lfs/swagger-codegen-cli-2.4.26.jar
\ No newline at end of file
diff --git a/bindings/go/build.sh b/bindings/go/build.sh
index 035d25af..d68b6741 100755
--- a/bindings/go/build.sh
+++ b/bindings/go/build.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+set -e
+
self=$(readlink -f $BASH_SOURCE)
self_dir=$(dirname $self)
root_dir=$(readlink -f "$self_dir/../..")
@@ -24,3 +26,12 @@ $root_dir/bin/swagger-codegen-cli generate \
-l go \
-o $src_dir \
$common_codegen_options
+
+
+# Apply fixes for missing imports
+#
+# This is a temporary measure as a larger API/swagger update is due soon which
+# should resolve this and other issues properly.
+
+sed -i 's/ \"fmt\"/ \"fmt\"\n \"github.com\/antihax\/optional\"/g' $src_dir/api_files.go
+sed -i 's/ \"strings\"/ \"strings\"\n \"github.com\/antihax\/optional\"/g' $src_dir/api_user.go
diff --git a/bindings/go/deploy.sh b/bindings/go/deploy.sh
index 75973be8..18d199cf 100755
--- a/bindings/go/deploy.sh
+++ b/bindings/go/deploy.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+set -e
+
self=$(readlink -f $BASH_SOURCE)
self_dir=$(dirname $self)
root_dir=$(readlink -f "$self_dir/../..")
diff --git a/bindings/go/src/.swagger-codegen/VERSION b/bindings/go/src/.swagger-codegen/VERSION
index 6b4d1577..21f40d97 100644
--- a/bindings/go/src/.swagger-codegen/VERSION
+++ b/bindings/go/src/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.2.3
\ No newline at end of file
+2.4.26
\ No newline at end of file
diff --git a/bindings/go/src/README.md b/bindings/go/src/README.md
index aa6962d8..c86a38b4 100644
--- a/bindings/go/src/README.md
+++ b/bindings/go/src/README.md
@@ -6,14 +6,14 @@ The API to the Cloudsmith Service
This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client.
- API version: v1
-- Package version: 1.30.0
+- Package version: 1.33.7
- Build package: io.swagger.codegen.languages.GoClientCodegen
For more information, please visit [https://help.cloudsmith.io](https://help.cloudsmith.io)
## Installation
Put the package under your project folder and add the following in import:
-```
- "./cloudsmith_api"
+```golang
+import "./cloudsmith_api"
```
## Documentation for API Endpoints
@@ -120,8 +120,8 @@ Class | Method | HTTP request | Description
*ReposApi* | [**ReposPartialUpdate**](docs/ReposApi.md#repospartialupdate) | **Patch** /repos/{owner}/{identifier}/ | Update details about a repository in a given namespace.
*ReposApi* | [**ReposRead**](docs/ReposApi.md#reposread) | **Get** /repos/{owner}/{identifier}/ | Get a specific repository.
*StatusApi* | [**StatusCheckBasic**](docs/StatusApi.md#statuscheckbasic) | **Get** /status/check/basic/ | Endpoint to check basic API connectivity.
-*StorageregionsApi* | [**StorageRegionsList**](docs/StorageregionsApi.md#storageregionslist) | **Get** /storage-regions/ | Get a list of all available storage regions.
-*StorageregionsApi* | [**StorageRegionsRead**](docs/StorageregionsApi.md#storageregionsread) | **Get** /storage-regions/{slug}/ | Get a specific storage region.
+*StorageRegionsApi* | [**StorageRegionsList**](docs/StorageRegionsApi.md#storageregionslist) | **Get** /storage-regions/ | Get a list of all available storage regions.
+*StorageRegionsApi* | [**StorageRegionsRead**](docs/StorageRegionsApi.md#storageregionsread) | **Get** /storage-regions/{slug}/ | Get a specific storage region.
*UserApi* | [**UserSelf**](docs/UserApi.md#userself) | **Get** /user/self/ | Provide a brief for the current user (if any).
*UserApi* | [**UserTokenCreate**](docs/UserApi.md#usertokencreate) | **Post** /user/token/ | Retrieve the API key/token for the authenticated user.
*UsersApi* | [**UsersProfileRead**](docs/UsersApi.md#usersprofileread) | **Get** /users/profile/{slug}/ | Provide a brief for the specified user (if any).
@@ -248,17 +248,28 @@ Class | Method | HTTP request | Description
## Documentation For Authorization
-
## apikey
-
- **Type**: API key
-- **API key parameter name**: X-Api-Key
-- **Location**: HTTP header
+Example
+```golang
+auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
+ Key: "APIKEY",
+ Prefix: "Bearer", // Omit if not necessary.
+})
+r, err := client.Service.Operation(auth, args)
+```
## basic
-
- **Type**: HTTP basic authentication
+Example
+```golang
+auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
+ UserName: "username",
+ Password: "password",
+})
+r, err := client.Service.Operation(auth, args)
+```
## Author
diff --git a/bindings/go/src/api/swagger.yaml b/bindings/go/src/api/swagger.yaml
new file mode 100644
index 00000000..bf0ce4cd
--- /dev/null
+++ b/bindings/go/src/api/swagger.yaml
@@ -0,0 +1,11734 @@
+---
+swagger: "2.0"
+info:
+ description: "The API to the Cloudsmith Service"
+ version: "v1"
+ title: "Cloudsmith API"
+ termsOfService: "https://help.cloudsmith.io/docs/terms-and-conditions"
+ contact:
+ name: "Cloudsmith Support"
+ url: "https://help.cloudsmith.io"
+ email: "support@cloudsmith.io"
+ license:
+ name: "MIT"
+ url: "https://opensource.org/licenses/MIT"
+host: "api.cloudsmith.io"
+basePath: "/v1"
+schemes:
+- "https"
+paths:
+ /badges/version/{owner}/{repo}/{package_format}/{package_name}/{package_version}/{package_identifiers}/:
+ get:
+ tags:
+ - "badges"
+ summary: "Get latest package version for a package or package group."
+ description: "Get latest package version for a package or package group."
+ operationId: "badges_version_list"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "package_format"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "PackageFormat"
+ - name: "package_name"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "PackageName"
+ - name: "package_version"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "PackageVersion"
+ - name: "package_identifiers"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "PackageIdentifiers"
+ - name: "badge_token"
+ in: "query"
+ description: "Badge token to authenticate for private packages"
+ required: false
+ type: "string"
+ x-exportParamName: "BadgeToken"
+ x-optionalDataType: "String"
+ - name: "cacheSeconds"
+ in: "query"
+ description: "Override the shields.io badge cacheSeconds value."
+ required: false
+ type: "string"
+ x-exportParamName: "CacheSeconds"
+ x-optionalDataType: "String"
+ - name: "color"
+ in: "query"
+ description: "Override the shields.io badge color value."
+ required: false
+ type: "string"
+ x-exportParamName: "Color"
+ x-optionalDataType: "String"
+ - name: "label"
+ in: "query"
+ description: "Override the shields.io badge label value."
+ required: false
+ type: "string"
+ x-exportParamName: "Label"
+ x-optionalDataType: "String"
+ - name: "labelColor"
+ in: "query"
+ description: "Override the shields.io badge labelColor value."
+ required: false
+ type: "string"
+ x-exportParamName: "LabelColor"
+ x-optionalDataType: "String"
+ - name: "logoColor"
+ in: "query"
+ description: "Override the shields.io badge logoColor value."
+ required: false
+ type: "string"
+ x-exportParamName: "LogoColor"
+ x-optionalDataType: "String"
+ - name: "logoWidth"
+ in: "query"
+ description: "Override the shields.io badge logoWidth value."
+ required: false
+ type: "string"
+ x-exportParamName: "LogoWidth"
+ x-optionalDataType: "String"
+ - name: "render"
+ in: "query"
+ description: "If true, badge will be rendered"
+ required: false
+ type: "boolean"
+ x-exportParamName: "Render"
+ x-optionalDataType: "Bool"
+ - name: "shields"
+ in: "query"
+ description: "If true, a shields response will be generated"
+ required: false
+ type: "boolean"
+ x-exportParamName: "Shields"
+ x-optionalDataType: "Bool"
+ - name: "show_latest"
+ in: "query"
+ description: "If true, for latest version badges a '(latest)' suffix is added"
+ required: false
+ type: "boolean"
+ x-exportParamName: "ShowLatest"
+ x-optionalDataType: "Bool"
+ - name: "style"
+ in: "query"
+ description: "Override the shields.io badge style value."
+ required: false
+ type: "string"
+ x-exportParamName: "Style"
+ x-optionalDataType: "String"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema: {}
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /distros/:
+ get:
+ tags:
+ - "distros"
+ summary: "Get a list of all supported distributions."
+ description: "Get a list of all supported distributions."
+ operationId: "distros_list"
+ parameters: []
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Available package formats retrieved"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/Distribution"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /distros/{slug}/:
+ get:
+ tags:
+ - "distros"
+ summary: "View for viewing/listing distributions."
+ description: "View for viewing/listing distributions."
+ operationId: "distros_read"
+ parameters:
+ - name: "slug"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Slug"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/Distribution"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /entitlements/{owner}/{repo}/:
+ get:
+ tags:
+ - "entitlements"
+ summary: "Get a list of all entitlements in a repository."
+ description: "Get a list of all entitlements in a repository."
+ operationId: "entitlements_list"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ - name: "show_tokens"
+ in: "query"
+ description: "Show entitlement token strings in results"
+ required: false
+ type: "boolean"
+ x-exportParamName: "ShowTokens"
+ x-optionalDataType: "Bool"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the list of entitlement tokens"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/RepositoryToken"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ post:
+ tags:
+ - "entitlements"
+ summary: "Create a specific entitlement in a repository."
+ description: "Create a specific entitlement in a repository."
+ operationId: "entitlements_create"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "show_tokens"
+ in: "query"
+ description: "Show entitlement token strings in results"
+ required: false
+ type: "boolean"
+ x-exportParamName: "ShowTokens"
+ x-optionalDataType: "Bool"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/EntitlementsCreate"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Created the specified entitlement"
+ schema:
+ $ref: "#/definitions/RepositoryToken"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /entitlements/{owner}/{repo}/sync/:
+ post:
+ tags:
+ - "entitlements"
+ summary: "Synchronise tokens from a source repository."
+ description: "Synchronise tokens from a source repository."
+ operationId: "entitlements_sync"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "show_tokens"
+ in: "query"
+ description: "Show entitlement token strings in results"
+ required: false
+ type: "boolean"
+ x-exportParamName: "ShowTokens"
+ x-optionalDataType: "Bool"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/EntitlementsSync"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "The tokens have been synchronised from the source repository"
+ schema:
+ $ref: "#/definitions/RepositoryTokenSync"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /entitlements/{owner}/{repo}/{identifier}/:
+ get:
+ tags:
+ - "entitlements"
+ summary: "Get a specific entitlement in a repository."
+ description: "Get a specific entitlement in a repository."
+ operationId: "entitlements_read"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - name: "show_tokens"
+ in: "query"
+ description: "Show entitlement token strings in results"
+ required: false
+ type: "boolean"
+ x-exportParamName: "ShowTokens"
+ x-optionalDataType: "Bool"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the specified entitlement"
+ schema:
+ $ref: "#/definitions/RepositoryToken"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ delete:
+ tags:
+ - "entitlements"
+ summary: "Delete a specific entitlement in a repository."
+ description: "Delete a specific entitlement in a repository."
+ operationId: "entitlements_delete"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Soft-deleted the specified entitlement token successfully"
+ "400":
+ description: "The entitlement cannot be deleted"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ patch:
+ tags:
+ - "entitlements"
+ summary: "Update a specific entitlement in a repository."
+ description: "Update a specific entitlement in a repository."
+ operationId: "entitlements_partial_update"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - name: "show_tokens"
+ in: "query"
+ description: "Show entitlement token strings in results"
+ required: false
+ type: "boolean"
+ x-exportParamName: "ShowTokens"
+ x-optionalDataType: "Bool"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/EntitlementsPartialUpdate"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Updated the specified entitlement"
+ schema:
+ $ref: "#/definitions/RepositoryToken"
+ "400":
+ description: "The entitlement cannot be edited"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /entitlements/{owner}/{repo}/{identifier}/disable/:
+ post:
+ tags:
+ - "entitlements"
+ summary: "Disable an entitlement token in a repository."
+ description: "Disable an entitlement token in a repository."
+ operationId: "entitlements_disable"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "The entitlement token has been disabled"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /entitlements/{owner}/{repo}/{identifier}/enable/:
+ post:
+ tags:
+ - "entitlements"
+ summary: "Enable an entitlement token in a repository."
+ description: "Enable an entitlement token in a repository."
+ operationId: "entitlements_enable"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "The entitlement token has been enabled"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /entitlements/{owner}/{repo}/{identifier}/refresh/:
+ post:
+ tags:
+ - "entitlements"
+ summary: "Refresh an entitlement token in a repository."
+ description: "Refresh an entitlement token in a repository."
+ operationId: "entitlements_refresh"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - name: "show_tokens"
+ in: "query"
+ description: "Show entitlement token strings in results"
+ required: false
+ type: "boolean"
+ x-exportParamName: "ShowTokens"
+ x-optionalDataType: "Bool"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/EntitlementsRefresh"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "The entitlement token has been refreshed"
+ schema:
+ $ref: "#/definitions/RepositoryTokenRefresh"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /entitlements/{owner}/{repo}/{identifier}/reset/:
+ post:
+ tags:
+ - "entitlements"
+ summary: "Reset the statistics for an entitlement token in a repository."
+ description: "Reset the statistics for an entitlement token in a repository."
+ operationId: "entitlements_reset"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - name: "show_tokens"
+ in: "query"
+ description: "Show entitlement token strings in results"
+ required: false
+ type: "boolean"
+ x-exportParamName: "ShowTokens"
+ x-optionalDataType: "Bool"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "The entitlement token statistics have been reset"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /files/{owner}/{repo}/:
+ post:
+ tags:
+ - "files"
+ summary: "Request URL(s) to upload new package file upload(s) to."
+ description: "Request URL(s) to upload new package file upload(s) to."
+ operationId: "files_create"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/FilesCreate"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "202":
+ description: "The upload request was accepted"
+ schema:
+ $ref: "#/definitions/PackageFileUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /files/{owner}/{repo}/validate/:
+ post:
+ tags:
+ - "files"
+ summary: "Validate parameters used for create."
+ description: "Validate parameters used for create."
+ operationId: "files_validate"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/FilesValidate"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /files/{owner}/{repo}/{identifier}/abort/:
+ post:
+ tags:
+ - "files"
+ summary: "Abort a multipart file upload."
+ description: "Abort a multipart file upload."
+ operationId: "files_abort"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/FilesAbort"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "The multipart upload was aborted successfully"
+ "400":
+ description: "The multipart upload could not be aborted"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner), repository or upload file not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /files/{owner}/{repo}/{identifier}/complete/:
+ post:
+ tags:
+ - "files"
+ summary: "Complete a multipart file upload."
+ description: "Complete a multipart file upload."
+ operationId: "files_complete"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/FilesComplete"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "The multipart upload was completed successfully"
+ schema:
+ $ref: "#/definitions/PackageFileUpload"
+ "400":
+ description: "The multipart upload could not be completed"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner), repository or upload file not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /files/{owner}/{repo}/{identifier}/info/:
+ get:
+ tags:
+ - "files"
+ summary: "Get upload information for a multipart file upload."
+ description: "Get upload information for a multipart file upload."
+ operationId: "files_info"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Information for multipart uploaded retrieved successfully"
+ schema:
+ $ref: "#/definitions/PackageFilePartsUpload"
+ "400":
+ description: "The provided upload file was not a multipart upload"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner), repository or upload file not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /formats/:
+ get:
+ tags:
+ - "formats"
+ summary: "Get a list of all supported package formats."
+ description: "Get a list of all supported package formats."
+ operationId: "formats_list"
+ parameters: []
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Available package formats retrieved"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/Format"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /formats/{slug}/:
+ get:
+ tags:
+ - "formats"
+ summary: "Get a specific supported package format."
+ description: "Get a specific supported package format."
+ operationId: "formats_read"
+ parameters:
+ - name: "slug"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Slug"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/Format"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /metrics/entitlements/{owner}/:
+ get:
+ tags:
+ - "metrics"
+ summary: "View for listing entitlement token metrics, across an account."
+ description: "View for listing entitlement token metrics, across an account."
+ operationId: "metrics_entitlements_list"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ - name: "finish"
+ in: "query"
+ description: "Include metrics upto and including this UTC date or UTC datetime.\
+ \ For example '2020-12-31' or '2021-12-13T00:00:00Z'."
+ required: false
+ type: "string"
+ x-exportParamName: "Finish"
+ x-optionalDataType: "String"
+ - name: "start"
+ in: "query"
+ description: "Include metrics from and including this UTC date or UTC datetime.\
+ \ For example '2020-12-31' or '2021-12-13T00:00:00Z'."
+ required: false
+ type: "string"
+ x-exportParamName: "Start"
+ x-optionalDataType: "String"
+ - name: "tokens"
+ in: "query"
+ description: "A comma seperated list of tokens (slug perm) to include in the\
+ \ results."
+ required: false
+ type: "string"
+ x-exportParamName: "Tokens"
+ x-optionalDataType: "String"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the metrics for entitlements"
+ schema:
+ $ref: "#/definitions/EntitlementUsageMetrics"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /metrics/entitlements/{owner}/{repo}/:
+ get:
+ tags:
+ - "metrics"
+ summary: "View for listing entitlement token metrics, for a repository."
+ description: "View for listing entitlement token metrics, for a repository."
+ operationId: "metrics_entitlements_list_0"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ - name: "finish"
+ in: "query"
+ description: "Include metrics upto and including this UTC date or UTC datetime.\
+ \ For example '2020-12-31' or '2021-12-13T00:00:00Z'."
+ required: false
+ type: "string"
+ x-exportParamName: "Finish"
+ x-optionalDataType: "String"
+ - name: "start"
+ in: "query"
+ description: "Include metrics from and including this UTC date or UTC datetime.\
+ \ For example '2020-12-31' or '2021-12-13T00:00:00Z'."
+ required: false
+ type: "string"
+ x-exportParamName: "Start"
+ x-optionalDataType: "String"
+ - name: "tokens"
+ in: "query"
+ description: "A comma seperated list of tokens (slug perm) to include in the\
+ \ results."
+ required: false
+ type: "string"
+ x-exportParamName: "Tokens"
+ x-optionalDataType: "String"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the metrics for entitlements"
+ schema:
+ $ref: "#/definitions/EntitlementUsageMetrics"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /metrics/packages/{owner}/{repo}/:
+ get:
+ tags:
+ - "metrics"
+ summary: "View for listing package usage metrics, for a repository."
+ description: "View for listing package usage metrics, for a repository."
+ operationId: "metrics_packages_list"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ - name: "finish"
+ in: "query"
+ description: "Include metrics upto and including this UTC date or UTC datetime.\
+ \ For example '2020-12-31' or '2021-12-13T00:00:00Z'."
+ required: false
+ type: "string"
+ x-exportParamName: "Finish"
+ x-optionalDataType: "String"
+ - name: "packages"
+ in: "query"
+ description: "A comma seperated list of packages (slug perm) to include in\
+ \ the results."
+ required: false
+ type: "string"
+ x-exportParamName: "Packages"
+ x-optionalDataType: "String"
+ - name: "start"
+ in: "query"
+ description: "Include metrics from and including this UTC date or UTC datetime.\
+ \ For example '2020-12-31' or '2021-12-13T00:00:00Z'."
+ required: false
+ type: "string"
+ x-exportParamName: "Start"
+ x-optionalDataType: "String"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the metrics for packages"
+ schema:
+ $ref: "#/definitions/PackageUsageMetrics"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /namespaces/:
+ get:
+ tags:
+ - "namespaces"
+ summary: "Get a list of all namespaces the user belongs to."
+ description: "Get a list of all namespaces the user belongs to."
+ operationId: "namespaces_list"
+ parameters:
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/Namespace"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /namespaces/{slug}/:
+ get:
+ tags:
+ - "namespaces"
+ summary: "Views for working with namespaces."
+ description: "Views for working with namespaces."
+ operationId: "namespaces_read"
+ parameters:
+ - name: "slug"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Slug"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/Namespace"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /orgs/:
+ get:
+ tags:
+ - "orgs"
+ summary: "Get a list of all the organizations you are associated with."
+ description: "Get a list of all the organizations you are associated with."
+ operationId: "orgs_list"
+ parameters:
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/Organization"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /orgs/{org}/:
+ get:
+ tags:
+ - "orgs"
+ summary: "Get the details for the specific organization."
+ description: "Get the details for the specific organization."
+ operationId: "orgs_read"
+ parameters:
+ - name: "org"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Org"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/Organization"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /orgs/{org}/members/:
+ get:
+ tags:
+ - "orgs"
+ summary: "Get the details for all organization members."
+ description: "Get the details for all organization members."
+ operationId: "orgs_members_list"
+ parameters:
+ - name: "org"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Org"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/OrganizationMembership"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /orgs/{org}/members/{member}/:
+ get:
+ tags:
+ - "orgs"
+ summary: "Get the details for a specific organization member."
+ description: "Get the details for a specific organization member."
+ operationId: "orgs_members_read"
+ parameters:
+ - name: "org"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Org"
+ - name: "member"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Member"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/OrganizationMembership"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /orgs/{org}/members/{member}/remove/:
+ get:
+ tags:
+ - "orgs"
+ summary: "Removes a member from the organization."
+ description: "Removes a member from the organization."
+ operationId: "orgs_members_remove"
+ parameters:
+ - name: "org"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Org"
+ - name: "member"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Member"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/OrganizationMembership"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/:
+ get:
+ tags:
+ - "packages"
+ summary: "Get a list of all packages associated with repository."
+ description: "Get a list of all packages associated with repository."
+ operationId: "packages_list"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ - name: "query"
+ in: "query"
+ description: "A search term for querying names, filenames, versions, distributions,\
+ \ architectures, formats or statuses of packages."
+ required: false
+ type: "string"
+ x-exportParamName: "Query"
+ x-optionalDataType: "String"
+ - name: "sort"
+ in: "query"
+ description: "A field for sorting objects in ascending or descending order."
+ required: false
+ type: "string"
+ x-exportParamName: "Sort"
+ x-optionalDataType: "String"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the list of packages"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/Package"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/alpine/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Alpine package"
+ description: "Create a new Alpine package"
+ operationId: "packages_upload_alpine"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadAlpine"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/cargo/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Cargo package"
+ description: "Create a new Cargo package"
+ operationId: "packages_upload_cargo"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadCargo"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/cocoapods/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new CocoaPods package"
+ description: "Create a new CocoaPods package"
+ operationId: "packages_upload_cocoapods"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadCocoapods"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/composer/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Composer package"
+ description: "Create a new Composer package"
+ operationId: "packages_upload_composer"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadComposer"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/conan/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Conan package"
+ description: "Create a new Conan package"
+ operationId: "packages_upload_conan"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadConan"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/ConanPackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/conda/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Conda package"
+ description: "Create a new Conda package"
+ operationId: "packages_upload_conda"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadConda"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/cran/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new CRAN package"
+ description: "Create a new CRAN package"
+ operationId: "packages_upload_cran"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadCran"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/dart/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Dart package"
+ description: "Create a new Dart package"
+ operationId: "packages_upload_dart"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadDart"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/deb/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Debian package"
+ description: "Create a new Debian package"
+ operationId: "packages_upload_deb"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadDeb"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/docker/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Docker package"
+ description: "Create a new Docker package"
+ operationId: "packages_upload_docker"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadDocker"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/go/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Go package"
+ description: "Create a new Go package"
+ operationId: "packages_upload_go"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadGo"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/helm/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Helm package"
+ description: "Create a new Helm package"
+ operationId: "packages_upload_helm"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadHelm"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/luarocks/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new LuaRocks package"
+ description: "Create a new LuaRocks package"
+ operationId: "packages_upload_luarocks"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadLuarocks"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/maven/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Maven package"
+ description: "Create a new Maven package"
+ operationId: "packages_upload_maven"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadMaven"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/MavenPackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/npm/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new npm package"
+ description: "Create a new npm package"
+ operationId: "packages_upload_npm"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadNpm"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/nuget/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new NuGet package"
+ description: "Create a new NuGet package"
+ operationId: "packages_upload_nuget"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadNuget"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/p2/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new P2 package"
+ description: "Create a new P2 package"
+ operationId: "packages_upload_p2"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadP2"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/python/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Python package"
+ description: "Create a new Python package"
+ operationId: "packages_upload_python"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadPython"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/raw/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Raw package"
+ description: "Create a new Raw package"
+ operationId: "packages_upload_raw"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadRaw"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/RawPackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/rpm/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new RedHat package"
+ description: "Create a new RedHat package"
+ operationId: "packages_upload_rpm"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadRpm"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/ruby/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Ruby package"
+ description: "Create a new Ruby package"
+ operationId: "packages_upload_ruby"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadRuby"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/terraform/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Terraform package"
+ description: "Create a new Terraform package"
+ operationId: "packages_upload_terraform"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadTerraform"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/AlpinePackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/upload/vagrant/:
+ post:
+ tags:
+ - "packages"
+ summary: "Create a new Vagrant package"
+ description: "Create a new Vagrant package"
+ operationId: "packages_upload_vagrant"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesUploadVagrant"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Upload acknowledged and queued for synchronisation"
+ schema:
+ $ref: "#/definitions/VagrantPackageUpload"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/alpine/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Alpine package"
+ description: "Validate parameters for create Alpine package"
+ operationId: "packages_validate-upload_alpine"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadAlpine"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/cargo/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Cargo package"
+ description: "Validate parameters for create Cargo package"
+ operationId: "packages_validate-upload_cargo"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadCargo"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/cocoapods/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create CocoaPods package"
+ description: "Validate parameters for create CocoaPods package"
+ operationId: "packages_validate-upload_cocoapods"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadCocoapods"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/composer/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Composer package"
+ description: "Validate parameters for create Composer package"
+ operationId: "packages_validate-upload_composer"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadComposer"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/conan/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Conan package"
+ description: "Validate parameters for create Conan package"
+ operationId: "packages_validate-upload_conan"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadConan"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/conda/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Conda package"
+ description: "Validate parameters for create Conda package"
+ operationId: "packages_validate-upload_conda"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadConda"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/cran/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create CRAN package"
+ description: "Validate parameters for create CRAN package"
+ operationId: "packages_validate-upload_cran"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadCran"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/dart/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Dart package"
+ description: "Validate parameters for create Dart package"
+ operationId: "packages_validate-upload_dart"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadDart"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/deb/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Debian package"
+ description: "Validate parameters for create Debian package"
+ operationId: "packages_validate-upload_deb"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadDeb"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/docker/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Docker package"
+ description: "Validate parameters for create Docker package"
+ operationId: "packages_validate-upload_docker"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadDocker"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/go/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Go package"
+ description: "Validate parameters for create Go package"
+ operationId: "packages_validate-upload_go"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadGo"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/helm/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Helm package"
+ description: "Validate parameters for create Helm package"
+ operationId: "packages_validate-upload_helm"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadHelm"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/luarocks/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create LuaRocks package"
+ description: "Validate parameters for create LuaRocks package"
+ operationId: "packages_validate-upload_luarocks"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadLuarocks"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/maven/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Maven package"
+ description: "Validate parameters for create Maven package"
+ operationId: "packages_validate-upload_maven"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadMaven"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/npm/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create npm package"
+ description: "Validate parameters for create npm package"
+ operationId: "packages_validate-upload_npm"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadNpm"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/nuget/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create NuGet package"
+ description: "Validate parameters for create NuGet package"
+ operationId: "packages_validate-upload_nuget"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadNuget"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/p2/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create P2 package"
+ description: "Validate parameters for create P2 package"
+ operationId: "packages_validate-upload_p2"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadP2"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/python/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Python package"
+ description: "Validate parameters for create Python package"
+ operationId: "packages_validate-upload_python"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadPython"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/raw/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Raw package"
+ description: "Validate parameters for create Raw package"
+ operationId: "packages_validate-upload_raw"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadRaw"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/rpm/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create RedHat package"
+ description: "Validate parameters for create RedHat package"
+ operationId: "packages_validate-upload_rpm"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadRpm"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/ruby/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Ruby package"
+ description: "Validate parameters for create Ruby package"
+ operationId: "packages_validate-upload_ruby"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadRuby"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/terraform/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Terraform package"
+ description: "Validate parameters for create Terraform package"
+ operationId: "packages_validate-upload_terraform"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadTerraform"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/validate-upload/vagrant/:
+ post:
+ tags:
+ - "packages"
+ summary: "Validate parameters for create Vagrant package"
+ description: "Validate parameters for create Vagrant package"
+ operationId: "packages_validate-upload_vagrant"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesValidateuploadVagrant"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Validation was successful, parameters are OK"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Namespace (owner) or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/{identifier}/:
+ get:
+ tags:
+ - "packages"
+ summary: "Get a specific package in a repository."
+ description: "Get a specific package in a repository."
+ operationId: "packages_read"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the specified package successfully"
+ schema:
+ $ref: "#/definitions/Package"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ delete:
+ tags:
+ - "packages"
+ summary: "Delete a specific package in a repository."
+ description: "Delete a specific package in a repository."
+ operationId: "packages_delete"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Deleted the specified package successfully"
+ "400":
+ description: "The package cannot be deleted"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/{identifier}/copy/:
+ post:
+ tags:
+ - "packages"
+ summary: "Copy a package to another repository."
+ description: "Copy a package to another repository."
+ operationId: "packages_copy"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesCopy"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Copied specified package to destination repository"
+ schema:
+ $ref: "#/definitions/PackageCopy"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/{identifier}/dependencies/:
+ get:
+ tags:
+ - "packages"
+ summary: "Get the direct (non-transitive) dependencies list for a package."
+ description: "Get the direct (non-transitive) dependencies list for a package."
+ operationId: "packages_dependencies"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved direct dependencies for specified package"
+ schema:
+ $ref: "#/definitions/PackageDependencies"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/{identifier}/move/:
+ post:
+ tags:
+ - "packages"
+ summary: "Move a package to another repository."
+ description: "Move a package to another repository."
+ operationId: "packages_move"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesMove"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Moved specified package to destination repository"
+ schema:
+ $ref: "#/definitions/PackageMove"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/{identifier}/resync/:
+ post:
+ tags:
+ - "packages"
+ summary: "Schedule a package for resynchronisation."
+ description: "Schedule a package for resynchronisation."
+ operationId: "packages_resync"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Scheduled the package for resynchronisation"
+ schema:
+ $ref: "#/definitions/Package"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/{identifier}/scan/:
+ post:
+ tags:
+ - "packages"
+ summary: "Schedule a package for scanning."
+ description: "Schedule a package for scanning."
+ operationId: "packages_scan"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Scheduled the package for scanning"
+ schema:
+ $ref: "#/definitions/Package"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/{identifier}/status/:
+ get:
+ tags:
+ - "packages"
+ summary: "Get the synchronisation status for a package."
+ description: "Get the synchronisation status for a package."
+ operationId: "packages_status"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved status for specified package"
+ schema:
+ $ref: "#/definitions/PackageStatus"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /packages/{owner}/{repo}/{identifier}/tag/:
+ post:
+ tags:
+ - "packages"
+ summary: "Add/Replace/Remove tags for a package."
+ description: "Add/Replace/Remove tags for a package."
+ operationId: "packages_tag"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/PackagesTag"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Modified tags for the package"
+ schema:
+ $ref: "#/definitions/Package"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /quota/history/{owner}/:
+ get:
+ tags:
+ - "quota"
+ summary: "Quota history for a given namespace."
+ description: "Quota history for a given namespace."
+ operationId: "quota_history_read"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/QuotaHistory"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /quota/oss/history/{owner}/:
+ get:
+ tags:
+ - "quota"
+ summary: "Open-source Quota history for a given namespace."
+ description: "Open-source Quota history for a given namespace."
+ operationId: "quota_oss_history_read"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/QuotaHistory"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /quota/oss/{owner}/:
+ get:
+ tags:
+ - "quota"
+ summary: "Open-source Quota usage for a given namespace."
+ description: "Open-source Quota usage for a given namespace."
+ operationId: "quota_oss_read"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/Quota"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /quota/{owner}/:
+ get:
+ tags:
+ - "quota"
+ summary: "Quota usage for a given namespace."
+ description: "Quota usage for a given namespace."
+ operationId: "quota_read"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/Quota"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /rates/limits/:
+ get:
+ tags:
+ - "rates"
+ summary: "Endpoint to check rate limits for current user."
+ description: "Endpoint to check rate limits for current user."
+ operationId: "rates_limits_list"
+ parameters: []
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Rate check was successful"
+ schema:
+ $ref: "#/definitions/ResourcesRateCheck"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /repos/:
+ get:
+ tags:
+ - "repos"
+ summary: "Get a list of all repositories associated with current user."
+ description: "Get a list of all repositories associated with current user."
+ operationId: "repos_all_list"
+ parameters:
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the list of repositories"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/Repository"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /repos/{owner}/:
+ get:
+ tags:
+ - "repos"
+ summary: "Get a list of all repositories within a namespace."
+ description: "Get a list of all repositories within a namespace."
+ operationId: "repos_list"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the list of repositories"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/Repository"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ post:
+ tags:
+ - "repos"
+ summary: "Create a new repository in a given namespace."
+ description: "Create a new repository in a given namespace."
+ operationId: "repos_create"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/ReposCreate"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "The repository was created"
+ schema:
+ $ref: "#/definitions/Repository"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /repos/{owner}/{identifier}/:
+ get:
+ tags:
+ - "repos"
+ summary: "Get a specific repository."
+ description: "Get a specific repository."
+ operationId: "repos_read"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the specified repository"
+ schema:
+ $ref: "#/definitions/Repository"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ delete:
+ tags:
+ - "repos"
+ summary: "Delete a repository in a given namespace."
+ description: "Delete a repository in a given namespace."
+ operationId: "repos_delete"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "The repository has been scheduled for deletion"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Unable to find repository with that name in the provided namespace"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ patch:
+ tags:
+ - "repos"
+ summary: "Update details about a repository in a given namespace."
+ description: "Update details about a repository in a given namespace."
+ operationId: "repos_partial_update"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/ReposPartialUpdate"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "The repository was updated"
+ schema:
+ $ref: "#/definitions/Repository"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Unable to find repository with that name in the provided namespace"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /status/check/basic/:
+ get:
+ tags:
+ - "status"
+ summary: "Endpoint to check basic API connectivity."
+ description: "Endpoint to check basic API connectivity."
+ operationId: "status_check_basic"
+ parameters: []
+ security: []
+ responses:
+ "200":
+ description: "Status check was successful"
+ schema:
+ $ref: "#/definitions/StatusBasic"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /storage-regions/:
+ get:
+ tags:
+ - "storage-regions"
+ summary: "Get a list of all available storage regions."
+ description: "Get a list of all available storage regions."
+ operationId: "storage-regions_list"
+ parameters: []
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Available storage regions retrieved"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/StorageRegion"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /storage-regions/{slug}/:
+ get:
+ tags:
+ - "storage-regions"
+ summary: "Get a specific storage region."
+ description: "Get a specific storage region."
+ operationId: "storage-regions_read"
+ parameters:
+ - name: "slug"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Slug"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/StorageRegion"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /user/self/:
+ get:
+ tags:
+ - "user"
+ summary: "Provide a brief for the current user (if any)."
+ description: "Provide a brief for the current user (if any)."
+ operationId: "user_self"
+ parameters: []
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved brief for the current user"
+ schema:
+ $ref: "#/definitions/UserBrief"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /user/token/:
+ post:
+ tags:
+ - "user"
+ summary: "Retrieve the API key/token for the authenticated user."
+ description: "Retrieve the API key/token for the authenticated user."
+ operationId: "user_token_create"
+ consumes:
+ - "application/json"
+ parameters:
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/UserTokenCreate"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Retrieved/created user API token/key"
+ schema:
+ $ref: "#/definitions/UserAuthToken"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "403":
+ description: "Locked out"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Failed to authenticate"
+ schema:
+ $ref: "#/definitions/Status"
+ /users/profile/{slug}/:
+ get:
+ tags:
+ - "users"
+ summary: "Provide a brief for the specified user (if any)."
+ description: "Provide a brief for the specified user (if any)."
+ operationId: "users_profile_read"
+ parameters:
+ - name: "slug"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Slug"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved details for the specified user (or current user,\
+ \ if none was specified)"
+ schema:
+ $ref: "#/definitions/UserProfile"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /vulnerabilities/{owner}/:
+ get:
+ tags:
+ - "vulnerabilities"
+ summary: "Lists scan results for a specific namespace."
+ description: "Lists scan results for a specific namespace."
+ operationId: "vulnerabilities_list"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/VulnerabilityScanResultsList"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /vulnerabilities/{owner}/{repo}/:
+ get:
+ tags:
+ - "vulnerabilities"
+ summary: "Lists scan results for a specific repository."
+ description: "Lists scan results for a specific repository."
+ operationId: "vulnerabilities_list_0"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/VulnerabilityScanResultsList"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /vulnerabilities/{owner}/{repo}/{package}/:
+ get:
+ tags:
+ - "vulnerabilities"
+ summary: "Lists scan results for a specific package."
+ description: "Lists scan results for a specific package."
+ operationId: "vulnerabilities_list_1"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "package"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Package_"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/VulnerabilityScanResultsList"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /vulnerabilities/{owner}/{repo}/{package}/{scan_id}/:
+ get:
+ tags:
+ - "vulnerabilities"
+ summary: "Returns a Scan Result."
+ description: "Returns a Scan Result."
+ operationId: "vulnerabilities_read"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "package"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Package_"
+ - name: "scan_id"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "ScanId"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/VulnerabilityScanResults"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /webhooks/{owner}/{repo}/:
+ get:
+ tags:
+ - "webhooks"
+ summary: "Get a list of all webhooks in a repository."
+ description: "Get a list of all webhooks in a repository."
+ operationId: "webhooks_list"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "page"
+ in: "query"
+ description: "A page number within the paginated result set."
+ required: false
+ type: "integer"
+ x-exportParamName: "Page"
+ x-optionalDataType: "Int32"
+ - name: "page_size"
+ in: "query"
+ description: "Number of results to return per page."
+ required: false
+ type: "integer"
+ x-exportParamName: "PageSize"
+ x-optionalDataType: "Int32"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Retrieved the list of webhooks"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/RepositoryWebhook"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ post:
+ tags:
+ - "webhooks"
+ summary: "Create a specific webhook in a repository."
+ description: "Create a specific webhook in a repository."
+ operationId: "webhooks_create"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/WebhooksCreate"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "201":
+ description: "Created the specified webhook"
+ schema:
+ $ref: "#/definitions/RepositoryWebhook"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ /webhooks/{owner}/{repo}/{identifier}/:
+ get:
+ tags:
+ - "webhooks"
+ summary: "Views for working with repository webhooks."
+ description: "Views for working with repository webhooks."
+ operationId: "webhooks_read"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "OK"
+ schema:
+ $ref: "#/definitions/RepositoryWebhook"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ delete:
+ tags:
+ - "webhooks"
+ summary: "Delete a specific webhook in a repository."
+ description: "Delete a specific webhook in a repository."
+ operationId: "webhooks_delete"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "204":
+ description: "Deleted the specified webhook successfully"
+ "400":
+ description: "The webhook cannot be deleted"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ patch:
+ tags:
+ - "webhooks"
+ summary: "Update a specific webhook in a repository."
+ description: "Update a specific webhook in a repository."
+ operationId: "webhooks_partial_update"
+ consumes:
+ - "application/json"
+ parameters:
+ - name: "owner"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Owner"
+ - name: "repo"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Repo"
+ - name: "identifier"
+ in: "path"
+ description: ""
+ required: true
+ type: "string"
+ x-exportParamName: "Identifier"
+ - in: "body"
+ name: "data"
+ required: false
+ schema:
+ $ref: "#/definitions/WebhooksPartialUpdate"
+ x-exportParamName: "Data"
+ security:
+ - token: []
+ - apikey: []
+ - csrf_token: []
+ responses:
+ "200":
+ description: "Updated the specified webhook"
+ schema:
+ $ref: "#/definitions/RepositoryWebhook"
+ "400":
+ description: "Request could not be processed (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+ "404":
+ description: "Owner namespace or repository not found"
+ schema:
+ $ref: "#/definitions/Status"
+ "422":
+ description: "Missing or invalid parameters (see detail)"
+ schema:
+ $ref: "#/definitions/Status"
+securityDefinitions:
+ apikey:
+ type: "apiKey"
+ name: "X-Api-Key"
+ in: "header"
+ basic:
+ type: "basic"
+definitions:
+ OrganizationMembership:
+ type: "object"
+ properties:
+ email:
+ type: "string"
+ description: ""
+ has_two_factor:
+ type: "boolean"
+ description: ""
+ joined_at:
+ type: "string"
+ description: ""
+ last_login_at:
+ type: "string"
+ description: ""
+ role:
+ type: "string"
+ description: ""
+ user:
+ type: "string"
+ description: ""
+ user_id:
+ type: "string"
+ description: ""
+ user_name:
+ type: "string"
+ description: ""
+ user_url:
+ type: "string"
+ description: ""
+ visibility:
+ type: "string"
+ description: ""
+ example:
+ joined_at: "joined_at"
+ last_login_at: "last_login_at"
+ role: "role"
+ visibility: "visibility"
+ user_id: "user_id"
+ user_name: "user_name"
+ user_url: "user_url"
+ user: "user"
+ email: "email"
+ has_two_factor: true
+ PackagesUploadConan:
+ type: "object"
+ required:
+ - "info_file"
+ - "manifest_file"
+ - "metadata_file"
+ - "package_file"
+ properties:
+ conan_channel:
+ type: "string"
+ example: "alpha"
+ description: "Conan channel."
+ conan_prefix:
+ type: "string"
+ example: "my-repository"
+ description: "Conan prefix (User)."
+ info_file:
+ type: "string"
+ example: "y1234456789b"
+ description: "The info file is an python file containing the package metadata."
+ manifest_file:
+ type: "string"
+ example: "y1234456789c"
+ description: "The info file is an python file containing the package metadata."
+ metadata_file:
+ type: "string"
+ example: "y1234456789a"
+ description: "The conan file is an python file containing the package metadata."
+ name:
+ type: "string"
+ example: "conan_package.tgz"
+ description: "The name of this package."
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ version:
+ type: "string"
+ example: "1.0.0"
+ description: "The raw version for this package."
+ title: "PackagesUploadConan"
+ example:
+ republish: true
+ name: "conan_package.tgz"
+ metadata_file: "y1234456789a"
+ package_file: "x123456789a"
+ conan_prefix: "my-repository"
+ version: "1.0.0"
+ conan_channel: "alpha"
+ info_file: "y1234456789b"
+ manifest_file: "y1234456789c"
+ tags: "tags"
+ ConanPackageUpload:
+ type: "object"
+ properties:
+ architectures:
+ type: "array"
+ description: ""
+ title: "ArchitecturesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_architectures"
+ cdn_url:
+ type: "string"
+ description: ""
+ checksum_md5:
+ type: "string"
+ description: ""
+ checksum_sha1:
+ type: "string"
+ description: ""
+ checksum_sha256:
+ type: "string"
+ description: ""
+ checksum_sha512:
+ type: "string"
+ description: ""
+ conan_channel:
+ type: "string"
+ example: "alpha"
+ description: "Conan channel."
+ conan_prefix:
+ type: "string"
+ example: "my-repository"
+ description: "Conan prefix (User)."
+ dependencies_checksum_md5:
+ type: "string"
+ description: "A checksum of all of the package's dependencies."
+ dependencies_url:
+ type: "string"
+ description: ""
+ description:
+ type: "string"
+ description: "A textual description of this package."
+ distro:
+ type: "object"
+ description: ""
+ properties: {}
+ distro_version:
+ type: "object"
+ description: ""
+ properties: {}
+ downloads:
+ type: "integer"
+ description: ""
+ epoch:
+ type: "integer"
+ description: "The epoch of the package version (if any)."
+ extension:
+ type: "string"
+ description: ""
+ filename:
+ type: "string"
+ description: ""
+ files:
+ type: "array"
+ description: ""
+ title: "FilesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_files"
+ format:
+ type: "string"
+ description: ""
+ format_url:
+ type: "string"
+ description: ""
+ identifier_perm:
+ type: "string"
+ description: "Unique and permanent identifier for the package."
+ indexed:
+ type: "boolean"
+ description: ""
+ is_sync_awaiting:
+ type: "boolean"
+ description: ""
+ is_sync_completed:
+ type: "boolean"
+ description: ""
+ is_sync_failed:
+ type: "boolean"
+ description: ""
+ is_sync_in_flight:
+ type: "boolean"
+ description: ""
+ is_sync_in_progress:
+ type: "boolean"
+ description: ""
+ license:
+ type: "string"
+ description: "The license of this package."
+ name:
+ type: "string"
+ example: "conan_package.tgz"
+ description: "The name of this package."
+ namespace:
+ type: "string"
+ description: ""
+ namespace_url:
+ type: "string"
+ description: ""
+ num_files:
+ type: "integer"
+ description: ""
+ package_type:
+ type: "string"
+ description: "The type of package contents."
+ release:
+ type: "string"
+ description: "The release of the package version (if any)."
+ repository:
+ type: "string"
+ description: ""
+ repository_url:
+ type: "string"
+ description: ""
+ security_scan_completed_at:
+ type: "string"
+ description: "The datetime the security scanning was completed."
+ security_scan_started_at:
+ type: "string"
+ description: "The datetime the security scanning was started."
+ security_scan_status:
+ type: "string"
+ description: ""
+ security_scan_status_updated_at:
+ type: "string"
+ description: "The datetime the security scanning status was updated."
+ self_html_url:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ signature_url:
+ type: "string"
+ description: ""
+ size:
+ type: "integer"
+ description: "The calculated size of the package."
+ slug:
+ type: "string"
+ description: "The public unique identifier for the package."
+ slug_perm:
+ type: "string"
+ description: ""
+ stage:
+ type: "string"
+ description: "The synchronisation (in progress) stage of the package."
+ stage_str:
+ type: "string"
+ description: ""
+ stage_updated_at:
+ type: "string"
+ description: "The datetime the package stage was updated at."
+ status:
+ type: "string"
+ description: "The synchronisation status of the package."
+ status_reason:
+ type: "string"
+ description: "A textual description for the synchronous status reason (if\
+ \ any"
+ status_str:
+ type: "string"
+ description: ""
+ status_updated_at:
+ type: "string"
+ description: "The datetime the package status was updated at."
+ status_url:
+ type: "string"
+ description: ""
+ subtype:
+ type: "string"
+ description: ""
+ summary:
+ type: "string"
+ description: "A one-liner synopsis of this package."
+ sync_finished_at:
+ type: "string"
+ description: "The datetime the package sync was finished at."
+ sync_progress:
+ type: "integer"
+ description: "Synchronisation progress (from 0-100)"
+ tags_immutable:
+ type: "object"
+ description: "All immutable tags on the package, grouped by tag type. Immutable\
+ \ tags cannot be (easily) deleted."
+ properties: {}
+ type_display:
+ type: "string"
+ description: ""
+ uploaded_at:
+ type: "string"
+ description: "The date this package was uploaded."
+ uploader:
+ type: "string"
+ description: ""
+ uploader_url:
+ type: "string"
+ description: ""
+ version:
+ type: "string"
+ example: "1.0.0"
+ description: "The raw version for this package."
+ version_orig:
+ type: "string"
+ description: ""
+ vulnerability_scan_results_url:
+ type: "string"
+ description: ""
+ example:
+ architectures:
+ - name: "name"
+ description: "description"
+ - name: "name"
+ description: "description"
+ security_scan_status_updated_at: "security_scan_status_updated_at"
+ checksum_sha256: "checksum_sha256"
+ release: "release"
+ package_type: "package_type"
+ repository: "repository"
+ identifier_perm: "identifier_perm"
+ stage_updated_at: "stage_updated_at"
+ tags_immutable: "{}"
+ slug: "slug"
+ security_scan_started_at: "security_scan_started_at"
+ security_scan_status: "security_scan_status"
+ indexed: true
+ format: "format"
+ status_str: "status_str"
+ version_orig: "version_orig"
+ namespace_url: "namespace_url"
+ slug_perm: "slug_perm"
+ version: "1.0.0"
+ license: "license"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ uploaded_at: "uploaded_at"
+ name: "conan_package.tgz"
+ sync_finished_at: "sync_finished_at"
+ files:
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ conan_prefix: "my-repository"
+ num_files: 1
+ conan_channel: "alpha"
+ status: "status"
+ checksum_sha512: "checksum_sha512"
+ distro: "{}"
+ extension: "extension"
+ description: "description"
+ epoch: 6
+ is_sync_completed: true
+ distro_version: "{}"
+ type_display: "type_display"
+ vulnerability_scan_results_url: "vulnerability_scan_results_url"
+ dependencies_checksum_md5: "dependencies_checksum_md5"
+ downloads: 0
+ subtype: "subtype"
+ uploader: "uploader"
+ signature_url: "signature_url"
+ repository_url: "repository_url"
+ status_reason: "status_reason"
+ status_updated_at: "status_updated_at"
+ summary: "summary"
+ checksum_sha1: "checksum_sha1"
+ checksum_md5: "checksum_md5"
+ sync_progress: 5
+ is_sync_awaiting: true
+ uploader_url: "uploader_url"
+ self_html_url: "self_html_url"
+ self_url: "self_url"
+ status_url: "status_url"
+ is_sync_in_flight: true
+ security_scan_completed_at: "security_scan_completed_at"
+ is_sync_in_progress: true
+ stage_str: "stage_str"
+ stage: "stage"
+ format_url: "format_url"
+ dependencies_url: "dependencies_url"
+ namespace: "namespace"
+ is_sync_failed: true
+ VulnerabilityScanResultsList:
+ type: "object"
+ required:
+ - "identifier"
+ - "package"
+ - "scan_id"
+ properties:
+ created_at:
+ type: "string"
+ example: "2020-01-01T12:00:00.000000Z"
+ description: "The time this scan result was stored."
+ has_vulnerabilities:
+ type: "boolean"
+ example: true
+ description: "Do the results contain any known vulnerabilities?"
+ identifier:
+ type: "string"
+ example: "HKmoU6OHbyj4ha3u"
+ description: ""
+ max_severity:
+ type: "string"
+ example: "HIGH"
+ description: ""
+ num_vulnerabilities:
+ type: "integer"
+ example: 2
+ description: ""
+ package:
+ type: "object"
+ example:
+ identifier: "XEtJh5CTzcr3"
+ name: "insecure-image"
+ version: "452fcef2bd33e962aa77c2adc65eb022c566c3e01759c432f7c2f9ec838a6b05"
+ description: ""
+ properties: {}
+ scan_id:
+ type: "integer"
+ example: 1
+ description: ""
+ example:
+ identifier: "HKmoU6OHbyj4ha3u"
+ max_severity: "HIGH"
+ package:
+ identifier: "XEtJh5CTzcr3"
+ name: "insecure-image"
+ version: "452fcef2bd33e962aa77c2adc65eb022c566c3e01759c432f7c2f9ec838a6b05"
+ has_vulnerabilities: true
+ created_at: "2020-01-01T12:00:00.000000Z"
+ num_vulnerabilities: 2
+ scan_id: 1
+ repos_gpg_keys:
+ type: "object"
+ properties:
+ active:
+ type: "boolean"
+ description: "If selected this is the active key for this repository."
+ comment:
+ type: "string"
+ description: ""
+ created_at:
+ type: "string"
+ description: ""
+ default:
+ type: "boolean"
+ description: "If selected this is the default key for this repository."
+ fingerprint:
+ type: "string"
+ description: "The long identifier used by GPG for this key."
+ fingerprint_short:
+ type: "string"
+ description: ""
+ public_key:
+ type: "string"
+ description: "The public key given to repository users."
+ example:
+ public_key: "public_key"
+ default: true
+ fingerprint: "fingerprint"
+ active: true
+ created_at: "created_at"
+ comment: "comment"
+ fingerprint_short: "fingerprint_short"
+ PackagesUploadNpm:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ npm_dist_tag:
+ type: "string"
+ example: "latest"
+ description: "The default npm dist-tag for this package/version - This will\
+ \ replace any other package/version if they are using the same tag."
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadNpm"
+ example:
+ republish: true
+ npm_dist_tag: "latest"
+ package_file: "y123456789"
+ tags: "tags"
+ PackagesValidateuploadConda:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadConda"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ Status:
+ type: "object"
+ required:
+ - "detail"
+ properties:
+ detail:
+ type: "string"
+ description: "An extended message for the response."
+ PackagesValidateuploadNpm:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ npm_dist_tag:
+ type: "string"
+ example: "latest"
+ description: "The default npm dist-tag for this package/version - This will\
+ \ replace any other package/version if they are using the same tag."
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadNpm"
+ example:
+ republish: true
+ npm_dist_tag: "latest"
+ package_file: "y123456789"
+ tags: "tags"
+ PackagesUploadPython:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadPython"
+ example:
+ republish: true
+ package_file: "y123456789"
+ tags: "tags"
+ PackagesValidateuploadDart:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadDart"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ PackagesUploadTerraform:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "z123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadTerraform"
+ example:
+ republish: true
+ package_file: "z123456789a"
+ tags: "tags"
+ PackagesValidateuploadRpm:
+ type: "object"
+ required:
+ - "distribution"
+ - "package_file"
+ properties:
+ distribution:
+ type: "string"
+ example: "el/7"
+ description: "The distribution to store the package for."
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadRpm"
+ example:
+ republish: true
+ distribution: "el/7"
+ package_file: "y123456789"
+ tags: "tags"
+ PackagesUploadRpm:
+ type: "object"
+ required:
+ - "distribution"
+ - "package_file"
+ properties:
+ distribution:
+ type: "string"
+ example: "el/7"
+ description: "The distribution to store the package for."
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadRpm"
+ example:
+ republish: true
+ distribution: "el/7"
+ package_file: "y123456789"
+ tags: "tags"
+ Namespace:
+ type: "object"
+ properties:
+ name:
+ type: "string"
+ description: ""
+ slug:
+ type: "string"
+ description: ""
+ slug_perm:
+ type: "string"
+ description: ""
+ type_name:
+ type: "string"
+ description: ""
+ example:
+ type_name: "type_name"
+ name: "name"
+ slug_perm: "slug_perm"
+ slug: "slug"
+ EntitlementUsageMetrics:
+ type: "object"
+ required:
+ - "tokens"
+ properties:
+ tokens:
+ type: "object"
+ example:
+ active: 1
+ bandwidth:
+ average:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ highest:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ lowest:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ total:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ downloads:
+ average:
+ value: 5
+ highest:
+ value: 5
+ lowest:
+ value: 5
+ total:
+ value: 5
+ inactive: 0
+ total: 0
+ description: ""
+ properties: {}
+ example:
+ tokens:
+ active: 1
+ bandwidth:
+ average:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ highest:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ lowest:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ total:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ downloads:
+ average:
+ value: 5
+ highest:
+ value: 5
+ lowest:
+ value: 5
+ total:
+ value: 5
+ inactive: 0
+ total: 0
+ PackageCopy:
+ type: "object"
+ properties:
+ architectures:
+ type: "array"
+ description: ""
+ title: "ArchitecturesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_architectures"
+ cdn_url:
+ type: "string"
+ description: ""
+ checksum_md5:
+ type: "string"
+ description: ""
+ checksum_sha1:
+ type: "string"
+ description: ""
+ checksum_sha256:
+ type: "string"
+ description: ""
+ checksum_sha512:
+ type: "string"
+ description: ""
+ dependencies_checksum_md5:
+ type: "string"
+ description: "A checksum of all of the package's dependencies."
+ dependencies_url:
+ type: "string"
+ description: ""
+ description:
+ type: "string"
+ description: "A textual description of this package."
+ distro:
+ type: "object"
+ description: ""
+ properties: {}
+ distro_version:
+ type: "object"
+ description: ""
+ properties: {}
+ downloads:
+ type: "integer"
+ description: ""
+ epoch:
+ type: "integer"
+ description: "The epoch of the package version (if any)."
+ extension:
+ type: "string"
+ description: ""
+ filename:
+ type: "string"
+ description: ""
+ files:
+ type: "array"
+ description: ""
+ title: "FilesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_files"
+ format:
+ type: "string"
+ description: ""
+ format_url:
+ type: "string"
+ description: ""
+ identifier_perm:
+ type: "string"
+ description: "Unique and permanent identifier for the package."
+ indexed:
+ type: "boolean"
+ description: ""
+ is_sync_awaiting:
+ type: "boolean"
+ description: ""
+ is_sync_completed:
+ type: "boolean"
+ description: ""
+ is_sync_failed:
+ type: "boolean"
+ description: ""
+ is_sync_in_flight:
+ type: "boolean"
+ description: ""
+ is_sync_in_progress:
+ type: "boolean"
+ description: ""
+ license:
+ type: "string"
+ description: "The license of this package."
+ name:
+ type: "string"
+ description: "The name of this package."
+ namespace:
+ type: "string"
+ description: ""
+ namespace_url:
+ type: "string"
+ description: ""
+ num_files:
+ type: "integer"
+ description: ""
+ package_type:
+ type: "string"
+ description: "The type of package contents."
+ release:
+ type: "string"
+ description: "The release of the package version (if any)."
+ repository:
+ type: "string"
+ description: "The repository the package will be copied to."
+ repository_url:
+ type: "string"
+ description: ""
+ security_scan_completed_at:
+ type: "string"
+ description: "The datetime the security scanning was completed."
+ security_scan_started_at:
+ type: "string"
+ description: "The datetime the security scanning was started."
+ security_scan_status:
+ type: "string"
+ description: ""
+ security_scan_status_updated_at:
+ type: "string"
+ description: "The datetime the security scanning status was updated."
+ self_html_url:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ signature_url:
+ type: "string"
+ description: ""
+ size:
+ type: "integer"
+ description: "The calculated size of the package."
+ slug:
+ type: "string"
+ description: "The public unique identifier for the package."
+ slug_perm:
+ type: "string"
+ description: ""
+ stage:
+ type: "string"
+ description: "The synchronisation (in progress) stage of the package."
+ stage_str:
+ type: "string"
+ description: ""
+ stage_updated_at:
+ type: "string"
+ description: "The datetime the package stage was updated at."
+ status:
+ type: "string"
+ description: "The synchronisation status of the package."
+ status_reason:
+ type: "string"
+ description: "A textual description for the synchronous status reason (if\
+ \ any"
+ status_str:
+ type: "string"
+ description: ""
+ status_updated_at:
+ type: "string"
+ description: "The datetime the package status was updated at."
+ status_url:
+ type: "string"
+ description: ""
+ subtype:
+ type: "string"
+ description: ""
+ summary:
+ type: "string"
+ description: "A one-liner synopsis of this package."
+ sync_finished_at:
+ type: "string"
+ description: "The datetime the package sync was finished at."
+ sync_progress:
+ type: "integer"
+ description: "Synchronisation progress (from 0-100)"
+ tags:
+ type: "object"
+ description: "All tags on the package, grouped by tag type. This includes\
+ \ immutable tags, but doesn't distinguish them from mutable. To see which\
+ \ tags are immutable specifically, see the tags_immutable field."
+ properties: {}
+ tags_immutable:
+ type: "object"
+ description: "All immutable tags on the package, grouped by tag type. Immutable\
+ \ tags cannot be (easily) deleted."
+ properties: {}
+ type_display:
+ type: "string"
+ description: ""
+ uploaded_at:
+ type: "string"
+ description: "The date this package was uploaded."
+ uploader:
+ type: "string"
+ description: ""
+ uploader_url:
+ type: "string"
+ description: ""
+ version:
+ type: "string"
+ description: "The raw version for this package."
+ version_orig:
+ type: "string"
+ description: ""
+ vulnerability_scan_results_url:
+ type: "string"
+ description: ""
+ example:
+ architectures:
+ - name: "name"
+ description: "description"
+ - name: "name"
+ description: "description"
+ security_scan_status_updated_at: "security_scan_status_updated_at"
+ checksum_sha256: "checksum_sha256"
+ release: "release"
+ package_type: "package_type"
+ repository: "repository"
+ identifier_perm: "identifier_perm"
+ stage_updated_at: "stage_updated_at"
+ tags_immutable: "{}"
+ slug: "slug"
+ security_scan_started_at: "security_scan_started_at"
+ security_scan_status: "security_scan_status"
+ indexed: true
+ format: "format"
+ status_str: "status_str"
+ version_orig: "version_orig"
+ namespace_url: "namespace_url"
+ slug_perm: "slug_perm"
+ version: "version"
+ tags: "{}"
+ license: "license"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ uploaded_at: "uploaded_at"
+ name: "name"
+ sync_finished_at: "sync_finished_at"
+ files:
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ num_files: 1
+ status: "status"
+ checksum_sha512: "checksum_sha512"
+ distro: "{}"
+ extension: "extension"
+ description: "description"
+ epoch: 6
+ is_sync_completed: true
+ distro_version: "{}"
+ type_display: "type_display"
+ vulnerability_scan_results_url: "vulnerability_scan_results_url"
+ dependencies_checksum_md5: "dependencies_checksum_md5"
+ downloads: 0
+ subtype: "subtype"
+ uploader: "uploader"
+ signature_url: "signature_url"
+ repository_url: "repository_url"
+ status_reason: "status_reason"
+ status_updated_at: "status_updated_at"
+ summary: "summary"
+ checksum_sha1: "checksum_sha1"
+ checksum_md5: "checksum_md5"
+ sync_progress: 5
+ is_sync_awaiting: true
+ uploader_url: "uploader_url"
+ self_html_url: "self_html_url"
+ self_url: "self_url"
+ status_url: "status_url"
+ is_sync_in_flight: true
+ security_scan_completed_at: "security_scan_completed_at"
+ is_sync_in_progress: true
+ stage_str: "stage_str"
+ stage: "stage"
+ format_url: "format_url"
+ dependencies_url: "dependencies_url"
+ namespace: "namespace"
+ is_sync_failed: true
+ Distribution:
+ type: "object"
+ required:
+ - "name"
+ properties:
+ format:
+ type: "string"
+ description: ""
+ format_url:
+ type: "string"
+ description: ""
+ name:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ slug:
+ type: "string"
+ description: "The slug identifier for this distribution"
+ variants:
+ type: "string"
+ description: ""
+ versions:
+ type: "array"
+ description: "A list of the versions for this distribution"
+ title: "VersionsList"
+ items:
+ $ref: "#/definitions/distros_versions"
+ example:
+ format_url: "format_url"
+ versions:
+ - name: "name"
+ slug: "slug"
+ - name: "name"
+ slug: "slug"
+ format: "format"
+ name: "name"
+ variants: "variants"
+ self_url: "self_url"
+ slug: "slug"
+ PackagesUploadDeb:
+ type: "object"
+ required:
+ - "distribution"
+ - "package_file"
+ properties:
+ changes_file:
+ type: "string"
+ example: "y123456789"
+ description: "The changes archive containing the changes made to the source\
+ \ and debian packaging files"
+ distribution:
+ type: "string"
+ example: "ubuntu/xenial"
+ description: "The distribution to store the package for."
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ sources_file:
+ type: "string"
+ example: "y123456789"
+ description: "The sources archive containing the source code for the binary"
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadDeb"
+ example:
+ sources_file: "y123456789"
+ republish: true
+ changes_file: "y123456789"
+ distribution: "ubuntu/xenial"
+ package_file: "y123456789"
+ tags: "tags"
+ PackagesUploadHelm:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadHelm"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ PackagesValidateuploadDeb:
+ type: "object"
+ required:
+ - "distribution"
+ - "package_file"
+ properties:
+ changes_file:
+ type: "string"
+ example: "y123456789"
+ description: "The changes archive containing the changes made to the source\
+ \ and debian packaging files"
+ distribution:
+ type: "string"
+ example: "ubuntu/xenial"
+ description: "The distribution to store the package for."
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ sources_file:
+ type: "string"
+ example: "y123456789"
+ description: "The sources archive containing the source code for the binary"
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadDeb"
+ example:
+ sources_file: "y123456789"
+ republish: true
+ changes_file: "y123456789"
+ distribution: "ubuntu/xenial"
+ package_file: "y123456789"
+ tags: "tags"
+ Package:
+ type: "object"
+ properties:
+ architectures:
+ type: "array"
+ description: ""
+ title: "ArchitecturesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_architectures"
+ cdn_url:
+ type: "string"
+ description: ""
+ checksum_md5:
+ type: "string"
+ description: ""
+ checksum_sha1:
+ type: "string"
+ description: ""
+ checksum_sha256:
+ type: "string"
+ description: ""
+ checksum_sha512:
+ type: "string"
+ description: ""
+ dependencies_checksum_md5:
+ type: "string"
+ description: "A checksum of all of the package's dependencies."
+ dependencies_url:
+ type: "string"
+ description: ""
+ description:
+ type: "string"
+ description: "A textual description of this package."
+ distro:
+ type: "object"
+ description: ""
+ properties: {}
+ distro_version:
+ type: "object"
+ description: ""
+ properties: {}
+ downloads:
+ type: "integer"
+ description: ""
+ epoch:
+ type: "integer"
+ description: "The epoch of the package version (if any)."
+ extension:
+ type: "string"
+ description: ""
+ filename:
+ type: "string"
+ description: ""
+ files:
+ type: "array"
+ description: ""
+ title: "FilesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_files"
+ format:
+ type: "string"
+ description: ""
+ format_url:
+ type: "string"
+ description: ""
+ identifier_perm:
+ type: "string"
+ description: "Unique and permanent identifier for the package."
+ indexed:
+ type: "boolean"
+ description: ""
+ is_sync_awaiting:
+ type: "boolean"
+ description: ""
+ is_sync_completed:
+ type: "boolean"
+ description: ""
+ is_sync_failed:
+ type: "boolean"
+ description: ""
+ is_sync_in_flight:
+ type: "boolean"
+ description: ""
+ is_sync_in_progress:
+ type: "boolean"
+ description: ""
+ license:
+ type: "string"
+ description: "The license of this package."
+ name:
+ type: "string"
+ description: "The name of this package."
+ namespace:
+ type: "string"
+ description: ""
+ namespace_url:
+ type: "string"
+ description: ""
+ num_files:
+ type: "integer"
+ description: ""
+ package_type:
+ type: "string"
+ description: "The type of package contents."
+ release:
+ type: "string"
+ description: "The release of the package version (if any)."
+ repository:
+ type: "string"
+ description: ""
+ repository_url:
+ type: "string"
+ description: ""
+ security_scan_completed_at:
+ type: "string"
+ description: "The datetime the security scanning was completed."
+ security_scan_started_at:
+ type: "string"
+ description: "The datetime the security scanning was started."
+ security_scan_status:
+ type: "string"
+ description: ""
+ security_scan_status_updated_at:
+ type: "string"
+ description: "The datetime the security scanning status was updated."
+ self_html_url:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ signature_url:
+ type: "string"
+ description: ""
+ size:
+ type: "integer"
+ description: "The calculated size of the package."
+ slug:
+ type: "string"
+ description: "The public unique identifier for the package."
+ slug_perm:
+ type: "string"
+ description: ""
+ stage:
+ type: "string"
+ description: "The synchronisation (in progress) stage of the package."
+ stage_str:
+ type: "string"
+ description: ""
+ stage_updated_at:
+ type: "string"
+ description: "The datetime the package stage was updated at."
+ status:
+ type: "string"
+ description: "The synchronisation status of the package."
+ status_reason:
+ type: "string"
+ description: "A textual description for the synchronous status reason (if\
+ \ any"
+ status_str:
+ type: "string"
+ description: ""
+ status_updated_at:
+ type: "string"
+ description: "The datetime the package status was updated at."
+ status_url:
+ type: "string"
+ description: ""
+ subtype:
+ type: "string"
+ description: ""
+ summary:
+ type: "string"
+ description: "A one-liner synopsis of this package."
+ sync_finished_at:
+ type: "string"
+ description: "The datetime the package sync was finished at."
+ sync_progress:
+ type: "integer"
+ description: "Synchronisation progress (from 0-100)"
+ tags:
+ type: "object"
+ description: "All tags on the package, grouped by tag type. This includes\
+ \ immutable tags, but doesn't distinguish them from mutable. To see which\
+ \ tags are immutable specifically, see the tags_immutable field."
+ properties: {}
+ tags_immutable:
+ type: "object"
+ description: "All immutable tags on the package, grouped by tag type. Immutable\
+ \ tags cannot be (easily) deleted."
+ properties: {}
+ type_display:
+ type: "string"
+ description: ""
+ uploaded_at:
+ type: "string"
+ description: "The date this package was uploaded."
+ uploader:
+ type: "string"
+ description: ""
+ uploader_url:
+ type: "string"
+ description: ""
+ version:
+ type: "string"
+ description: "The raw version for this package."
+ version_orig:
+ type: "string"
+ description: ""
+ vulnerability_scan_results_url:
+ type: "string"
+ description: ""
+ example:
+ architectures:
+ - name: "name"
+ description: "description"
+ - name: "name"
+ description: "description"
+ security_scan_status_updated_at: "security_scan_status_updated_at"
+ checksum_sha256: "checksum_sha256"
+ release: "release"
+ package_type: "package_type"
+ repository: "repository"
+ identifier_perm: "identifier_perm"
+ stage_updated_at: "stage_updated_at"
+ tags_immutable: "{}"
+ slug: "slug"
+ security_scan_started_at: "security_scan_started_at"
+ security_scan_status: "security_scan_status"
+ indexed: true
+ format: "format"
+ status_str: "status_str"
+ version_orig: "version_orig"
+ namespace_url: "namespace_url"
+ slug_perm: "slug_perm"
+ version: "version"
+ tags: "{}"
+ license: "license"
+ filename: "filename"
+ size: 2
+ cdn_url: "cdn_url"
+ uploaded_at: "uploaded_at"
+ name: "name"
+ sync_finished_at: "sync_finished_at"
+ files:
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ num_files: 5
+ status: "status"
+ checksum_sha512: "checksum_sha512"
+ distro: "{}"
+ extension: "extension"
+ description: "description"
+ epoch: 6
+ is_sync_completed: true
+ distro_version: "{}"
+ type_display: "type_display"
+ vulnerability_scan_results_url: "vulnerability_scan_results_url"
+ dependencies_checksum_md5: "dependencies_checksum_md5"
+ downloads: 0
+ subtype: "subtype"
+ uploader: "uploader"
+ signature_url: "signature_url"
+ repository_url: "repository_url"
+ status_reason: "status_reason"
+ status_updated_at: "status_updated_at"
+ summary: "summary"
+ checksum_sha1: "checksum_sha1"
+ checksum_md5: "checksum_md5"
+ sync_progress: 7
+ is_sync_awaiting: true
+ uploader_url: "uploader_url"
+ self_html_url: "self_html_url"
+ self_url: "self_url"
+ status_url: "status_url"
+ is_sync_in_flight: true
+ security_scan_completed_at: "security_scan_completed_at"
+ is_sync_in_progress: true
+ stage_str: "stage_str"
+ stage: "stage"
+ format_url: "format_url"
+ dependencies_url: "dependencies_url"
+ namespace: "namespace"
+ is_sync_failed: true
+ UserTokenCreate:
+ type: "object"
+ properties:
+ email:
+ type: "string"
+ description: "Email address to authenticate with"
+ password:
+ type: "string"
+ description: "Password to authenticate with"
+ title: "UserTokenCreate"
+ example:
+ password: "password"
+ email: "email"
+ PackagesValidateuploadConan:
+ type: "object"
+ required:
+ - "info_file"
+ - "manifest_file"
+ - "metadata_file"
+ - "package_file"
+ properties:
+ conan_channel:
+ type: "string"
+ example: "alpha"
+ description: "Conan channel."
+ conan_prefix:
+ type: "string"
+ example: "my-repository"
+ description: "Conan prefix (User)."
+ info_file:
+ type: "string"
+ example: "y1234456789b"
+ description: "The info file is an python file containing the package metadata."
+ manifest_file:
+ type: "string"
+ example: "y1234456789c"
+ description: "The info file is an python file containing the package metadata."
+ metadata_file:
+ type: "string"
+ example: "y1234456789a"
+ description: "The conan file is an python file containing the package metadata."
+ name:
+ type: "string"
+ example: "conan_package.tgz"
+ description: "The name of this package."
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ version:
+ type: "string"
+ example: "1.0.0"
+ description: "The raw version for this package."
+ title: "PackagesValidate-uploadConan"
+ example:
+ republish: true
+ name: "conan_package.tgz"
+ metadata_file: "y1234456789a"
+ package_file: "x123456789a"
+ conan_prefix: "my-repository"
+ version: "1.0.0"
+ conan_channel: "alpha"
+ info_file: "y1234456789b"
+ manifest_file: "y1234456789c"
+ tags: "tags"
+ Organization:
+ type: "object"
+ properties:
+ country:
+ type: "string"
+ description: ""
+ created_at:
+ type: "string"
+ description: ""
+ location:
+ type: "string"
+ description: "The city/town/area your organization is based in."
+ name:
+ type: "string"
+ description: "A descriptive name for your organization."
+ slug:
+ type: "string"
+ description: ""
+ slug_perm:
+ type: "string"
+ description: ""
+ tagline:
+ type: "string"
+ description: "A short public descriptive for your organization."
+ example:
+ country: "country"
+ name: "name"
+ created_at: "created_at"
+ tagline: "tagline"
+ location: "location"
+ slug_perm: "slug_perm"
+ slug: "slug"
+ QuotaHistory:
+ type: "object"
+ required:
+ - "history"
+ properties:
+ history:
+ type: "array"
+ example:
+ - days: 30
+ display:
+ downloaded:
+ limit: "2 TB"
+ percentage: "0.0%"
+ used: "0 B"
+ storage_used:
+ limit: "1 TB"
+ percentage: "0.109%"
+ used: "1.1 GB"
+ uploaded:
+ limit: "Unlimited"
+ percentage: "∞"
+ used: "0 B"
+ end: "2020-10-10 12:35:23+00:00"
+ plan: "Package (Velocity)"
+ raw:
+ downloaded:
+ limit: 2199023255552
+ percentage: 0.0
+ used: 0
+ storage_used:
+ limit: 1099511627776
+ percentage: 0.109
+ used: 1197653687
+ uploaded:
+ limit: ""
+ percentage: 0.0
+ used: 0
+ start: "2020-09-10 12:35:23+00:00"
+ description: ""
+ title: "HistoryList"
+ items:
+ $ref: "#/definitions/QuotaHistory_history"
+ example:
+ history:
+ - days: 30
+ display:
+ downloaded:
+ limit: "2 TB"
+ percentage: "0.0%"
+ used: "0 B"
+ storage_used:
+ limit: "1 TB"
+ percentage: "0.109%"
+ used: "1.1 GB"
+ uploaded:
+ limit: "Unlimited"
+ percentage: "∞"
+ used: "0 B"
+ end: "2020-10-10 12:35:23+00:00"
+ plan: "Package (Velocity)"
+ raw:
+ downloaded:
+ limit: 2199023255552
+ percentage: 0.0
+ used: 0
+ storage_used:
+ limit: 1099511627776
+ percentage: 0.109
+ used: 1197653687
+ uploaded:
+ limit: ""
+ percentage: 0.0
+ used: 0
+ start: "2020-09-10 12:35:23+00:00"
+ PackagesValidateuploadPython:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadPython"
+ example:
+ republish: true
+ package_file: "y123456789"
+ tags: "tags"
+ VagrantPackageUpload:
+ type: "object"
+ required:
+ - "name"
+ - "provider"
+ - "version"
+ properties:
+ architectures:
+ type: "array"
+ description: ""
+ title: "ArchitecturesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_architectures"
+ cdn_url:
+ type: "string"
+ description: ""
+ checksum_md5:
+ type: "string"
+ description: ""
+ checksum_sha1:
+ type: "string"
+ description: ""
+ checksum_sha256:
+ type: "string"
+ description: ""
+ checksum_sha512:
+ type: "string"
+ description: ""
+ dependencies_checksum_md5:
+ type: "string"
+ description: "A checksum of all of the package's dependencies."
+ dependencies_url:
+ type: "string"
+ description: ""
+ description:
+ type: "string"
+ description: "A textual description of this package."
+ distro:
+ type: "object"
+ description: ""
+ properties: {}
+ distro_version:
+ type: "object"
+ description: ""
+ properties: {}
+ downloads:
+ type: "integer"
+ description: ""
+ epoch:
+ type: "integer"
+ description: "The epoch of the package version (if any)."
+ extension:
+ type: "string"
+ description: ""
+ filename:
+ type: "string"
+ description: ""
+ files:
+ type: "array"
+ description: ""
+ title: "FilesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_files"
+ format:
+ type: "string"
+ description: ""
+ format_url:
+ type: "string"
+ description: ""
+ identifier_perm:
+ type: "string"
+ description: "Unique and permanent identifier for the package."
+ indexed:
+ type: "boolean"
+ description: ""
+ is_sync_awaiting:
+ type: "boolean"
+ description: ""
+ is_sync_completed:
+ type: "boolean"
+ description: ""
+ is_sync_failed:
+ type: "boolean"
+ description: ""
+ is_sync_in_flight:
+ type: "boolean"
+ description: ""
+ is_sync_in_progress:
+ type: "boolean"
+ description: ""
+ license:
+ type: "string"
+ description: "The license of this package."
+ name:
+ type: "string"
+ example: "tcl"
+ description: "The name of this package."
+ namespace:
+ type: "string"
+ description: ""
+ namespace_url:
+ type: "string"
+ description: ""
+ num_files:
+ type: "integer"
+ description: ""
+ package_type:
+ type: "string"
+ description: "The type of package contents."
+ provider:
+ type: "string"
+ example: "virtualbox"
+ description: "The virtual machine provider for the box."
+ release:
+ type: "string"
+ description: "The release of the package version (if any)."
+ repository:
+ type: "string"
+ description: ""
+ repository_url:
+ type: "string"
+ description: ""
+ security_scan_completed_at:
+ type: "string"
+ description: "The datetime the security scanning was completed."
+ security_scan_started_at:
+ type: "string"
+ description: "The datetime the security scanning was started."
+ security_scan_status:
+ type: "string"
+ description: ""
+ security_scan_status_updated_at:
+ type: "string"
+ description: "The datetime the security scanning status was updated."
+ self_html_url:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ signature_url:
+ type: "string"
+ description: ""
+ size:
+ type: "integer"
+ description: "The calculated size of the package."
+ slug:
+ type: "string"
+ description: "The public unique identifier for the package."
+ slug_perm:
+ type: "string"
+ description: ""
+ stage:
+ type: "string"
+ description: "The synchronisation (in progress) stage of the package."
+ stage_str:
+ type: "string"
+ description: ""
+ stage_updated_at:
+ type: "string"
+ description: "The datetime the package stage was updated at."
+ status:
+ type: "string"
+ description: "The synchronisation status of the package."
+ status_reason:
+ type: "string"
+ description: "A textual description for the synchronous status reason (if\
+ \ any"
+ status_str:
+ type: "string"
+ description: ""
+ status_updated_at:
+ type: "string"
+ description: "The datetime the package status was updated at."
+ status_url:
+ type: "string"
+ description: ""
+ subtype:
+ type: "string"
+ description: ""
+ summary:
+ type: "string"
+ description: "A one-liner synopsis of this package."
+ sync_finished_at:
+ type: "string"
+ description: "The datetime the package sync was finished at."
+ sync_progress:
+ type: "integer"
+ description: "Synchronisation progress (from 0-100)"
+ tags_immutable:
+ type: "object"
+ description: "All immutable tags on the package, grouped by tag type. Immutable\
+ \ tags cannot be (easily) deleted."
+ properties: {}
+ type_display:
+ type: "string"
+ description: ""
+ uploaded_at:
+ type: "string"
+ description: "The date this package was uploaded."
+ uploader:
+ type: "string"
+ description: ""
+ uploader_url:
+ type: "string"
+ description: ""
+ version:
+ type: "string"
+ example: "1.0"
+ description: "The raw version for this package."
+ version_orig:
+ type: "string"
+ description: ""
+ vulnerability_scan_results_url:
+ type: "string"
+ description: ""
+ example:
+ architectures:
+ - name: "name"
+ description: "description"
+ - name: "name"
+ description: "description"
+ security_scan_status_updated_at: "security_scan_status_updated_at"
+ checksum_sha256: "checksum_sha256"
+ release: "release"
+ package_type: "package_type"
+ repository: "repository"
+ identifier_perm: "identifier_perm"
+ stage_updated_at: "stage_updated_at"
+ tags_immutable: "{}"
+ slug: "slug"
+ security_scan_started_at: "security_scan_started_at"
+ security_scan_status: "security_scan_status"
+ indexed: true
+ format: "format"
+ status_str: "status_str"
+ version_orig: "version_orig"
+ namespace_url: "namespace_url"
+ slug_perm: "slug_perm"
+ version: "1.0"
+ license: "license"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ uploaded_at: "uploaded_at"
+ name: "tcl"
+ sync_finished_at: "sync_finished_at"
+ files:
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ num_files: 1
+ status: "status"
+ checksum_sha512: "checksum_sha512"
+ distro: "{}"
+ extension: "extension"
+ description: "description"
+ epoch: 6
+ is_sync_completed: true
+ distro_version: "{}"
+ type_display: "type_display"
+ vulnerability_scan_results_url: "vulnerability_scan_results_url"
+ dependencies_checksum_md5: "dependencies_checksum_md5"
+ downloads: 0
+ provider: "virtualbox"
+ subtype: "subtype"
+ uploader: "uploader"
+ signature_url: "signature_url"
+ repository_url: "repository_url"
+ status_reason: "status_reason"
+ status_updated_at: "status_updated_at"
+ summary: "summary"
+ checksum_sha1: "checksum_sha1"
+ checksum_md5: "checksum_md5"
+ sync_progress: 5
+ is_sync_awaiting: true
+ uploader_url: "uploader_url"
+ self_html_url: "self_html_url"
+ self_url: "self_url"
+ status_url: "status_url"
+ is_sync_in_flight: true
+ security_scan_completed_at: "security_scan_completed_at"
+ is_sync_in_progress: true
+ stage_str: "stage_str"
+ stage: "stage"
+ format_url: "format_url"
+ dependencies_url: "dependencies_url"
+ namespace: "namespace"
+ is_sync_failed: true
+ PackageStatus:
+ type: "object"
+ properties:
+ is_sync_awaiting:
+ type: "boolean"
+ description: ""
+ is_sync_completed:
+ type: "boolean"
+ description: ""
+ is_sync_failed:
+ type: "boolean"
+ description: ""
+ is_sync_in_flight:
+ type: "boolean"
+ description: ""
+ is_sync_in_progress:
+ type: "boolean"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ stage:
+ type: "string"
+ description: "The synchronisation (in progress) stage of the package."
+ stage_str:
+ type: "string"
+ description: ""
+ stage_updated_at:
+ type: "string"
+ description: "The datetime the package stage was updated at."
+ status:
+ type: "string"
+ description: "The synchronisation status of the package."
+ status_reason:
+ type: "string"
+ description: "A textual description for the synchronous status reason (if\
+ \ any"
+ status_str:
+ type: "string"
+ description: ""
+ status_updated_at:
+ type: "string"
+ description: "The datetime the package status was updated at."
+ sync_finished_at:
+ type: "string"
+ description: "The datetime the package sync was finished at."
+ sync_progress:
+ type: "integer"
+ description: "Synchronisation progress (from 0-100)"
+ example:
+ status_str: "status_str"
+ sync_progress: 0
+ is_sync_awaiting: true
+ is_sync_completed: true
+ self_url: "self_url"
+ is_sync_in_flight: true
+ is_sync_in_progress: true
+ stage_str: "stage_str"
+ stage_updated_at: "stage_updated_at"
+ stage: "stage"
+ sync_finished_at: "sync_finished_at"
+ is_sync_failed: true
+ status_reason: "status_reason"
+ status: "status"
+ status_updated_at: "status_updated_at"
+ PackagesValidateuploadP2:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadP2"
+ example:
+ republish: true
+ package_file: "package_file"
+ tags: "tags"
+ PackagesUploadAlpine:
+ type: "object"
+ required:
+ - "distribution"
+ - "package_file"
+ properties:
+ distribution:
+ type: "string"
+ example: "alpine/v3.8"
+ description: "The distribution to store the package for."
+ package_file:
+ type: "string"
+ example: "a123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadAlpine"
+ example:
+ republish: true
+ distribution: "alpine/v3.8"
+ package_file: "a123456789"
+ tags: "tags"
+ VulnerabilityScanResults:
+ type: "object"
+ required:
+ - "identifier"
+ - "package"
+ - "scan"
+ - "scan_id"
+ properties:
+ created_at:
+ type: "string"
+ example: "2020-01-01T12:00:00.000000Z"
+ description: "The time this scan result was stored."
+ has_vulnerabilities:
+ type: "boolean"
+ example: true
+ description: "Do the results contain any known vulnerabilities?"
+ identifier:
+ type: "string"
+ example: "HKmoU6OHbyj4ha3u"
+ description: ""
+ max_severity:
+ type: "string"
+ example: "HIGH"
+ description: ""
+ num_vulnerabilities:
+ type: "integer"
+ example: 2
+ description: ""
+ package:
+ type: "object"
+ example:
+ identifier: "XEtJh5CTzcr3"
+ name: "insecure-image"
+ version: "d391c46c9c1a3b9a4c772213bc07e8d9e283775fddf6c7931f702f65cf7e6469"
+ description: ""
+ properties: {}
+ scan:
+ type: "object"
+ example:
+ results:
+ - affected_version: "4.19.67-2+deb10u2"
+ description: "A memory leak in the rsi_send_beacon() function in drivers/net/wireless/rsi/rsi_91x_mgmt.c\
+ \ in the Linux kernel through 5.3.11 allows attackers to cause a denial\
+ \ of service (memory consumption) by triggering rsi_prepare_beacon()\
+ \ failures, aka CID-d563131ef23c."
+ fixed_version: "4.19.98-1"
+ package_name: "linux-libc-dev"
+ references:
+ - "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19071"
+ - "https://github.com/torvalds/linux/commit/d563131ef23cbc756026f839a82598c8445bc45f"
+ - "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O3PSDE6PTOTVBK2YTKB2TFQP2SUBVSNF/"
+ - "https://security.netapp.com/advisory/ntap-20191205-0001/"
+ - "https://usn.ubuntu.com/4258-1/"
+ - "https://usn.ubuntu.com/usn/usn-4258-1"
+ severity: "HIGH"
+ severity_source: "debian"
+ vulnerability_id: "CVE-2019-19071"
+ - affected_version: "5.0-4"
+ description: ""
+ fixed_version: ""
+ package_name: "bash"
+ references: []
+ severity: "LOW"
+ severity_source: "debian"
+ vulnerability_id: "TEMP-0841856-B18BAF"
+ target: "/oci (debian 10.2)"
+ type: "debian"
+ description: ""
+ properties: {}
+ scan_id:
+ type: "integer"
+ example: 1
+ description: ""
+ example:
+ identifier: "HKmoU6OHbyj4ha3u"
+ max_severity: "HIGH"
+ package:
+ identifier: "XEtJh5CTzcr3"
+ name: "insecure-image"
+ version: "d391c46c9c1a3b9a4c772213bc07e8d9e283775fddf6c7931f702f65cf7e6469"
+ has_vulnerabilities: true
+ scan:
+ results:
+ - affected_version: "4.19.67-2+deb10u2"
+ description: "A memory leak in the rsi_send_beacon() function in drivers/net/wireless/rsi/rsi_91x_mgmt.c\
+ \ in the Linux kernel through 5.3.11 allows attackers to cause a denial\
+ \ of service (memory consumption) by triggering rsi_prepare_beacon() failures,\
+ \ aka CID-d563131ef23c."
+ fixed_version: "4.19.98-1"
+ package_name: "linux-libc-dev"
+ references:
+ - "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19071"
+ - "https://github.com/torvalds/linux/commit/d563131ef23cbc756026f839a82598c8445bc45f"
+ - "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O3PSDE6PTOTVBK2YTKB2TFQP2SUBVSNF/"
+ - "https://security.netapp.com/advisory/ntap-20191205-0001/"
+ - "https://usn.ubuntu.com/4258-1/"
+ - "https://usn.ubuntu.com/usn/usn-4258-1"
+ severity: "HIGH"
+ severity_source: "debian"
+ vulnerability_id: "CVE-2019-19071"
+ - affected_version: "5.0-4"
+ description: ""
+ fixed_version: ""
+ package_name: "bash"
+ references: []
+ severity: "LOW"
+ severity_source: "debian"
+ vulnerability_id: "TEMP-0841856-B18BAF"
+ target: "/oci (debian 10.2)"
+ type: "debian"
+ created_at: "2020-01-01T12:00:00.000000Z"
+ num_vulnerabilities: 2
+ scan_id: 1
+ PackagesUploadRaw:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ content_type:
+ type: "string"
+ description: "A custom content/media (also known as MIME) type to be sent\
+ \ when downloading this file. By default Cloudsmith will attempt to detect\
+ \ the type, but if you need to override it, you can specify it here."
+ description:
+ type: "string"
+ example: "Everything about packaging files."
+ description: "A textual description of this package."
+ name:
+ type: "string"
+ example: "my-package"
+ description: "The name of this package."
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ summary:
+ type: "string"
+ example: "My Package File"
+ description: "A one-liner synopsis of this package."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ version:
+ type: "string"
+ example: "1.0"
+ description: "The raw version for this package."
+ title: "PackagesUploadRaw"
+ example:
+ summary: "My Package File"
+ content_type: "content_type"
+ republish: true
+ name: "my-package"
+ description: "Everything about packaging files."
+ package_file: "y123456789"
+ version: "1.0"
+ tags: "tags"
+ PackagesUploadMaven:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ artifact_id:
+ type: "string"
+ example: "cloudsmith-example"
+ description: "The ID of the artifact."
+ group_id:
+ type: "string"
+ example: "io.cloudsmith.example"
+ description: "Artifact's group ID."
+ javadoc_file:
+ type: "string"
+ example: "y1234456789c"
+ description: "Adds bundled Java documentation to the Maven package"
+ package_file:
+ type: "string"
+ example: "y1234456789a"
+ description: "The primary file for the package."
+ packaging:
+ type: "string"
+ description: "Artifact's Maven packaging type."
+ pom_file:
+ type: "string"
+ example: "y1234456789b"
+ description: "The POM file is an XML file containing the Maven coordinates."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ sources_file:
+ type: "string"
+ example: "y1234456789d"
+ description: "Adds bundled Java source code to the Maven package."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ tests_file:
+ type: "string"
+ example: "y1234456789e"
+ description: "Adds bundled Java tests to the Maven package."
+ version:
+ type: "string"
+ description: "The raw version for this package."
+ title: "PackagesUploadMaven"
+ example:
+ sources_file: "y1234456789d"
+ tests_file: "y1234456789e"
+ republish: true
+ group_id: "io.cloudsmith.example"
+ javadoc_file: "y1234456789c"
+ packaging: "packaging"
+ artifact_id: "cloudsmith-example"
+ package_file: "y1234456789a"
+ version: "version"
+ pom_file: "y1234456789b"
+ tags: "tags"
+ ResourcesRateCheck:
+ type: "object"
+ properties:
+ resources:
+ type: "object"
+ example:
+ core:
+ interval: 5.123456789
+ limit: 3600
+ remaining: 3595
+ reset: 1646245156
+ reset_iso_8601: "2022-03-02T18:19:16.259727+00:00"
+ throttled: false
+ description: "Rate limit values per resource"
+ properties: {}
+ example:
+ resources:
+ core:
+ interval: 5.123456789
+ limit: 3600
+ remaining: 3595
+ reset: 1646245156
+ reset_iso_8601: "2022-03-02T18:19:16.259727+00:00"
+ throttled: false
+ UserBrief:
+ type: "object"
+ properties:
+ authenticated:
+ type: "boolean"
+ example: true
+ description: "If true then you're logged in as a user."
+ email:
+ type: "string"
+ example: "user@example.com"
+ description: "Your email address that we use to contact you. This is only\
+ \ visible to you."
+ name:
+ type: "string"
+ example: "Example User"
+ description: "The full name of the user (if any)."
+ profile_url:
+ type: "string"
+ description: "The URL for the full profile of the user."
+ self_url:
+ type: "string"
+ description: ""
+ slug:
+ type: "string"
+ example: "example-user"
+ description: ""
+ slug_perm:
+ type: "string"
+ example: "x1y2z3z4y"
+ description: ""
+ example:
+ authenticated: true
+ profile_url: "profile_url"
+ name: "Example User"
+ slug_perm: "x1y2z3z4y"
+ email: "user@example.com"
+ self_url: "self_url"
+ slug: "example-user"
+ PackagesValidateuploadCocoapods:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "z123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadCocoapods"
+ example:
+ republish: true
+ package_file: "z123456789"
+ tags: "tags"
+ PackagesUploadNuget:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y1234456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ symbols_file:
+ type: "string"
+ example: "y1234456789b"
+ description: "Attaches a symbols file to the package."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadNuget"
+ example:
+ republish: true
+ symbols_file: "y1234456789b"
+ package_file: "y1234456789a"
+ tags: "tags"
+ PackagesUploadVagrant:
+ type: "object"
+ required:
+ - "name"
+ - "package_file"
+ - "provider"
+ - "version"
+ properties:
+ name:
+ type: "string"
+ example: "tcl"
+ description: "The name of this package."
+ package_file:
+ type: "string"
+ example: "y123456789x"
+ description: "The primary file for the package."
+ provider:
+ type: "string"
+ example: "virtualbox"
+ description: "The virtual machine provider for the box."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ version:
+ type: "string"
+ example: "1.0"
+ description: "The raw version for this package."
+ title: "PackagesUploadVagrant"
+ example:
+ republish: true
+ provider: "virtualbox"
+ name: "tcl"
+ package_file: "y123456789x"
+ version: "1.0"
+ tags: "tags"
+ RepositoryTokenSync_tokens:
+ type: "object"
+ properties:
+ clients:
+ type: "integer"
+ description: ""
+ created_at:
+ type: "string"
+ description: "The datetime the token was updated at."
+ created_by:
+ type: "string"
+ description: ""
+ created_by_url:
+ type: "string"
+ description: ""
+ default:
+ type: "boolean"
+ description: "If selected this is the default token for this repository."
+ disable_url:
+ type: "string"
+ description: ""
+ downloads:
+ type: "integer"
+ description: ""
+ enable_url:
+ type: "string"
+ description: ""
+ eula_accepted:
+ type: "object"
+ description: ""
+ properties: {}
+ eula_accepted_at:
+ type: "string"
+ description: "The datetime the EULA was accepted at."
+ eula_accepted_from:
+ type: "string"
+ description: ""
+ eula_required:
+ type: "boolean"
+ description: "If checked, a EULA acceptance is required for this token."
+ has_limits:
+ type: "boolean"
+ description: ""
+ identifier:
+ type: "integer"
+ description: ""
+ is_active:
+ type: "boolean"
+ description: "If enabled, the token will allow downloads based on configured\
+ \ restrictions (if any)."
+ is_limited:
+ type: "boolean"
+ description: ""
+ limit_bandwidth:
+ type: "integer"
+ description: "The maximum download bandwidth allowed for the token. Values\
+ \ are expressed as the selected unit of bandwidth. Please note that since\
+ \ downloads are calculated asynchronously (after the download happens),\
+ \ the limit may not be imposed immediately but at a later point. "
+ limit_bandwidth_unit:
+ type: "string"
+ description: ""
+ limit_date_range_from:
+ type: "string"
+ description: "The starting date/time the token is allowed to be used from."
+ limit_date_range_to:
+ type: "string"
+ description: "The ending date/time the token is allowed to be used until."
+ limit_num_clients:
+ type: "integer"
+ description: "The maximum number of unique clients allowed for the token.\
+ \ Please note that since clients are calculated asynchronously (after the\
+ \ download happens), the limit may not be imposed immediately but at a later\
+ \ point."
+ limit_num_downloads:
+ type: "integer"
+ description: "The maximum number of downloads allowed for the token. Please\
+ \ note that since downloads are calculated asynchronously (after the download\
+ \ happens), the limit may not be imposed immediately but at a later point."
+ limit_package_query:
+ type: "string"
+ description: "The package-based search query to apply to restrict downloads\
+ \ to. This uses the same syntax as the standard search used for repositories,\
+ \ and also supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. This will still allow access to non-package files, such\
+ \ as metadata."
+ limit_path_query:
+ type: "string"
+ description: "The path-based search query to apply to restrict downloads to.\
+ \ This supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. The path evaluated does not include the domain name, the\
+ \ namespace, the entitlement code used, the package format, etc. and it\
+ \ always starts with a forward slash."
+ metadata:
+ type: "string"
+ description: ""
+ name:
+ type: "string"
+ description: ""
+ refresh_url:
+ type: "string"
+ description: ""
+ reset_url:
+ type: "string"
+ description: ""
+ scheduled_reset_at:
+ type: "string"
+ description: "The time at which the scheduled reset period has elapsed and\
+ \ the token limits were automatically reset to zero."
+ scheduled_reset_period:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ slug_perm:
+ type: "string"
+ description: ""
+ token:
+ type: "string"
+ description: ""
+ updated_at:
+ type: "string"
+ description: "The datetime the token was updated at."
+ updated_by:
+ type: "string"
+ description: ""
+ updated_by_url:
+ type: "string"
+ description: ""
+ usage:
+ type: "string"
+ description: ""
+ user:
+ type: "string"
+ description: ""
+ user_url:
+ type: "string"
+ description: ""
+ example:
+ limit_date_range_to: "limit_date_range_to"
+ metadata: "metadata"
+ clients: 0
+ limit_bandwidth_unit: "limit_bandwidth_unit"
+ scheduled_reset_at: "scheduled_reset_at"
+ usage: "usage"
+ limit_bandwidth: 5
+ created_at: "created_at"
+ limit_num_clients: 5
+ eula_accepted_at: "eula_accepted_at"
+ limit_package_query: "limit_package_query"
+ limit_path_query: "limit_path_query"
+ default: true
+ updated_at: "updated_at"
+ downloads: 6
+ user_url: "user_url"
+ limit_date_range_from: "limit_date_range_from"
+ reset_url: "reset_url"
+ limit_num_downloads: 2
+ eula_required: true
+ refresh_url: "refresh_url"
+ scheduled_reset_period: "scheduled_reset_period"
+ identifier: 1
+ is_active: true
+ eula_accepted: "{}"
+ eula_accepted_from: "eula_accepted_from"
+ created_by_url: "created_by_url"
+ is_limited: true
+ slug_perm: "slug_perm"
+ created_by: "created_by"
+ enable_url: "enable_url"
+ self_url: "self_url"
+ token: "token"
+ updated_by_url: "updated_by_url"
+ disable_url: "disable_url"
+ name: "name"
+ updated_by: "updated_by"
+ has_limits: true
+ user: "user"
+ PackagesValidateuploadComposer:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadComposer"
+ example:
+ republish: true
+ package_file: "y123456789"
+ tags: "tags"
+ EntitlementsRefresh:
+ type: "object"
+ properties:
+ eula_required:
+ type: "boolean"
+ description: "If checked, a EULA acceptance is required for this token."
+ is_active:
+ type: "boolean"
+ description: "If enabled, the token will allow downloads based on configured\
+ \ restrictions (if any)."
+ limit_bandwidth:
+ type: "integer"
+ description: "The maximum download bandwidth allowed for the token. Values\
+ \ are expressed as the selected unit of bandwidth. Please note that since\
+ \ downloads are calculated asynchronously (after the download happens),\
+ \ the limit may not be imposed immediately but at a later point. "
+ limit_bandwidth_unit:
+ type: "string"
+ description: "None"
+ limit_date_range_from:
+ type: "string"
+ description: "The starting date/time the token is allowed to be used from."
+ limit_date_range_to:
+ type: "string"
+ description: "The ending date/time the token is allowed to be used until."
+ limit_num_clients:
+ type: "integer"
+ description: "The maximum number of unique clients allowed for the token.\
+ \ Please note that since clients are calculated asynchronously (after the\
+ \ download happens), the limit may not be imposed immediately but at a later\
+ \ point."
+ limit_num_downloads:
+ type: "integer"
+ description: "The maximum number of downloads allowed for the token. Please\
+ \ note that since downloads are calculated asynchronously (after the download\
+ \ happens), the limit may not be imposed immediately but at a later point."
+ limit_package_query:
+ type: "string"
+ description: "The package-based search query to apply to restrict downloads\
+ \ to. This uses the same syntax as the standard search used for repositories,\
+ \ and also supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. This will still allow access to non-package files, such\
+ \ as metadata."
+ limit_path_query:
+ type: "string"
+ description: "The path-based search query to apply to restrict downloads to.\
+ \ This supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. The path evaluated does not include the domain name, the\
+ \ namespace, the entitlement code used, the package format, etc. and it\
+ \ always starts with a forward slash."
+ metadata:
+ type: "object"
+ description: "None"
+ properties: {}
+ scheduled_reset_at:
+ type: "string"
+ description: "The time at which the scheduled reset period has elapsed and\
+ \ the token limits were automatically reset to zero."
+ scheduled_reset_period:
+ type: "string"
+ description: "None"
+ token:
+ type: "string"
+ description: "None"
+ title: "EntitlementsRefresh"
+ example:
+ limit_date_range_to: "limit_date_range_to"
+ metadata: "{}"
+ is_active: true
+ limit_bandwidth_unit: "limit_bandwidth_unit"
+ scheduled_reset_at: "scheduled_reset_at"
+ limit_bandwidth: 0
+ limit_num_clients: 6
+ limit_package_query: "limit_package_query"
+ limit_path_query: "limit_path_query"
+ token: "token"
+ limit_date_range_from: "limit_date_range_from"
+ limit_num_downloads: 1
+ eula_required: true
+ scheduled_reset_period: "scheduled_reset_period"
+ PackagesValidateuploadRuby:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadRuby"
+ example:
+ republish: true
+ package_file: "y123456789"
+ tags: "tags"
+ PackageFilePartsUpload:
+ type: "object"
+ properties:
+ identifier:
+ type: "string"
+ description: "The identifier for the file to use uploading parts."
+ upload_querystring:
+ type: "string"
+ description: "The querystring to use for the next-step PUT upload."
+ upload_url:
+ type: "string"
+ description: "The URL to use for the next-step PUT upload"
+ example:
+ identifier: "identifier"
+ upload_querystring: "upload_querystring"
+ upload_url: "upload_url"
+ Repository:
+ type: "object"
+ required:
+ - "name"
+ properties:
+ cdn_url:
+ type: "string"
+ description: "Base URL from which packages and other artifacts are downloaded."
+ created_at:
+ type: "string"
+ description: ""
+ deleted_at:
+ type: "string"
+ description: ""
+ description:
+ type: "string"
+ description: "A description of the repository's purpose/contents."
+ gpg_keys:
+ type: "array"
+ description: ""
+ title: "Gpg keysList"
+ items:
+ $ref: "#/definitions/repos_gpg_keys"
+ index_files:
+ type: "boolean"
+ description: "If checked, files contained in packages will be indexed, which\
+ \ increase the synchronisation time required for packages. Note that it\
+ \ is recommended you keep this enabled unless the synchronisation time is\
+ \ significantly impacted."
+ is_open_source:
+ type: "boolean"
+ description: ""
+ is_private:
+ type: "boolean"
+ description: ""
+ is_public:
+ type: "boolean"
+ description: ""
+ name:
+ type: "string"
+ description: "A descriptive name for the repository."
+ namespace:
+ type: "string"
+ description: "Namespace to which this repository belongs."
+ namespace_url:
+ type: "string"
+ description: "API endpoint where data about this namespace can be retrieved."
+ num_downloads:
+ type: "integer"
+ description: "The number of downloads for packages in the repository."
+ package_count:
+ type: "integer"
+ description: "The number of packages in the repository."
+ package_group_count:
+ type: "integer"
+ description: "The number of groups in the repository."
+ repository_type:
+ type: "string"
+ description: "The repository type changes how it is accessed and billed. Private\
+ \ repositories can only be used on paid plans, but are visible only to you\
+ \ or authorised delegates. Open-Source repositories are always visible to\
+ \ everyone and are restricted by licensing, but are free to use and come\
+ \ with generous bandwidth/storage. You can only select Open-Source at repository\
+ \ creation time."
+ repository_type_str:
+ type: "string"
+ description: "The repository type changes how it is accessed and billed. Private\
+ \ repositories can only be used on paid plans, but are visible only to you\
+ \ or authorised delegates. Public repositories are free to use on all plans\
+ \ and visible to all Cloudsmith users."
+ self_html_url:
+ type: "string"
+ description: "Website URL for this repository."
+ self_url:
+ type: "string"
+ description: "API endpoint where data about this repository can be retrieved."
+ size:
+ type: "integer"
+ description: "The calculated size of the repository."
+ size_str:
+ type: "string"
+ description: "The calculated size of the repository (human readable)."
+ slug:
+ type: "string"
+ description: "The slug identifies the repository in URIs."
+ slug_perm:
+ type: "string"
+ description: "The slug_perm immutably identifies the repository. It will never\
+ \ change once a repository has been created."
+ storage_region:
+ type: "string"
+ description: "The Cloudsmith region in which package files are stored."
+ example:
+ is_private: true
+ created_at: "created_at"
+ description: "description"
+ namespace_url: "namespace_url"
+ self_html_url: "self_html_url"
+ slug_perm: "slug_perm"
+ deleted_at: "deleted_at"
+ index_files: true
+ num_downloads: 0
+ repository_type: "repository_type"
+ self_url: "self_url"
+ package_count: 6
+ storage_region: "storage_region"
+ size_str: "size_str"
+ package_group_count: 1
+ size: 5
+ cdn_url: "cdn_url"
+ repository_type_str: "repository_type_str"
+ gpg_keys:
+ - public_key: "public_key"
+ default: true
+ fingerprint: "fingerprint"
+ active: true
+ created_at: "created_at"
+ comment: "comment"
+ fingerprint_short: "fingerprint_short"
+ - public_key: "public_key"
+ default: true
+ fingerprint: "fingerprint"
+ active: true
+ created_at: "created_at"
+ comment: "comment"
+ fingerprint_short: "fingerprint_short"
+ is_open_source: true
+ is_public: true
+ name: "name"
+ namespace: "namespace"
+ slug: "slug"
+ PackageUsageMetrics:
+ type: "object"
+ required:
+ - "packages"
+ properties:
+ packages:
+ type: "object"
+ example:
+ active: 1
+ bandwidth:
+ average:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ highest:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ lowest:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ total:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ downloads:
+ average:
+ value: 5
+ highest:
+ value: 5
+ lowest:
+ value: 5
+ total:
+ value: 5
+ inactive: 0
+ total: 0
+ description: ""
+ properties: {}
+ example:
+ packages:
+ active: 1
+ bandwidth:
+ average:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ highest:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ lowest:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ total:
+ display: "11 B"
+ units: "bytes"
+ value: 11
+ downloads:
+ average:
+ value: 5
+ highest:
+ value: 5
+ lowest:
+ value: 5
+ total:
+ value: 5
+ inactive: 0
+ total: 0
+ ReposCreate:
+ type: "object"
+ required:
+ - "name"
+ properties:
+ description:
+ type: "string"
+ description: "A description of the repository's purpose/contents."
+ index_files:
+ type: "boolean"
+ description: "If checked, files contained in packages will be indexed, which\
+ \ increase the synchronisation time required for packages. Note that it\
+ \ is recommended you keep this enabled unless the synchronisation time is\
+ \ significantly impacted."
+ name:
+ type: "string"
+ description: "A descriptive name for the repository."
+ repository_type_str:
+ type: "string"
+ description: "The repository type changes how it is accessed and billed. Private\
+ \ repositories can only be used on paid plans, but are visible only to you\
+ \ or authorised delegates. Public repositories are free to use on all plans\
+ \ and visible to all Cloudsmith users."
+ slug:
+ type: "string"
+ description: "The slug identifies the repository in URIs."
+ storage_region:
+ type: "string"
+ description: "The Cloudsmith region in which package files are stored."
+ title: "ReposCreate"
+ example:
+ storage_region: "storage_region"
+ repository_type_str: "repository_type_str"
+ name: "name"
+ description: "description"
+ index_files: true
+ slug: "slug"
+ formats_distributions:
+ type: "object"
+ properties:
+ name:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ slug:
+ type: "string"
+ description: "The slug identifier for this distribution"
+ variants:
+ type: "string"
+ description: ""
+ example:
+ name: "name"
+ variants: "variants"
+ self_url: "self_url"
+ slug: "slug"
+ PackagesValidateuploadDocker:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadDocker"
+ example:
+ republish: true
+ package_file: "y123456789"
+ tags: "tags"
+ PackageDependencies:
+ type: "object"
+ required:
+ - "dependencies"
+ properties:
+ dependencies:
+ type: "array"
+ description: ""
+ title: "DependenciesList"
+ items:
+ $ref: "#/definitions/PackageDependencies_dependencies"
+ example:
+ dependencies:
+ - dep_type: "dep_type"
+ name: "name"
+ version: "version"
+ operator: "operator"
+ - dep_type: "dep_type"
+ name: "name"
+ version: "version"
+ operator: "operator"
+ PackageMove:
+ type: "object"
+ properties:
+ architectures:
+ type: "array"
+ description: ""
+ title: "ArchitecturesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_architectures"
+ cdn_url:
+ type: "string"
+ description: ""
+ checksum_md5:
+ type: "string"
+ description: ""
+ checksum_sha1:
+ type: "string"
+ description: ""
+ checksum_sha256:
+ type: "string"
+ description: ""
+ checksum_sha512:
+ type: "string"
+ description: ""
+ dependencies_checksum_md5:
+ type: "string"
+ description: "A checksum of all of the package's dependencies."
+ dependencies_url:
+ type: "string"
+ description: ""
+ description:
+ type: "string"
+ description: "A textual description of this package."
+ distro:
+ type: "object"
+ description: ""
+ properties: {}
+ distro_version:
+ type: "object"
+ description: ""
+ properties: {}
+ downloads:
+ type: "integer"
+ description: ""
+ epoch:
+ type: "integer"
+ description: "The epoch of the package version (if any)."
+ extension:
+ type: "string"
+ description: ""
+ filename:
+ type: "string"
+ description: ""
+ files:
+ type: "array"
+ description: ""
+ title: "FilesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_files"
+ format:
+ type: "string"
+ description: ""
+ format_url:
+ type: "string"
+ description: ""
+ identifier_perm:
+ type: "string"
+ description: "Unique and permanent identifier for the package."
+ indexed:
+ type: "boolean"
+ description: ""
+ is_sync_awaiting:
+ type: "boolean"
+ description: ""
+ is_sync_completed:
+ type: "boolean"
+ description: ""
+ is_sync_failed:
+ type: "boolean"
+ description: ""
+ is_sync_in_flight:
+ type: "boolean"
+ description: ""
+ is_sync_in_progress:
+ type: "boolean"
+ description: ""
+ license:
+ type: "string"
+ description: "The license of this package."
+ name:
+ type: "string"
+ description: "The name of this package."
+ namespace:
+ type: "string"
+ description: ""
+ namespace_url:
+ type: "string"
+ description: ""
+ num_files:
+ type: "integer"
+ description: ""
+ package_type:
+ type: "string"
+ description: "The type of package contents."
+ release:
+ type: "string"
+ description: "The release of the package version (if any)."
+ repository:
+ type: "string"
+ description: "The repository the package will be moved to."
+ repository_url:
+ type: "string"
+ description: ""
+ security_scan_completed_at:
+ type: "string"
+ description: "The datetime the security scanning was completed."
+ security_scan_started_at:
+ type: "string"
+ description: "The datetime the security scanning was started."
+ security_scan_status:
+ type: "string"
+ description: ""
+ security_scan_status_updated_at:
+ type: "string"
+ description: "The datetime the security scanning status was updated."
+ self_html_url:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ signature_url:
+ type: "string"
+ description: ""
+ size:
+ type: "integer"
+ description: "The calculated size of the package."
+ slug:
+ type: "string"
+ description: "The public unique identifier for the package."
+ slug_perm:
+ type: "string"
+ description: ""
+ stage:
+ type: "string"
+ description: "The synchronisation (in progress) stage of the package."
+ stage_str:
+ type: "string"
+ description: ""
+ stage_updated_at:
+ type: "string"
+ description: "The datetime the package stage was updated at."
+ status:
+ type: "string"
+ description: "The synchronisation status of the package."
+ status_reason:
+ type: "string"
+ description: "A textual description for the synchronous status reason (if\
+ \ any"
+ status_str:
+ type: "string"
+ description: ""
+ status_updated_at:
+ type: "string"
+ description: "The datetime the package status was updated at."
+ status_url:
+ type: "string"
+ description: ""
+ subtype:
+ type: "string"
+ description: ""
+ summary:
+ type: "string"
+ description: "A one-liner synopsis of this package."
+ sync_finished_at:
+ type: "string"
+ description: "The datetime the package sync was finished at."
+ sync_progress:
+ type: "integer"
+ description: "Synchronisation progress (from 0-100)"
+ tags:
+ type: "object"
+ description: "All tags on the package, grouped by tag type. This includes\
+ \ immutable tags, but doesn't distinguish them from mutable. To see which\
+ \ tags are immutable specifically, see the tags_immutable field."
+ properties: {}
+ tags_immutable:
+ type: "object"
+ description: "All immutable tags on the package, grouped by tag type. Immutable\
+ \ tags cannot be (easily) deleted."
+ properties: {}
+ type_display:
+ type: "string"
+ description: ""
+ uploaded_at:
+ type: "string"
+ description: "The date this package was uploaded."
+ uploader:
+ type: "string"
+ description: ""
+ uploader_url:
+ type: "string"
+ description: ""
+ version:
+ type: "string"
+ description: "The raw version for this package."
+ version_orig:
+ type: "string"
+ description: ""
+ vulnerability_scan_results_url:
+ type: "string"
+ description: ""
+ example:
+ architectures:
+ - name: "name"
+ description: "description"
+ - name: "name"
+ description: "description"
+ security_scan_status_updated_at: "security_scan_status_updated_at"
+ checksum_sha256: "checksum_sha256"
+ release: "release"
+ package_type: "package_type"
+ repository: "repository"
+ identifier_perm: "identifier_perm"
+ stage_updated_at: "stage_updated_at"
+ tags_immutable: "{}"
+ slug: "slug"
+ security_scan_started_at: "security_scan_started_at"
+ security_scan_status: "security_scan_status"
+ indexed: true
+ format: "format"
+ status_str: "status_str"
+ version_orig: "version_orig"
+ namespace_url: "namespace_url"
+ slug_perm: "slug_perm"
+ version: "version"
+ tags: "{}"
+ license: "license"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ uploaded_at: "uploaded_at"
+ name: "name"
+ sync_finished_at: "sync_finished_at"
+ files:
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ num_files: 1
+ status: "status"
+ checksum_sha512: "checksum_sha512"
+ distro: "{}"
+ extension: "extension"
+ description: "description"
+ epoch: 6
+ is_sync_completed: true
+ distro_version: "{}"
+ type_display: "type_display"
+ vulnerability_scan_results_url: "vulnerability_scan_results_url"
+ dependencies_checksum_md5: "dependencies_checksum_md5"
+ downloads: 0
+ subtype: "subtype"
+ uploader: "uploader"
+ signature_url: "signature_url"
+ repository_url: "repository_url"
+ status_reason: "status_reason"
+ status_updated_at: "status_updated_at"
+ summary: "summary"
+ checksum_sha1: "checksum_sha1"
+ checksum_md5: "checksum_md5"
+ sync_progress: 5
+ is_sync_awaiting: true
+ uploader_url: "uploader_url"
+ self_html_url: "self_html_url"
+ self_url: "self_url"
+ status_url: "status_url"
+ is_sync_in_flight: true
+ security_scan_completed_at: "security_scan_completed_at"
+ is_sync_in_progress: true
+ stage_str: "stage_str"
+ stage: "stage"
+ format_url: "format_url"
+ dependencies_url: "dependencies_url"
+ namespace: "namespace"
+ is_sync_failed: true
+ FilesValidate:
+ type: "object"
+ required:
+ - "filename"
+ properties:
+ filename:
+ type: "string"
+ description: "Filename for the package file upload."
+ md5_checksum:
+ type: "string"
+ description: "MD5 checksum for a POST-based package file upload."
+ method:
+ type: "string"
+ description: "The method to use for package file upload."
+ sha256_checksum:
+ type: "string"
+ description: "SHA256 checksum for a PUT-based package file upload."
+ title: "FilesValidate"
+ example:
+ sha256_checksum: "sha256_checksum"
+ filename: "filename"
+ method: "method"
+ md5_checksum: "md5_checksum"
+ AlpinePackageUpload:
+ type: "object"
+ properties:
+ architectures:
+ type: "array"
+ description: ""
+ title: "ArchitecturesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_architectures"
+ cdn_url:
+ type: "string"
+ description: ""
+ checksum_md5:
+ type: "string"
+ description: ""
+ checksum_sha1:
+ type: "string"
+ description: ""
+ checksum_sha256:
+ type: "string"
+ description: ""
+ checksum_sha512:
+ type: "string"
+ description: ""
+ dependencies_checksum_md5:
+ type: "string"
+ description: "A checksum of all of the package's dependencies."
+ dependencies_url:
+ type: "string"
+ description: ""
+ description:
+ type: "string"
+ description: "A textual description of this package."
+ distro:
+ type: "object"
+ description: ""
+ properties: {}
+ distro_version:
+ type: "object"
+ description: ""
+ properties: {}
+ downloads:
+ type: "integer"
+ description: ""
+ epoch:
+ type: "integer"
+ description: "The epoch of the package version (if any)."
+ extension:
+ type: "string"
+ description: ""
+ filename:
+ type: "string"
+ description: ""
+ files:
+ type: "array"
+ description: ""
+ title: "FilesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_files"
+ format:
+ type: "string"
+ description: ""
+ format_url:
+ type: "string"
+ description: ""
+ identifier_perm:
+ type: "string"
+ description: "Unique and permanent identifier for the package."
+ indexed:
+ type: "boolean"
+ description: ""
+ is_sync_awaiting:
+ type: "boolean"
+ description: ""
+ is_sync_completed:
+ type: "boolean"
+ description: ""
+ is_sync_failed:
+ type: "boolean"
+ description: ""
+ is_sync_in_flight:
+ type: "boolean"
+ description: ""
+ is_sync_in_progress:
+ type: "boolean"
+ description: ""
+ license:
+ type: "string"
+ description: "The license of this package."
+ name:
+ type: "string"
+ description: "The name of this package."
+ namespace:
+ type: "string"
+ description: ""
+ namespace_url:
+ type: "string"
+ description: ""
+ num_files:
+ type: "integer"
+ description: ""
+ package_type:
+ type: "string"
+ description: "The type of package contents."
+ release:
+ type: "string"
+ description: "The release of the package version (if any)."
+ repository:
+ type: "string"
+ description: ""
+ repository_url:
+ type: "string"
+ description: ""
+ security_scan_completed_at:
+ type: "string"
+ description: "The datetime the security scanning was completed."
+ security_scan_started_at:
+ type: "string"
+ description: "The datetime the security scanning was started."
+ security_scan_status:
+ type: "string"
+ description: ""
+ security_scan_status_updated_at:
+ type: "string"
+ description: "The datetime the security scanning status was updated."
+ self_html_url:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ signature_url:
+ type: "string"
+ description: ""
+ size:
+ type: "integer"
+ description: "The calculated size of the package."
+ slug:
+ type: "string"
+ description: "The public unique identifier for the package."
+ slug_perm:
+ type: "string"
+ description: ""
+ stage:
+ type: "string"
+ description: "The synchronisation (in progress) stage of the package."
+ stage_str:
+ type: "string"
+ description: ""
+ stage_updated_at:
+ type: "string"
+ description: "The datetime the package stage was updated at."
+ status:
+ type: "string"
+ description: "The synchronisation status of the package."
+ status_reason:
+ type: "string"
+ description: "A textual description for the synchronous status reason (if\
+ \ any"
+ status_str:
+ type: "string"
+ description: ""
+ status_updated_at:
+ type: "string"
+ description: "The datetime the package status was updated at."
+ status_url:
+ type: "string"
+ description: ""
+ subtype:
+ type: "string"
+ description: ""
+ summary:
+ type: "string"
+ description: "A one-liner synopsis of this package."
+ sync_finished_at:
+ type: "string"
+ description: "The datetime the package sync was finished at."
+ sync_progress:
+ type: "integer"
+ description: "Synchronisation progress (from 0-100)"
+ tags_immutable:
+ type: "object"
+ description: "All immutable tags on the package, grouped by tag type. Immutable\
+ \ tags cannot be (easily) deleted."
+ properties: {}
+ type_display:
+ type: "string"
+ description: ""
+ uploaded_at:
+ type: "string"
+ description: "The date this package was uploaded."
+ uploader:
+ type: "string"
+ description: ""
+ uploader_url:
+ type: "string"
+ description: ""
+ version:
+ type: "string"
+ description: "The raw version for this package."
+ version_orig:
+ type: "string"
+ description: ""
+ vulnerability_scan_results_url:
+ type: "string"
+ description: ""
+ example:
+ architectures:
+ - name: "name"
+ description: "description"
+ - name: "name"
+ description: "description"
+ security_scan_status_updated_at: "security_scan_status_updated_at"
+ checksum_sha256: "checksum_sha256"
+ release: "release"
+ package_type: "package_type"
+ repository: "repository"
+ identifier_perm: "identifier_perm"
+ stage_updated_at: "stage_updated_at"
+ tags_immutable: "{}"
+ slug: "slug"
+ security_scan_started_at: "security_scan_started_at"
+ security_scan_status: "security_scan_status"
+ indexed: true
+ format: "format"
+ status_str: "status_str"
+ version_orig: "version_orig"
+ namespace_url: "namespace_url"
+ slug_perm: "slug_perm"
+ version: "version"
+ license: "license"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ uploaded_at: "uploaded_at"
+ name: "name"
+ sync_finished_at: "sync_finished_at"
+ files:
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ num_files: 1
+ status: "status"
+ checksum_sha512: "checksum_sha512"
+ distro: "{}"
+ extension: "extension"
+ description: "description"
+ epoch: 6
+ is_sync_completed: true
+ distro_version: "{}"
+ type_display: "type_display"
+ vulnerability_scan_results_url: "vulnerability_scan_results_url"
+ dependencies_checksum_md5: "dependencies_checksum_md5"
+ downloads: 0
+ subtype: "subtype"
+ uploader: "uploader"
+ signature_url: "signature_url"
+ repository_url: "repository_url"
+ status_reason: "status_reason"
+ status_updated_at: "status_updated_at"
+ summary: "summary"
+ checksum_sha1: "checksum_sha1"
+ checksum_md5: "checksum_md5"
+ sync_progress: 5
+ is_sync_awaiting: true
+ uploader_url: "uploader_url"
+ self_html_url: "self_html_url"
+ self_url: "self_url"
+ status_url: "status_url"
+ is_sync_in_flight: true
+ security_scan_completed_at: "security_scan_completed_at"
+ is_sync_in_progress: true
+ stage_str: "stage_str"
+ stage: "stage"
+ format_url: "format_url"
+ dependencies_url: "dependencies_url"
+ namespace: "namespace"
+ is_sync_failed: true
+ PackagesValidateuploadCran:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadCran"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ PackagesMove:
+ type: "object"
+ required:
+ - "destination"
+ properties:
+ destination:
+ type: "string"
+ description: "None"
+ title: "PackagesMove"
+ example:
+ destination: "destination"
+ PackagesUploadP2:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadP2"
+ example:
+ republish: true
+ package_file: "package_file"
+ tags: "tags"
+ PackagesUploadRuby:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadRuby"
+ example:
+ republish: true
+ package_file: "y123456789"
+ tags: "tags"
+ webhooksownerrepo_templates:
+ type: "object"
+ properties:
+ event:
+ type: "string"
+ description: ""
+ template:
+ type: "string"
+ description: ""
+ example:
+ template: "template"
+ event: "event"
+ PackagesUploadDocker:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadDocker"
+ example:
+ republish: true
+ package_file: "y123456789"
+ tags: "tags"
+ packagesownerrepo_architectures:
+ type: "object"
+ properties:
+ description:
+ type: "string"
+ description: ""
+ name:
+ type: "string"
+ description: ""
+ example:
+ name: "name"
+ description: "description"
+ StatusBasic:
+ type: "object"
+ properties:
+ detail:
+ type: "string"
+ example: "Cloudsmith API is operational."
+ description: "The message describing the state of the API."
+ version:
+ type: "string"
+ example: "1.33.7"
+ description: "The current version for the Cloudsmith service."
+ example:
+ detail: "Cloudsmith API is operational."
+ version: "1.33.7"
+ ReposPartialUpdate:
+ type: "object"
+ properties:
+ description:
+ type: "string"
+ description: "A description of the repository's purpose/contents."
+ index_files:
+ type: "boolean"
+ description: "If checked, files contained in packages will be indexed, which\
+ \ increase the synchronisation time required for packages. Note that it\
+ \ is recommended you keep this enabled unless the synchronisation time is\
+ \ significantly impacted."
+ name:
+ type: "string"
+ description: "A descriptive name for the repository."
+ repository_type_str:
+ type: "string"
+ description: "The repository type changes how it is accessed and billed. Private\
+ \ repositories can only be used on paid plans, but are visible only to you\
+ \ or authorised delegates. Public repositories are free to use on all plans\
+ \ and visible to all Cloudsmith users."
+ slug:
+ type: "string"
+ description: "The slug identifies the repository in URIs."
+ title: "ReposPartialUpdate"
+ example:
+ repository_type_str: "repository_type_str"
+ name: "name"
+ description: "description"
+ index_files: true
+ slug: "slug"
+ PackagesUploadCran:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadCran"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ RawPackageUpload:
+ type: "object"
+ properties:
+ architectures:
+ type: "array"
+ description: ""
+ title: "ArchitecturesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_architectures"
+ cdn_url:
+ type: "string"
+ description: ""
+ checksum_md5:
+ type: "string"
+ description: ""
+ checksum_sha1:
+ type: "string"
+ description: ""
+ checksum_sha256:
+ type: "string"
+ description: ""
+ checksum_sha512:
+ type: "string"
+ description: ""
+ dependencies_checksum_md5:
+ type: "string"
+ description: "A checksum of all of the package's dependencies."
+ dependencies_url:
+ type: "string"
+ description: ""
+ description:
+ type: "string"
+ example: "Everything about packaging files."
+ description: "A textual description of this package."
+ distro:
+ type: "object"
+ description: ""
+ properties: {}
+ distro_version:
+ type: "object"
+ description: ""
+ properties: {}
+ downloads:
+ type: "integer"
+ description: ""
+ epoch:
+ type: "integer"
+ description: "The epoch of the package version (if any)."
+ extension:
+ type: "string"
+ description: ""
+ filename:
+ type: "string"
+ description: ""
+ files:
+ type: "array"
+ description: ""
+ title: "FilesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_files"
+ format:
+ type: "string"
+ description: ""
+ format_url:
+ type: "string"
+ description: ""
+ identifier_perm:
+ type: "string"
+ description: "Unique and permanent identifier for the package."
+ indexed:
+ type: "boolean"
+ description: ""
+ is_sync_awaiting:
+ type: "boolean"
+ description: ""
+ is_sync_completed:
+ type: "boolean"
+ description: ""
+ is_sync_failed:
+ type: "boolean"
+ description: ""
+ is_sync_in_flight:
+ type: "boolean"
+ description: ""
+ is_sync_in_progress:
+ type: "boolean"
+ description: ""
+ license:
+ type: "string"
+ description: "The license of this package."
+ name:
+ type: "string"
+ example: "my-package"
+ description: "The name of this package."
+ namespace:
+ type: "string"
+ description: ""
+ namespace_url:
+ type: "string"
+ description: ""
+ num_files:
+ type: "integer"
+ description: ""
+ package_type:
+ type: "string"
+ description: "The type of package contents."
+ release:
+ type: "string"
+ description: "The release of the package version (if any)."
+ repository:
+ type: "string"
+ description: ""
+ repository_url:
+ type: "string"
+ description: ""
+ security_scan_completed_at:
+ type: "string"
+ description: "The datetime the security scanning was completed."
+ security_scan_started_at:
+ type: "string"
+ description: "The datetime the security scanning was started."
+ security_scan_status:
+ type: "string"
+ description: ""
+ security_scan_status_updated_at:
+ type: "string"
+ description: "The datetime the security scanning status was updated."
+ self_html_url:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ signature_url:
+ type: "string"
+ description: ""
+ size:
+ type: "integer"
+ description: "The calculated size of the package."
+ slug:
+ type: "string"
+ description: "The public unique identifier for the package."
+ slug_perm:
+ type: "string"
+ description: ""
+ stage:
+ type: "string"
+ description: "The synchronisation (in progress) stage of the package."
+ stage_str:
+ type: "string"
+ description: ""
+ stage_updated_at:
+ type: "string"
+ description: "The datetime the package stage was updated at."
+ status:
+ type: "string"
+ description: "The synchronisation status of the package."
+ status_reason:
+ type: "string"
+ description: "A textual description for the synchronous status reason (if\
+ \ any"
+ status_str:
+ type: "string"
+ description: ""
+ status_updated_at:
+ type: "string"
+ description: "The datetime the package status was updated at."
+ status_url:
+ type: "string"
+ description: ""
+ subtype:
+ type: "string"
+ description: ""
+ summary:
+ type: "string"
+ example: "My Package File"
+ description: "A one-liner synopsis of this package."
+ sync_finished_at:
+ type: "string"
+ description: "The datetime the package sync was finished at."
+ sync_progress:
+ type: "integer"
+ description: "Synchronisation progress (from 0-100)"
+ tags_immutable:
+ type: "object"
+ description: "All immutable tags on the package, grouped by tag type. Immutable\
+ \ tags cannot be (easily) deleted."
+ properties: {}
+ type_display:
+ type: "string"
+ description: ""
+ uploaded_at:
+ type: "string"
+ description: "The date this package was uploaded."
+ uploader:
+ type: "string"
+ description: ""
+ uploader_url:
+ type: "string"
+ description: ""
+ version:
+ type: "string"
+ example: "1.0"
+ description: "The raw version for this package."
+ version_orig:
+ type: "string"
+ description: ""
+ vulnerability_scan_results_url:
+ type: "string"
+ description: ""
+ example:
+ architectures:
+ - name: "name"
+ description: "description"
+ - name: "name"
+ description: "description"
+ security_scan_status_updated_at: "security_scan_status_updated_at"
+ checksum_sha256: "checksum_sha256"
+ release: "release"
+ package_type: "package_type"
+ repository: "repository"
+ identifier_perm: "identifier_perm"
+ stage_updated_at: "stage_updated_at"
+ tags_immutable: "{}"
+ slug: "slug"
+ security_scan_started_at: "security_scan_started_at"
+ security_scan_status: "security_scan_status"
+ indexed: true
+ format: "format"
+ status_str: "status_str"
+ version_orig: "version_orig"
+ namespace_url: "namespace_url"
+ slug_perm: "slug_perm"
+ version: "1.0"
+ license: "license"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ uploaded_at: "uploaded_at"
+ name: "my-package"
+ sync_finished_at: "sync_finished_at"
+ files:
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ num_files: 1
+ status: "status"
+ checksum_sha512: "checksum_sha512"
+ distro: "{}"
+ extension: "extension"
+ description: "Everything about packaging files."
+ epoch: 6
+ is_sync_completed: true
+ distro_version: "{}"
+ type_display: "type_display"
+ vulnerability_scan_results_url: "vulnerability_scan_results_url"
+ dependencies_checksum_md5: "dependencies_checksum_md5"
+ downloads: 0
+ subtype: "subtype"
+ uploader: "uploader"
+ signature_url: "signature_url"
+ repository_url: "repository_url"
+ status_reason: "status_reason"
+ status_updated_at: "status_updated_at"
+ summary: "My Package File"
+ checksum_sha1: "checksum_sha1"
+ checksum_md5: "checksum_md5"
+ sync_progress: 5
+ is_sync_awaiting: true
+ uploader_url: "uploader_url"
+ self_html_url: "self_html_url"
+ self_url: "self_url"
+ status_url: "status_url"
+ is_sync_in_flight: true
+ security_scan_completed_at: "security_scan_completed_at"
+ is_sync_in_progress: true
+ stage_str: "stage_str"
+ stage: "stage"
+ format_url: "format_url"
+ dependencies_url: "dependencies_url"
+ namespace: "namespace"
+ is_sync_failed: true
+ UserAuthToken:
+ type: "object"
+ properties:
+ token:
+ type: "string"
+ example: "y4682jh19cqf0b2ty4682jh19cqf0b2t"
+ description: "API token for the authenticated user"
+ example:
+ token: "y4682jh19cqf0b2ty4682jh19cqf0b2t"
+ PackagesUploadComposer:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadComposer"
+ example:
+ republish: true
+ package_file: "y123456789"
+ tags: "tags"
+ PackagesValidateuploadGo:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadGo"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ FilesCreate:
+ type: "object"
+ required:
+ - "filename"
+ properties:
+ filename:
+ type: "string"
+ description: "Filename for the package file upload."
+ md5_checksum:
+ type: "string"
+ description: "MD5 checksum for a POST-based package file upload."
+ method:
+ type: "string"
+ description: "The method to use for package file upload."
+ sha256_checksum:
+ type: "string"
+ description: "SHA256 checksum for a PUT-based package file upload."
+ title: "FilesCreate"
+ example:
+ sha256_checksum: "sha256_checksum"
+ filename: "filename"
+ method: "method"
+ md5_checksum: "md5_checksum"
+ PackagesUploadGo:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadGo"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ FilesComplete:
+ type: "object"
+ required:
+ - "filename"
+ properties:
+ filename:
+ type: "string"
+ description: "Filename for the package file upload."
+ md5_checksum:
+ type: "string"
+ description: "MD5 checksum for a POST-based package file upload."
+ method:
+ type: "string"
+ description: "The method to use for package file upload."
+ sha256_checksum:
+ type: "string"
+ description: "SHA256 checksum for a PUT-based package file upload."
+ title: "FilesComplete"
+ example:
+ sha256_checksum: "sha256_checksum"
+ filename: "filename"
+ method: "method"
+ md5_checksum: "md5_checksum"
+ packagesownerrepo_files:
+ type: "object"
+ properties:
+ cdn_url:
+ type: "string"
+ description: ""
+ checksum_md5:
+ type: "string"
+ description: ""
+ checksum_sha1:
+ type: "string"
+ description: ""
+ checksum_sha256:
+ type: "string"
+ description: ""
+ checksum_sha512:
+ type: "string"
+ description: ""
+ downloads:
+ type: "integer"
+ description: ""
+ filename:
+ type: "string"
+ description: ""
+ is_downloadable:
+ type: "boolean"
+ description: ""
+ is_primary:
+ type: "boolean"
+ description: ""
+ is_synchronised:
+ type: "boolean"
+ description: ""
+ signature_url:
+ type: "string"
+ description: ""
+ size:
+ type: "integer"
+ description: "The calculated size of the file."
+ slug_perm:
+ type: "string"
+ description: ""
+ tag:
+ type: "string"
+ description: "Freeform descriptor that describes what the file is."
+ example:
+ checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ PackagesUploadCargo:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadCargo"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ PackagesValidateuploadMaven:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ artifact_id:
+ type: "string"
+ example: "cloudsmith-example"
+ description: "The ID of the artifact."
+ group_id:
+ type: "string"
+ example: "io.cloudsmith.example"
+ description: "Artifact's group ID."
+ javadoc_file:
+ type: "string"
+ example: "y1234456789c"
+ description: "Adds bundled Java documentation to the Maven package"
+ package_file:
+ type: "string"
+ example: "y1234456789a"
+ description: "The primary file for the package."
+ packaging:
+ type: "string"
+ description: "Artifact's Maven packaging type."
+ pom_file:
+ type: "string"
+ example: "y1234456789b"
+ description: "The POM file is an XML file containing the Maven coordinates."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ sources_file:
+ type: "string"
+ example: "y1234456789d"
+ description: "Adds bundled Java source code to the Maven package."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ tests_file:
+ type: "string"
+ example: "y1234456789e"
+ description: "Adds bundled Java tests to the Maven package."
+ version:
+ type: "string"
+ description: "The raw version for this package."
+ title: "PackagesValidate-uploadMaven"
+ example:
+ sources_file: "y1234456789d"
+ tests_file: "y1234456789e"
+ republish: true
+ group_id: "io.cloudsmith.example"
+ javadoc_file: "y1234456789c"
+ packaging: "packaging"
+ artifact_id: "cloudsmith-example"
+ package_file: "y1234456789a"
+ version: "version"
+ pom_file: "y1234456789b"
+ tags: "tags"
+ PackagesUploadLuarocks:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadLuarocks"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ EntitlementsPartialUpdate:
+ type: "object"
+ properties:
+ eula_required:
+ type: "boolean"
+ description: "If checked, a EULA acceptance is required for this token."
+ is_active:
+ type: "boolean"
+ description: "If enabled, the token will allow downloads based on configured\
+ \ restrictions (if any)."
+ limit_bandwidth:
+ type: "integer"
+ description: "The maximum download bandwidth allowed for the token. Values\
+ \ are expressed as the selected unit of bandwidth. Please note that since\
+ \ downloads are calculated asynchronously (after the download happens),\
+ \ the limit may not be imposed immediately but at a later point. "
+ limit_bandwidth_unit:
+ type: "string"
+ description: "None"
+ limit_date_range_from:
+ type: "string"
+ description: "The starting date/time the token is allowed to be used from."
+ limit_date_range_to:
+ type: "string"
+ description: "The ending date/time the token is allowed to be used until."
+ limit_num_clients:
+ type: "integer"
+ description: "The maximum number of unique clients allowed for the token.\
+ \ Please note that since clients are calculated asynchronously (after the\
+ \ download happens), the limit may not be imposed immediately but at a later\
+ \ point."
+ limit_num_downloads:
+ type: "integer"
+ description: "The maximum number of downloads allowed for the token. Please\
+ \ note that since downloads are calculated asynchronously (after the download\
+ \ happens), the limit may not be imposed immediately but at a later point."
+ limit_package_query:
+ type: "string"
+ description: "The package-based search query to apply to restrict downloads\
+ \ to. This uses the same syntax as the standard search used for repositories,\
+ \ and also supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. This will still allow access to non-package files, such\
+ \ as metadata."
+ limit_path_query:
+ type: "string"
+ description: "The path-based search query to apply to restrict downloads to.\
+ \ This supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. The path evaluated does not include the domain name, the\
+ \ namespace, the entitlement code used, the package format, etc. and it\
+ \ always starts with a forward slash."
+ metadata:
+ type: "object"
+ description: "None"
+ properties: {}
+ name:
+ type: "string"
+ description: "None"
+ scheduled_reset_at:
+ type: "string"
+ description: "The time at which the scheduled reset period has elapsed and\
+ \ the token limits were automatically reset to zero."
+ scheduled_reset_period:
+ type: "string"
+ description: "None"
+ token:
+ type: "string"
+ description: "None"
+ title: "EntitlementsPartialUpdate"
+ example:
+ limit_date_range_to: "limit_date_range_to"
+ metadata: "{}"
+ is_active: true
+ limit_bandwidth_unit: "limit_bandwidth_unit"
+ scheduled_reset_at: "scheduled_reset_at"
+ limit_bandwidth: 0
+ limit_num_clients: 6
+ limit_package_query: "limit_package_query"
+ limit_path_query: "limit_path_query"
+ token: "token"
+ name: "name"
+ limit_date_range_from: "limit_date_range_from"
+ limit_num_downloads: 1
+ eula_required: true
+ scheduled_reset_period: "scheduled_reset_period"
+ MavenPackageUpload:
+ type: "object"
+ properties:
+ architectures:
+ type: "array"
+ description: ""
+ title: "ArchitecturesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_architectures"
+ artifact_id:
+ type: "string"
+ example: "cloudsmith-example"
+ description: "The ID of the artifact."
+ cdn_url:
+ type: "string"
+ description: ""
+ checksum_md5:
+ type: "string"
+ description: ""
+ checksum_sha1:
+ type: "string"
+ description: ""
+ checksum_sha256:
+ type: "string"
+ description: ""
+ checksum_sha512:
+ type: "string"
+ description: ""
+ dependencies_checksum_md5:
+ type: "string"
+ description: "A checksum of all of the package's dependencies."
+ dependencies_url:
+ type: "string"
+ description: ""
+ description:
+ type: "string"
+ description: "A textual description of this package."
+ distro:
+ type: "object"
+ description: ""
+ properties: {}
+ distro_version:
+ type: "object"
+ description: ""
+ properties: {}
+ downloads:
+ type: "integer"
+ description: ""
+ epoch:
+ type: "integer"
+ description: "The epoch of the package version (if any)."
+ extension:
+ type: "string"
+ description: ""
+ filename:
+ type: "string"
+ description: ""
+ files:
+ type: "array"
+ description: ""
+ title: "FilesList"
+ items:
+ $ref: "#/definitions/packagesownerrepo_files"
+ format:
+ type: "string"
+ description: ""
+ format_url:
+ type: "string"
+ description: ""
+ group_id:
+ type: "string"
+ example: "io.cloudsmith.example"
+ description: "Artifact's group ID."
+ identifier_perm:
+ type: "string"
+ description: "Unique and permanent identifier for the package."
+ indexed:
+ type: "boolean"
+ description: ""
+ is_sync_awaiting:
+ type: "boolean"
+ description: ""
+ is_sync_completed:
+ type: "boolean"
+ description: ""
+ is_sync_failed:
+ type: "boolean"
+ description: ""
+ is_sync_in_flight:
+ type: "boolean"
+ description: ""
+ is_sync_in_progress:
+ type: "boolean"
+ description: ""
+ license:
+ type: "string"
+ description: "The license of this package."
+ name:
+ type: "string"
+ description: "The name of this package."
+ namespace:
+ type: "string"
+ description: ""
+ namespace_url:
+ type: "string"
+ description: ""
+ num_files:
+ type: "integer"
+ description: ""
+ package_type:
+ type: "string"
+ description: "The type of package contents."
+ packaging:
+ type: "string"
+ description: "Artifact's Maven packaging type."
+ release:
+ type: "string"
+ description: "The release of the package version (if any)."
+ repository:
+ type: "string"
+ description: ""
+ repository_url:
+ type: "string"
+ description: ""
+ security_scan_completed_at:
+ type: "string"
+ description: "The datetime the security scanning was completed."
+ security_scan_started_at:
+ type: "string"
+ description: "The datetime the security scanning was started."
+ security_scan_status:
+ type: "string"
+ description: ""
+ security_scan_status_updated_at:
+ type: "string"
+ description: "The datetime the security scanning status was updated."
+ self_html_url:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ signature_url:
+ type: "string"
+ description: ""
+ size:
+ type: "integer"
+ description: "The calculated size of the package."
+ slug:
+ type: "string"
+ description: "The public unique identifier for the package."
+ slug_perm:
+ type: "string"
+ description: ""
+ stage:
+ type: "string"
+ description: "The synchronisation (in progress) stage of the package."
+ stage_str:
+ type: "string"
+ description: ""
+ stage_updated_at:
+ type: "string"
+ description: "The datetime the package stage was updated at."
+ status:
+ type: "string"
+ description: "The synchronisation status of the package."
+ status_reason:
+ type: "string"
+ description: "A textual description for the synchronous status reason (if\
+ \ any"
+ status_str:
+ type: "string"
+ description: ""
+ status_updated_at:
+ type: "string"
+ description: "The datetime the package status was updated at."
+ status_url:
+ type: "string"
+ description: ""
+ subtype:
+ type: "string"
+ description: ""
+ summary:
+ type: "string"
+ description: "A one-liner synopsis of this package."
+ sync_finished_at:
+ type: "string"
+ description: "The datetime the package sync was finished at."
+ sync_progress:
+ type: "integer"
+ description: "Synchronisation progress (from 0-100)"
+ tags_immutable:
+ type: "object"
+ description: "All immutable tags on the package, grouped by tag type. Immutable\
+ \ tags cannot be (easily) deleted."
+ properties: {}
+ type_display:
+ type: "string"
+ description: ""
+ uploaded_at:
+ type: "string"
+ description: "The date this package was uploaded."
+ uploader:
+ type: "string"
+ description: ""
+ uploader_url:
+ type: "string"
+ description: ""
+ version:
+ type: "string"
+ description: "The raw version for this package."
+ version_orig:
+ type: "string"
+ description: ""
+ vulnerability_scan_results_url:
+ type: "string"
+ description: ""
+ example:
+ architectures:
+ - name: "name"
+ description: "description"
+ - name: "name"
+ description: "description"
+ security_scan_status_updated_at: "security_scan_status_updated_at"
+ checksum_sha256: "checksum_sha256"
+ release: "release"
+ artifact_id: "cloudsmith-example"
+ package_type: "package_type"
+ repository: "repository"
+ identifier_perm: "identifier_perm"
+ stage_updated_at: "stage_updated_at"
+ tags_immutable: "{}"
+ slug: "slug"
+ security_scan_started_at: "security_scan_started_at"
+ security_scan_status: "security_scan_status"
+ indexed: true
+ format: "format"
+ status_str: "status_str"
+ version_orig: "version_orig"
+ namespace_url: "namespace_url"
+ slug_perm: "slug_perm"
+ version: "version"
+ license: "license"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ uploaded_at: "uploaded_at"
+ name: "name"
+ sync_finished_at: "sync_finished_at"
+ files:
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ - checksum_sha512: "checksum_sha512"
+ checksum_sha1: "checksum_sha1"
+ checksum_sha256: "checksum_sha256"
+ is_primary: true
+ checksum_md5: "checksum_md5"
+ slug_perm: "slug_perm"
+ filename: "filename"
+ size: 5
+ cdn_url: "cdn_url"
+ downloads: 1
+ is_synchronised: true
+ is_downloadable: true
+ signature_url: "signature_url"
+ tag: "tag"
+ num_files: 1
+ status: "status"
+ checksum_sha512: "checksum_sha512"
+ distro: "{}"
+ extension: "extension"
+ description: "description"
+ epoch: 6
+ is_sync_completed: true
+ distro_version: "{}"
+ type_display: "type_display"
+ vulnerability_scan_results_url: "vulnerability_scan_results_url"
+ dependencies_checksum_md5: "dependencies_checksum_md5"
+ downloads: 0
+ subtype: "subtype"
+ uploader: "uploader"
+ signature_url: "signature_url"
+ repository_url: "repository_url"
+ status_reason: "status_reason"
+ status_updated_at: "status_updated_at"
+ summary: "summary"
+ checksum_sha1: "checksum_sha1"
+ checksum_md5: "checksum_md5"
+ sync_progress: 5
+ is_sync_awaiting: true
+ packaging: "packaging"
+ uploader_url: "uploader_url"
+ self_html_url: "self_html_url"
+ self_url: "self_url"
+ status_url: "status_url"
+ is_sync_in_flight: true
+ security_scan_completed_at: "security_scan_completed_at"
+ is_sync_in_progress: true
+ stage_str: "stage_str"
+ stage: "stage"
+ format_url: "format_url"
+ group_id: "io.cloudsmith.example"
+ dependencies_url: "dependencies_url"
+ namespace: "namespace"
+ is_sync_failed: true
+ PackagesValidateuploadLuarocks:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadLuarocks"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ UserProfile:
+ type: "object"
+ required:
+ - "first_name"
+ - "last_name"
+ properties:
+ company:
+ type: "string"
+ description: ""
+ first_name:
+ type: "string"
+ description: ""
+ job_title:
+ type: "string"
+ description: ""
+ joined_at:
+ type: "string"
+ description: ""
+ last_name:
+ type: "string"
+ description: ""
+ name:
+ type: "string"
+ description: ""
+ slug:
+ type: "string"
+ description: ""
+ slug_perm:
+ type: "string"
+ description: ""
+ tagline:
+ type: "string"
+ description: "Your tagline is a sentence about you. Make it funny. Make it\
+ \ professional. Either way, it's public and it represents who you are."
+ url:
+ type: "string"
+ description: ""
+ example:
+ joined_at: "joined_at"
+ name: "name"
+ last_name: "last_name"
+ tagline: "tagline"
+ company: "company"
+ slug_perm: "slug_perm"
+ first_name: "first_name"
+ job_title: "job_title"
+ slug: "slug"
+ url: "url"
+ PackageFileUpload:
+ type: "object"
+ properties:
+ identifier:
+ type: "string"
+ description: "The identifier for the file to use when creating packages"
+ upload_fields:
+ type: "object"
+ description: "The dictionary of fields that must be sent with POST uploads"
+ properties: {}
+ upload_headers:
+ type: "object"
+ description: "The dictionary of headers that must be sent with uploads"
+ properties: {}
+ upload_querystring:
+ type: "string"
+ description: "The querystring to use for the next-step POST or PUT upload"
+ upload_url:
+ type: "string"
+ description: "The URL to use for the next-step POST or PUT upload"
+ example:
+ identifier: "identifier"
+ upload_fields: "{}"
+ upload_querystring: "upload_querystring"
+ upload_headers: "{}"
+ upload_url: "upload_url"
+ RepositoryWebhook:
+ type: "object"
+ required:
+ - "events"
+ - "target_url"
+ - "templates"
+ properties:
+ created_at:
+ type: "string"
+ description: ""
+ created_by:
+ type: "string"
+ description: ""
+ created_by_url:
+ type: "string"
+ description: ""
+ disable_reason:
+ type: "string"
+ description: ""
+ disable_reason_str:
+ type: "string"
+ description: ""
+ events:
+ type: "array"
+ description: ""
+ title: "EventsList"
+ items:
+ type: "string"
+ description: ""
+ identifier:
+ type: "integer"
+ description: ""
+ is_active:
+ type: "boolean"
+ description: "If enabled, the webhook will trigger on events and send payloads\
+ \ to the configured target URL."
+ is_last_response_bad:
+ type: "boolean"
+ description: ""
+ last_response_status:
+ type: "integer"
+ description: ""
+ last_response_status_str:
+ type: "string"
+ description: ""
+ num_sent:
+ type: "integer"
+ description: ""
+ package_query:
+ type: "string"
+ description: "The package-based search query for webhooks to fire. This uses\
+ \ the same syntax as the standard search used for repositories, and also\
+ \ supports boolean logic operators such as OR/AND/NOT and parentheses for\
+ \ grouping. If a package does not match, the webhook will not fire."
+ request_body_format:
+ type: "string"
+ description: "The format of the payloads for webhook requests."
+ request_body_format_str:
+ type: "string"
+ description: ""
+ request_body_template_format:
+ type: "string"
+ description: "The format of the payloads for webhook requests."
+ request_body_template_format_str:
+ type: "string"
+ description: ""
+ request_content_type:
+ type: "string"
+ description: "The value that will be sent for the 'Content Type' header. "
+ secret_header:
+ type: "string"
+ description: "The header to send the predefined secret in. This must be unique\
+ \ from existing headers or it won't be sent. You can use this as a form\
+ \ of authentication on the endpoint side."
+ self_url:
+ type: "string"
+ description: ""
+ slug_perm:
+ type: "string"
+ description: ""
+ target_url:
+ type: "string"
+ description: "The destination URL that webhook payloads will be POST'ed to."
+ templates:
+ type: "array"
+ description: ""
+ title: "TemplatesList"
+ items:
+ $ref: "#/definitions/webhooksownerrepo_templates"
+ updated_at:
+ type: "string"
+ description: ""
+ updated_by:
+ type: "string"
+ description: ""
+ updated_by_url:
+ type: "string"
+ description: ""
+ verify_ssl:
+ type: "boolean"
+ description: "If enabled, SSL certificates is verified when webhooks are sent.\
+ \ It's recommended to leave this enabled as not verifying the integrity\
+ \ of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM)\
+ \ attacks."
+ example:
+ is_last_response_bad: true
+ last_response_status_str: "last_response_status_str"
+ target_url: "target_url"
+ created_at: "created_at"
+ last_response_status: 6
+ request_body_template_format_str: "request_body_template_format_str"
+ request_content_type: "request_content_type"
+ updated_at: "updated_at"
+ request_body_format_str: "request_body_format_str"
+ num_sent: 1
+ request_body_template_format: "request_body_template_format"
+ events:
+ - "events"
+ - "events"
+ disable_reason_str: "disable_reason_str"
+ identifier: 0
+ package_query: "package_query"
+ is_active: true
+ disable_reason: "disable_reason"
+ created_by_url: "created_by_url"
+ templates:
+ - template: "template"
+ event: "event"
+ - template: "template"
+ event: "event"
+ request_body_format: "request_body_format"
+ slug_perm: "slug_perm"
+ created_by: "created_by"
+ self_url: "self_url"
+ updated_by_url: "updated_by_url"
+ verify_ssl: true
+ secret_header: "secret_header"
+ updated_by: "updated_by"
+ PackagesValidateuploadAlpine:
+ type: "object"
+ required:
+ - "distribution"
+ - "package_file"
+ properties:
+ distribution:
+ type: "string"
+ example: "alpine/v3.8"
+ description: "The distribution to store the package for."
+ package_file:
+ type: "string"
+ example: "a123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadAlpine"
+ example:
+ republish: true
+ distribution: "alpine/v3.8"
+ package_file: "a123456789"
+ tags: "tags"
+ PackagesCopy:
+ type: "object"
+ required:
+ - "destination"
+ properties:
+ destination:
+ type: "string"
+ description: "None"
+ republish:
+ type: "boolean"
+ description: "If true, the package will overwrite any others with the same\
+ \ attributes (e.g. same version); otherwise, it will be flagged as a duplicate."
+ title: "PackagesCopy"
+ example:
+ republish: true
+ destination: "destination"
+ WebhooksCreate:
+ type: "object"
+ required:
+ - "events"
+ - "target_url"
+ - "templates"
+ properties:
+ events:
+ type: "array"
+ description: "None"
+ title: "EventsList"
+ items:
+ type: "string"
+ description: ""
+ is_active:
+ type: "boolean"
+ description: "If enabled, the webhook will trigger on events and send payloads\
+ \ to the configured target URL."
+ package_query:
+ type: "string"
+ description: "The package-based search query for webhooks to fire. This uses\
+ \ the same syntax as the standard search used for repositories, and also\
+ \ supports boolean logic operators such as OR/AND/NOT and parentheses for\
+ \ grouping. If a package does not match, the webhook will not fire."
+ request_body_format:
+ type: "string"
+ description: "The format of the payloads for webhook requests."
+ request_body_template_format:
+ type: "string"
+ description: "The format of the payloads for webhook requests."
+ request_content_type:
+ type: "string"
+ description: "The value that will be sent for the 'Content Type' header. "
+ secret_header:
+ type: "string"
+ description: "The header to send the predefined secret in. This must be unique\
+ \ from existing headers or it won't be sent. You can use this as a form\
+ \ of authentication on the endpoint side."
+ secret_value:
+ type: "string"
+ description: "The value for the predefined secret (note: this is treated as\
+ \ a passphrase and is encrypted when we store it). You can use this as a\
+ \ form of authentication on the endpoint side."
+ signature_key:
+ type: "string"
+ description: "The value for the signature key - This is used to generate an\
+ \ HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature\
+ \ header so that you can ensure that the request wasn't modified by a malicious\
+ \ party (note: this is treated as a passphrase and is encrypted when we\
+ \ store it)."
+ target_url:
+ type: "string"
+ description: "The destination URL that webhook payloads will be POST'ed to."
+ templates:
+ type: "array"
+ description: "None"
+ title: "TemplatesList"
+ items:
+ $ref: "#/definitions/webhooksownerrepo_templates"
+ verify_ssl:
+ type: "boolean"
+ description: "If enabled, SSL certificates is verified when webhooks are sent.\
+ \ It's recommended to leave this enabled as not verifying the integrity\
+ \ of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM)\
+ \ attacks."
+ title: "WebhooksCreate"
+ example:
+ package_query: "package_query"
+ request_content_type: "request_content_type"
+ is_active: true
+ verify_ssl: true
+ signature_key: "signature_key"
+ target_url: "target_url"
+ templates:
+ - template: "template"
+ event: "event"
+ - template: "template"
+ event: "event"
+ secret_header: "secret_header"
+ secret_value: "secret_value"
+ request_body_format: "request_body_format"
+ request_body_template_format: "request_body_template_format"
+ events:
+ - "events"
+ - "events"
+ StorageRegion:
+ type: "object"
+ required:
+ - "label"
+ - "slug"
+ properties:
+ label:
+ type: "string"
+ description: "Name of the storage region"
+ slug:
+ type: "string"
+ description: "Slug for the storage region"
+ example:
+ label: "label"
+ slug: "slug"
+ QuotaHistory_history:
+ type: "object"
+ properties:
+ days:
+ type: "integer"
+ description: ""
+ display:
+ type: "object"
+ description: ""
+ properties: {}
+ end:
+ type: "string"
+ description: ""
+ plan:
+ type: "string"
+ description: ""
+ raw:
+ type: "object"
+ description: ""
+ properties: {}
+ start:
+ type: "string"
+ description: ""
+ PackagesUploadConda:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadConda"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ Format:
+ type: "object"
+ required:
+ - "description"
+ - "extensions"
+ - "name"
+ - "premium"
+ - "slug"
+ - "supports"
+ properties:
+ description:
+ type: "string"
+ description: "Description of the package format"
+ distributions:
+ type: "array"
+ description: "The distributions supported by this package format"
+ title: "DistributionsList"
+ items:
+ $ref: "#/definitions/formats_distributions"
+ extensions:
+ type: "array"
+ description: "A non-exhaustive list of extensions supported"
+ title: "ExtensionsList"
+ items:
+ type: "string"
+ description: ""
+ name:
+ type: "string"
+ description: "Name for the package format"
+ premium:
+ type: "boolean"
+ description: "If true the package format is a premium-only feature"
+ premium_plan_id:
+ type: "string"
+ description: "The minimum plan id required for this package format"
+ premium_plan_name:
+ type: "string"
+ description: "The minimum plan name required for this package format"
+ slug:
+ type: "string"
+ description: "Slug for the package format"
+ supports:
+ type: "object"
+ description: "A set of what the package format supports"
+ properties: {}
+ example:
+ extensions:
+ - "extensions"
+ - "extensions"
+ premium: true
+ name: "name"
+ description: "description"
+ supports: "{}"
+ premium_plan_name: "premium_plan_name"
+ distributions:
+ - name: "name"
+ variants: "variants"
+ self_url: "self_url"
+ slug: "slug"
+ - name: "name"
+ variants: "variants"
+ self_url: "self_url"
+ slug: "slug"
+ premium_plan_id: "premium_plan_id"
+ slug: "slug"
+ WebhooksPartialUpdate:
+ type: "object"
+ properties:
+ events:
+ type: "array"
+ description: "None"
+ title: "EventsList"
+ items:
+ type: "string"
+ description: ""
+ is_active:
+ type: "boolean"
+ description: "If enabled, the webhook will trigger on events and send payloads\
+ \ to the configured target URL."
+ package_query:
+ type: "string"
+ description: "The package-based search query for webhooks to fire. This uses\
+ \ the same syntax as the standard search used for repositories, and also\
+ \ supports boolean logic operators such as OR/AND/NOT and parentheses for\
+ \ grouping. If a package does not match, the webhook will not fire."
+ request_body_format:
+ type: "string"
+ description: "The format of the payloads for webhook requests."
+ request_body_template_format:
+ type: "string"
+ description: "The format of the payloads for webhook requests."
+ request_content_type:
+ type: "string"
+ description: "The value that will be sent for the 'Content Type' header. "
+ secret_header:
+ type: "string"
+ description: "The header to send the predefined secret in. This must be unique\
+ \ from existing headers or it won't be sent. You can use this as a form\
+ \ of authentication on the endpoint side."
+ secret_value:
+ type: "string"
+ description: "The value for the predefined secret (note: this is treated as\
+ \ a passphrase and is encrypted when we store it). You can use this as a\
+ \ form of authentication on the endpoint side."
+ signature_key:
+ type: "string"
+ description: "The value for the signature key - This is used to generate an\
+ \ HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature\
+ \ header so that you can ensure that the request wasn't modified by a malicious\
+ \ party (note: this is treated as a passphrase and is encrypted when we\
+ \ store it)."
+ target_url:
+ type: "string"
+ description: "The destination URL that webhook payloads will be POST'ed to."
+ templates:
+ type: "array"
+ description: "None"
+ title: "TemplatesList"
+ items:
+ $ref: "#/definitions/webhooksownerrepo_templates"
+ verify_ssl:
+ type: "boolean"
+ description: "If enabled, SSL certificates is verified when webhooks are sent.\
+ \ It's recommended to leave this enabled as not verifying the integrity\
+ \ of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM)\
+ \ attacks."
+ title: "WebhooksPartialUpdate"
+ example:
+ package_query: "package_query"
+ request_content_type: "request_content_type"
+ is_active: true
+ verify_ssl: true
+ signature_key: "signature_key"
+ target_url: "target_url"
+ templates:
+ - template: "template"
+ event: "event"
+ - template: "template"
+ event: "event"
+ secret_header: "secret_header"
+ secret_value: "secret_value"
+ request_body_format: "request_body_format"
+ request_body_template_format: "request_body_template_format"
+ events:
+ - "events"
+ - "events"
+ RepositoryToken:
+ type: "object"
+ required:
+ - "name"
+ properties:
+ clients:
+ type: "integer"
+ description: ""
+ created_at:
+ type: "string"
+ description: "The datetime the token was updated at."
+ created_by:
+ type: "string"
+ description: ""
+ created_by_url:
+ type: "string"
+ description: ""
+ default:
+ type: "boolean"
+ description: "If selected this is the default token for this repository."
+ disable_url:
+ type: "string"
+ description: ""
+ downloads:
+ type: "integer"
+ description: ""
+ enable_url:
+ type: "string"
+ description: ""
+ eula_accepted:
+ type: "object"
+ description: ""
+ properties: {}
+ eula_accepted_at:
+ type: "string"
+ description: "The datetime the EULA was accepted at."
+ eula_accepted_from:
+ type: "string"
+ description: ""
+ eula_required:
+ type: "boolean"
+ description: "If checked, a EULA acceptance is required for this token."
+ has_limits:
+ type: "boolean"
+ description: ""
+ identifier:
+ type: "integer"
+ description: ""
+ is_active:
+ type: "boolean"
+ description: "If enabled, the token will allow downloads based on configured\
+ \ restrictions (if any)."
+ is_limited:
+ type: "boolean"
+ description: ""
+ limit_bandwidth:
+ type: "integer"
+ description: "The maximum download bandwidth allowed for the token. Values\
+ \ are expressed as the selected unit of bandwidth. Please note that since\
+ \ downloads are calculated asynchronously (after the download happens),\
+ \ the limit may not be imposed immediately but at a later point. "
+ limit_bandwidth_unit:
+ type: "string"
+ description: ""
+ limit_date_range_from:
+ type: "string"
+ description: "The starting date/time the token is allowed to be used from."
+ limit_date_range_to:
+ type: "string"
+ description: "The ending date/time the token is allowed to be used until."
+ limit_num_clients:
+ type: "integer"
+ description: "The maximum number of unique clients allowed for the token.\
+ \ Please note that since clients are calculated asynchronously (after the\
+ \ download happens), the limit may not be imposed immediately but at a later\
+ \ point."
+ limit_num_downloads:
+ type: "integer"
+ description: "The maximum number of downloads allowed for the token. Please\
+ \ note that since downloads are calculated asynchronously (after the download\
+ \ happens), the limit may not be imposed immediately but at a later point."
+ limit_package_query:
+ type: "string"
+ description: "The package-based search query to apply to restrict downloads\
+ \ to. This uses the same syntax as the standard search used for repositories,\
+ \ and also supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. This will still allow access to non-package files, such\
+ \ as metadata."
+ limit_path_query:
+ type: "string"
+ description: "The path-based search query to apply to restrict downloads to.\
+ \ This supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. The path evaluated does not include the domain name, the\
+ \ namespace, the entitlement code used, the package format, etc. and it\
+ \ always starts with a forward slash."
+ metadata:
+ type: "object"
+ description: ""
+ properties: {}
+ name:
+ type: "string"
+ description: ""
+ refresh_url:
+ type: "string"
+ description: ""
+ reset_url:
+ type: "string"
+ description: ""
+ scheduled_reset_at:
+ type: "string"
+ description: "The time at which the scheduled reset period has elapsed and\
+ \ the token limits were automatically reset to zero."
+ scheduled_reset_period:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ slug_perm:
+ type: "string"
+ description: ""
+ token:
+ type: "string"
+ description: ""
+ updated_at:
+ type: "string"
+ description: "The datetime the token was updated at."
+ updated_by:
+ type: "string"
+ description: ""
+ updated_by_url:
+ type: "string"
+ description: ""
+ usage:
+ type: "string"
+ description: ""
+ user:
+ type: "string"
+ description: ""
+ user_url:
+ type: "string"
+ description: ""
+ example:
+ limit_date_range_to: "limit_date_range_to"
+ metadata: "{}"
+ clients: 0
+ limit_bandwidth_unit: "limit_bandwidth_unit"
+ scheduled_reset_at: "scheduled_reset_at"
+ usage: "usage"
+ limit_bandwidth: 5
+ created_at: "created_at"
+ limit_num_clients: 5
+ eula_accepted_at: "eula_accepted_at"
+ limit_package_query: "limit_package_query"
+ limit_path_query: "limit_path_query"
+ default: true
+ updated_at: "updated_at"
+ downloads: 6
+ user_url: "user_url"
+ limit_date_range_from: "limit_date_range_from"
+ reset_url: "reset_url"
+ limit_num_downloads: 2
+ eula_required: true
+ refresh_url: "refresh_url"
+ scheduled_reset_period: "scheduled_reset_period"
+ identifier: 1
+ is_active: true
+ eula_accepted: "{}"
+ eula_accepted_from: "eula_accepted_from"
+ created_by_url: "created_by_url"
+ is_limited: true
+ slug_perm: "slug_perm"
+ created_by: "created_by"
+ enable_url: "enable_url"
+ self_url: "self_url"
+ token: "token"
+ updated_by_url: "updated_by_url"
+ disable_url: "disable_url"
+ name: "name"
+ updated_by: "updated_by"
+ has_limits: true
+ user: "user"
+ PackagesValidateuploadVagrant:
+ type: "object"
+ required:
+ - "name"
+ - "package_file"
+ - "provider"
+ - "version"
+ properties:
+ name:
+ type: "string"
+ example: "tcl"
+ description: "The name of this package."
+ package_file:
+ type: "string"
+ example: "y123456789x"
+ description: "The primary file for the package."
+ provider:
+ type: "string"
+ example: "virtualbox"
+ description: "The virtual machine provider for the box."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ version:
+ type: "string"
+ example: "1.0"
+ description: "The raw version for this package."
+ title: "PackagesValidate-uploadVagrant"
+ example:
+ republish: true
+ provider: "virtualbox"
+ name: "tcl"
+ package_file: "y123456789x"
+ version: "1.0"
+ tags: "tags"
+ PackageDependencies_dependencies:
+ type: "object"
+ properties:
+ dep_type:
+ type: "string"
+ description: ""
+ name:
+ type: "string"
+ description: "The name of the package dependency."
+ operator:
+ type: "string"
+ description: ""
+ version:
+ type: "string"
+ description: "The raw dependency version (if any)."
+ example:
+ dep_type: "dep_type"
+ name: "name"
+ version: "version"
+ operator: "operator"
+ distros_versions:
+ type: "object"
+ properties:
+ name:
+ type: "string"
+ description: "The textual name for this version."
+ slug:
+ type: "string"
+ description: "The slug identifier for this version"
+ example:
+ name: "name"
+ slug: "slug"
+ PackagesUploadCocoapods:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "z123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadCocoapods"
+ example:
+ republish: true
+ package_file: "z123456789"
+ tags: "tags"
+ PackagesValidateuploadCargo:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadCargo"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ EntitlementsSync:
+ type: "object"
+ required:
+ - "source"
+ properties:
+ source:
+ type: "string"
+ description: "The source repository slug (in the same owner namespace)."
+ title: "EntitlementsSync"
+ example:
+ source: "source"
+ EntitlementsCreate:
+ type: "object"
+ required:
+ - "name"
+ properties:
+ eula_required:
+ type: "boolean"
+ description: "If checked, a EULA acceptance is required for this token."
+ is_active:
+ type: "boolean"
+ description: "If enabled, the token will allow downloads based on configured\
+ \ restrictions (if any)."
+ limit_bandwidth:
+ type: "integer"
+ description: "The maximum download bandwidth allowed for the token. Values\
+ \ are expressed as the selected unit of bandwidth. Please note that since\
+ \ downloads are calculated asynchronously (after the download happens),\
+ \ the limit may not be imposed immediately but at a later point. "
+ limit_bandwidth_unit:
+ type: "string"
+ description: "None"
+ limit_date_range_from:
+ type: "string"
+ description: "The starting date/time the token is allowed to be used from."
+ limit_date_range_to:
+ type: "string"
+ description: "The ending date/time the token is allowed to be used until."
+ limit_num_clients:
+ type: "integer"
+ description: "The maximum number of unique clients allowed for the token.\
+ \ Please note that since clients are calculated asynchronously (after the\
+ \ download happens), the limit may not be imposed immediately but at a later\
+ \ point."
+ limit_num_downloads:
+ type: "integer"
+ description: "The maximum number of downloads allowed for the token. Please\
+ \ note that since downloads are calculated asynchronously (after the download\
+ \ happens), the limit may not be imposed immediately but at a later point."
+ limit_package_query:
+ type: "string"
+ description: "The package-based search query to apply to restrict downloads\
+ \ to. This uses the same syntax as the standard search used for repositories,\
+ \ and also supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. This will still allow access to non-package files, such\
+ \ as metadata."
+ limit_path_query:
+ type: "string"
+ description: "The path-based search query to apply to restrict downloads to.\
+ \ This supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. The path evaluated does not include the domain name, the\
+ \ namespace, the entitlement code used, the package format, etc. and it\
+ \ always starts with a forward slash."
+ metadata:
+ type: "object"
+ description: "None"
+ properties: {}
+ name:
+ type: "string"
+ description: "None"
+ scheduled_reset_at:
+ type: "string"
+ description: "The time at which the scheduled reset period has elapsed and\
+ \ the token limits were automatically reset to zero."
+ scheduled_reset_period:
+ type: "string"
+ description: "None"
+ token:
+ type: "string"
+ description: "None"
+ title: "EntitlementsCreate"
+ example:
+ limit_date_range_to: "limit_date_range_to"
+ metadata: "{}"
+ is_active: true
+ limit_bandwidth_unit: "limit_bandwidth_unit"
+ scheduled_reset_at: "scheduled_reset_at"
+ limit_bandwidth: 0
+ limit_num_clients: 6
+ limit_package_query: "limit_package_query"
+ limit_path_query: "limit_path_query"
+ token: "token"
+ name: "name"
+ limit_date_range_from: "limit_date_range_from"
+ limit_num_downloads: 1
+ eula_required: true
+ scheduled_reset_period: "scheduled_reset_period"
+ FilesAbort:
+ type: "object"
+ required:
+ - "filename"
+ properties:
+ filename:
+ type: "string"
+ description: "Filename for the package file upload."
+ md5_checksum:
+ type: "string"
+ description: "MD5 checksum for a POST-based package file upload."
+ method:
+ type: "string"
+ description: "The method to use for package file upload."
+ sha256_checksum:
+ type: "string"
+ description: "SHA256 checksum for a PUT-based package file upload."
+ title: "FilesAbort"
+ example:
+ sha256_checksum: "sha256_checksum"
+ filename: "filename"
+ method: "method"
+ md5_checksum: "md5_checksum"
+ PackagesValidateuploadNuget:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "y1234456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ symbols_file:
+ type: "string"
+ example: "y1234456789b"
+ description: "Attaches a symbols file to the package."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadNuget"
+ example:
+ republish: true
+ symbols_file: "y1234456789b"
+ package_file: "y1234456789a"
+ tags: "tags"
+ PackagesValidateuploadRaw:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ content_type:
+ type: "string"
+ description: "A custom content/media (also known as MIME) type to be sent\
+ \ when downloading this file. By default Cloudsmith will attempt to detect\
+ \ the type, but if you need to override it, you can specify it here."
+ description:
+ type: "string"
+ example: "Everything about packaging files."
+ description: "A textual description of this package."
+ name:
+ type: "string"
+ example: "my-package"
+ description: "The name of this package."
+ package_file:
+ type: "string"
+ example: "y123456789"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ summary:
+ type: "string"
+ example: "My Package File"
+ description: "A one-liner synopsis of this package."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ version:
+ type: "string"
+ example: "1.0"
+ description: "The raw version for this package."
+ title: "PackagesValidate-uploadRaw"
+ example:
+ summary: "My Package File"
+ content_type: "content_type"
+ republish: true
+ name: "my-package"
+ description: "Everything about packaging files."
+ package_file: "y123456789"
+ version: "1.0"
+ tags: "tags"
+ RepositoryTokenSync:
+ type: "object"
+ properties:
+ tokens:
+ type: "array"
+ description: "The entitlements that have been synchronised."
+ title: "TokensList"
+ items:
+ $ref: "#/definitions/RepositoryTokenSync_tokens"
+ example:
+ tokens:
+ - limit_date_range_to: "limit_date_range_to"
+ metadata: "metadata"
+ clients: 0
+ limit_bandwidth_unit: "limit_bandwidth_unit"
+ scheduled_reset_at: "scheduled_reset_at"
+ usage: "usage"
+ limit_bandwidth: 5
+ created_at: "created_at"
+ limit_num_clients: 5
+ eula_accepted_at: "eula_accepted_at"
+ limit_package_query: "limit_package_query"
+ limit_path_query: "limit_path_query"
+ default: true
+ updated_at: "updated_at"
+ downloads: 6
+ user_url: "user_url"
+ limit_date_range_from: "limit_date_range_from"
+ reset_url: "reset_url"
+ limit_num_downloads: 2
+ eula_required: true
+ refresh_url: "refresh_url"
+ scheduled_reset_period: "scheduled_reset_period"
+ identifier: 1
+ is_active: true
+ eula_accepted: "{}"
+ eula_accepted_from: "eula_accepted_from"
+ created_by_url: "created_by_url"
+ is_limited: true
+ slug_perm: "slug_perm"
+ created_by: "created_by"
+ enable_url: "enable_url"
+ self_url: "self_url"
+ token: "token"
+ updated_by_url: "updated_by_url"
+ disable_url: "disable_url"
+ name: "name"
+ updated_by: "updated_by"
+ has_limits: true
+ user: "user"
+ - limit_date_range_to: "limit_date_range_to"
+ metadata: "metadata"
+ clients: 0
+ limit_bandwidth_unit: "limit_bandwidth_unit"
+ scheduled_reset_at: "scheduled_reset_at"
+ usage: "usage"
+ limit_bandwidth: 5
+ created_at: "created_at"
+ limit_num_clients: 5
+ eula_accepted_at: "eula_accepted_at"
+ limit_package_query: "limit_package_query"
+ limit_path_query: "limit_path_query"
+ default: true
+ updated_at: "updated_at"
+ downloads: 6
+ user_url: "user_url"
+ limit_date_range_from: "limit_date_range_from"
+ reset_url: "reset_url"
+ limit_num_downloads: 2
+ eula_required: true
+ refresh_url: "refresh_url"
+ scheduled_reset_period: "scheduled_reset_period"
+ identifier: 1
+ is_active: true
+ eula_accepted: "{}"
+ eula_accepted_from: "eula_accepted_from"
+ created_by_url: "created_by_url"
+ is_limited: true
+ slug_perm: "slug_perm"
+ created_by: "created_by"
+ enable_url: "enable_url"
+ self_url: "self_url"
+ token: "token"
+ updated_by_url: "updated_by_url"
+ disable_url: "disable_url"
+ name: "name"
+ updated_by: "updated_by"
+ has_limits: true
+ user: "user"
+ PackagesTag:
+ type: "object"
+ properties:
+ action:
+ type: "string"
+ description: "None"
+ is_immutable:
+ type: "boolean"
+ description: "If true, created tags will be immutable. An immutable flag is\
+ \ a tag that cannot be removed from a package."
+ tags:
+ type: "array"
+ description: "A list of tags to apply the action to. Not required for clears."
+ title: "TagsList"
+ items:
+ type: "string"
+ description: ""
+ title: "PackagesTag"
+ example:
+ is_immutable: true
+ action: "action"
+ tags:
+ - "tags"
+ - "tags"
+ PackagesValidateuploadHelm:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadHelm"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+ Quota:
+ type: "object"
+ required:
+ - "usage"
+ properties:
+ usage:
+ type: "object"
+ example:
+ display:
+ bandwidth:
+ configured: "60 GB"
+ percentage_used: "0.0%"
+ plan_limit: "2 TB"
+ used: "0 B"
+ storage:
+ configured: "30 GB"
+ percentage_used: "0.109%"
+ plan_limit: "1 TB"
+ used: "1.1 GB"
+ raw:
+ bandwidth:
+ configured: 64424509440
+ percentage_used: 0.0
+ plan_limit: 2199023255552
+ used: 0
+ storage:
+ configured: 32212254720
+ percentage_used: 0.109
+ plan_limit: 1099511627776
+ used: 1197653687
+ description: ""
+ properties: {}
+ example:
+ usage:
+ display:
+ bandwidth:
+ configured: "60 GB"
+ percentage_used: "0.0%"
+ plan_limit: "2 TB"
+ used: "0 B"
+ storage:
+ configured: "30 GB"
+ percentage_used: "0.109%"
+ plan_limit: "1 TB"
+ used: "1.1 GB"
+ raw:
+ bandwidth:
+ configured: 64424509440
+ percentage_used: 0.0
+ plan_limit: 2199023255552
+ used: 0
+ storage:
+ configured: 32212254720
+ percentage_used: 0.109
+ plan_limit: 1099511627776
+ used: 1197653687
+ PackagesValidateuploadTerraform:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "z123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesValidate-uploadTerraform"
+ example:
+ republish: true
+ package_file: "z123456789a"
+ tags: "tags"
+ RepositoryTokenRefresh:
+ type: "object"
+ properties:
+ clients:
+ type: "integer"
+ description: ""
+ created_at:
+ type: "string"
+ description: "The datetime the token was updated at."
+ created_by:
+ type: "string"
+ description: ""
+ created_by_url:
+ type: "string"
+ description: ""
+ default:
+ type: "boolean"
+ description: "If selected this is the default token for this repository."
+ disable_url:
+ type: "string"
+ description: ""
+ downloads:
+ type: "integer"
+ description: ""
+ enable_url:
+ type: "string"
+ description: ""
+ eula_accepted:
+ type: "object"
+ description: ""
+ properties: {}
+ eula_accepted_at:
+ type: "string"
+ description: "The datetime the EULA was accepted at."
+ eula_accepted_from:
+ type: "string"
+ description: ""
+ eula_required:
+ type: "boolean"
+ description: "If checked, a EULA acceptance is required for this token."
+ has_limits:
+ type: "boolean"
+ description: ""
+ identifier:
+ type: "integer"
+ description: ""
+ is_active:
+ type: "boolean"
+ description: "If enabled, the token will allow downloads based on configured\
+ \ restrictions (if any)."
+ is_limited:
+ type: "boolean"
+ description: ""
+ limit_bandwidth:
+ type: "integer"
+ description: "The maximum download bandwidth allowed for the token. Values\
+ \ are expressed as the selected unit of bandwidth. Please note that since\
+ \ downloads are calculated asynchronously (after the download happens),\
+ \ the limit may not be imposed immediately but at a later point. "
+ limit_bandwidth_unit:
+ type: "string"
+ description: ""
+ limit_date_range_from:
+ type: "string"
+ description: "The starting date/time the token is allowed to be used from."
+ limit_date_range_to:
+ type: "string"
+ description: "The ending date/time the token is allowed to be used until."
+ limit_num_clients:
+ type: "integer"
+ description: "The maximum number of unique clients allowed for the token.\
+ \ Please note that since clients are calculated asynchronously (after the\
+ \ download happens), the limit may not be imposed immediately but at a later\
+ \ point."
+ limit_num_downloads:
+ type: "integer"
+ description: "The maximum number of downloads allowed for the token. Please\
+ \ note that since downloads are calculated asynchronously (after the download\
+ \ happens), the limit may not be imposed immediately but at a later point."
+ limit_package_query:
+ type: "string"
+ description: "The package-based search query to apply to restrict downloads\
+ \ to. This uses the same syntax as the standard search used for repositories,\
+ \ and also supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. This will still allow access to non-package files, such\
+ \ as metadata."
+ limit_path_query:
+ type: "string"
+ description: "The path-based search query to apply to restrict downloads to.\
+ \ This supports boolean logic operators such as OR/AND/NOT and parentheses\
+ \ for grouping. The path evaluated does not include the domain name, the\
+ \ namespace, the entitlement code used, the package format, etc. and it\
+ \ always starts with a forward slash."
+ metadata:
+ type: "object"
+ description: ""
+ properties: {}
+ name:
+ type: "string"
+ description: ""
+ refresh_url:
+ type: "string"
+ description: ""
+ reset_url:
+ type: "string"
+ description: ""
+ scheduled_reset_at:
+ type: "string"
+ description: "The time at which the scheduled reset period has elapsed and\
+ \ the token limits were automatically reset to zero."
+ scheduled_reset_period:
+ type: "string"
+ description: ""
+ self_url:
+ type: "string"
+ description: ""
+ slug_perm:
+ type: "string"
+ description: ""
+ token:
+ type: "string"
+ description: ""
+ updated_at:
+ type: "string"
+ description: "The datetime the token was updated at."
+ updated_by:
+ type: "string"
+ description: ""
+ updated_by_url:
+ type: "string"
+ description: ""
+ usage:
+ type: "string"
+ description: ""
+ user:
+ type: "string"
+ description: ""
+ user_url:
+ type: "string"
+ description: ""
+ example:
+ limit_date_range_to: "limit_date_range_to"
+ metadata: "{}"
+ clients: 0
+ limit_bandwidth_unit: "limit_bandwidth_unit"
+ scheduled_reset_at: "scheduled_reset_at"
+ usage: "usage"
+ limit_bandwidth: 5
+ created_at: "created_at"
+ limit_num_clients: 5
+ eula_accepted_at: "eula_accepted_at"
+ limit_package_query: "limit_package_query"
+ limit_path_query: "limit_path_query"
+ default: true
+ updated_at: "updated_at"
+ downloads: 6
+ user_url: "user_url"
+ limit_date_range_from: "limit_date_range_from"
+ reset_url: "reset_url"
+ limit_num_downloads: 2
+ eula_required: true
+ refresh_url: "refresh_url"
+ scheduled_reset_period: "scheduled_reset_period"
+ identifier: 1
+ is_active: true
+ eula_accepted: "{}"
+ eula_accepted_from: "eula_accepted_from"
+ created_by_url: "created_by_url"
+ is_limited: true
+ slug_perm: "slug_perm"
+ created_by: "created_by"
+ enable_url: "enable_url"
+ self_url: "self_url"
+ token: "token"
+ updated_by_url: "updated_by_url"
+ disable_url: "disable_url"
+ name: "name"
+ updated_by: "updated_by"
+ has_limits: true
+ user: "user"
+ PackagesUploadDart:
+ type: "object"
+ required:
+ - "package_file"
+ properties:
+ package_file:
+ type: "string"
+ example: "x123456789a"
+ description: "The primary file for the package."
+ republish:
+ type: "boolean"
+ description: "If true, the uploaded package will overwrite any others with\
+ \ the same attributes (e.g. same version); otherwise, it will be flagged\
+ \ as a duplicate."
+ tags:
+ type: "string"
+ description: "A comma-separated values list of tags to add to the package."
+ title: "PackagesUploadDart"
+ example:
+ republish: true
+ package_file: "x123456789a"
+ tags: "tags"
+externalDocs:
+ description: "Find out more info at the Cloudsmith Help Website"
+ url: "https://help.cloudsmith.io"
+x-readme:
+ explorer-enabled: true
+ proxy-enabled: false
+ samples-enabled: true
diff --git a/bindings/go/src/api_badges.go b/bindings/go/src/api_badges.go
new file mode 100644
index 00000000..636b588f
--- /dev/null
+++ b/bindings/go/src/api_badges.go
@@ -0,0 +1,222 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type BadgesApiService service
+
+/*
+BadgesApiService Get latest package version for a package or package group.
+Get latest package version for a package or package group.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param packageFormat
+ * @param packageName
+ * @param packageVersion
+ * @param packageIdentifiers
+ * @param optional nil or *BadgesApiBadgesVersionListOpts - Optional Parameters:
+ * @param "BadgeToken" (optional.String) - Badge token to authenticate for private packages
+ * @param "CacheSeconds" (optional.String) - Override the shields.io badge cacheSeconds value.
+ * @param "Color" (optional.String) - Override the shields.io badge color value.
+ * @param "Label" (optional.String) - Override the shields.io badge label value.
+ * @param "LabelColor" (optional.String) - Override the shields.io badge labelColor value.
+ * @param "LogoColor" (optional.String) - Override the shields.io badge logoColor value.
+ * @param "LogoWidth" (optional.String) - Override the shields.io badge logoWidth value.
+ * @param "Render" (optional.Bool) - If true, badge will be rendered
+ * @param "Shields" (optional.Bool) - If true, a shields response will be generated
+ * @param "ShowLatest" (optional.Bool) - If true, for latest version badges a '(latest)' suffix is added
+ * @param "Style" (optional.String) - Override the shields.io badge style value.
+
+@return interface{}
+*/
+
+type BadgesApiBadgesVersionListOpts struct {
+ BadgeToken optional.String
+ CacheSeconds optional.String
+ Color optional.String
+ Label optional.String
+ LabelColor optional.String
+ LogoColor optional.String
+ LogoWidth optional.String
+ Render optional.Bool
+ Shields optional.Bool
+ ShowLatest optional.Bool
+ Style optional.String
+}
+
+func (a *BadgesApiService) BadgesVersionList(ctx context.Context, owner string, repo string, packageFormat string, packageName string, packageVersion string, packageIdentifiers string, localVarOptionals *BadgesApiBadgesVersionListOpts) (interface{}, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue interface{}
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/badges/version/{owner}/{repo}/{package_format}/{package_name}/{package_version}/{package_identifiers}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"package_format"+"}", fmt.Sprintf("%v", packageFormat), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"package_name"+"}", fmt.Sprintf("%v", packageName), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"package_version"+"}", fmt.Sprintf("%v", packageVersion), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"package_identifiers"+"}", fmt.Sprintf("%v", packageIdentifiers), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.BadgeToken.IsSet() {
+ localVarQueryParams.Add("badge_token", parameterToString(localVarOptionals.BadgeToken.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.CacheSeconds.IsSet() {
+ localVarQueryParams.Add("cacheSeconds", parameterToString(localVarOptionals.CacheSeconds.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Color.IsSet() {
+ localVarQueryParams.Add("color", parameterToString(localVarOptionals.Color.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Label.IsSet() {
+ localVarQueryParams.Add("label", parameterToString(localVarOptionals.Label.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.LabelColor.IsSet() {
+ localVarQueryParams.Add("labelColor", parameterToString(localVarOptionals.LabelColor.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.LogoColor.IsSet() {
+ localVarQueryParams.Add("logoColor", parameterToString(localVarOptionals.LogoColor.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.LogoWidth.IsSet() {
+ localVarQueryParams.Add("logoWidth", parameterToString(localVarOptionals.LogoWidth.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Render.IsSet() {
+ localVarQueryParams.Add("render", parameterToString(localVarOptionals.Render.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Shields.IsSet() {
+ localVarQueryParams.Add("shields", parameterToString(localVarOptionals.Shields.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.ShowLatest.IsSet() {
+ localVarQueryParams.Add("show_latest", parameterToString(localVarOptionals.ShowLatest.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Style.IsSet() {
+ localVarQueryParams.Add("style", parameterToString(localVarOptionals.Style.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v interface{}
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_client.go b/bindings/go/src/api_client.go
deleted file mode 100644
index 6eff7527..00000000
--- a/bindings/go/src/api_client.go
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "bytes"
- "fmt"
- "path/filepath"
- "reflect"
- "strings"
- "net/url"
- "io/ioutil"
- "gopkg.in/go-resty/resty.v0"
-)
-
-type APIClient struct {
- config *Configuration
-}
-
-func (c *APIClient) SelectHeaderContentType(contentTypes []string) string {
-
- if len(contentTypes) == 0 {
- return ""
- }
- if contains(contentTypes, "application/json") {
- return "application/json"
- }
- return contentTypes[0] // use the first content type specified in 'consumes'
-}
-
-func (c *APIClient) SelectHeaderAccept(accepts []string) string {
-
- if len(accepts) == 0 {
- return ""
- }
- if contains(accepts, "application/json") {
- return "application/json"
- }
- return strings.Join(accepts, ",")
-}
-
-func contains(haystack []string, needle string) bool {
- for _, a := range haystack {
- if strings.ToLower(a) == strings.ToLower(needle) {
- return true
- }
- }
- return false
-}
-
-func (c *APIClient) CallAPI(path string, method string,
- postBody interface{},
- headerParams map[string]string,
- queryParams url.Values,
- formParams map[string]string,
- fileName string,
- fileBytes []byte) (*resty.Response, error) {
-
- rClient := c.prepareClient()
- request := c.prepareRequest(rClient, postBody, headerParams, queryParams, formParams, fileName, fileBytes)
-
- switch strings.ToUpper(method) {
- case "GET":
- response, err := request.Get(path)
- return response, err
- case "POST":
- response, err := request.Post(path)
- return response, err
- case "PUT":
- response, err := request.Put(path)
- return response, err
- case "PATCH":
- response, err := request.Patch(path)
- return response, err
- case "DELETE":
- response, err := request.Delete(path)
- return response, err
- }
-
- return nil, fmt.Errorf("invalid method %v", method)
-}
-
-func (c *APIClient) ParameterToString(obj interface{}, collectionFormat string) string {
- delimiter := ""
- switch collectionFormat {
- case "pipes":
- delimiter = "|"
- case "ssv":
- delimiter = " "
- case "tsv":
- delimiter = "\t"
- case "csv":
- delimiter = ","
- }
-
- if reflect.TypeOf(obj).Kind() == reflect.Slice {
- return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
- }
-
- return fmt.Sprintf("%v", obj)
-}
-
-func (c *APIClient) prepareClient() *resty.Client {
-
- rClient := resty.New()
-
- rClient.SetDebug(c.config.Debug)
- if c.config.Transport != nil {
- rClient.SetTransport(c.config.Transport)
- }
-
- if c.config.Timeout != nil {
- rClient.SetTimeout(*c.config.Timeout)
- }
- rClient.SetLogger(ioutil.Discard)
- return rClient
-}
-
-func (c *APIClient) prepareRequest(
- rClient *resty.Client,
- postBody interface{},
- headerParams map[string]string,
- queryParams url.Values,
- formParams map[string]string,
- fileName string,
- fileBytes []byte) *resty.Request {
-
-
- request := rClient.R()
- request.SetBody(postBody)
-
- if c.config.UserAgent != "" {
- request.SetHeader("User-Agent", c.config.UserAgent)
- }
-
- // add header parameter, if any
- if len(headerParams) > 0 {
- request.SetHeaders(headerParams)
- }
-
- // add query parameter, if any
- if len(queryParams) > 0 {
- request.SetMultiValueQueryParams(queryParams)
- }
-
- // add form parameter, if any
- if len(formParams) > 0 {
- request.SetFormData(formParams)
- }
-
- if len(fileBytes) > 0 && fileName != "" {
- _, fileNm := filepath.Split(fileName)
- request.SetFileReader("file", fileNm, bytes.NewReader(fileBytes))
- }
- return request
-}
diff --git a/bindings/go/src/api_distros.go b/bindings/go/src/api_distros.go
new file mode 100644
index 00000000..fe1d20e7
--- /dev/null
+++ b/bindings/go/src/api_distros.go
@@ -0,0 +1,271 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type DistrosApiService service
+
+/*
+DistrosApiService Get a list of all supported distributions.
+Get a list of all supported distributions.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+
+@return []Distribution
+*/
+func (a *DistrosApiService) DistrosList(ctx context.Context) ([]Distribution, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []Distribution
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/distros/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []Distribution
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+DistrosApiService View for viewing/listing distributions.
+View for viewing/listing distributions.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param slug
+
+@return Distribution
+*/
+func (a *DistrosApiService) DistrosRead(ctx context.Context, slug string) (Distribution, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue Distribution
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/distros/{slug}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v Distribution
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_entitlements.go b/bindings/go/src/api_entitlements.go
new file mode 100644
index 00000000..31f5a08e
--- /dev/null
+++ b/bindings/go/src/api_entitlements.go
@@ -0,0 +1,1399 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type EntitlementsApiService service
+
+/*
+EntitlementsApiService Create a specific entitlement in a repository.
+Create a specific entitlement in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *EntitlementsApiEntitlementsCreateOpts - Optional Parameters:
+ * @param "ShowTokens" (optional.Bool) - Show entitlement token strings in results
+ * @param "Data" (optional.Interface of EntitlementsCreate) -
+
+@return RepositoryToken
+*/
+
+type EntitlementsApiEntitlementsCreateOpts struct {
+ ShowTokens optional.Bool
+ Data optional.Interface
+}
+
+func (a *EntitlementsApiService) EntitlementsCreate(ctx context.Context, owner string, repo string, localVarOptionals *EntitlementsApiEntitlementsCreateOpts) (RepositoryToken, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue RepositoryToken
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.ShowTokens.IsSet() {
+ localVarQueryParams.Add("show_tokens", parameterToString(localVarOptionals.ShowTokens.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(EntitlementsCreate)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be EntitlementsCreate")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v RepositoryToken
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+EntitlementsApiService Delete a specific entitlement in a repository.
+Delete a specific entitlement in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+
+*/
+func (a *EntitlementsApiService) EntitlementsDelete(ctx context.Context, owner string, repo string, identifier string) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Delete")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+EntitlementsApiService Disable an entitlement token in a repository.
+Disable an entitlement token in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+
+*/
+func (a *EntitlementsApiService) EntitlementsDisable(ctx context.Context, owner string, repo string, identifier string) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/{identifier}/disable/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+EntitlementsApiService Enable an entitlement token in a repository.
+Enable an entitlement token in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+
+*/
+func (a *EntitlementsApiService) EntitlementsEnable(ctx context.Context, owner string, repo string, identifier string) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/{identifier}/enable/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+EntitlementsApiService Get a list of all entitlements in a repository.
+Get a list of all entitlements in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *EntitlementsApiEntitlementsListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+ * @param "ShowTokens" (optional.Bool) - Show entitlement token strings in results
+
+@return []RepositoryToken
+*/
+
+type EntitlementsApiEntitlementsListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+ ShowTokens optional.Bool
+}
+
+func (a *EntitlementsApiService) EntitlementsList(ctx context.Context, owner string, repo string, localVarOptionals *EntitlementsApiEntitlementsListOpts) ([]RepositoryToken, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []RepositoryToken
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.ShowTokens.IsSet() {
+ localVarQueryParams.Add("show_tokens", parameterToString(localVarOptionals.ShowTokens.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []RepositoryToken
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+EntitlementsApiService Update a specific entitlement in a repository.
+Update a specific entitlement in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *EntitlementsApiEntitlementsPartialUpdateOpts - Optional Parameters:
+ * @param "ShowTokens" (optional.Bool) - Show entitlement token strings in results
+ * @param "Data" (optional.Interface of EntitlementsPartialUpdate) -
+
+@return RepositoryToken
+*/
+
+type EntitlementsApiEntitlementsPartialUpdateOpts struct {
+ ShowTokens optional.Bool
+ Data optional.Interface
+}
+
+func (a *EntitlementsApiService) EntitlementsPartialUpdate(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *EntitlementsApiEntitlementsPartialUpdateOpts) (RepositoryToken, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Patch")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue RepositoryToken
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.ShowTokens.IsSet() {
+ localVarQueryParams.Add("show_tokens", parameterToString(localVarOptionals.ShowTokens.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(EntitlementsPartialUpdate)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be EntitlementsPartialUpdate")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v RepositoryToken
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+EntitlementsApiService Get a specific entitlement in a repository.
+Get a specific entitlement in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *EntitlementsApiEntitlementsReadOpts - Optional Parameters:
+ * @param "ShowTokens" (optional.Bool) - Show entitlement token strings in results
+
+@return RepositoryToken
+*/
+
+type EntitlementsApiEntitlementsReadOpts struct {
+ ShowTokens optional.Bool
+}
+
+func (a *EntitlementsApiService) EntitlementsRead(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *EntitlementsApiEntitlementsReadOpts) (RepositoryToken, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue RepositoryToken
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.ShowTokens.IsSet() {
+ localVarQueryParams.Add("show_tokens", parameterToString(localVarOptionals.ShowTokens.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v RepositoryToken
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+EntitlementsApiService Refresh an entitlement token in a repository.
+Refresh an entitlement token in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *EntitlementsApiEntitlementsRefreshOpts - Optional Parameters:
+ * @param "ShowTokens" (optional.Bool) - Show entitlement token strings in results
+ * @param "Data" (optional.Interface of EntitlementsRefresh) -
+
+@return RepositoryTokenRefresh
+*/
+
+type EntitlementsApiEntitlementsRefreshOpts struct {
+ ShowTokens optional.Bool
+ Data optional.Interface
+}
+
+func (a *EntitlementsApiService) EntitlementsRefresh(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *EntitlementsApiEntitlementsRefreshOpts) (RepositoryTokenRefresh, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue RepositoryTokenRefresh
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/{identifier}/refresh/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.ShowTokens.IsSet() {
+ localVarQueryParams.Add("show_tokens", parameterToString(localVarOptionals.ShowTokens.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(EntitlementsRefresh)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be EntitlementsRefresh")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v RepositoryTokenRefresh
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+EntitlementsApiService Reset the statistics for an entitlement token in a repository.
+Reset the statistics for an entitlement token in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *EntitlementsApiEntitlementsResetOpts - Optional Parameters:
+ * @param "ShowTokens" (optional.Bool) - Show entitlement token strings in results
+
+
+*/
+
+type EntitlementsApiEntitlementsResetOpts struct {
+ ShowTokens optional.Bool
+}
+
+func (a *EntitlementsApiService) EntitlementsReset(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *EntitlementsApiEntitlementsResetOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/{identifier}/reset/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.ShowTokens.IsSet() {
+ localVarQueryParams.Add("show_tokens", parameterToString(localVarOptionals.ShowTokens.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+EntitlementsApiService Synchronise tokens from a source repository.
+Synchronise tokens from a source repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *EntitlementsApiEntitlementsSyncOpts - Optional Parameters:
+ * @param "ShowTokens" (optional.Bool) - Show entitlement token strings in results
+ * @param "Data" (optional.Interface of EntitlementsSync) -
+
+@return RepositoryTokenSync
+*/
+
+type EntitlementsApiEntitlementsSyncOpts struct {
+ ShowTokens optional.Bool
+ Data optional.Interface
+}
+
+func (a *EntitlementsApiService) EntitlementsSync(ctx context.Context, owner string, repo string, localVarOptionals *EntitlementsApiEntitlementsSyncOpts) (RepositoryTokenSync, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue RepositoryTokenSync
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/entitlements/{owner}/{repo}/sync/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.ShowTokens.IsSet() {
+ localVarQueryParams.Add("show_tokens", parameterToString(localVarOptionals.ShowTokens.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(EntitlementsSync)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be EntitlementsSync")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v RepositoryTokenSync
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_files.go b/bindings/go/src/api_files.go
new file mode 100644
index 00000000..2363f9e0
--- /dev/null
+++ b/bindings/go/src/api_files.go
@@ -0,0 +1,743 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type FilesApiService service
+
+/*
+FilesApiService Abort a multipart file upload.
+Abort a multipart file upload.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *FilesApiFilesAbortOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of FilesAbort) -
+
+
+*/
+
+type FilesApiFilesAbortOpts struct {
+ Data optional.Interface
+}
+
+func (a *FilesApiService) FilesAbort(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *FilesApiFilesAbortOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/files/{owner}/{repo}/{identifier}/abort/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(FilesAbort)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be FilesAbort")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+FilesApiService Complete a multipart file upload.
+Complete a multipart file upload.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *FilesApiFilesCompleteOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of FilesComplete) -
+
+@return PackageFileUpload
+*/
+
+type FilesApiFilesCompleteOpts struct {
+ Data optional.Interface
+}
+
+func (a *FilesApiService) FilesComplete(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *FilesApiFilesCompleteOpts) (PackageFileUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue PackageFileUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/files/{owner}/{repo}/{identifier}/complete/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(FilesComplete)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be FilesComplete")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v PackageFileUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+FilesApiService Request URL(s) to upload new package file upload(s) to.
+Request URL(s) to upload new package file upload(s) to.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *FilesApiFilesCreateOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of FilesCreate) -
+
+@return PackageFileUpload
+*/
+
+type FilesApiFilesCreateOpts struct {
+ Data optional.Interface
+}
+
+func (a *FilesApiService) FilesCreate(ctx context.Context, owner string, repo string, localVarOptionals *FilesApiFilesCreateOpts) (PackageFileUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue PackageFileUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/files/{owner}/{repo}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(FilesCreate)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be FilesCreate")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 202 {
+ var v PackageFileUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+FilesApiService Get upload information for a multipart file upload.
+Get upload information for a multipart file upload.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+@return PackageFilePartsUpload
+*/
+func (a *FilesApiService) FilesInfo(ctx context.Context, owner string, repo string, identifier string) (PackageFilePartsUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue PackageFilePartsUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/files/{owner}/{repo}/{identifier}/info/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v PackageFilePartsUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+FilesApiService Validate parameters used for create.
+Validate parameters used for create.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *FilesApiFilesValidateOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of FilesValidate) -
+
+
+*/
+
+type FilesApiFilesValidateOpts struct {
+ Data optional.Interface
+}
+
+func (a *FilesApiService) FilesValidate(ctx context.Context, owner string, repo string, localVarOptionals *FilesApiFilesValidateOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/files/{owner}/{repo}/validate/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(FilesValidate)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be FilesValidate")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_formats.go b/bindings/go/src/api_formats.go
new file mode 100644
index 00000000..93bd9870
--- /dev/null
+++ b/bindings/go/src/api_formats.go
@@ -0,0 +1,271 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type FormatsApiService service
+
+/*
+FormatsApiService Get a list of all supported package formats.
+Get a list of all supported package formats.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+
+@return []Format
+*/
+func (a *FormatsApiService) FormatsList(ctx context.Context) ([]Format, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []Format
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/formats/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []Format
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+FormatsApiService Get a specific supported package format.
+Get a specific supported package format.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param slug
+
+@return Format
+*/
+func (a *FormatsApiService) FormatsRead(ctx context.Context, slug string) (Format, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue Format
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/formats/{slug}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v Format
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_metrics.go b/bindings/go/src/api_metrics.go
new file mode 100644
index 00000000..e2dc7ddf
--- /dev/null
+++ b/bindings/go/src/api_metrics.go
@@ -0,0 +1,490 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type MetricsApiService service
+
+/*
+MetricsApiService View for listing entitlement token metrics, across an account.
+View for listing entitlement token metrics, across an account.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param optional nil or *MetricsApiMetricsEntitlementsListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+ * @param "Finish" (optional.String) - Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
+ * @param "Start" (optional.String) - Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
+ * @param "Tokens" (optional.String) - A comma seperated list of tokens (slug perm) to include in the results.
+
+@return EntitlementUsageMetrics
+*/
+
+type MetricsApiMetricsEntitlementsListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+ Finish optional.String
+ Start optional.String
+ Tokens optional.String
+}
+
+func (a *MetricsApiService) MetricsEntitlementsList(ctx context.Context, owner string, localVarOptionals *MetricsApiMetricsEntitlementsListOpts) (EntitlementUsageMetrics, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue EntitlementUsageMetrics
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/metrics/entitlements/{owner}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Finish.IsSet() {
+ localVarQueryParams.Add("finish", parameterToString(localVarOptionals.Finish.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Start.IsSet() {
+ localVarQueryParams.Add("start", parameterToString(localVarOptionals.Start.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Tokens.IsSet() {
+ localVarQueryParams.Add("tokens", parameterToString(localVarOptionals.Tokens.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v EntitlementUsageMetrics
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+MetricsApiService View for listing entitlement token metrics, for a repository.
+View for listing entitlement token metrics, for a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *MetricsApiMetricsEntitlementsList0Opts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+ * @param "Finish" (optional.String) - Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
+ * @param "Start" (optional.String) - Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
+ * @param "Tokens" (optional.String) - A comma seperated list of tokens (slug perm) to include in the results.
+
+@return EntitlementUsageMetrics
+*/
+
+type MetricsApiMetricsEntitlementsList0Opts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+ Finish optional.String
+ Start optional.String
+ Tokens optional.String
+}
+
+func (a *MetricsApiService) MetricsEntitlementsList0(ctx context.Context, owner string, repo string, localVarOptionals *MetricsApiMetricsEntitlementsList0Opts) (EntitlementUsageMetrics, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue EntitlementUsageMetrics
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/metrics/entitlements/{owner}/{repo}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Finish.IsSet() {
+ localVarQueryParams.Add("finish", parameterToString(localVarOptionals.Finish.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Start.IsSet() {
+ localVarQueryParams.Add("start", parameterToString(localVarOptionals.Start.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Tokens.IsSet() {
+ localVarQueryParams.Add("tokens", parameterToString(localVarOptionals.Tokens.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v EntitlementUsageMetrics
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+MetricsApiService View for listing package usage metrics, for a repository.
+View for listing package usage metrics, for a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *MetricsApiMetricsPackagesListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+ * @param "Finish" (optional.String) - Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
+ * @param "Packages" (optional.String) - A comma seperated list of packages (slug perm) to include in the results.
+ * @param "Start" (optional.String) - Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
+
+@return PackageUsageMetrics
+*/
+
+type MetricsApiMetricsPackagesListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+ Finish optional.String
+ Packages optional.String
+ Start optional.String
+}
+
+func (a *MetricsApiService) MetricsPackagesList(ctx context.Context, owner string, repo string, localVarOptionals *MetricsApiMetricsPackagesListOpts) (PackageUsageMetrics, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue PackageUsageMetrics
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/metrics/packages/{owner}/{repo}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Finish.IsSet() {
+ localVarQueryParams.Add("finish", parameterToString(localVarOptionals.Finish.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Packages.IsSet() {
+ localVarQueryParams.Add("packages", parameterToString(localVarOptionals.Packages.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Start.IsSet() {
+ localVarQueryParams.Add("start", parameterToString(localVarOptionals.Start.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v PackageUsageMetrics
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_namespaces.go b/bindings/go/src/api_namespaces.go
new file mode 100644
index 00000000..bedcc6f1
--- /dev/null
+++ b/bindings/go/src/api_namespaces.go
@@ -0,0 +1,287 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type NamespacesApiService service
+
+/*
+NamespacesApiService Get a list of all namespaces the user belongs to.
+Get a list of all namespaces the user belongs to.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param optional nil or *NamespacesApiNamespacesListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+
+@return []Namespace
+*/
+
+type NamespacesApiNamespacesListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+}
+
+func (a *NamespacesApiService) NamespacesList(ctx context.Context, localVarOptionals *NamespacesApiNamespacesListOpts) ([]Namespace, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []Namespace
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/namespaces/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []Namespace
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+NamespacesApiService Views for working with namespaces.
+Views for working with namespaces.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param slug
+
+@return Namespace
+*/
+func (a *NamespacesApiService) NamespacesRead(ctx context.Context, slug string) (Namespace, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue Namespace
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/namespaces/{slug}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v Namespace
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_orgs.go b/bindings/go/src/api_orgs.go
new file mode 100644
index 00000000..02ddf56c
--- /dev/null
+++ b/bindings/go/src/api_orgs.go
@@ -0,0 +1,672 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type OrgsApiService service
+
+/*
+OrgsApiService Get a list of all the organizations you are associated with.
+Get a list of all the organizations you are associated with.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param optional nil or *OrgsApiOrgsListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+
+@return []Organization
+*/
+
+type OrgsApiOrgsListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+}
+
+func (a *OrgsApiService) OrgsList(ctx context.Context, localVarOptionals *OrgsApiOrgsListOpts) ([]Organization, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []Organization
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/orgs/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []Organization
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+OrgsApiService Get the details for all organization members.
+Get the details for all organization members.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param org
+ * @param optional nil or *OrgsApiOrgsMembersListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+
+@return []OrganizationMembership
+*/
+
+type OrgsApiOrgsMembersListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+}
+
+func (a *OrgsApiService) OrgsMembersList(ctx context.Context, org string, localVarOptionals *OrgsApiOrgsMembersListOpts) ([]OrganizationMembership, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []OrganizationMembership
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/orgs/{org}/members/"
+ localVarPath = strings.Replace(localVarPath, "{"+"org"+"}", fmt.Sprintf("%v", org), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []OrganizationMembership
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+OrgsApiService Get the details for a specific organization member.
+Get the details for a specific organization member.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param org
+ * @param member
+
+@return OrganizationMembership
+*/
+func (a *OrgsApiService) OrgsMembersRead(ctx context.Context, org string, member string) (OrganizationMembership, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue OrganizationMembership
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/orgs/{org}/members/{member}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"org"+"}", fmt.Sprintf("%v", org), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"member"+"}", fmt.Sprintf("%v", member), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v OrganizationMembership
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+OrgsApiService Removes a member from the organization.
+Removes a member from the organization.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param org
+ * @param member
+
+@return OrganizationMembership
+*/
+func (a *OrgsApiService) OrgsMembersRemove(ctx context.Context, org string, member string) (OrganizationMembership, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue OrganizationMembership
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/orgs/{org}/members/{member}/remove/"
+ localVarPath = strings.Replace(localVarPath, "{"+"org"+"}", fmt.Sprintf("%v", org), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"member"+"}", fmt.Sprintf("%v", member), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v OrganizationMembership
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+OrgsApiService Get the details for the specific organization.
+Get the details for the specific organization.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param org
+
+@return Organization
+*/
+func (a *OrgsApiService) OrgsRead(ctx context.Context, org string) (Organization, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue Organization
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/orgs/{org}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"org"+"}", fmt.Sprintf("%v", org), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v Organization
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_packages.go b/bindings/go/src/api_packages.go
new file mode 100644
index 00000000..968840d0
--- /dev/null
+++ b/bindings/go/src/api_packages.go
@@ -0,0 +1,7923 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type PackagesApiService service
+
+/*
+PackagesApiService Copy a package to another repository.
+Copy a package to another repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *PackagesApiPackagesCopyOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesCopy) -
+
+@return PackageCopy
+*/
+
+type PackagesApiPackagesCopyOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesCopy(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *PackagesApiPackagesCopyOpts) (PackageCopy, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue PackageCopy
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/{identifier}/copy/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesCopy)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesCopy")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v PackageCopy
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Delete a specific package in a repository.
+Delete a specific package in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+
+*/
+func (a *PackagesApiService) PackagesDelete(ctx context.Context, owner string, repo string, identifier string) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Delete")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Get the direct (non-transitive) dependencies list for a package.
+Get the direct (non-transitive) dependencies list for a package.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+@return PackageDependencies
+*/
+func (a *PackagesApiService) PackagesDependencies(ctx context.Context, owner string, repo string, identifier string) (PackageDependencies, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue PackageDependencies
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/{identifier}/dependencies/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v PackageDependencies
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Get a list of all packages associated with repository.
+Get a list of all packages associated with repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+ * @param "Query" (optional.String) - A search term for querying names, filenames, versions, distributions, architectures, formats or statuses of packages.
+ * @param "Sort" (optional.String) - A field for sorting objects in ascending or descending order.
+
+@return []ModelPackage
+*/
+
+type PackagesApiPackagesListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+ Query optional.String
+ Sort optional.String
+}
+
+func (a *PackagesApiService) PackagesList(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesListOpts) ([]ModelPackage, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []ModelPackage
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Query.IsSet() {
+ localVarQueryParams.Add("query", parameterToString(localVarOptionals.Query.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.Sort.IsSet() {
+ localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []ModelPackage
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Move a package to another repository.
+Move a package to another repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *PackagesApiPackagesMoveOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesMove) -
+
+@return PackageMove
+*/
+
+type PackagesApiPackagesMoveOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesMove(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *PackagesApiPackagesMoveOpts) (PackageMove, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue PackageMove
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/{identifier}/move/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesMove)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesMove")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v PackageMove
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Get a specific package in a repository.
+Get a specific package in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+@return ModelPackage
+*/
+func (a *PackagesApiService) PackagesRead(ctx context.Context, owner string, repo string, identifier string) (ModelPackage, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ModelPackage
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ModelPackage
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Schedule a package for resynchronisation.
+Schedule a package for resynchronisation.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+@return ModelPackage
+*/
+func (a *PackagesApiService) PackagesResync(ctx context.Context, owner string, repo string, identifier string) (ModelPackage, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ModelPackage
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/{identifier}/resync/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ModelPackage
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Schedule a package for scanning.
+Schedule a package for scanning.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+@return ModelPackage
+*/
+func (a *PackagesApiService) PackagesScan(ctx context.Context, owner string, repo string, identifier string) (ModelPackage, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ModelPackage
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/{identifier}/scan/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ModelPackage
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Get the synchronisation status for a package.
+Get the synchronisation status for a package.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+@return PackageStatus
+*/
+func (a *PackagesApiService) PackagesStatus(ctx context.Context, owner string, repo string, identifier string) (PackageStatus, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue PackageStatus
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/{identifier}/status/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v PackageStatus
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Add/Replace/Remove tags for a package.
+Add/Replace/Remove tags for a package.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *PackagesApiPackagesTagOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesTag) -
+
+@return ModelPackage
+*/
+
+type PackagesApiPackagesTagOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesTag(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *PackagesApiPackagesTagOpts) (ModelPackage, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ModelPackage
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/{identifier}/tag/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesTag)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesTag")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ModelPackage
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Alpine package
+Create a new Alpine package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadAlpineOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadAlpine) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadAlpineOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadAlpine(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadAlpineOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/alpine/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadAlpine)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadAlpine")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Cargo package
+Create a new Cargo package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadCargoOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadCargo) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadCargoOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadCargo(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadCargoOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/cargo/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadCargo)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadCargo")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new CocoaPods package
+Create a new CocoaPods package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadCocoapodsOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadCocoapods) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadCocoapodsOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadCocoapods(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadCocoapodsOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/cocoapods/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadCocoapods)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadCocoapods")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Composer package
+Create a new Composer package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadComposerOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadComposer) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadComposerOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadComposer(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadComposerOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/composer/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadComposer)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadComposer")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Conan package
+Create a new Conan package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadConanOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadConan) -
+
+@return ConanPackageUpload
+*/
+
+type PackagesApiPackagesUploadConanOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadConan(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadConanOpts) (ConanPackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ConanPackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/conan/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadConan)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadConan")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v ConanPackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Conda package
+Create a new Conda package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadCondaOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadConda) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadCondaOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadConda(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadCondaOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/conda/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadConda)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadConda")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new CRAN package
+Create a new CRAN package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadCranOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadCran) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadCranOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadCran(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadCranOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/cran/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadCran)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadCran")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Dart package
+Create a new Dart package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadDartOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadDart) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadDartOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadDart(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadDartOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/dart/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadDart)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadDart")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Debian package
+Create a new Debian package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadDebOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadDeb) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadDebOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadDeb(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadDebOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/deb/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadDeb)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadDeb")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Docker package
+Create a new Docker package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadDockerOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadDocker) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadDockerOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadDocker(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadDockerOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/docker/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadDocker)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadDocker")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Go package
+Create a new Go package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadGoOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadGo) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadGoOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadGo(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadGoOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/go/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadGo)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadGo")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Helm package
+Create a new Helm package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadHelmOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadHelm) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadHelmOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadHelm(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadHelmOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/helm/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadHelm)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadHelm")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new LuaRocks package
+Create a new LuaRocks package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadLuarocksOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadLuarocks) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadLuarocksOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadLuarocks(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadLuarocksOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/luarocks/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadLuarocks)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadLuarocks")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Maven package
+Create a new Maven package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadMavenOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadMaven) -
+
+@return MavenPackageUpload
+*/
+
+type PackagesApiPackagesUploadMavenOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadMaven(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadMavenOpts) (MavenPackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue MavenPackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/maven/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadMaven)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadMaven")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v MavenPackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new npm package
+Create a new npm package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadNpmOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadNpm) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadNpmOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadNpm(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadNpmOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/npm/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadNpm)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadNpm")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new NuGet package
+Create a new NuGet package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadNugetOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadNuget) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadNugetOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadNuget(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadNugetOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/nuget/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadNuget)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadNuget")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new P2 package
+Create a new P2 package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadP2Opts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadP2) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadP2Opts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadP2(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadP2Opts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/p2/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadP2)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadP2")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Python package
+Create a new Python package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadPythonOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadPython) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadPythonOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadPython(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadPythonOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/python/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadPython)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadPython")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Raw package
+Create a new Raw package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadRawOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadRaw) -
+
+@return RawPackageUpload
+*/
+
+type PackagesApiPackagesUploadRawOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadRaw(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadRawOpts) (RawPackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue RawPackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/raw/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadRaw)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadRaw")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v RawPackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new RedHat package
+Create a new RedHat package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadRpmOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadRpm) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadRpmOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadRpm(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadRpmOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/rpm/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadRpm)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadRpm")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Ruby package
+Create a new Ruby package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadRubyOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadRuby) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadRubyOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadRuby(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadRubyOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/ruby/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadRuby)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadRuby")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Terraform package
+Create a new Terraform package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadTerraformOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadTerraform) -
+
+@return AlpinePackageUpload
+*/
+
+type PackagesApiPackagesUploadTerraformOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadTerraform(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadTerraformOpts) (AlpinePackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue AlpinePackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/terraform/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadTerraform)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadTerraform")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v AlpinePackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Create a new Vagrant package
+Create a new Vagrant package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesUploadVagrantOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesUploadVagrant) -
+
+@return VagrantPackageUpload
+*/
+
+type PackagesApiPackagesUploadVagrantOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesUploadVagrant(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesUploadVagrantOpts) (VagrantPackageUpload, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue VagrantPackageUpload
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/upload/vagrant/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesUploadVagrant)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be PackagesUploadVagrant")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v VagrantPackageUpload
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Alpine package
+Validate parameters for create Alpine package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadAlpineOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadAlpine) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadAlpineOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadAlpine(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadAlpineOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/alpine/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadAlpine)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadAlpine")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Cargo package
+Validate parameters for create Cargo package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadCargoOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadCargo) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadCargoOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadCargo(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadCargoOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/cargo/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadCargo)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadCargo")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create CocoaPods package
+Validate parameters for create CocoaPods package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadCocoapodsOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadCocoapods) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadCocoapodsOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadCocoapods(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadCocoapodsOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/cocoapods/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadCocoapods)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadCocoapods")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Composer package
+Validate parameters for create Composer package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadComposerOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadComposer) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadComposerOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadComposer(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadComposerOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/composer/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadComposer)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadComposer")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Conan package
+Validate parameters for create Conan package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadConanOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadConan) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadConanOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadConan(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadConanOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/conan/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadConan)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadConan")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Conda package
+Validate parameters for create Conda package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadCondaOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadConda) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadCondaOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadConda(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadCondaOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/conda/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadConda)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadConda")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create CRAN package
+Validate parameters for create CRAN package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadCranOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadCran) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadCranOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadCran(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadCranOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/cran/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadCran)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadCran")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Dart package
+Validate parameters for create Dart package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadDartOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadDart) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadDartOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadDart(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadDartOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/dart/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadDart)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadDart")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Debian package
+Validate parameters for create Debian package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadDebOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadDeb) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadDebOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadDeb(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadDebOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/deb/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadDeb)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadDeb")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Docker package
+Validate parameters for create Docker package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadDockerOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadDocker) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadDockerOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadDocker(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadDockerOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/docker/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadDocker)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadDocker")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Go package
+Validate parameters for create Go package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadGoOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadGo) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadGoOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadGo(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadGoOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/go/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadGo)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadGo")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Helm package
+Validate parameters for create Helm package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadHelmOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadHelm) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadHelmOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadHelm(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadHelmOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/helm/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadHelm)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadHelm")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create LuaRocks package
+Validate parameters for create LuaRocks package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadLuarocksOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadLuarocks) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadLuarocksOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadLuarocks(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadLuarocksOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/luarocks/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadLuarocks)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadLuarocks")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Maven package
+Validate parameters for create Maven package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadMavenOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadMaven) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadMavenOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadMaven(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadMavenOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/maven/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadMaven)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadMaven")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create npm package
+Validate parameters for create npm package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadNpmOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadNpm) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadNpmOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadNpm(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadNpmOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/npm/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadNpm)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadNpm")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create NuGet package
+Validate parameters for create NuGet package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadNugetOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadNuget) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadNugetOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadNuget(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadNugetOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/nuget/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadNuget)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadNuget")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create P2 package
+Validate parameters for create P2 package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadP2Opts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadP2) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadP2Opts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadP2(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadP2Opts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/p2/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadP2)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadP2")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Python package
+Validate parameters for create Python package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadPythonOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadPython) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadPythonOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadPython(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadPythonOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/python/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadPython)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadPython")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Raw package
+Validate parameters for create Raw package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadRawOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadRaw) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadRawOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadRaw(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadRawOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/raw/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadRaw)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadRaw")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create RedHat package
+Validate parameters for create RedHat package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadRpmOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadRpm) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadRpmOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadRpm(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadRpmOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/rpm/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadRpm)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadRpm")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Ruby package
+Validate parameters for create Ruby package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadRubyOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadRuby) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadRubyOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadRuby(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadRubyOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/ruby/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadRuby)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadRuby")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Terraform package
+Validate parameters for create Terraform package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadTerraformOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadTerraform) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadTerraformOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadTerraform(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadTerraformOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/terraform/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadTerraform)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadTerraform")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+PackagesApiService Validate parameters for create Vagrant package
+Validate parameters for create Vagrant package
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *PackagesApiPackagesValidateUploadVagrantOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of PackagesValidateuploadVagrant) -
+
+
+*/
+
+type PackagesApiPackagesValidateUploadVagrantOpts struct {
+ Data optional.Interface
+}
+
+func (a *PackagesApiService) PackagesValidateUploadVagrant(ctx context.Context, owner string, repo string, localVarOptionals *PackagesApiPackagesValidateUploadVagrantOpts) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/packages/{owner}/{repo}/validate-upload/vagrant/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(PackagesValidateuploadVagrant)
+ if !localVarOptionalDataok {
+ return nil, reportError("data should be PackagesValidateuploadVagrant")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_quota.go b/bindings/go/src/api_quota.go
new file mode 100644
index 00000000..49cb3586
--- /dev/null
+++ b/bindings/go/src/api_quota.go
@@ -0,0 +1,517 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type QuotaApiService service
+
+/*
+QuotaApiService Quota history for a given namespace.
+Quota history for a given namespace.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+
+@return QuotaHistory
+*/
+func (a *QuotaApiService) QuotaHistoryRead(ctx context.Context, owner string) (QuotaHistory, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue QuotaHistory
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/quota/history/{owner}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v QuotaHistory
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+QuotaApiService Open-source Quota history for a given namespace.
+Open-source Quota history for a given namespace.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+
+@return QuotaHistory
+*/
+func (a *QuotaApiService) QuotaOssHistoryRead(ctx context.Context, owner string) (QuotaHistory, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue QuotaHistory
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/quota/oss/history/{owner}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v QuotaHistory
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+QuotaApiService Open-source Quota usage for a given namespace.
+Open-source Quota usage for a given namespace.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+
+@return Quota
+*/
+func (a *QuotaApiService) QuotaOssRead(ctx context.Context, owner string) (Quota, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue Quota
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/quota/oss/{owner}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v Quota
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+QuotaApiService Quota usage for a given namespace.
+Quota usage for a given namespace.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+
+@return Quota
+*/
+func (a *QuotaApiService) QuotaRead(ctx context.Context, owner string) (Quota, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue Quota
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/quota/{owner}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v Quota
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_rates.go b/bindings/go/src/api_rates.go
new file mode 100644
index 00000000..673337be
--- /dev/null
+++ b/bindings/go/src/api_rates.go
@@ -0,0 +1,148 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type RatesApiService service
+
+/*
+RatesApiService Endpoint to check rate limits for current user.
+Endpoint to check rate limits for current user.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+
+@return ResourcesRateCheck
+*/
+func (a *RatesApiService) RatesLimitsList(ctx context.Context) (ResourcesRateCheck, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ResourcesRateCheck
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/rates/limits/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ResourcesRateCheck
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_repos.go b/bindings/go/src/api_repos.go
new file mode 100644
index 00000000..eb7d2436
--- /dev/null
+++ b/bindings/go/src/api_repos.go
@@ -0,0 +1,867 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type ReposApiService service
+
+/*
+ReposApiService Get a list of all repositories associated with current user.
+Get a list of all repositories associated with current user.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param optional nil or *ReposApiReposAllListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+
+@return []Repository
+*/
+
+type ReposApiReposAllListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+}
+
+func (a *ReposApiService) ReposAllList(ctx context.Context, localVarOptionals *ReposApiReposAllListOpts) ([]Repository, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []Repository
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/repos/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []Repository
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ReposApiService Create a new repository in a given namespace.
+Create a new repository in a given namespace.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param optional nil or *ReposApiReposCreateOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of ReposCreate) -
+
+@return Repository
+*/
+
+type ReposApiReposCreateOpts struct {
+ Data optional.Interface
+}
+
+func (a *ReposApiService) ReposCreate(ctx context.Context, owner string, localVarOptionals *ReposApiReposCreateOpts) (Repository, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue Repository
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/repos/{owner}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(ReposCreate)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be ReposCreate")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v Repository
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ReposApiService Delete a repository in a given namespace.
+Delete a repository in a given namespace.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param identifier
+
+
+*/
+func (a *ReposApiService) ReposDelete(ctx context.Context, owner string, identifier string) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Delete")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+ReposApiService Get a list of all repositories within a namespace.
+Get a list of all repositories within a namespace.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param optional nil or *ReposApiReposListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+
+@return []Repository
+*/
+
+type ReposApiReposListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+}
+
+func (a *ReposApiService) ReposList(ctx context.Context, owner string, localVarOptionals *ReposApiReposListOpts) ([]Repository, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []Repository
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/repos/{owner}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []Repository
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ReposApiService Update details about a repository in a given namespace.
+Update details about a repository in a given namespace.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param identifier
+ * @param optional nil or *ReposApiReposPartialUpdateOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of ReposPartialUpdate) -
+
+@return Repository
+*/
+
+type ReposApiReposPartialUpdateOpts struct {
+ Data optional.Interface
+}
+
+func (a *ReposApiService) ReposPartialUpdate(ctx context.Context, owner string, identifier string, localVarOptionals *ReposApiReposPartialUpdateOpts) (Repository, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Patch")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue Repository
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(ReposPartialUpdate)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be ReposPartialUpdate")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v Repository
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+ReposApiService Get a specific repository.
+Get a specific repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param identifier
+
+@return Repository
+*/
+func (a *ReposApiService) ReposRead(ctx context.Context, owner string, identifier string) (Repository, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue Repository
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v Repository
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_status.go b/bindings/go/src/api_status.go
new file mode 100644
index 00000000..9cbfc77c
--- /dev/null
+++ b/bindings/go/src/api_status.go
@@ -0,0 +1,135 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type StatusApiService service
+
+/*
+StatusApiService Endpoint to check basic API connectivity.
+Endpoint to check basic API connectivity.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+
+@return StatusBasic
+*/
+func (a *StatusApiService) StatusCheckBasic(ctx context.Context) (StatusBasic, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue StatusBasic
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/status/check/basic/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v StatusBasic
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_storage_regions.go b/bindings/go/src/api_storage_regions.go
new file mode 100644
index 00000000..603635f8
--- /dev/null
+++ b/bindings/go/src/api_storage_regions.go
@@ -0,0 +1,271 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type StorageRegionsApiService service
+
+/*
+StorageRegionsApiService Get a list of all available storage regions.
+Get a list of all available storage regions.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+
+@return []StorageRegion
+*/
+func (a *StorageRegionsApiService) StorageRegionsList(ctx context.Context) ([]StorageRegion, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []StorageRegion
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/storage-regions/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []StorageRegion
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+StorageRegionsApiService Get a specific storage region.
+Get a specific storage region.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param slug
+
+@return StorageRegion
+*/
+func (a *StorageRegionsApiService) StorageRegionsRead(ctx context.Context, slug string) (StorageRegion, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue StorageRegion
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/storage-regions/{slug}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v StorageRegion
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_user.go b/bindings/go/src/api_user.go
new file mode 100644
index 00000000..0356c2b6
--- /dev/null
+++ b/bindings/go/src/api_user.go
@@ -0,0 +1,296 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type UserApiService service
+
+/*
+UserApiService Provide a brief for the current user (if any).
+Provide a brief for the current user (if any).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+
+@return UserBrief
+*/
+func (a *UserApiService) UserSelf(ctx context.Context) (UserBrief, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue UserBrief
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/user/self/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v UserBrief
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+UserApiService Retrieve the API key/token for the authenticated user.
+Retrieve the API key/token for the authenticated user.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param optional nil or *UserApiUserTokenCreateOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of UserTokenCreate) -
+
+@return UserAuthToken
+*/
+
+type UserApiUserTokenCreateOpts struct {
+ Data optional.Interface
+}
+
+func (a *UserApiService) UserTokenCreate(ctx context.Context, localVarOptionals *UserApiUserTokenCreateOpts) (UserAuthToken, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue UserAuthToken
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/user/token/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(UserTokenCreate)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be UserTokenCreate")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v UserAuthToken
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 403 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_users.go b/bindings/go/src/api_users.go
new file mode 100644
index 00000000..e29d24df
--- /dev/null
+++ b/bindings/go/src/api_users.go
@@ -0,0 +1,151 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type UsersApiService service
+
+/*
+UsersApiService Provide a brief for the specified user (if any).
+Provide a brief for the specified user (if any).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param slug
+
+@return UserProfile
+*/
+func (a *UsersApiService) UsersProfileRead(ctx context.Context, slug string) (UserProfile, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue UserProfile
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/users/profile/{slug}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v UserProfile
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_vulnerabilities.go b/bindings/go/src/api_vulnerabilities.go
new file mode 100644
index 00000000..75d92169
--- /dev/null
+++ b/bindings/go/src/api_vulnerabilities.go
@@ -0,0 +1,575 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type VulnerabilitiesApiService service
+
+/*
+VulnerabilitiesApiService Lists scan results for a specific namespace.
+Lists scan results for a specific namespace.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param optional nil or *VulnerabilitiesApiVulnerabilitiesListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+
+@return []VulnerabilityScanResultsList
+*/
+
+type VulnerabilitiesApiVulnerabilitiesListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+}
+
+func (a *VulnerabilitiesApiService) VulnerabilitiesList(ctx context.Context, owner string, localVarOptionals *VulnerabilitiesApiVulnerabilitiesListOpts) ([]VulnerabilityScanResultsList, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []VulnerabilityScanResultsList
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/vulnerabilities/{owner}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []VulnerabilityScanResultsList
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+VulnerabilitiesApiService Lists scan results for a specific repository.
+Lists scan results for a specific repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *VulnerabilitiesApiVulnerabilitiesList0Opts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+
+@return []VulnerabilityScanResultsList
+*/
+
+type VulnerabilitiesApiVulnerabilitiesList0Opts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+}
+
+func (a *VulnerabilitiesApiService) VulnerabilitiesList0(ctx context.Context, owner string, repo string, localVarOptionals *VulnerabilitiesApiVulnerabilitiesList0Opts) ([]VulnerabilityScanResultsList, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []VulnerabilityScanResultsList
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/vulnerabilities/{owner}/{repo}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []VulnerabilityScanResultsList
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+VulnerabilitiesApiService Lists scan results for a specific package.
+Lists scan results for a specific package.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param package_
+ * @param optional nil or *VulnerabilitiesApiVulnerabilitiesList1Opts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+
+@return []VulnerabilityScanResultsList
+*/
+
+type VulnerabilitiesApiVulnerabilitiesList1Opts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+}
+
+func (a *VulnerabilitiesApiService) VulnerabilitiesList1(ctx context.Context, owner string, repo string, package_ string, localVarOptionals *VulnerabilitiesApiVulnerabilitiesList1Opts) ([]VulnerabilityScanResultsList, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []VulnerabilityScanResultsList
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/vulnerabilities/{owner}/{repo}/{package}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"package"+"}", fmt.Sprintf("%v", package_), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []VulnerabilityScanResultsList
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+VulnerabilitiesApiService Returns a Scan Result.
+Returns a Scan Result.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param package_
+ * @param scanId
+
+@return VulnerabilityScanResults
+*/
+func (a *VulnerabilitiesApiService) VulnerabilitiesRead(ctx context.Context, owner string, repo string, package_ string, scanId string) (VulnerabilityScanResults, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue VulnerabilityScanResults
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/vulnerabilities/{owner}/{repo}/{package}/{scan_id}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"package"+"}", fmt.Sprintf("%v", package_), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"scan_id"+"}", fmt.Sprintf("%v", scanId), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v VulnerabilityScanResults
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/api_webhooks.go b/bindings/go/src/api_webhooks.go
new file mode 100644
index 00000000..be8e35f3
--- /dev/null
+++ b/bindings/go/src/api_webhooks.go
@@ -0,0 +1,720 @@
+
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "context"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "fmt"
+ "github.com/antihax/optional"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type WebhooksApiService service
+
+/*
+WebhooksApiService Create a specific webhook in a repository.
+Create a specific webhook in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *WebhooksApiWebhooksCreateOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of WebhooksCreate) -
+
+@return RepositoryWebhook
+*/
+
+type WebhooksApiWebhooksCreateOpts struct {
+ Data optional.Interface
+}
+
+func (a *WebhooksApiService) WebhooksCreate(ctx context.Context, owner string, repo string, localVarOptionals *WebhooksApiWebhooksCreateOpts) (RepositoryWebhook, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue RepositoryWebhook
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/webhooks/{owner}/{repo}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(WebhooksCreate)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be WebhooksCreate")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 201 {
+ var v RepositoryWebhook
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+WebhooksApiService Delete a specific webhook in a repository.
+Delete a specific webhook in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+
+*/
+func (a *WebhooksApiService) WebhooksDelete(ctx context.Context, owner string, repo string, identifier string) (*http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Delete")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/webhooks/{owner}/{repo}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarHttpResponse, err
+ }
+
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, newErr
+ }
+
+ return localVarHttpResponse, nil
+}
+
+/*
+WebhooksApiService Get a list of all webhooks in a repository.
+Get a list of all webhooks in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param optional nil or *WebhooksApiWebhooksListOpts - Optional Parameters:
+ * @param "Page" (optional.Int32) - A page number within the paginated result set.
+ * @param "PageSize" (optional.Int32) - Number of results to return per page.
+
+@return []RepositoryWebhook
+*/
+
+type WebhooksApiWebhooksListOpts struct {
+ Page optional.Int32
+ PageSize optional.Int32
+}
+
+func (a *WebhooksApiService) WebhooksList(ctx context.Context, owner string, repo string, localVarOptionals *WebhooksApiWebhooksListOpts) ([]RepositoryWebhook, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []RepositoryWebhook
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/webhooks/{owner}/{repo}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if localVarOptionals != nil && localVarOptionals.Page.IsSet() {
+ localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), ""))
+ }
+ if localVarOptionals != nil && localVarOptionals.PageSize.IsSet() {
+ localVarQueryParams.Add("page_size", parameterToString(localVarOptionals.PageSize.Value(), ""))
+ }
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v []RepositoryWebhook
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+WebhooksApiService Update a specific webhook in a repository.
+Update a specific webhook in a repository.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+ * @param optional nil or *WebhooksApiWebhooksPartialUpdateOpts - Optional Parameters:
+ * @param "Data" (optional.Interface of WebhooksPartialUpdate) -
+
+@return RepositoryWebhook
+*/
+
+type WebhooksApiWebhooksPartialUpdateOpts struct {
+ Data optional.Interface
+}
+
+func (a *WebhooksApiService) WebhooksPartialUpdate(ctx context.Context, owner string, repo string, identifier string, localVarOptionals *WebhooksApiWebhooksPartialUpdateOpts) (RepositoryWebhook, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Patch")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue RepositoryWebhook
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/webhooks/{owner}/{repo}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ // body params
+ if localVarOptionals != nil && localVarOptionals.Data.IsSet() {
+
+ localVarOptionalData, localVarOptionalDataok := localVarOptionals.Data.Value().(WebhooksPartialUpdate)
+ if !localVarOptionalDataok {
+ return localVarReturnValue, nil, reportError("data should be WebhooksPartialUpdate")
+ }
+ localVarPostBody = &localVarOptionalData
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v RepositoryWebhook
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 404 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+WebhooksApiService Views for working with repository webhooks.
+Views for working with repository webhooks.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param owner
+ * @param repo
+ * @param identifier
+
+@return RepositoryWebhook
+*/
+func (a *WebhooksApiService) WebhooksRead(ctx context.Context, owner string, repo string, identifier string) (RepositoryWebhook, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Get")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue RepositoryWebhook
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/webhooks/{owner}/{repo}/{identifier}/"
+ localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if ctx != nil {
+ // API Key Authentication
+ if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
+ var key string
+ if auth.Prefix != "" {
+ key = auth.Prefix + " " + auth.Key
+ } else {
+ key = auth.Key
+ }
+ localVarHeaderParams["X-Api-Key"] = key
+
+ }
+ }
+ r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericSwaggerError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+
+ if localVarHttpResponse.StatusCode == 200 {
+ var v RepositoryWebhook
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 400 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ if localVarHttpResponse.StatusCode == 422 {
+ var v Status
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
diff --git a/bindings/go/src/badges_api.go b/bindings/go/src/badges_api.go
deleted file mode 100644
index aebffd13..00000000
--- a/bindings/go/src/badges_api.go
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "fmt"
-)
-
-type BadgesApi struct {
- Configuration *Configuration
-}
-
-func NewBadgesApi() *BadgesApi {
- configuration := NewConfiguration()
- return &BadgesApi{
- Configuration: configuration,
- }
-}
-
-func NewBadgesApiWithBasePath(basePath string) *BadgesApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &BadgesApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get latest package version for a package or package group.
- * Get latest package version for a package or package group.
- *
- * @param owner
- * @param repo
- * @param packageFormat
- * @param packageName
- * @param packageVersion
- * @param packageIdentifiers
- * @param badgeToken Badge token to authenticate for private packages
- * @param cacheSeconds Override the shields.io badge cacheSeconds value.
- * @param color Override the shields.io badge color value.
- * @param label Override the shields.io badge label value.
- * @param labelColor Override the shields.io badge labelColor value.
- * @param logoColor Override the shields.io badge logoColor value.
- * @param logoWidth Override the shields.io badge logoWidth value.
- * @param render If true, badge will be rendered
- * @param shields If true, a shields response will be generated
- * @param showLatest If true, for latest version badges a '(latest)' suffix is added
- * @param style Override the shields.io badge style value.
- * @return void
- */
-func (a BadgesApi) BadgesVersionList(owner string, repo string, packageFormat string, packageName string, packageVersion string, packageIdentifiers string, badgeToken string, cacheSeconds string, color string, label string, labelColor string, logoColor string, logoWidth string, render bool, shields bool, showLatest bool, style string) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/badges/version/{owner}/{repo}/{package_format}/{package_name}/{package_version}/{package_identifiers}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"package_format"+"}", fmt.Sprintf("%v", packageFormat), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"package_name"+"}", fmt.Sprintf("%v", packageName), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"package_version"+"}", fmt.Sprintf("%v", packageVersion), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"package_identifiers"+"}", fmt.Sprintf("%v", packageIdentifiers), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("badge_token", a.Configuration.APIClient.ParameterToString(badgeToken, ""))
- localVarQueryParams.Add("cacheSeconds", a.Configuration.APIClient.ParameterToString(cacheSeconds, ""))
- localVarQueryParams.Add("color", a.Configuration.APIClient.ParameterToString(color, ""))
- localVarQueryParams.Add("label", a.Configuration.APIClient.ParameterToString(label, ""))
- localVarQueryParams.Add("labelColor", a.Configuration.APIClient.ParameterToString(labelColor, ""))
- localVarQueryParams.Add("logoColor", a.Configuration.APIClient.ParameterToString(logoColor, ""))
- localVarQueryParams.Add("logoWidth", a.Configuration.APIClient.ParameterToString(logoWidth, ""))
- localVarQueryParams.Add("render", a.Configuration.APIClient.ParameterToString(render, ""))
- localVarQueryParams.Add("shields", a.Configuration.APIClient.ParameterToString(shields, ""))
- localVarQueryParams.Add("show_latest", a.Configuration.APIClient.ParameterToString(showLatest, ""))
- localVarQueryParams.Add("style", a.Configuration.APIClient.ParameterToString(style, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "BadgesVersionList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/build.json b/bindings/go/src/build.json
index e46cdac6..141b4c72 100644
--- a/bindings/go/src/build.json
+++ b/bindings/go/src/build.json
@@ -1,5 +1,5 @@
{
"hideGenerationTimestamp": true,
"packageName": "cloudsmith_api",
- "packageVersion": "1.30.0"
+ "packageVersion": "1.33.7"
}
diff --git a/bindings/go/src/client.go b/bindings/go/src/client.go
new file mode 100644
index 00000000..370bc4b7
--- /dev/null
+++ b/bindings/go/src/client.go
@@ -0,0 +1,526 @@
+/*
+ * Cloudsmith API
+ *
+ * The API to the Cloudsmith Service
+ *
+ * API version: v1
+ * Contact: support@cloudsmith.io
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
+ */
+
+package cloudsmith_api
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "io"
+ "mime/multipart"
+ "net/http"
+ "net/url"
+ "os"
+ "path/filepath"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "golang.org/x/oauth2"
+)
+
+var (
+ jsonCheck = regexp.MustCompile("(?i:(?:application|text)/json)")
+ xmlCheck = regexp.MustCompile("(?i:(?:application|text)/xml)")
+)
+
+// APIClient manages communication with the Cloudsmith API API vv1
+// In most cases there should be only one, shared, APIClient.
+type APIClient struct {
+ cfg *Configuration
+ common service // Reuse a single struct instead of allocating one for each service on the heap.
+
+ // API Services
+
+ BadgesApi *BadgesApiService
+
+ DistrosApi *DistrosApiService
+
+ EntitlementsApi *EntitlementsApiService
+
+ FilesApi *FilesApiService
+
+ FormatsApi *FormatsApiService
+
+ MetricsApi *MetricsApiService
+
+ NamespacesApi *NamespacesApiService
+
+ OrgsApi *OrgsApiService
+
+ PackagesApi *PackagesApiService
+
+ QuotaApi *QuotaApiService
+
+ RatesApi *RatesApiService
+
+ ReposApi *ReposApiService
+
+ StatusApi *StatusApiService
+
+ StorageRegionsApi *StorageRegionsApiService
+
+ UserApi *UserApiService
+
+ UsersApi *UsersApiService
+
+ VulnerabilitiesApi *VulnerabilitiesApiService
+
+ WebhooksApi *WebhooksApiService
+}
+
+type service struct {
+ client *APIClient
+}
+
+// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
+// optionally a custom http.Client to allow for advanced features such as caching.
+func NewAPIClient(cfg *Configuration) *APIClient {
+ if cfg.HTTPClient == nil {
+ cfg.HTTPClient = http.DefaultClient
+ }
+
+ c := &APIClient{}
+ c.cfg = cfg
+ c.common.client = c
+
+ // API Services
+ c.BadgesApi = (*BadgesApiService)(&c.common)
+ c.DistrosApi = (*DistrosApiService)(&c.common)
+ c.EntitlementsApi = (*EntitlementsApiService)(&c.common)
+ c.FilesApi = (*FilesApiService)(&c.common)
+ c.FormatsApi = (*FormatsApiService)(&c.common)
+ c.MetricsApi = (*MetricsApiService)(&c.common)
+ c.NamespacesApi = (*NamespacesApiService)(&c.common)
+ c.OrgsApi = (*OrgsApiService)(&c.common)
+ c.PackagesApi = (*PackagesApiService)(&c.common)
+ c.QuotaApi = (*QuotaApiService)(&c.common)
+ c.RatesApi = (*RatesApiService)(&c.common)
+ c.ReposApi = (*ReposApiService)(&c.common)
+ c.StatusApi = (*StatusApiService)(&c.common)
+ c.StorageRegionsApi = (*StorageRegionsApiService)(&c.common)
+ c.UserApi = (*UserApiService)(&c.common)
+ c.UsersApi = (*UsersApiService)(&c.common)
+ c.VulnerabilitiesApi = (*VulnerabilitiesApiService)(&c.common)
+ c.WebhooksApi = (*WebhooksApiService)(&c.common)
+
+ return c
+}
+
+func atoi(in string) (int, error) {
+ return strconv.Atoi(in)
+}
+
+// selectHeaderContentType select a content type from the available list.
+func selectHeaderContentType(contentTypes []string) string {
+ if len(contentTypes) == 0 {
+ return ""
+ }
+ if contains(contentTypes, "application/json") {
+ return "application/json"
+ }
+ return contentTypes[0] // use the first content type specified in 'consumes'
+}
+
+// selectHeaderAccept join all accept types and return
+func selectHeaderAccept(accepts []string) string {
+ if len(accepts) == 0 {
+ return ""
+ }
+
+ if contains(accepts, "application/json") {
+ return "application/json"
+ }
+
+ return strings.Join(accepts, ",")
+}
+
+// contains is a case insenstive match, finding needle in a haystack
+func contains(haystack []string, needle string) bool {
+ for _, a := range haystack {
+ if strings.ToLower(a) == strings.ToLower(needle) {
+ return true
+ }
+ }
+ return false
+}
+
+// Verify optional parameters are of the correct type.
+func typeCheckParameter(obj interface{}, expected string, name string) error {
+ // Make sure there is an object.
+ if obj == nil {
+ return nil
+ }
+
+ // Check the type is as expected.
+ if reflect.TypeOf(obj).String() != expected {
+ return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String())
+ }
+ return nil
+}
+
+// parameterToString convert interface{} parameters to string, using a delimiter if format is provided.
+func parameterToString(obj interface{}, collectionFormat string) string {
+ var delimiter string
+
+ switch collectionFormat {
+ case "pipes":
+ delimiter = "|"
+ case "ssv":
+ delimiter = " "
+ case "tsv":
+ delimiter = "\t"
+ case "csv":
+ delimiter = ","
+ }
+
+ if reflect.TypeOf(obj).Kind() == reflect.Slice {
+ return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
+ }
+
+ return fmt.Sprintf("%v", obj)
+}
+
+// callAPI do the request.
+func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
+ return c.cfg.HTTPClient.Do(request)
+}
+
+// Change base path to allow switching to mocks
+func (c *APIClient) ChangeBasePath(path string) {
+ c.cfg.BasePath = path
+}
+
+// prepareRequest build the request
+func (c *APIClient) prepareRequest(
+ ctx context.Context,
+ path string, method string,
+ postBody interface{},
+ headerParams map[string]string,
+ queryParams url.Values,
+ formParams url.Values,
+ fileName string,
+ fileBytes []byte) (localVarRequest *http.Request, err error) {
+
+ var body *bytes.Buffer
+
+ // Detect postBody type and post.
+ if postBody != nil {
+ contentType := headerParams["Content-Type"]
+ if contentType == "" {
+ contentType = detectContentType(postBody)
+ headerParams["Content-Type"] = contentType
+ }
+
+ body, err = setBody(postBody, contentType)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // add form parameters and file if available.
+ if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ w := multipart.NewWriter(body)
+
+ for k, v := range formParams {
+ for _, iv := range v {
+ if strings.HasPrefix(k, "@") { // file
+ err = addFile(w, k[1:], iv)
+ if err != nil {
+ return nil, err
+ }
+ } else { // form value
+ w.WriteField(k, iv)
+ }
+ }
+ }
+ if len(fileBytes) > 0 && fileName != "" {
+ w.Boundary()
+ //_, fileNm := filepath.Split(fileName)
+ part, err := w.CreateFormFile("file", filepath.Base(fileName))
+ if err != nil {
+ return nil, err
+ }
+ _, err = part.Write(fileBytes)
+ if err != nil {
+ return nil, err
+ }
+ // Set the Boundary in the Content-Type
+ headerParams["Content-Type"] = w.FormDataContentType()
+ }
+
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ w.Close()
+ }
+
+ if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ body.WriteString(formParams.Encode())
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ }
+
+ // Setup path and query parameters
+ url, err := url.Parse(path)
+ if err != nil {
+ return nil, err
+ }
+
+ // Adding Query Param
+ query := url.Query()
+ for k, v := range queryParams {
+ for _, iv := range v {
+ query.Add(k, iv)
+ }
+ }
+
+ // Encode the parameters.
+ url.RawQuery = query.Encode()
+
+ // Generate a new request
+ if body != nil {
+ localVarRequest, err = http.NewRequest(method, url.String(), body)
+ } else {
+ localVarRequest, err = http.NewRequest(method, url.String(), nil)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // add header parameters, if any
+ if len(headerParams) > 0 {
+ headers := http.Header{}
+ for h, v := range headerParams {
+ headers.Set(h, v)
+ }
+ localVarRequest.Header = headers
+ }
+
+ // Override request host, if applicable
+ if c.cfg.Host != "" {
+ localVarRequest.Host = c.cfg.Host
+ }
+
+ // Add the user agent to the request.
+ localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
+
+ if ctx != nil {
+ // add context to the request
+ localVarRequest = localVarRequest.WithContext(ctx)
+
+ // Walk through any authentication.
+
+ // OAuth2 authentication
+ if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok {
+ // We were able to grab an oauth2 token from the context
+ var latestToken *oauth2.Token
+ if latestToken, err = tok.Token(); err != nil {
+ return nil, err
+ }
+
+ latestToken.SetAuthHeader(localVarRequest)
+ }
+
+ // Basic HTTP Authentication
+ if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok {
+ localVarRequest.SetBasicAuth(auth.UserName, auth.Password)
+ }
+
+ // AccessToken Authentication
+ if auth, ok := ctx.Value(ContextAccessToken).(string); ok {
+ localVarRequest.Header.Add("Authorization", "Bearer "+auth)
+ }
+ }
+
+ for header, value := range c.cfg.DefaultHeader {
+ localVarRequest.Header.Add(header, value)
+ }
+
+ return localVarRequest, nil
+}
+
+func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
+ if strings.Contains(contentType, "application/xml") {
+ if err = xml.Unmarshal(b, v); err != nil {
+ return err
+ }
+ return nil
+ } else if strings.Contains(contentType, "application/json") {
+ if err = json.Unmarshal(b, v); err != nil {
+ return err
+ }
+ return nil
+ }
+ return errors.New("undefined response type")
+}
+
+// Add a file to the multipart request
+func addFile(w *multipart.Writer, fieldName, path string) error {
+ file, err := os.Open(path)
+ if err != nil {
+ return err
+ }
+ defer file.Close()
+
+ part, err := w.CreateFormFile(fieldName, filepath.Base(path))
+ if err != nil {
+ return err
+ }
+ _, err = io.Copy(part, file)
+
+ return err
+}
+
+// Prevent trying to import "fmt"
+func reportError(format string, a ...interface{}) error {
+ return fmt.Errorf(format, a...)
+}
+
+// Set request body from an interface{}
+func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
+ if bodyBuf == nil {
+ bodyBuf = &bytes.Buffer{}
+ }
+
+ if reader, ok := body.(io.Reader); ok {
+ _, err = bodyBuf.ReadFrom(reader)
+ } else if b, ok := body.([]byte); ok {
+ _, err = bodyBuf.Write(b)
+ } else if s, ok := body.(string); ok {
+ _, err = bodyBuf.WriteString(s)
+ } else if s, ok := body.(*string); ok {
+ _, err = bodyBuf.WriteString(*s)
+ } else if jsonCheck.MatchString(contentType) {
+ err = json.NewEncoder(bodyBuf).Encode(body)
+ } else if xmlCheck.MatchString(contentType) {
+ xml.NewEncoder(bodyBuf).Encode(body)
+ }
+
+ if err != nil {
+ return nil, err
+ }
+
+ if bodyBuf.Len() == 0 {
+ err = fmt.Errorf("Invalid body type %s\n", contentType)
+ return nil, err
+ }
+ return bodyBuf, nil
+}
+
+// detectContentType method is used to figure out `Request.Body` content type for request header
+func detectContentType(body interface{}) string {
+ contentType := "text/plain; charset=utf-8"
+ kind := reflect.TypeOf(body).Kind()
+
+ switch kind {
+ case reflect.Struct, reflect.Map, reflect.Ptr:
+ contentType = "application/json; charset=utf-8"
+ case reflect.String:
+ contentType = "text/plain; charset=utf-8"
+ default:
+ if b, ok := body.([]byte); ok {
+ contentType = http.DetectContentType(b)
+ } else if kind == reflect.Slice {
+ contentType = "application/json; charset=utf-8"
+ }
+ }
+
+ return contentType
+}
+
+// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
+type cacheControl map[string]string
+
+func parseCacheControl(headers http.Header) cacheControl {
+ cc := cacheControl{}
+ ccHeader := headers.Get("Cache-Control")
+ for _, part := range strings.Split(ccHeader, ",") {
+ part = strings.Trim(part, " ")
+ if part == "" {
+ continue
+ }
+ if strings.ContainsRune(part, '=') {
+ keyval := strings.Split(part, "=")
+ cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
+ } else {
+ cc[part] = ""
+ }
+ }
+ return cc
+}
+
+// CacheExpires helper function to determine remaining time before repeating a request.
+func CacheExpires(r *http.Response) time.Time {
+ // Figure out when the cache expires.
+ var expires time.Time
+ now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
+ if err != nil {
+ return time.Now()
+ }
+ respCacheControl := parseCacheControl(r.Header)
+
+ if maxAge, ok := respCacheControl["max-age"]; ok {
+ lifetime, err := time.ParseDuration(maxAge + "s")
+ if err != nil {
+ expires = now
+ }
+ expires = now.Add(lifetime)
+ } else {
+ expiresHeader := r.Header.Get("Expires")
+ if expiresHeader != "" {
+ expires, err = time.Parse(time.RFC1123, expiresHeader)
+ if err != nil {
+ expires = now
+ }
+ }
+ }
+ return expires
+}
+
+func strlen(s string) int {
+ return utf8.RuneCountInString(s)
+}
+
+// GenericSwaggerError Provides access to the body, error and model on returned errors.
+type GenericSwaggerError struct {
+ body []byte
+ error string
+ model interface{}
+}
+
+// Error returns non-empty string if there was an error.
+func (e GenericSwaggerError) Error() string {
+ return e.error
+}
+
+// Body returns the raw bytes of the response
+func (e GenericSwaggerError) Body() []byte {
+ return e.body
+}
+
+// Model returns the unpacked model of the error
+func (e GenericSwaggerError) Model() interface{} {
+ return e.model
+}
diff --git a/bindings/go/src/configuration.go b/bindings/go/src/configuration.go
index e980ac2f..ee1c83bb 100644
--- a/bindings/go/src/configuration.go
+++ b/bindings/go/src/configuration.go
@@ -1,67 +1,73 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
import (
- "encoding/base64"
"net/http"
- "time"
)
+// contextKeys are used to identify the type of value in the context.
+// Since these are string, it is possible to get a short description of the
+// context key for logging and debugging using key.String().
+
+type contextKey string
+
+func (c contextKey) String() string {
+ return "auth " + string(c)
+}
+
+var (
+ // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
+ ContextOAuth2 = contextKey("token")
+
+ // ContextBasicAuth takes BasicAuth as authentication for the request.
+ ContextBasicAuth = contextKey("basic")
+
+ // ContextAccessToken takes a string oauth2 access token as authentication for the request.
+ ContextAccessToken = contextKey("accesstoken")
+
+ // ContextAPIKey takes an APIKey as authentication for the request
+ ContextAPIKey = contextKey("apikey")
+)
+
+// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
+type BasicAuth struct {
+ UserName string `json:"userName,omitempty"`
+ Password string `json:"password,omitempty"`
+}
+
+// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
+type APIKey struct {
+ Key string
+ Prefix string
+}
type Configuration struct {
- Username string `json:"userName,omitempty"`
- Password string `json:"password,omitempty"`
- APIKeyPrefix map[string]string `json:"APIKeyPrefix,omitempty"`
- APIKey map[string]string `json:"APIKey,omitempty"`
- Debug bool `json:"debug,omitempty"`
- DebugFile string `json:"debugFile,omitempty"`
- OAuthToken string `json:"oAuthToken,omitempty"`
BasePath string `json:"basePath,omitempty"`
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
- AccessToken string `json:"accessToken,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
- APIClient *APIClient
- Transport *http.Transport
- Timeout *time.Duration `json:"timeout,omitempty"`
+ HTTPClient *http.Client
}
func NewConfiguration() *Configuration {
cfg := &Configuration{
BasePath: "https://api.cloudsmith.io/v1",
DefaultHeader: make(map[string]string),
- APIKey: make(map[string]string),
- APIKeyPrefix: make(map[string]string),
- UserAgent: "Swagger-Codegen/1.30.0/go",
- APIClient: &APIClient{},
+ UserAgent: "Swagger-Codegen/1.33.7/go",
}
-
- cfg.APIClient.config = cfg
return cfg
}
-func (c *Configuration) GetBasicAuthEncodedString() string {
- return base64.StdEncoding.EncodeToString([]byte(c.Username + ":" + c.Password))
-}
-
func (c *Configuration) AddDefaultHeader(key string, value string) {
c.DefaultHeader[key] = value
}
-
-func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string {
- if c.APIKeyPrefix[APIKeyIdentifier] != "" {
- return c.APIKeyPrefix[APIKeyIdentifier] + " " + c.APIKey[APIKeyIdentifier]
- }
-
- return c.APIKey[APIKeyIdentifier]
-}
diff --git a/bindings/go/src/distros_api.go b/bindings/go/src/distros_api.go
deleted file mode 100644
index 908cbbc6..00000000
--- a/bindings/go/src/distros_api.go
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type DistrosApi struct {
- Configuration *Configuration
-}
-
-func NewDistrosApi() *DistrosApi {
- configuration := NewConfiguration()
- return &DistrosApi{
- Configuration: configuration,
- }
-}
-
-func NewDistrosApiWithBasePath(basePath string) *DistrosApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &DistrosApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get a list of all supported distributions.
- * Get a list of all supported distributions.
- *
- * @return []Distribution
- */
-func (a DistrosApi) DistrosList() ([]Distribution, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/distros/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]Distribution)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "DistrosList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * View for viewing/listing distributions.
- * View for viewing/listing distributions.
- *
- * @param slug
- * @return *Distribution
- */
-func (a DistrosApi) DistrosRead(slug string) (*Distribution, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/distros/{slug}/"
- localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(Distribution)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "DistrosRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/docs/AlpinePackageUpload.md b/bindings/go/src/docs/AlpinePackageUpload.md
index 7ec5aa16..578acdb9 100644
--- a/bindings/go/src/docs/AlpinePackageUpload.md
+++ b/bindings/go/src/docs/AlpinePackageUpload.md
@@ -12,8 +12,8 @@ Name | Type | Description | Notes
**DependenciesChecksumMd5** | **string** | A checksum of all of the package's dependencies. | [optional] [default to null]
**DependenciesUrl** | **string** | | [optional] [default to null]
**Description** | **string** | A textual description of this package. | [optional] [default to null]
-**Distro** | [**interface{}**](interface{}.md) | | [optional] [default to null]
-**DistroVersion** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Distro** | **interface{}** | | [optional] [default to null]
+**DistroVersion** | **interface{}** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**Epoch** | **int32** | The epoch of the package version (if any). | [optional] [default to null]
**Extension** | **string** | | [optional] [default to null]
@@ -59,7 +59,7 @@ Name | Type | Description | Notes
**Summary** | **string** | A one-liner synopsis of this package. | [optional] [default to null]
**SyncFinishedAt** | **string** | The datetime the package sync was finished at. | [optional] [default to null]
**SyncProgress** | **int32** | Synchronisation progress (from 0-100) | [optional] [default to null]
-**TagsImmutable** | [**interface{}**](interface{}.md) | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
+**TagsImmutable** | **interface{}** | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
**TypeDisplay** | **string** | | [optional] [default to null]
**UploadedAt** | **string** | The date this package was uploaded. | [optional] [default to null]
**Uploader** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/BadgesApi.md b/bindings/go/src/docs/BadgesApi.md
index 62d4557e..281b428e 100644
--- a/bindings/go/src/docs/BadgesApi.md
+++ b/bindings/go/src/docs/BadgesApi.md
@@ -8,38 +8,50 @@ Method | HTTP request | Description
# **BadgesVersionList**
-> BadgesVersionList($owner, $repo, $packageFormat, $packageName, $packageVersion, $packageIdentifiers, $badgeToken, $cacheSeconds, $color, $label, $labelColor, $logoColor, $logoWidth, $render, $shields, $showLatest, $style)
-
+> interface{} BadgesVersionList(ctx, owner, repo, packageFormat, packageName, packageVersion, packageIdentifiers, optional)
Get latest package version for a package or package group.
Get latest package version for a package or package group.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **packageFormat** | **string**| |
+ **packageName** | **string**| |
+ **packageVersion** | **string**| |
+ **packageIdentifiers** | **string**| |
+ **optional** | ***BadgesApiBadgesVersionListOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a BadgesApiBadgesVersionListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **packageFormat** | **string**| |
- **packageName** | **string**| |
- **packageVersion** | **string**| |
- **packageIdentifiers** | **string**| |
- **badgeToken** | **string**| Badge token to authenticate for private packages | [optional]
- **cacheSeconds** | **string**| Override the shields.io badge cacheSeconds value. | [optional]
- **color** | **string**| Override the shields.io badge color value. | [optional]
- **label** | **string**| Override the shields.io badge label value. | [optional]
- **labelColor** | **string**| Override the shields.io badge labelColor value. | [optional]
- **logoColor** | **string**| Override the shields.io badge logoColor value. | [optional]
- **logoWidth** | **string**| Override the shields.io badge logoWidth value. | [optional]
- **render** | **bool**| If true, badge will be rendered | [optional]
- **shields** | **bool**| If true, a shields response will be generated | [optional]
- **showLatest** | **bool**| If true, for latest version badges a '(latest)' suffix is added | [optional]
- **style** | **string**| Override the shields.io badge style value. | [optional]
+
+
+
+
+
+
+ **badgeToken** | **optional.String**| Badge token to authenticate for private packages |
+ **cacheSeconds** | **optional.String**| Override the shields.io badge cacheSeconds value. |
+ **color** | **optional.String**| Override the shields.io badge color value. |
+ **label** | **optional.String**| Override the shields.io badge label value. |
+ **labelColor** | **optional.String**| Override the shields.io badge labelColor value. |
+ **logoColor** | **optional.String**| Override the shields.io badge logoColor value. |
+ **logoWidth** | **optional.String**| Override the shields.io badge logoWidth value. |
+ **render** | **optional.Bool**| If true, badge will be rendered |
+ **shields** | **optional.Bool**| If true, a shields response will be generated |
+ **showLatest** | **optional.Bool**| If true, for latest version badges a '(latest)' suffix is added |
+ **style** | **optional.String**| Override the shields.io badge style value. |
### Return type
-void (empty response body)
+**interface{}**
### Authorization
diff --git a/bindings/go/src/docs/ConanPackageUpload.md b/bindings/go/src/docs/ConanPackageUpload.md
index d6223970..ea0c6964 100644
--- a/bindings/go/src/docs/ConanPackageUpload.md
+++ b/bindings/go/src/docs/ConanPackageUpload.md
@@ -14,8 +14,8 @@ Name | Type | Description | Notes
**DependenciesChecksumMd5** | **string** | A checksum of all of the package's dependencies. | [optional] [default to null]
**DependenciesUrl** | **string** | | [optional] [default to null]
**Description** | **string** | A textual description of this package. | [optional] [default to null]
-**Distro** | [**interface{}**](interface{}.md) | | [optional] [default to null]
-**DistroVersion** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Distro** | **interface{}** | | [optional] [default to null]
+**DistroVersion** | **interface{}** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**Epoch** | **int32** | The epoch of the package version (if any). | [optional] [default to null]
**Extension** | **string** | | [optional] [default to null]
@@ -61,7 +61,7 @@ Name | Type | Description | Notes
**Summary** | **string** | A one-liner synopsis of this package. | [optional] [default to null]
**SyncFinishedAt** | **string** | The datetime the package sync was finished at. | [optional] [default to null]
**SyncProgress** | **int32** | Synchronisation progress (from 0-100) | [optional] [default to null]
-**TagsImmutable** | [**interface{}**](interface{}.md) | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
+**TagsImmutable** | **interface{}** | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
**TypeDisplay** | **string** | | [optional] [default to null]
**UploadedAt** | **string** | The date this package was uploaded. | [optional] [default to null]
**Uploader** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/DistrosApi.md b/bindings/go/src/docs/DistrosApi.md
index 4a222e9b..374aaa0a 100644
--- a/bindings/go/src/docs/DistrosApi.md
+++ b/bindings/go/src/docs/DistrosApi.md
@@ -9,14 +9,12 @@ Method | HTTP request | Description
# **DistrosList**
-> []Distribution DistrosList()
-
+> []Distribution DistrosList(ctx, )
Get a list of all supported distributions.
Get a list of all supported distributions.
-
-### Parameters
+### Required Parameters
This endpoint does not need any parameter.
### Return type
@@ -35,18 +33,17 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **DistrosRead**
-> Distribution DistrosRead($slug)
-
+> Distribution DistrosRead(ctx, slug)
View for viewing/listing distributions.
View for viewing/listing distributions.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **slug** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **slug** | **string**| |
### Return type
diff --git a/bindings/go/src/docs/EntitlementUsageMetrics.md b/bindings/go/src/docs/EntitlementUsageMetrics.md
index a9ab3cb1..f5e8c0e5 100644
--- a/bindings/go/src/docs/EntitlementUsageMetrics.md
+++ b/bindings/go/src/docs/EntitlementUsageMetrics.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Tokens** | [**interface{}**](interface{}.md) | | [default to null]
+**Tokens** | **interface{}** | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/bindings/go/src/docs/EntitlementsApi.md b/bindings/go/src/docs/EntitlementsApi.md
index 68824c5b..d57c1cee 100644
--- a/bindings/go/src/docs/EntitlementsApi.md
+++ b/bindings/go/src/docs/EntitlementsApi.md
@@ -17,21 +17,29 @@ Method | HTTP request | Description
# **EntitlementsCreate**
-> RepositoryToken EntitlementsCreate($owner, $repo, $showTokens, $data)
-
+> RepositoryToken EntitlementsCreate(ctx, owner, repo, optional)
Create a specific entitlement in a repository.
Create a specific entitlement in a repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***EntitlementsApiEntitlementsCreateOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a EntitlementsApiEntitlementsCreateOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **showTokens** | **bool**| Show entitlement token strings in results | [optional]
- **data** | [**EntitlementsCreate**](EntitlementsCreate.md)| | [optional]
+
+
+ **showTokens** | **optional.Bool**| Show entitlement token strings in results |
+ **data** | [**optional.Interface of EntitlementsCreate**](EntitlementsCreate.md)| |
### Return type
@@ -49,24 +57,23 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **EntitlementsDelete**
-> EntitlementsDelete($owner, $repo, $identifier)
-
+> EntitlementsDelete(ctx, owner, repo, identifier)
Delete a specific entitlement in a repository.
Delete a specific entitlement in a repository.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -80,24 +87,23 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **EntitlementsDisable**
-> EntitlementsDisable($owner, $repo, $identifier)
-
+> EntitlementsDisable(ctx, owner, repo, identifier)
Disable an entitlement token in a repository.
Disable an entitlement token in a repository.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -111,24 +117,23 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **EntitlementsEnable**
-> EntitlementsEnable($owner, $repo, $identifier)
-
+> EntitlementsEnable(ctx, owner, repo, identifier)
Enable an entitlement token in a repository.
Enable an entitlement token in a repository.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -142,22 +147,30 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **EntitlementsList**
-> []RepositoryToken EntitlementsList($owner, $repo, $page, $pageSize, $showTokens)
-
+> []RepositoryToken EntitlementsList(ctx, owner, repo, optional)
Get a list of all entitlements in a repository.
Get a list of all entitlements in a repository.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***EntitlementsApiEntitlementsListOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a EntitlementsApiEntitlementsListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
- **showTokens** | **bool**| Show entitlement token strings in results | [optional]
+
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
+ **showTokens** | **optional.Bool**| Show entitlement token strings in results |
### Return type
@@ -175,22 +188,31 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **EntitlementsPartialUpdate**
-> RepositoryToken EntitlementsPartialUpdate($owner, $repo, $identifier, $showTokens, $data)
-
+> RepositoryToken EntitlementsPartialUpdate(ctx, owner, repo, identifier, optional)
Update a specific entitlement in a repository.
Update a specific entitlement in a repository.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***EntitlementsApiEntitlementsPartialUpdateOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a EntitlementsApiEntitlementsPartialUpdateOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **showTokens** | **bool**| Show entitlement token strings in results | [optional]
- **data** | [**EntitlementsPartialUpdate**](EntitlementsPartialUpdate.md)| | [optional]
+
+
+
+ **showTokens** | **optional.Bool**| Show entitlement token strings in results |
+ **data** | [**optional.Interface of EntitlementsPartialUpdate**](EntitlementsPartialUpdate.md)| |
### Return type
@@ -208,21 +230,30 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **EntitlementsRead**
-> RepositoryToken EntitlementsRead($owner, $repo, $identifier, $showTokens)
-
+> RepositoryToken EntitlementsRead(ctx, owner, repo, identifier, optional)
Get a specific entitlement in a repository.
Get a specific entitlement in a repository.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***EntitlementsApiEntitlementsReadOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a EntitlementsApiEntitlementsReadOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **showTokens** | **bool**| Show entitlement token strings in results | [optional]
+
+
+
+ **showTokens** | **optional.Bool**| Show entitlement token strings in results |
### Return type
@@ -240,22 +271,31 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **EntitlementsRefresh**
-> RepositoryTokenRefresh EntitlementsRefresh($owner, $repo, $identifier, $showTokens, $data)
-
+> RepositoryTokenRefresh EntitlementsRefresh(ctx, owner, repo, identifier, optional)
Refresh an entitlement token in a repository.
Refresh an entitlement token in a repository.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***EntitlementsApiEntitlementsRefreshOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a EntitlementsApiEntitlementsRefreshOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **showTokens** | **bool**| Show entitlement token strings in results | [optional]
- **data** | [**EntitlementsRefresh**](EntitlementsRefresh.md)| | [optional]
+
+
+
+ **showTokens** | **optional.Bool**| Show entitlement token strings in results |
+ **data** | [**optional.Interface of EntitlementsRefresh**](EntitlementsRefresh.md)| |
### Return type
@@ -273,25 +313,34 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **EntitlementsReset**
-> EntitlementsReset($owner, $repo, $identifier, $showTokens)
-
+> EntitlementsReset(ctx, owner, repo, identifier, optional)
Reset the statistics for an entitlement token in a repository.
Reset the statistics for an entitlement token in a repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***EntitlementsApiEntitlementsResetOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a EntitlementsApiEntitlementsResetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **showTokens** | **bool**| Show entitlement token strings in results | [optional]
+
+
+
+ **showTokens** | **optional.Bool**| Show entitlement token strings in results |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -305,21 +354,29 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **EntitlementsSync**
-> RepositoryTokenSync EntitlementsSync($owner, $repo, $showTokens, $data)
-
+> RepositoryTokenSync EntitlementsSync(ctx, owner, repo, optional)
Synchronise tokens from a source repository.
Synchronise tokens from a source repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***EntitlementsApiEntitlementsSyncOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a EntitlementsApiEntitlementsSyncOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **showTokens** | **bool**| Show entitlement token strings in results | [optional]
- **data** | [**EntitlementsSync**](EntitlementsSync.md)| | [optional]
+
+
+ **showTokens** | **optional.Bool**| Show entitlement token strings in results |
+ **data** | [**optional.Interface of EntitlementsSync**](EntitlementsSync.md)| |
### Return type
diff --git a/bindings/go/src/docs/EntitlementsCreate.md b/bindings/go/src/docs/EntitlementsCreate.md
index 35daa8bb..29726feb 100644
--- a/bindings/go/src/docs/EntitlementsCreate.md
+++ b/bindings/go/src/docs/EntitlementsCreate.md
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
**LimitNumDownloads** | **int32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null]
**LimitPackageQuery** | **string** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null]
**LimitPathQuery** | **string** | The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null]
-**Metadata** | [**interface{}**](interface{}.md) | None | [optional] [default to null]
+**Metadata** | **interface{}** | None | [optional] [default to null]
**Name** | **string** | None | [default to null]
**ScheduledResetAt** | **string** | The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. | [optional] [default to null]
**ScheduledResetPeriod** | **string** | None | [optional] [default to null]
diff --git a/bindings/go/src/docs/EntitlementsPartialUpdate.md b/bindings/go/src/docs/EntitlementsPartialUpdate.md
index 7a362187..fd7367ab 100644
--- a/bindings/go/src/docs/EntitlementsPartialUpdate.md
+++ b/bindings/go/src/docs/EntitlementsPartialUpdate.md
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
**LimitNumDownloads** | **int32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null]
**LimitPackageQuery** | **string** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null]
**LimitPathQuery** | **string** | The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null]
-**Metadata** | [**interface{}**](interface{}.md) | None | [optional] [default to null]
+**Metadata** | **interface{}** | None | [optional] [default to null]
**Name** | **string** | None | [optional] [default to null]
**ScheduledResetAt** | **string** | The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. | [optional] [default to null]
**ScheduledResetPeriod** | **string** | None | [optional] [default to null]
diff --git a/bindings/go/src/docs/EntitlementsRefresh.md b/bindings/go/src/docs/EntitlementsRefresh.md
index 903b310b..c8b9d5b9 100644
--- a/bindings/go/src/docs/EntitlementsRefresh.md
+++ b/bindings/go/src/docs/EntitlementsRefresh.md
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
**LimitNumDownloads** | **int32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null]
**LimitPackageQuery** | **string** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null]
**LimitPathQuery** | **string** | The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null]
-**Metadata** | [**interface{}**](interface{}.md) | None | [optional] [default to null]
+**Metadata** | **interface{}** | None | [optional] [default to null]
**ScheduledResetAt** | **string** | The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero. | [optional] [default to null]
**ScheduledResetPeriod** | **string** | None | [optional] [default to null]
**Token** | **string** | None | [optional] [default to null]
diff --git a/bindings/go/src/docs/FilesApi.md b/bindings/go/src/docs/FilesApi.md
index 32d68dc8..cfa1f0ca 100644
--- a/bindings/go/src/docs/FilesApi.md
+++ b/bindings/go/src/docs/FilesApi.md
@@ -12,25 +12,34 @@ Method | HTTP request | Description
# **FilesAbort**
-> FilesAbort($owner, $repo, $identifier, $data)
-
+> FilesAbort(ctx, owner, repo, identifier, optional)
Abort a multipart file upload.
Abort a multipart file upload.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***FilesApiFilesAbortOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a FilesApiFilesAbortOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **data** | [**FilesAbort**](FilesAbort.md)| | [optional]
+
+
+
+ **data** | [**optional.Interface of FilesAbort**](FilesAbort.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -44,21 +53,30 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **FilesComplete**
-> PackageFileUpload FilesComplete($owner, $repo, $identifier, $data)
-
+> PackageFileUpload FilesComplete(ctx, owner, repo, identifier, optional)
Complete a multipart file upload.
Complete a multipart file upload.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***FilesApiFilesCompleteOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a FilesApiFilesCompleteOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **data** | [**FilesComplete**](FilesComplete.md)| | [optional]
+
+
+
+ **data** | [**optional.Interface of FilesComplete**](FilesComplete.md)| |
### Return type
@@ -76,20 +94,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **FilesCreate**
-> PackageFileUpload FilesCreate($owner, $repo, $data)
-
+> PackageFileUpload FilesCreate(ctx, owner, repo, optional)
Request URL(s) to upload new package file upload(s) to.
Request URL(s) to upload new package file upload(s) to.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***FilesApiFilesCreateOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a FilesApiFilesCreateOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**FilesCreate**](FilesCreate.md)| | [optional]
+
+
+ **data** | [**optional.Interface of FilesCreate**](FilesCreate.md)| |
### Return type
@@ -107,20 +133,19 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **FilesInfo**
-> PackageFilePartsUpload FilesInfo($owner, $repo, $identifier)
-
+> PackageFilePartsUpload FilesInfo(ctx, owner, repo, identifier)
Get upload information for a multipart file upload.
Get upload information for a multipart file upload.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
@@ -138,24 +163,32 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **FilesValidate**
-> FilesValidate($owner, $repo, $data)
-
+> FilesValidate(ctx, owner, repo, optional)
Validate parameters used for create.
Validate parameters used for create.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***FilesApiFilesValidateOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a FilesApiFilesValidateOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**FilesValidate**](FilesValidate.md)| | [optional]
+
+
+ **data** | [**optional.Interface of FilesValidate**](FilesValidate.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
diff --git a/bindings/go/src/docs/Format.md b/bindings/go/src/docs/Format.md
index 13a5cd77..0a33440b 100644
--- a/bindings/go/src/docs/Format.md
+++ b/bindings/go/src/docs/Format.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**PremiumPlanId** | **string** | The minimum plan id required for this package format | [optional] [default to null]
**PremiumPlanName** | **string** | The minimum plan name required for this package format | [optional] [default to null]
**Slug** | **string** | Slug for the package format | [default to null]
-**Supports** | [**interface{}**](interface{}.md) | A set of what the package format supports | [default to null]
+**Supports** | **interface{}** | A set of what the package format supports | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/bindings/go/src/docs/FormatsApi.md b/bindings/go/src/docs/FormatsApi.md
index efdb2f66..957b4d00 100644
--- a/bindings/go/src/docs/FormatsApi.md
+++ b/bindings/go/src/docs/FormatsApi.md
@@ -9,14 +9,12 @@ Method | HTTP request | Description
# **FormatsList**
-> []Format FormatsList()
-
+> []Format FormatsList(ctx, )
Get a list of all supported package formats.
Get a list of all supported package formats.
-
-### Parameters
+### Required Parameters
This endpoint does not need any parameter.
### Return type
@@ -35,18 +33,17 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **FormatsRead**
-> Format FormatsRead($slug)
-
+> Format FormatsRead(ctx, slug)
Get a specific supported package format.
Get a specific supported package format.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **slug** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **slug** | **string**| |
### Return type
diff --git a/bindings/go/src/docs/MavenPackageUpload.md b/bindings/go/src/docs/MavenPackageUpload.md
index a3d79a59..51d2d072 100644
--- a/bindings/go/src/docs/MavenPackageUpload.md
+++ b/bindings/go/src/docs/MavenPackageUpload.md
@@ -13,8 +13,8 @@ Name | Type | Description | Notes
**DependenciesChecksumMd5** | **string** | A checksum of all of the package's dependencies. | [optional] [default to null]
**DependenciesUrl** | **string** | | [optional] [default to null]
**Description** | **string** | A textual description of this package. | [optional] [default to null]
-**Distro** | [**interface{}**](interface{}.md) | | [optional] [default to null]
-**DistroVersion** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Distro** | **interface{}** | | [optional] [default to null]
+**DistroVersion** | **interface{}** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**Epoch** | **int32** | The epoch of the package version (if any). | [optional] [default to null]
**Extension** | **string** | | [optional] [default to null]
@@ -62,7 +62,7 @@ Name | Type | Description | Notes
**Summary** | **string** | A one-liner synopsis of this package. | [optional] [default to null]
**SyncFinishedAt** | **string** | The datetime the package sync was finished at. | [optional] [default to null]
**SyncProgress** | **int32** | Synchronisation progress (from 0-100) | [optional] [default to null]
-**TagsImmutable** | [**interface{}**](interface{}.md) | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
+**TagsImmutable** | **interface{}** | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
**TypeDisplay** | **string** | | [optional] [default to null]
**UploadedAt** | **string** | The date this package was uploaded. | [optional] [default to null]
**Uploader** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/MetricsApi.md b/bindings/go/src/docs/MetricsApi.md
index 6434daf9..9da2407d 100644
--- a/bindings/go/src/docs/MetricsApi.md
+++ b/bindings/go/src/docs/MetricsApi.md
@@ -10,23 +10,30 @@ Method | HTTP request | Description
# **MetricsEntitlementsList**
-> EntitlementUsageMetrics MetricsEntitlementsList($owner, $page, $pageSize, $finish, $start, $tokens)
-
+> EntitlementUsageMetrics MetricsEntitlementsList(ctx, owner, optional)
View for listing entitlement token metrics, across an account.
View for listing entitlement token metrics, across an account.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **optional** | ***MetricsApiMetricsEntitlementsListOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a MetricsApiMetricsEntitlementsListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
- **finish** | **string**| Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | [optional]
- **start** | **string**| Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | [optional]
- **tokens** | **string**| A comma seperated list of tokens (slug perm) to include in the results. | [optional]
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
+ **finish** | **optional.String**| Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. |
+ **start** | **optional.String**| Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. |
+ **tokens** | **optional.String**| A comma seperated list of tokens (slug perm) to include in the results. |
### Return type
@@ -44,24 +51,32 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **MetricsEntitlementsList0**
-> EntitlementUsageMetrics MetricsEntitlementsList0($owner, $repo, $page, $pageSize, $finish, $start, $tokens)
-
+> EntitlementUsageMetrics MetricsEntitlementsList0(ctx, owner, repo, optional)
View for listing entitlement token metrics, for a repository.
View for listing entitlement token metrics, for a repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***MetricsApiMetricsEntitlementsList0Opts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a MetricsApiMetricsEntitlementsList0Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
- **finish** | **string**| Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | [optional]
- **start** | **string**| Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | [optional]
- **tokens** | **string**| A comma seperated list of tokens (slug perm) to include in the results. | [optional]
+
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
+ **finish** | **optional.String**| Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. |
+ **start** | **optional.String**| Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. |
+ **tokens** | **optional.String**| A comma seperated list of tokens (slug perm) to include in the results. |
### Return type
@@ -79,24 +94,32 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **MetricsPackagesList**
-> PackageUsageMetrics MetricsPackagesList($owner, $repo, $page, $pageSize, $finish, $packages, $start)
-
+> PackageUsageMetrics MetricsPackagesList(ctx, owner, repo, optional)
View for listing package usage metrics, for a repository.
View for listing package usage metrics, for a repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***MetricsApiMetricsPackagesListOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a MetricsApiMetricsPackagesListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
- **finish** | **string**| Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | [optional]
- **packages** | **string**| A comma seperated list of packages (slug perm) to include in the results. | [optional]
- **start** | **string**| Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. | [optional]
+
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
+ **finish** | **optional.String**| Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. |
+ **packages** | **optional.String**| A comma seperated list of packages (slug perm) to include in the results. |
+ **start** | **optional.String**| Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. |
### Return type
diff --git a/bindings/go/src/docs/ModelPackage.md b/bindings/go/src/docs/ModelPackage.md
index c0356de4..74f306c9 100644
--- a/bindings/go/src/docs/ModelPackage.md
+++ b/bindings/go/src/docs/ModelPackage.md
@@ -12,8 +12,8 @@ Name | Type | Description | Notes
**DependenciesChecksumMd5** | **string** | A checksum of all of the package's dependencies. | [optional] [default to null]
**DependenciesUrl** | **string** | | [optional] [default to null]
**Description** | **string** | A textual description of this package. | [optional] [default to null]
-**Distro** | [**interface{}**](interface{}.md) | | [optional] [default to null]
-**DistroVersion** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Distro** | **interface{}** | | [optional] [default to null]
+**DistroVersion** | **interface{}** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**Epoch** | **int32** | The epoch of the package version (if any). | [optional] [default to null]
**Extension** | **string** | | [optional] [default to null]
@@ -59,8 +59,8 @@ Name | Type | Description | Notes
**Summary** | **string** | A one-liner synopsis of this package. | [optional] [default to null]
**SyncFinishedAt** | **string** | The datetime the package sync was finished at. | [optional] [default to null]
**SyncProgress** | **int32** | Synchronisation progress (from 0-100) | [optional] [default to null]
-**Tags** | [**interface{}**](interface{}.md) | All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field. | [optional] [default to null]
-**TagsImmutable** | [**interface{}**](interface{}.md) | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
+**Tags** | **interface{}** | All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field. | [optional] [default to null]
+**TagsImmutable** | **interface{}** | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
**TypeDisplay** | **string** | | [optional] [default to null]
**UploadedAt** | **string** | The date this package was uploaded. | [optional] [default to null]
**Uploader** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/NamespacesApi.md b/bindings/go/src/docs/NamespacesApi.md
index f1db910b..84c66b4b 100644
--- a/bindings/go/src/docs/NamespacesApi.md
+++ b/bindings/go/src/docs/NamespacesApi.md
@@ -9,19 +9,25 @@ Method | HTTP request | Description
# **NamespacesList**
-> []Namespace NamespacesList($page, $pageSize)
-
+> []Namespace NamespacesList(ctx, optional)
Get a list of all namespaces the user belongs to.
Get a list of all namespaces the user belongs to.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***NamespacesApiNamespacesListOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a NamespacesApiNamespacesListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
### Return type
@@ -39,18 +45,17 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **NamespacesRead**
-> Namespace NamespacesRead($slug)
-
+> Namespace NamespacesRead(ctx, slug)
Views for working with namespaces.
Views for working with namespaces.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **slug** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **slug** | **string**| |
### Return type
diff --git a/bindings/go/src/docs/OrgsApi.md b/bindings/go/src/docs/OrgsApi.md
index 41fdaf56..8c56fc12 100644
--- a/bindings/go/src/docs/OrgsApi.md
+++ b/bindings/go/src/docs/OrgsApi.md
@@ -12,19 +12,25 @@ Method | HTTP request | Description
# **OrgsList**
-> []Organization OrgsList($page, $pageSize)
-
+> []Organization OrgsList(ctx, optional)
Get a list of all the organizations you are associated with.
Get a list of all the organizations you are associated with.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***OrgsApiOrgsListOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a OrgsApiOrgsListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
### Return type
@@ -42,20 +48,27 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **OrgsMembersList**
-> []OrganizationMembership OrgsMembersList($org, $page, $pageSize)
-
+> []OrganizationMembership OrgsMembersList(ctx, org, optional)
Get the details for all organization members.
Get the details for all organization members.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **org** | **string**| |
+ **optional** | ***OrgsApiOrgsMembersListOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a OrgsApiOrgsMembersListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **org** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
### Return type
@@ -73,19 +86,18 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **OrgsMembersRead**
-> OrganizationMembership OrgsMembersRead($org, $member)
-
+> OrganizationMembership OrgsMembersRead(ctx, org, member)
Get the details for a specific organization member.
Get the details for a specific organization member.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **org** | **string**| |
- **member** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **org** | **string**| |
+ **member** | **string**| |
### Return type
@@ -103,19 +115,18 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **OrgsMembersRemove**
-> OrganizationMembership OrgsMembersRemove($org, $member)
-
+> OrganizationMembership OrgsMembersRemove(ctx, org, member)
Removes a member from the organization.
Removes a member from the organization.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **org** | **string**| |
- **member** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **org** | **string**| |
+ **member** | **string**| |
### Return type
@@ -133,18 +144,17 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **OrgsRead**
-> Organization OrgsRead($org)
-
+> Organization OrgsRead(ctx, org)
Get the details for the specific organization.
Get the details for the specific organization.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **org** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **org** | **string**| |
### Return type
diff --git a/bindings/go/src/docs/PackageCopy.md b/bindings/go/src/docs/PackageCopy.md
index 5ec56c61..f85f25e0 100644
--- a/bindings/go/src/docs/PackageCopy.md
+++ b/bindings/go/src/docs/PackageCopy.md
@@ -12,8 +12,8 @@ Name | Type | Description | Notes
**DependenciesChecksumMd5** | **string** | A checksum of all of the package's dependencies. | [optional] [default to null]
**DependenciesUrl** | **string** | | [optional] [default to null]
**Description** | **string** | A textual description of this package. | [optional] [default to null]
-**Distro** | [**interface{}**](interface{}.md) | | [optional] [default to null]
-**DistroVersion** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Distro** | **interface{}** | | [optional] [default to null]
+**DistroVersion** | **interface{}** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**Epoch** | **int32** | The epoch of the package version (if any). | [optional] [default to null]
**Extension** | **string** | | [optional] [default to null]
@@ -59,8 +59,8 @@ Name | Type | Description | Notes
**Summary** | **string** | A one-liner synopsis of this package. | [optional] [default to null]
**SyncFinishedAt** | **string** | The datetime the package sync was finished at. | [optional] [default to null]
**SyncProgress** | **int32** | Synchronisation progress (from 0-100) | [optional] [default to null]
-**Tags** | [**interface{}**](interface{}.md) | All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field. | [optional] [default to null]
-**TagsImmutable** | [**interface{}**](interface{}.md) | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
+**Tags** | **interface{}** | All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field. | [optional] [default to null]
+**TagsImmutable** | **interface{}** | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
**TypeDisplay** | **string** | | [optional] [default to null]
**UploadedAt** | **string** | The date this package was uploaded. | [optional] [default to null]
**Uploader** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/PackageFileUpload.md b/bindings/go/src/docs/PackageFileUpload.md
index 51b032a3..4633bc36 100644
--- a/bindings/go/src/docs/PackageFileUpload.md
+++ b/bindings/go/src/docs/PackageFileUpload.md
@@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Identifier** | **string** | The identifier for the file to use when creating packages | [optional] [default to null]
-**UploadFields** | [**interface{}**](interface{}.md) | The dictionary of fields that must be sent with POST uploads | [optional] [default to null]
-**UploadHeaders** | [**interface{}**](interface{}.md) | The dictionary of headers that must be sent with uploads | [optional] [default to null]
+**UploadFields** | **interface{}** | The dictionary of fields that must be sent with POST uploads | [optional] [default to null]
+**UploadHeaders** | **interface{}** | The dictionary of headers that must be sent with uploads | [optional] [default to null]
**UploadQuerystring** | **string** | The querystring to use for the next-step POST or PUT upload | [optional] [default to null]
**UploadUrl** | **string** | The URL to use for the next-step POST or PUT upload | [optional] [default to null]
diff --git a/bindings/go/src/docs/PackageMove.md b/bindings/go/src/docs/PackageMove.md
index 88558722..4e8d9260 100644
--- a/bindings/go/src/docs/PackageMove.md
+++ b/bindings/go/src/docs/PackageMove.md
@@ -12,8 +12,8 @@ Name | Type | Description | Notes
**DependenciesChecksumMd5** | **string** | A checksum of all of the package's dependencies. | [optional] [default to null]
**DependenciesUrl** | **string** | | [optional] [default to null]
**Description** | **string** | A textual description of this package. | [optional] [default to null]
-**Distro** | [**interface{}**](interface{}.md) | | [optional] [default to null]
-**DistroVersion** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Distro** | **interface{}** | | [optional] [default to null]
+**DistroVersion** | **interface{}** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**Epoch** | **int32** | The epoch of the package version (if any). | [optional] [default to null]
**Extension** | **string** | | [optional] [default to null]
@@ -59,8 +59,8 @@ Name | Type | Description | Notes
**Summary** | **string** | A one-liner synopsis of this package. | [optional] [default to null]
**SyncFinishedAt** | **string** | The datetime the package sync was finished at. | [optional] [default to null]
**SyncProgress** | **int32** | Synchronisation progress (from 0-100) | [optional] [default to null]
-**Tags** | [**interface{}**](interface{}.md) | All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field. | [optional] [default to null]
-**TagsImmutable** | [**interface{}**](interface{}.md) | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
+**Tags** | **interface{}** | All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field. | [optional] [default to null]
+**TagsImmutable** | **interface{}** | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
**TypeDisplay** | **string** | | [optional] [default to null]
**UploadedAt** | **string** | The date this package was uploaded. | [optional] [default to null]
**Uploader** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/PackageUsageMetrics.md b/bindings/go/src/docs/PackageUsageMetrics.md
index 78b75851..0257a641 100644
--- a/bindings/go/src/docs/PackageUsageMetrics.md
+++ b/bindings/go/src/docs/PackageUsageMetrics.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Packages** | [**interface{}**](interface{}.md) | | [default to null]
+**Packages** | **interface{}** | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/bindings/go/src/docs/PackagesApi.md b/bindings/go/src/docs/PackagesApi.md
index 5d67bde9..3de7a627 100644
--- a/bindings/go/src/docs/PackagesApi.md
+++ b/bindings/go/src/docs/PackagesApi.md
@@ -63,21 +63,30 @@ Method | HTTP request | Description
# **PackagesCopy**
-> PackageCopy PackagesCopy($owner, $repo, $identifier, $data)
-
+> PackageCopy PackagesCopy(ctx, owner, repo, identifier, optional)
Copy a package to another repository.
Copy a package to another repository.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***PackagesApiPackagesCopyOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesCopyOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **data** | [**PackagesCopy**](PackagesCopy.md)| | [optional]
+
+
+
+ **data** | [**optional.Interface of PackagesCopy**](PackagesCopy.md)| |
### Return type
@@ -95,24 +104,23 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesDelete**
-> PackagesDelete($owner, $repo, $identifier)
-
+> PackagesDelete(ctx, owner, repo, identifier)
Delete a specific package in a repository.
Delete a specific package in a repository.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -126,20 +134,19 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesDependencies**
-> PackageDependencies PackagesDependencies($owner, $repo, $identifier)
-
+> PackageDependencies PackagesDependencies(ctx, owner, repo, identifier)
Get the direct (non-transitive) dependencies list for a package.
Get the direct (non-transitive) dependencies list for a package.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
@@ -157,23 +164,31 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesList**
-> []ModelPackage PackagesList($owner, $repo, $page, $pageSize, $query, $sort)
-
+> []ModelPackage PackagesList(ctx, owner, repo, optional)
Get a list of all packages associated with repository.
Get a list of all packages associated with repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesListOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
- **query** | **string**| A search term for querying names, filenames, versions, distributions, architectures, formats or statuses of packages. | [optional]
- **sort** | **string**| A field for sorting objects in ascending or descending order. | [optional]
+
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
+ **query** | **optional.String**| A search term for querying names, filenames, versions, distributions, architectures, formats or statuses of packages. |
+ **sort** | **optional.String**| A field for sorting objects in ascending or descending order. |
### Return type
@@ -191,21 +206,30 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesMove**
-> PackageMove PackagesMove($owner, $repo, $identifier, $data)
-
+> PackageMove PackagesMove(ctx, owner, repo, identifier, optional)
Move a package to another repository.
Move a package to another repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***PackagesApiPackagesMoveOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesMoveOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **data** | [**PackagesMove**](PackagesMove.md)| | [optional]
+
+
+
+ **data** | [**optional.Interface of PackagesMove**](PackagesMove.md)| |
### Return type
@@ -223,20 +247,19 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesRead**
-> ModelPackage PackagesRead($owner, $repo, $identifier)
-
+> ModelPackage PackagesRead(ctx, owner, repo, identifier)
Get a specific package in a repository.
Get a specific package in a repository.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
@@ -254,20 +277,19 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesResync**
-> ModelPackage PackagesResync($owner, $repo, $identifier)
-
+> ModelPackage PackagesResync(ctx, owner, repo, identifier)
Schedule a package for resynchronisation.
Schedule a package for resynchronisation.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
@@ -285,20 +307,19 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesScan**
-> ModelPackage PackagesScan($owner, $repo, $identifier)
-
+> ModelPackage PackagesScan(ctx, owner, repo, identifier)
Schedule a package for scanning.
Schedule a package for scanning.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
@@ -316,20 +337,19 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesStatus**
-> PackageStatus PackagesStatus($owner, $repo, $identifier)
-
+> PackageStatus PackagesStatus(ctx, owner, repo, identifier)
Get the synchronisation status for a package.
Get the synchronisation status for a package.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
@@ -347,21 +367,30 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesTag**
-> ModelPackage PackagesTag($owner, $repo, $identifier, $data)
-
+> ModelPackage PackagesTag(ctx, owner, repo, identifier, optional)
Add/Replace/Remove tags for a package.
Add/Replace/Remove tags for a package.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***PackagesApiPackagesTagOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesTagOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **data** | [**PackagesTag**](PackagesTag.md)| | [optional]
+
+
+
+ **data** | [**optional.Interface of PackagesTag**](PackagesTag.md)| |
### Return type
@@ -379,20 +408,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadAlpine**
-> AlpinePackageUpload PackagesUploadAlpine($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadAlpine(ctx, owner, repo, optional)
Create a new Alpine package
Create a new Alpine package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadAlpineOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadAlpineOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadAlpine**](PackagesUploadAlpine.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadAlpine**](PackagesUploadAlpine.md)| |
### Return type
@@ -410,20 +447,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadCargo**
-> AlpinePackageUpload PackagesUploadCargo($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadCargo(ctx, owner, repo, optional)
Create a new Cargo package
Create a new Cargo package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadCargoOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadCargoOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadCargo**](PackagesUploadCargo.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadCargo**](PackagesUploadCargo.md)| |
### Return type
@@ -441,20 +486,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadCocoapods**
-> AlpinePackageUpload PackagesUploadCocoapods($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadCocoapods(ctx, owner, repo, optional)
Create a new CocoaPods package
Create a new CocoaPods package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadCocoapodsOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadCocoapodsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadCocoapods**](PackagesUploadCocoapods.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadCocoapods**](PackagesUploadCocoapods.md)| |
### Return type
@@ -472,20 +525,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadComposer**
-> AlpinePackageUpload PackagesUploadComposer($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadComposer(ctx, owner, repo, optional)
Create a new Composer package
Create a new Composer package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadComposerOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadComposerOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadComposer**](PackagesUploadComposer.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadComposer**](PackagesUploadComposer.md)| |
### Return type
@@ -503,20 +564,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadConan**
-> ConanPackageUpload PackagesUploadConan($owner, $repo, $data)
-
+> ConanPackageUpload PackagesUploadConan(ctx, owner, repo, optional)
Create a new Conan package
Create a new Conan package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadConanOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadConanOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadConan**](PackagesUploadConan.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadConan**](PackagesUploadConan.md)| |
### Return type
@@ -534,20 +603,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadConda**
-> AlpinePackageUpload PackagesUploadConda($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadConda(ctx, owner, repo, optional)
Create a new Conda package
Create a new Conda package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadCondaOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadCondaOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadConda**](PackagesUploadConda.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadConda**](PackagesUploadConda.md)| |
### Return type
@@ -565,20 +642,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadCran**
-> AlpinePackageUpload PackagesUploadCran($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadCran(ctx, owner, repo, optional)
Create a new CRAN package
Create a new CRAN package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadCranOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadCranOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadCran**](PackagesUploadCran.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadCran**](PackagesUploadCran.md)| |
### Return type
@@ -596,20 +681,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadDart**
-> AlpinePackageUpload PackagesUploadDart($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadDart(ctx, owner, repo, optional)
Create a new Dart package
Create a new Dart package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadDartOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadDartOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadDart**](PackagesUploadDart.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadDart**](PackagesUploadDart.md)| |
### Return type
@@ -627,20 +720,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadDeb**
-> AlpinePackageUpload PackagesUploadDeb($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadDeb(ctx, owner, repo, optional)
Create a new Debian package
Create a new Debian package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadDebOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadDebOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadDeb**](PackagesUploadDeb.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadDeb**](PackagesUploadDeb.md)| |
### Return type
@@ -658,20 +759,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadDocker**
-> AlpinePackageUpload PackagesUploadDocker($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadDocker(ctx, owner, repo, optional)
Create a new Docker package
Create a new Docker package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadDockerOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadDockerOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadDocker**](PackagesUploadDocker.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadDocker**](PackagesUploadDocker.md)| |
### Return type
@@ -689,20 +798,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadGo**
-> AlpinePackageUpload PackagesUploadGo($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadGo(ctx, owner, repo, optional)
Create a new Go package
Create a new Go package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadGoOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadGoOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadGo**](PackagesUploadGo.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadGo**](PackagesUploadGo.md)| |
### Return type
@@ -720,20 +837,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadHelm**
-> AlpinePackageUpload PackagesUploadHelm($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadHelm(ctx, owner, repo, optional)
Create a new Helm package
Create a new Helm package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadHelmOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadHelmOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadHelm**](PackagesUploadHelm.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadHelm**](PackagesUploadHelm.md)| |
### Return type
@@ -751,20 +876,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadLuarocks**
-> AlpinePackageUpload PackagesUploadLuarocks($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadLuarocks(ctx, owner, repo, optional)
Create a new LuaRocks package
Create a new LuaRocks package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadLuarocksOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadLuarocksOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadLuarocks**](PackagesUploadLuarocks.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadLuarocks**](PackagesUploadLuarocks.md)| |
### Return type
@@ -782,20 +915,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadMaven**
-> MavenPackageUpload PackagesUploadMaven($owner, $repo, $data)
-
+> MavenPackageUpload PackagesUploadMaven(ctx, owner, repo, optional)
Create a new Maven package
Create a new Maven package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadMavenOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadMavenOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadMaven**](PackagesUploadMaven.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadMaven**](PackagesUploadMaven.md)| |
### Return type
@@ -813,20 +954,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadNpm**
-> AlpinePackageUpload PackagesUploadNpm($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadNpm(ctx, owner, repo, optional)
Create a new npm package
Create a new npm package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadNpmOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadNpmOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadNpm**](PackagesUploadNpm.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadNpm**](PackagesUploadNpm.md)| |
### Return type
@@ -844,20 +993,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadNuget**
-> AlpinePackageUpload PackagesUploadNuget($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadNuget(ctx, owner, repo, optional)
Create a new NuGet package
Create a new NuGet package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadNugetOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadNugetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadNuget**](PackagesUploadNuget.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadNuget**](PackagesUploadNuget.md)| |
### Return type
@@ -875,20 +1032,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadP2**
-> AlpinePackageUpload PackagesUploadP2($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadP2(ctx, owner, repo, optional)
Create a new P2 package
Create a new P2 package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadP2Opts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadP2Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadP2**](PackagesUploadP2.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadP2**](PackagesUploadP2.md)| |
### Return type
@@ -906,20 +1071,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadPython**
-> AlpinePackageUpload PackagesUploadPython($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadPython(ctx, owner, repo, optional)
Create a new Python package
Create a new Python package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadPythonOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadPythonOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadPython**](PackagesUploadPython.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadPython**](PackagesUploadPython.md)| |
### Return type
@@ -937,20 +1110,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadRaw**
-> RawPackageUpload PackagesUploadRaw($owner, $repo, $data)
-
+> RawPackageUpload PackagesUploadRaw(ctx, owner, repo, optional)
Create a new Raw package
Create a new Raw package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadRawOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadRawOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadRaw**](PackagesUploadRaw.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadRaw**](PackagesUploadRaw.md)| |
### Return type
@@ -968,20 +1149,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadRpm**
-> AlpinePackageUpload PackagesUploadRpm($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadRpm(ctx, owner, repo, optional)
Create a new RedHat package
Create a new RedHat package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadRpmOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadRpmOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadRpm**](PackagesUploadRpm.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadRpm**](PackagesUploadRpm.md)| |
### Return type
@@ -999,20 +1188,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadRuby**
-> AlpinePackageUpload PackagesUploadRuby($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadRuby(ctx, owner, repo, optional)
Create a new Ruby package
Create a new Ruby package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadRubyOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadRubyOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadRuby**](PackagesUploadRuby.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadRuby**](PackagesUploadRuby.md)| |
### Return type
@@ -1030,20 +1227,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadTerraform**
-> AlpinePackageUpload PackagesUploadTerraform($owner, $repo, $data)
-
+> AlpinePackageUpload PackagesUploadTerraform(ctx, owner, repo, optional)
Create a new Terraform package
Create a new Terraform package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadTerraformOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadTerraformOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadTerraform**](PackagesUploadTerraform.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadTerraform**](PackagesUploadTerraform.md)| |
### Return type
@@ -1061,20 +1266,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesUploadVagrant**
-> VagrantPackageUpload PackagesUploadVagrant($owner, $repo, $data)
-
+> VagrantPackageUpload PackagesUploadVagrant(ctx, owner, repo, optional)
Create a new Vagrant package
Create a new Vagrant package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesUploadVagrantOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesUploadVagrantOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesUploadVagrant**](PackagesUploadVagrant.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesUploadVagrant**](PackagesUploadVagrant.md)| |
### Return type
@@ -1092,24 +1305,32 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadAlpine**
-> PackagesValidateUploadAlpine($owner, $repo, $data)
-
+> PackagesValidateUploadAlpine(ctx, owner, repo, optional)
Validate parameters for create Alpine package
Validate parameters for create Alpine package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadAlpineOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadAlpineOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadAlpine**](PackagesValidateuploadAlpine.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadAlpine**](PackagesValidateuploadAlpine.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1123,24 +1344,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadCargo**
-> PackagesValidateUploadCargo($owner, $repo, $data)
-
+> PackagesValidateUploadCargo(ctx, owner, repo, optional)
Validate parameters for create Cargo package
Validate parameters for create Cargo package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadCargoOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadCargoOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadCargo**](PackagesValidateuploadCargo.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadCargo**](PackagesValidateuploadCargo.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1154,24 +1383,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadCocoapods**
-> PackagesValidateUploadCocoapods($owner, $repo, $data)
-
+> PackagesValidateUploadCocoapods(ctx, owner, repo, optional)
Validate parameters for create CocoaPods package
Validate parameters for create CocoaPods package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadCocoapodsOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadCocoapodsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadCocoapods**](PackagesValidateuploadCocoapods.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadCocoapods**](PackagesValidateuploadCocoapods.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1185,24 +1422,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadComposer**
-> PackagesValidateUploadComposer($owner, $repo, $data)
-
+> PackagesValidateUploadComposer(ctx, owner, repo, optional)
Validate parameters for create Composer package
Validate parameters for create Composer package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadComposerOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadComposerOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadComposer**](PackagesValidateuploadComposer.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadComposer**](PackagesValidateuploadComposer.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1216,24 +1461,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadConan**
-> PackagesValidateUploadConan($owner, $repo, $data)
-
+> PackagesValidateUploadConan(ctx, owner, repo, optional)
Validate parameters for create Conan package
Validate parameters for create Conan package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadConanOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadConanOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadConan**](PackagesValidateuploadConan.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadConan**](PackagesValidateuploadConan.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1247,24 +1500,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadConda**
-> PackagesValidateUploadConda($owner, $repo, $data)
-
+> PackagesValidateUploadConda(ctx, owner, repo, optional)
Validate parameters for create Conda package
Validate parameters for create Conda package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadCondaOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadCondaOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadConda**](PackagesValidateuploadConda.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadConda**](PackagesValidateuploadConda.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1278,24 +1539,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadCran**
-> PackagesValidateUploadCran($owner, $repo, $data)
-
+> PackagesValidateUploadCran(ctx, owner, repo, optional)
Validate parameters for create CRAN package
Validate parameters for create CRAN package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadCranOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadCranOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadCran**](PackagesValidateuploadCran.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadCran**](PackagesValidateuploadCran.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1309,24 +1578,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadDart**
-> PackagesValidateUploadDart($owner, $repo, $data)
-
+> PackagesValidateUploadDart(ctx, owner, repo, optional)
Validate parameters for create Dart package
Validate parameters for create Dart package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadDartOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadDartOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadDart**](PackagesValidateuploadDart.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadDart**](PackagesValidateuploadDart.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1340,24 +1617,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadDeb**
-> PackagesValidateUploadDeb($owner, $repo, $data)
-
+> PackagesValidateUploadDeb(ctx, owner, repo, optional)
Validate parameters for create Debian package
Validate parameters for create Debian package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadDebOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadDebOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadDeb**](PackagesValidateuploadDeb.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadDeb**](PackagesValidateuploadDeb.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1371,24 +1656,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadDocker**
-> PackagesValidateUploadDocker($owner, $repo, $data)
-
+> PackagesValidateUploadDocker(ctx, owner, repo, optional)
Validate parameters for create Docker package
Validate parameters for create Docker package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadDockerOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadDockerOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadDocker**](PackagesValidateuploadDocker.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadDocker**](PackagesValidateuploadDocker.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1402,24 +1695,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadGo**
-> PackagesValidateUploadGo($owner, $repo, $data)
-
+> PackagesValidateUploadGo(ctx, owner, repo, optional)
Validate parameters for create Go package
Validate parameters for create Go package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadGoOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadGoOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadGo**](PackagesValidateuploadGo.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadGo**](PackagesValidateuploadGo.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1433,24 +1734,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadHelm**
-> PackagesValidateUploadHelm($owner, $repo, $data)
-
+> PackagesValidateUploadHelm(ctx, owner, repo, optional)
Validate parameters for create Helm package
Validate parameters for create Helm package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadHelmOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadHelmOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadHelm**](PackagesValidateuploadHelm.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadHelm**](PackagesValidateuploadHelm.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1464,24 +1773,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadLuarocks**
-> PackagesValidateUploadLuarocks($owner, $repo, $data)
-
+> PackagesValidateUploadLuarocks(ctx, owner, repo, optional)
Validate parameters for create LuaRocks package
Validate parameters for create LuaRocks package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadLuarocksOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadLuarocksOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadLuarocks**](PackagesValidateuploadLuarocks.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadLuarocks**](PackagesValidateuploadLuarocks.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1495,24 +1812,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadMaven**
-> PackagesValidateUploadMaven($owner, $repo, $data)
-
+> PackagesValidateUploadMaven(ctx, owner, repo, optional)
Validate parameters for create Maven package
Validate parameters for create Maven package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadMavenOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadMavenOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadMaven**](PackagesValidateuploadMaven.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadMaven**](PackagesValidateuploadMaven.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1526,24 +1851,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadNpm**
-> PackagesValidateUploadNpm($owner, $repo, $data)
-
+> PackagesValidateUploadNpm(ctx, owner, repo, optional)
Validate parameters for create npm package
Validate parameters for create npm package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadNpmOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadNpmOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadNpm**](PackagesValidateuploadNpm.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadNpm**](PackagesValidateuploadNpm.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1557,24 +1890,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadNuget**
-> PackagesValidateUploadNuget($owner, $repo, $data)
-
+> PackagesValidateUploadNuget(ctx, owner, repo, optional)
Validate parameters for create NuGet package
Validate parameters for create NuGet package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadNugetOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadNugetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadNuget**](PackagesValidateuploadNuget.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadNuget**](PackagesValidateuploadNuget.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1588,24 +1929,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadP2**
-> PackagesValidateUploadP2($owner, $repo, $data)
-
+> PackagesValidateUploadP2(ctx, owner, repo, optional)
Validate parameters for create P2 package
Validate parameters for create P2 package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadP2Opts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadP2Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadP2**](PackagesValidateuploadP2.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadP2**](PackagesValidateuploadP2.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1619,24 +1968,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadPython**
-> PackagesValidateUploadPython($owner, $repo, $data)
-
+> PackagesValidateUploadPython(ctx, owner, repo, optional)
Validate parameters for create Python package
Validate parameters for create Python package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadPythonOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadPythonOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadPython**](PackagesValidateuploadPython.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadPython**](PackagesValidateuploadPython.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1650,24 +2007,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadRaw**
-> PackagesValidateUploadRaw($owner, $repo, $data)
-
+> PackagesValidateUploadRaw(ctx, owner, repo, optional)
Validate parameters for create Raw package
Validate parameters for create Raw package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadRawOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadRawOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadRaw**](PackagesValidateuploadRaw.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadRaw**](PackagesValidateuploadRaw.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1681,24 +2046,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadRpm**
-> PackagesValidateUploadRpm($owner, $repo, $data)
-
+> PackagesValidateUploadRpm(ctx, owner, repo, optional)
Validate parameters for create RedHat package
Validate parameters for create RedHat package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadRpmOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadRpmOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadRpm**](PackagesValidateuploadRpm.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadRpm**](PackagesValidateuploadRpm.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1712,24 +2085,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadRuby**
-> PackagesValidateUploadRuby($owner, $repo, $data)
-
+> PackagesValidateUploadRuby(ctx, owner, repo, optional)
Validate parameters for create Ruby package
Validate parameters for create Ruby package
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadRubyOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadRubyOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadRuby**](PackagesValidateuploadRuby.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadRuby**](PackagesValidateuploadRuby.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1743,24 +2124,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadTerraform**
-> PackagesValidateUploadTerraform($owner, $repo, $data)
-
+> PackagesValidateUploadTerraform(ctx, owner, repo, optional)
Validate parameters for create Terraform package
Validate parameters for create Terraform package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadTerraformOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadTerraformOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadTerraform**](PackagesValidateuploadTerraform.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadTerraform**](PackagesValidateuploadTerraform.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -1774,24 +2163,32 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **PackagesValidateUploadVagrant**
-> PackagesValidateUploadVagrant($owner, $repo, $data)
-
+> PackagesValidateUploadVagrant(ctx, owner, repo, optional)
Validate parameters for create Vagrant package
Validate parameters for create Vagrant package
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***PackagesApiPackagesValidateUploadVagrantOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a PackagesApiPackagesValidateUploadVagrantOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**PackagesValidateuploadVagrant**](PackagesValidateuploadVagrant.md)| | [optional]
+
+
+ **data** | [**optional.Interface of PackagesValidateuploadVagrant**](PackagesValidateuploadVagrant.md)| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
diff --git a/bindings/go/src/docs/Quota.md b/bindings/go/src/docs/Quota.md
index a7c87cc0..5098f535 100644
--- a/bindings/go/src/docs/Quota.md
+++ b/bindings/go/src/docs/Quota.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Usage** | [**interface{}**](interface{}.md) | | [default to null]
+**Usage** | **interface{}** | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/bindings/go/src/docs/QuotaApi.md b/bindings/go/src/docs/QuotaApi.md
index 749b0551..09c51678 100644
--- a/bindings/go/src/docs/QuotaApi.md
+++ b/bindings/go/src/docs/QuotaApi.md
@@ -11,18 +11,17 @@ Method | HTTP request | Description
# **QuotaHistoryRead**
-> QuotaHistory QuotaHistoryRead($owner)
-
+> QuotaHistory QuotaHistoryRead(ctx, owner)
Quota history for a given namespace.
Quota history for a given namespace.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
### Return type
@@ -40,18 +39,17 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **QuotaOssHistoryRead**
-> QuotaHistory QuotaOssHistoryRead($owner)
-
+> QuotaHistory QuotaOssHistoryRead(ctx, owner)
Open-source Quota history for a given namespace.
Open-source Quota history for a given namespace.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
### Return type
@@ -69,18 +67,17 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **QuotaOssRead**
-> Quota QuotaOssRead($owner)
-
+> Quota QuotaOssRead(ctx, owner)
Open-source Quota usage for a given namespace.
Open-source Quota usage for a given namespace.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
### Return type
@@ -98,18 +95,17 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **QuotaRead**
-> Quota QuotaRead($owner)
-
+> Quota QuotaRead(ctx, owner)
Quota usage for a given namespace.
Quota usage for a given namespace.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
### Return type
diff --git a/bindings/go/src/docs/QuotaHistoryHistory.md b/bindings/go/src/docs/QuotaHistoryHistory.md
index 97c0951d..c93d3dce 100644
--- a/bindings/go/src/docs/QuotaHistoryHistory.md
+++ b/bindings/go/src/docs/QuotaHistoryHistory.md
@@ -4,10 +4,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Days** | **int32** | | [optional] [default to null]
-**Display** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Display** | **interface{}** | | [optional] [default to null]
**End** | **string** | | [optional] [default to null]
**Plan** | **string** | | [optional] [default to null]
-**Raw** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Raw** | **interface{}** | | [optional] [default to null]
**Start** | **string** | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/bindings/go/src/docs/RatesApi.md b/bindings/go/src/docs/RatesApi.md
index 97fbfe53..58b8a1cb 100644
--- a/bindings/go/src/docs/RatesApi.md
+++ b/bindings/go/src/docs/RatesApi.md
@@ -8,14 +8,12 @@ Method | HTTP request | Description
# **RatesLimitsList**
-> ResourcesRateCheck RatesLimitsList()
-
+> ResourcesRateCheck RatesLimitsList(ctx, )
Endpoint to check rate limits for current user.
Endpoint to check rate limits for current user.
-
-### Parameters
+### Required Parameters
This endpoint does not need any parameter.
### Return type
diff --git a/bindings/go/src/docs/RawPackageUpload.md b/bindings/go/src/docs/RawPackageUpload.md
index 2b841cad..da4d7788 100644
--- a/bindings/go/src/docs/RawPackageUpload.md
+++ b/bindings/go/src/docs/RawPackageUpload.md
@@ -12,8 +12,8 @@ Name | Type | Description | Notes
**DependenciesChecksumMd5** | **string** | A checksum of all of the package's dependencies. | [optional] [default to null]
**DependenciesUrl** | **string** | | [optional] [default to null]
**Description** | **string** | A textual description of this package. | [optional] [default to null]
-**Distro** | [**interface{}**](interface{}.md) | | [optional] [default to null]
-**DistroVersion** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Distro** | **interface{}** | | [optional] [default to null]
+**DistroVersion** | **interface{}** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**Epoch** | **int32** | The epoch of the package version (if any). | [optional] [default to null]
**Extension** | **string** | | [optional] [default to null]
@@ -59,7 +59,7 @@ Name | Type | Description | Notes
**Summary** | **string** | A one-liner synopsis of this package. | [optional] [default to null]
**SyncFinishedAt** | **string** | The datetime the package sync was finished at. | [optional] [default to null]
**SyncProgress** | **int32** | Synchronisation progress (from 0-100) | [optional] [default to null]
-**TagsImmutable** | [**interface{}**](interface{}.md) | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
+**TagsImmutable** | **interface{}** | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
**TypeDisplay** | **string** | | [optional] [default to null]
**UploadedAt** | **string** | The date this package was uploaded. | [optional] [default to null]
**Uploader** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/ReposApi.md b/bindings/go/src/docs/ReposApi.md
index 72797c41..73bfcb6b 100644
--- a/bindings/go/src/docs/ReposApi.md
+++ b/bindings/go/src/docs/ReposApi.md
@@ -13,19 +13,25 @@ Method | HTTP request | Description
# **ReposAllList**
-> []Repository ReposAllList($page, $pageSize)
-
+> []Repository ReposAllList(ctx, optional)
Get a list of all repositories associated with current user.
Get a list of all repositories associated with current user.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***ReposApiReposAllListOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a ReposApiReposAllListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
### Return type
@@ -43,19 +49,26 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ReposCreate**
-> Repository ReposCreate($owner, $data)
-
+> Repository ReposCreate(ctx, owner, optional)
Create a new repository in a given namespace.
Create a new repository in a given namespace.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **optional** | ***ReposApiReposCreateOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a ReposApiReposCreateOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **data** | [**ReposCreate**](ReposCreate.md)| | [optional]
+
+ **data** | [**optional.Interface of ReposCreate**](ReposCreate.md)| |
### Return type
@@ -73,23 +86,22 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ReposDelete**
-> ReposDelete($owner, $identifier)
-
+> ReposDelete(ctx, owner, identifier)
Delete a repository in a given namespace.
Delete a repository in a given namespace.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **identifier** | **string**| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -103,20 +115,27 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ReposList**
-> []Repository ReposList($owner, $page, $pageSize)
-
+> []Repository ReposList(ctx, owner, optional)
Get a list of all repositories within a namespace.
Get a list of all repositories within a namespace.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **optional** | ***ReposApiReposListOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a ReposApiReposListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
### Return type
@@ -134,20 +153,28 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ReposPartialUpdate**
-> Repository ReposPartialUpdate($owner, $identifier, $data)
-
+> Repository ReposPartialUpdate(ctx, owner, identifier, optional)
Update details about a repository in a given namespace.
Update details about a repository in a given namespace.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***ReposApiReposPartialUpdateOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a ReposApiReposPartialUpdateOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **identifier** | **string**| |
- **data** | [**ReposPartialUpdate**](ReposPartialUpdate.md)| | [optional]
+
+
+ **data** | [**optional.Interface of ReposPartialUpdate**](ReposPartialUpdate.md)| |
### Return type
@@ -165,19 +192,18 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ReposRead**
-> Repository ReposRead($owner, $identifier)
-
+> Repository ReposRead(ctx, owner, identifier)
Get a specific repository.
Get a specific repository.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **identifier** | **string**| |
### Return type
diff --git a/bindings/go/src/docs/RepositoryToken.md b/bindings/go/src/docs/RepositoryToken.md
index d1791bc0..01f2cfed 100644
--- a/bindings/go/src/docs/RepositoryToken.md
+++ b/bindings/go/src/docs/RepositoryToken.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**DisableUrl** | **string** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**EnableUrl** | **string** | | [optional] [default to null]
-**EulaAccepted** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**EulaAccepted** | **interface{}** | | [optional] [default to null]
**EulaAcceptedAt** | **string** | The datetime the EULA was accepted at. | [optional] [default to null]
**EulaAcceptedFrom** | **string** | | [optional] [default to null]
**EulaRequired** | **bool** | If checked, a EULA acceptance is required for this token. | [optional] [default to null]
@@ -27,7 +27,7 @@ Name | Type | Description | Notes
**LimitNumDownloads** | **int32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null]
**LimitPackageQuery** | **string** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null]
**LimitPathQuery** | **string** | The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null]
-**Metadata** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Metadata** | **interface{}** | | [optional] [default to null]
**Name** | **string** | | [default to null]
**RefreshUrl** | **string** | | [optional] [default to null]
**ResetUrl** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/RepositoryTokenRefresh.md b/bindings/go/src/docs/RepositoryTokenRefresh.md
index 01c8abe5..63654ecb 100644
--- a/bindings/go/src/docs/RepositoryTokenRefresh.md
+++ b/bindings/go/src/docs/RepositoryTokenRefresh.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**DisableUrl** | **string** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**EnableUrl** | **string** | | [optional] [default to null]
-**EulaAccepted** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**EulaAccepted** | **interface{}** | | [optional] [default to null]
**EulaAcceptedAt** | **string** | The datetime the EULA was accepted at. | [optional] [default to null]
**EulaAcceptedFrom** | **string** | | [optional] [default to null]
**EulaRequired** | **bool** | If checked, a EULA acceptance is required for this token. | [optional] [default to null]
@@ -27,7 +27,7 @@ Name | Type | Description | Notes
**LimitNumDownloads** | **int32** | The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point. | [optional] [default to null]
**LimitPackageQuery** | **string** | The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata. | [optional] [default to null]
**LimitPathQuery** | **string** | The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash. | [optional] [default to null]
-**Metadata** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Metadata** | **interface{}** | | [optional] [default to null]
**Name** | **string** | | [optional] [default to null]
**RefreshUrl** | **string** | | [optional] [default to null]
**ResetUrl** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/RepositoryTokenSyncTokens.md b/bindings/go/src/docs/RepositoryTokenSyncTokens.md
index 9fe17fd8..20c4e937 100644
--- a/bindings/go/src/docs/RepositoryTokenSyncTokens.md
+++ b/bindings/go/src/docs/RepositoryTokenSyncTokens.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**DisableUrl** | **string** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**EnableUrl** | **string** | | [optional] [default to null]
-**EulaAccepted** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**EulaAccepted** | **interface{}** | | [optional] [default to null]
**EulaAcceptedAt** | **string** | The datetime the EULA was accepted at. | [optional] [default to null]
**EulaAcceptedFrom** | **string** | | [optional] [default to null]
**EulaRequired** | **bool** | If checked, a EULA acceptance is required for this token. | [optional] [default to null]
diff --git a/bindings/go/src/docs/ResourcesRateCheck.md b/bindings/go/src/docs/ResourcesRateCheck.md
index b75c7263..4bc7b715 100644
--- a/bindings/go/src/docs/ResourcesRateCheck.md
+++ b/bindings/go/src/docs/ResourcesRateCheck.md
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**Resources** | [**interface{}**](interface{}.md) | Rate limit values per resource | [optional] [default to null]
+**Resources** | **interface{}** | Rate limit values per resource | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/bindings/go/src/docs/StatusApi.md b/bindings/go/src/docs/StatusApi.md
index 63d62c23..7bd2edf0 100644
--- a/bindings/go/src/docs/StatusApi.md
+++ b/bindings/go/src/docs/StatusApi.md
@@ -8,14 +8,12 @@ Method | HTTP request | Description
# **StatusCheckBasic**
-> StatusBasic StatusCheckBasic()
-
+> StatusBasic StatusCheckBasic(ctx, )
Endpoint to check basic API connectivity.
Endpoint to check basic API connectivity.
-
-### Parameters
+### Required Parameters
This endpoint does not need any parameter.
### Return type
diff --git a/bindings/go/src/docs/StorageregionsApi.md b/bindings/go/src/docs/StorageregionsApi.md
index cb5da21b..82690ad3 100644
--- a/bindings/go/src/docs/StorageregionsApi.md
+++ b/bindings/go/src/docs/StorageregionsApi.md
@@ -1,22 +1,20 @@
-# \StorageregionsApi
+# \StorageRegionsApi
All URIs are relative to *https://api.cloudsmith.io/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
-[**StorageRegionsList**](StorageregionsApi.md#StorageRegionsList) | **Get** /storage-regions/ | Get a list of all available storage regions.
-[**StorageRegionsRead**](StorageregionsApi.md#StorageRegionsRead) | **Get** /storage-regions/{slug}/ | Get a specific storage region.
+[**StorageRegionsList**](StorageRegionsApi.md#StorageRegionsList) | **Get** /storage-regions/ | Get a list of all available storage regions.
+[**StorageRegionsRead**](StorageRegionsApi.md#StorageRegionsRead) | **Get** /storage-regions/{slug}/ | Get a specific storage region.
# **StorageRegionsList**
-> []StorageRegion StorageRegionsList()
-
+> []StorageRegion StorageRegionsList(ctx, )
Get a list of all available storage regions.
Get a list of all available storage regions.
-
-### Parameters
+### Required Parameters
This endpoint does not need any parameter.
### Return type
@@ -35,18 +33,17 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **StorageRegionsRead**
-> StorageRegion StorageRegionsRead($slug)
-
+> StorageRegion StorageRegionsRead(ctx, slug)
Get a specific storage region.
Get a specific storage region.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **slug** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **slug** | **string**| |
### Return type
diff --git a/bindings/go/src/docs/UserApi.md b/bindings/go/src/docs/UserApi.md
index 35a4349a..052d501e 100644
--- a/bindings/go/src/docs/UserApi.md
+++ b/bindings/go/src/docs/UserApi.md
@@ -9,14 +9,12 @@ Method | HTTP request | Description
# **UserSelf**
-> UserBrief UserSelf()
-
+> UserBrief UserSelf(ctx, )
Provide a brief for the current user (if any).
Provide a brief for the current user (if any).
-
-### Parameters
+### Required Parameters
This endpoint does not need any parameter.
### Return type
@@ -35,18 +33,24 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **UserTokenCreate**
-> UserAuthToken UserTokenCreate($data)
-
+> UserAuthToken UserTokenCreate(ctx, optional)
Retrieve the API key/token for the authenticated user.
Retrieve the API key/token for the authenticated user.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **optional** | ***UserApiUserTokenCreateOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a UserApiUserTokenCreateOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **data** | [**UserTokenCreate**](UserTokenCreate.md)| | [optional]
+ **data** | [**optional.Interface of UserTokenCreate**](UserTokenCreate.md)| |
### Return type
diff --git a/bindings/go/src/docs/UsersApi.md b/bindings/go/src/docs/UsersApi.md
index a1d78a61..cb5c2e76 100644
--- a/bindings/go/src/docs/UsersApi.md
+++ b/bindings/go/src/docs/UsersApi.md
@@ -8,18 +8,17 @@ Method | HTTP request | Description
# **UsersProfileRead**
-> UserProfile UsersProfileRead($slug)
-
+> UserProfile UsersProfileRead(ctx, slug)
Provide a brief for the specified user (if any).
Provide a brief for the specified user (if any).
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **slug** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **slug** | **string**| |
### Return type
diff --git a/bindings/go/src/docs/VagrantPackageUpload.md b/bindings/go/src/docs/VagrantPackageUpload.md
index 272dd87d..c4ba4ccd 100644
--- a/bindings/go/src/docs/VagrantPackageUpload.md
+++ b/bindings/go/src/docs/VagrantPackageUpload.md
@@ -12,8 +12,8 @@ Name | Type | Description | Notes
**DependenciesChecksumMd5** | **string** | A checksum of all of the package's dependencies. | [optional] [default to null]
**DependenciesUrl** | **string** | | [optional] [default to null]
**Description** | **string** | A textual description of this package. | [optional] [default to null]
-**Distro** | [**interface{}**](interface{}.md) | | [optional] [default to null]
-**DistroVersion** | [**interface{}**](interface{}.md) | | [optional] [default to null]
+**Distro** | **interface{}** | | [optional] [default to null]
+**DistroVersion** | **interface{}** | | [optional] [default to null]
**Downloads** | **int32** | | [optional] [default to null]
**Epoch** | **int32** | The epoch of the package version (if any). | [optional] [default to null]
**Extension** | **string** | | [optional] [default to null]
@@ -60,7 +60,7 @@ Name | Type | Description | Notes
**Summary** | **string** | A one-liner synopsis of this package. | [optional] [default to null]
**SyncFinishedAt** | **string** | The datetime the package sync was finished at. | [optional] [default to null]
**SyncProgress** | **int32** | Synchronisation progress (from 0-100) | [optional] [default to null]
-**TagsImmutable** | [**interface{}**](interface{}.md) | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
+**TagsImmutable** | **interface{}** | All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted. | [optional] [default to null]
**TypeDisplay** | **string** | | [optional] [default to null]
**UploadedAt** | **string** | The date this package was uploaded. | [optional] [default to null]
**Uploader** | **string** | | [optional] [default to null]
diff --git a/bindings/go/src/docs/VulnerabilitiesApi.md b/bindings/go/src/docs/VulnerabilitiesApi.md
index c7134528..b9911fb2 100644
--- a/bindings/go/src/docs/VulnerabilitiesApi.md
+++ b/bindings/go/src/docs/VulnerabilitiesApi.md
@@ -11,20 +11,27 @@ Method | HTTP request | Description
# **VulnerabilitiesList**
-> []VulnerabilityScanResultsList VulnerabilitiesList($owner, $page, $pageSize)
-
+> []VulnerabilityScanResultsList VulnerabilitiesList(ctx, owner, optional)
Lists scan results for a specific namespace.
Lists scan results for a specific namespace.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **optional** | ***VulnerabilitiesApiVulnerabilitiesListOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a VulnerabilitiesApiVulnerabilitiesListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
### Return type
@@ -42,21 +49,29 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **VulnerabilitiesList0**
-> []VulnerabilityScanResultsList VulnerabilitiesList0($owner, $repo, $page, $pageSize)
-
+> []VulnerabilityScanResultsList VulnerabilitiesList0(ctx, owner, repo, optional)
Lists scan results for a specific repository.
Lists scan results for a specific repository.
+### Required Parameters
-### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***VulnerabilitiesApiVulnerabilitiesList0Opts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a VulnerabilitiesApiVulnerabilitiesList0Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
+
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
### Return type
@@ -74,22 +89,31 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **VulnerabilitiesList1**
-> []VulnerabilityScanResultsList VulnerabilitiesList1($owner, $repo, $package_, $page, $pageSize)
-
+> []VulnerabilityScanResultsList VulnerabilitiesList1(ctx, owner, repo, package_, optional)
Lists scan results for a specific package.
Lists scan results for a specific package.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **package_** | **string**| |
+ **optional** | ***VulnerabilitiesApiVulnerabilitiesList1Opts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a VulnerabilitiesApiVulnerabilitiesList1Opts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **package_** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
+
+
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
### Return type
@@ -107,21 +131,20 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **VulnerabilitiesRead**
-> VulnerabilityScanResults VulnerabilitiesRead($owner, $repo, $package_, $scanId)
-
+> VulnerabilityScanResults VulnerabilitiesRead(ctx, owner, repo, package_, scanId)
Returns a Scan Result.
Returns a Scan Result.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **package_** | **string**| |
- **scanId** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **package_** | **string**| |
+ **scanId** | **string**| |
### Return type
diff --git a/bindings/go/src/docs/VulnerabilityScanResults.md b/bindings/go/src/docs/VulnerabilityScanResults.md
index e2029aa7..af98809f 100644
--- a/bindings/go/src/docs/VulnerabilityScanResults.md
+++ b/bindings/go/src/docs/VulnerabilityScanResults.md
@@ -8,8 +8,8 @@ Name | Type | Description | Notes
**Identifier** | **string** | | [default to null]
**MaxSeverity** | **string** | | [optional] [default to null]
**NumVulnerabilities** | **int32** | | [optional] [default to null]
-**Package_** | [**interface{}**](interface{}.md) | | [default to null]
-**Scan** | [**interface{}**](interface{}.md) | | [default to null]
+**Package_** | **interface{}** | | [default to null]
+**Scan** | **interface{}** | | [default to null]
**ScanId** | **int32** | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/bindings/go/src/docs/VulnerabilityScanResultsList.md b/bindings/go/src/docs/VulnerabilityScanResultsList.md
index f61a56ee..d08ce762 100644
--- a/bindings/go/src/docs/VulnerabilityScanResultsList.md
+++ b/bindings/go/src/docs/VulnerabilityScanResultsList.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**Identifier** | **string** | | [default to null]
**MaxSeverity** | **string** | | [optional] [default to null]
**NumVulnerabilities** | **int32** | | [optional] [default to null]
-**Package_** | [**interface{}**](interface{}.md) | | [default to null]
+**Package_** | **interface{}** | | [default to null]
**ScanId** | **int32** | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/bindings/go/src/docs/WebhooksApi.md b/bindings/go/src/docs/WebhooksApi.md
index bcbfda77..f60cd10e 100644
--- a/bindings/go/src/docs/WebhooksApi.md
+++ b/bindings/go/src/docs/WebhooksApi.md
@@ -12,20 +12,28 @@ Method | HTTP request | Description
# **WebhooksCreate**
-> RepositoryWebhook WebhooksCreate($owner, $repo, $data)
-
+> RepositoryWebhook WebhooksCreate(ctx, owner, repo, optional)
Create a specific webhook in a repository.
Create a specific webhook in a repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***WebhooksApiWebhooksCreateOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a WebhooksApiWebhooksCreateOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **data** | [**WebhooksCreate**](WebhooksCreate.md)| | [optional]
+
+
+ **data** | [**optional.Interface of WebhooksCreate**](WebhooksCreate.md)| |
### Return type
@@ -43,24 +51,23 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **WebhooksDelete**
-> WebhooksDelete($owner, $repo, $identifier)
-
+> WebhooksDelete(ctx, owner, repo, identifier)
Delete a specific webhook in a repository.
Delete a specific webhook in a repository.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
-void (empty response body)
+ (empty response body)
### Authorization
@@ -74,21 +81,29 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **WebhooksList**
-> []RepositoryWebhook WebhooksList($owner, $repo, $page, $pageSize)
-
+> []RepositoryWebhook WebhooksList(ctx, owner, repo, optional)
Get a list of all webhooks in a repository.
Get a list of all webhooks in a repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **optional** | ***WebhooksApiWebhooksListOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a WebhooksApiWebhooksListOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **page** | **int32**| A page number within the paginated result set. | [optional]
- **pageSize** | **int32**| Number of results to return per page. | [optional]
+
+
+ **page** | **optional.Int32**| A page number within the paginated result set. |
+ **pageSize** | **optional.Int32**| Number of results to return per page. |
### Return type
@@ -106,21 +121,30 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **WebhooksPartialUpdate**
-> RepositoryWebhook WebhooksPartialUpdate($owner, $repo, $identifier, $data)
-
+> RepositoryWebhook WebhooksPartialUpdate(ctx, owner, repo, identifier, optional)
Update a specific webhook in a repository.
Update a specific webhook in a repository.
+### Required Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
+ **optional** | ***WebhooksApiWebhooksPartialUpdateOpts** | optional parameters | nil if no parameters
-### Parameters
+### Optional Parameters
+Optional parameters are passed through a pointer to a WebhooksApiWebhooksPartialUpdateOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
- **data** | [**WebhooksPartialUpdate**](WebhooksPartialUpdate.md)| | [optional]
+
+
+
+ **data** | [**optional.Interface of WebhooksPartialUpdate**](WebhooksPartialUpdate.md)| |
### Return type
@@ -138,20 +162,19 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **WebhooksRead**
-> RepositoryWebhook WebhooksRead($owner, $repo, $identifier)
-
+> RepositoryWebhook WebhooksRead(ctx, owner, repo, identifier)
Views for working with repository webhooks.
Views for working with repository webhooks.
-
-### Parameters
+### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **owner** | **string**| |
- **repo** | **string**| |
- **identifier** | **string**| |
+ **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
+ **owner** | **string**| |
+ **repo** | **string**| |
+ **identifier** | **string**| |
### Return type
diff --git a/bindings/go/src/entitlements_api.go b/bindings/go/src/entitlements_api.go
deleted file mode 100644
index 915c2cb3..00000000
--- a/bindings/go/src/entitlements_api.go
+++ /dev/null
@@ -1,725 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type EntitlementsApi struct {
- Configuration *Configuration
-}
-
-func NewEntitlementsApi() *EntitlementsApi {
- configuration := NewConfiguration()
- return &EntitlementsApi{
- Configuration: configuration,
- }
-}
-
-func NewEntitlementsApiWithBasePath(basePath string) *EntitlementsApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &EntitlementsApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Create a specific entitlement in a repository.
- * Create a specific entitlement in a repository.
- *
- * @param owner
- * @param repo
- * @param showTokens Show entitlement token strings in results
- * @param data
- * @return *RepositoryToken
- */
-func (a EntitlementsApi) EntitlementsCreate(owner string, repo string, showTokens bool, data EntitlementsCreate) (*RepositoryToken, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("show_tokens", a.Configuration.APIClient.ParameterToString(showTokens, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(RepositoryToken)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsCreate", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Delete a specific entitlement in a repository.
- * Delete a specific entitlement in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return void
- */
-func (a EntitlementsApi) EntitlementsDelete(owner string, repo string, identifier string) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Delete")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsDelete", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Disable an entitlement token in a repository.
- * Disable an entitlement token in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return void
- */
-func (a EntitlementsApi) EntitlementsDisable(owner string, repo string, identifier string) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/{identifier}/disable/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsDisable", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Enable an entitlement token in a repository.
- * Enable an entitlement token in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return void
- */
-func (a EntitlementsApi) EntitlementsEnable(owner string, repo string, identifier string) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/{identifier}/enable/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsEnable", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Get a list of all entitlements in a repository.
- * Get a list of all entitlements in a repository.
- *
- * @param owner
- * @param repo
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @param showTokens Show entitlement token strings in results
- * @return []RepositoryToken
- */
-func (a EntitlementsApi) EntitlementsList(owner string, repo string, page int32, pageSize int32, showTokens bool) ([]RepositoryToken, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
- localVarQueryParams.Add("show_tokens", a.Configuration.APIClient.ParameterToString(showTokens, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]RepositoryToken)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Update a specific entitlement in a repository.
- * Update a specific entitlement in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param showTokens Show entitlement token strings in results
- * @param data
- * @return *RepositoryToken
- */
-func (a EntitlementsApi) EntitlementsPartialUpdate(owner string, repo string, identifier string, showTokens bool, data EntitlementsPartialUpdate) (*RepositoryToken, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Patch")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("show_tokens", a.Configuration.APIClient.ParameterToString(showTokens, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(RepositoryToken)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsPartialUpdate", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get a specific entitlement in a repository.
- * Get a specific entitlement in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param showTokens Show entitlement token strings in results
- * @return *RepositoryToken
- */
-func (a EntitlementsApi) EntitlementsRead(owner string, repo string, identifier string, showTokens bool) (*RepositoryToken, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("show_tokens", a.Configuration.APIClient.ParameterToString(showTokens, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(RepositoryToken)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Refresh an entitlement token in a repository.
- * Refresh an entitlement token in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param showTokens Show entitlement token strings in results
- * @param data
- * @return *RepositoryTokenRefresh
- */
-func (a EntitlementsApi) EntitlementsRefresh(owner string, repo string, identifier string, showTokens bool, data EntitlementsRefresh) (*RepositoryTokenRefresh, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/{identifier}/refresh/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("show_tokens", a.Configuration.APIClient.ParameterToString(showTokens, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(RepositoryTokenRefresh)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsRefresh", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Reset the statistics for an entitlement token in a repository.
- * Reset the statistics for an entitlement token in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param showTokens Show entitlement token strings in results
- * @return void
- */
-func (a EntitlementsApi) EntitlementsReset(owner string, repo string, identifier string, showTokens bool) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/{identifier}/reset/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("show_tokens", a.Configuration.APIClient.ParameterToString(showTokens, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsReset", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Synchronise tokens from a source repository.
- * Synchronise tokens from a source repository.
- *
- * @param owner
- * @param repo
- * @param showTokens Show entitlement token strings in results
- * @param data
- * @return *RepositoryTokenSync
- */
-func (a EntitlementsApi) EntitlementsSync(owner string, repo string, showTokens bool, data EntitlementsSync) (*RepositoryTokenSync, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/entitlements/{owner}/{repo}/sync/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("show_tokens", a.Configuration.APIClient.ParameterToString(showTokens, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(RepositoryTokenSync)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "EntitlementsSync", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/files_api.go b/bindings/go/src/files_api.go
deleted file mode 100644
index 3442f19e..00000000
--- a/bindings/go/src/files_api.go
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type FilesApi struct {
- Configuration *Configuration
-}
-
-func NewFilesApi() *FilesApi {
- configuration := NewConfiguration()
- return &FilesApi{
- Configuration: configuration,
- }
-}
-
-func NewFilesApiWithBasePath(basePath string) *FilesApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &FilesApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Abort a multipart file upload.
- * Abort a multipart file upload.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param data
- * @return void
- */
-func (a FilesApi) FilesAbort(owner string, repo string, identifier string, data FilesAbort) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/files/{owner}/{repo}/{identifier}/abort/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "FilesAbort", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Complete a multipart file upload.
- * Complete a multipart file upload.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param data
- * @return *PackageFileUpload
- */
-func (a FilesApi) FilesComplete(owner string, repo string, identifier string, data FilesComplete) (*PackageFileUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/files/{owner}/{repo}/{identifier}/complete/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(PackageFileUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "FilesComplete", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Request URL(s) to upload new package file upload(s) to.
- * Request URL(s) to upload new package file upload(s) to.
- *
- * @param owner
- * @param repo
- * @param data
- * @return *PackageFileUpload
- */
-func (a FilesApi) FilesCreate(owner string, repo string, data FilesCreate) (*PackageFileUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/files/{owner}/{repo}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(PackageFileUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "FilesCreate", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get upload information for a multipart file upload.
- * Get upload information for a multipart file upload.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return *PackageFilePartsUpload
- */
-func (a FilesApi) FilesInfo(owner string, repo string, identifier string) (*PackageFilePartsUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/files/{owner}/{repo}/{identifier}/info/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(PackageFilePartsUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "FilesInfo", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Validate parameters used for create.
- * Validate parameters used for create.
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a FilesApi) FilesValidate(owner string, repo string, data FilesValidate) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/files/{owner}/{repo}/validate/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "FilesValidate", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/formats_api.go b/bindings/go/src/formats_api.go
deleted file mode 100644
index ee13228a..00000000
--- a/bindings/go/src/formats_api.go
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type FormatsApi struct {
- Configuration *Configuration
-}
-
-func NewFormatsApi() *FormatsApi {
- configuration := NewConfiguration()
- return &FormatsApi{
- Configuration: configuration,
- }
-}
-
-func NewFormatsApiWithBasePath(basePath string) *FormatsApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &FormatsApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get a list of all supported package formats.
- * Get a list of all supported package formats.
- *
- * @return []Format
- */
-func (a FormatsApi) FormatsList() ([]Format, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/formats/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]Format)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "FormatsList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get a specific supported package format.
- * Get a specific supported package format.
- *
- * @param slug
- * @return *Format
- */
-func (a FormatsApi) FormatsRead(slug string) (*Format, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/formats/{slug}/"
- localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(Format)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "FormatsRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/git_push.sh b/bindings/go/src/git_push.sh
index bb3f01ed..4fda2ff0 100644
--- a/bindings/go/src/git_push.sh
+++ b/bindings/go/src/git_push.sh
@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
diff --git a/bindings/go/src/metrics_api.go b/bindings/go/src/metrics_api.go
deleted file mode 100644
index 539d8fb6..00000000
--- a/bindings/go/src/metrics_api.go
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type MetricsApi struct {
- Configuration *Configuration
-}
-
-func NewMetricsApi() *MetricsApi {
- configuration := NewConfiguration()
- return &MetricsApi{
- Configuration: configuration,
- }
-}
-
-func NewMetricsApiWithBasePath(basePath string) *MetricsApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &MetricsApi{
- Configuration: configuration,
- }
-}
-
-/**
- * View for listing entitlement token metrics, across an account.
- * View for listing entitlement token metrics, across an account.
- *
- * @param owner
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @param finish Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
- * @param start Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
- * @param tokens A comma seperated list of tokens (slug perm) to include in the results.
- * @return *EntitlementUsageMetrics
- */
-func (a MetricsApi) MetricsEntitlementsList(owner string, page int32, pageSize int32, finish string, start string, tokens string) (*EntitlementUsageMetrics, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/metrics/entitlements/{owner}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
- localVarQueryParams.Add("finish", a.Configuration.APIClient.ParameterToString(finish, ""))
- localVarQueryParams.Add("start", a.Configuration.APIClient.ParameterToString(start, ""))
- localVarQueryParams.Add("tokens", a.Configuration.APIClient.ParameterToString(tokens, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(EntitlementUsageMetrics)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "MetricsEntitlementsList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * View for listing entitlement token metrics, for a repository.
- * View for listing entitlement token metrics, for a repository.
- *
- * @param owner
- * @param repo
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @param finish Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
- * @param start Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
- * @param tokens A comma seperated list of tokens (slug perm) to include in the results.
- * @return *EntitlementUsageMetrics
- */
-func (a MetricsApi) MetricsEntitlementsList0(owner string, repo string, page int32, pageSize int32, finish string, start string, tokens string) (*EntitlementUsageMetrics, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/metrics/entitlements/{owner}/{repo}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
- localVarQueryParams.Add("finish", a.Configuration.APIClient.ParameterToString(finish, ""))
- localVarQueryParams.Add("start", a.Configuration.APIClient.ParameterToString(start, ""))
- localVarQueryParams.Add("tokens", a.Configuration.APIClient.ParameterToString(tokens, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(EntitlementUsageMetrics)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "MetricsEntitlementsList0", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * View for listing package usage metrics, for a repository.
- * View for listing package usage metrics, for a repository.
- *
- * @param owner
- * @param repo
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @param finish Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
- * @param packages A comma seperated list of packages (slug perm) to include in the results.
- * @param start Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'.
- * @return *PackageUsageMetrics
- */
-func (a MetricsApi) MetricsPackagesList(owner string, repo string, page int32, pageSize int32, finish string, packages string, start string) (*PackageUsageMetrics, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/metrics/packages/{owner}/{repo}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
- localVarQueryParams.Add("finish", a.Configuration.APIClient.ParameterToString(finish, ""))
- localVarQueryParams.Add("packages", a.Configuration.APIClient.ParameterToString(packages, ""))
- localVarQueryParams.Add("start", a.Configuration.APIClient.ParameterToString(start, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(PackageUsageMetrics)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "MetricsPackagesList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/alpine_package_upload.go b/bindings/go/src/model_alpine_package_upload.go
similarity index 96%
rename from bindings/go/src/alpine_package_upload.go
rename to bindings/go/src/model_alpine_package_upload.go
index f3d34bdc..ca49e011 100644
--- a/bindings/go/src/alpine_package_upload.go
+++ b/bindings/go/src/model_alpine_package_upload.go
@@ -1,206 +1,142 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type AlpinePackageUpload struct {
-
//
Architectures []PackagesownerrepoArchitectures `json:"architectures,omitempty"`
-
//
CdnUrl string `json:"cdn_url,omitempty"`
-
//
ChecksumMd5 string `json:"checksum_md5,omitempty"`
-
//
ChecksumSha1 string `json:"checksum_sha1,omitempty"`
-
//
ChecksumSha256 string `json:"checksum_sha256,omitempty"`
-
//
ChecksumSha512 string `json:"checksum_sha512,omitempty"`
-
// A checksum of all of the package's dependencies.
DependenciesChecksumMd5 string `json:"dependencies_checksum_md5,omitempty"`
-
//
DependenciesUrl string `json:"dependencies_url,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
//
Distro interface{} `json:"distro,omitempty"`
-
//
DistroVersion interface{} `json:"distro_version,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
// The epoch of the package version (if any).
Epoch int32 `json:"epoch,omitempty"`
-
//
Extension string `json:"extension,omitempty"`
-
//
Filename string `json:"filename,omitempty"`
-
//
Files []PackagesownerrepoFiles `json:"files,omitempty"`
-
//
Format string `json:"format,omitempty"`
-
//
FormatUrl string `json:"format_url,omitempty"`
-
// Unique and permanent identifier for the package.
IdentifierPerm string `json:"identifier_perm,omitempty"`
-
//
Indexed bool `json:"indexed,omitempty"`
-
//
IsSyncAwaiting bool `json:"is_sync_awaiting,omitempty"`
-
//
IsSyncCompleted bool `json:"is_sync_completed,omitempty"`
-
//
IsSyncFailed bool `json:"is_sync_failed,omitempty"`
-
//
IsSyncInFlight bool `json:"is_sync_in_flight,omitempty"`
-
//
IsSyncInProgress bool `json:"is_sync_in_progress,omitempty"`
-
// The license of this package.
License string `json:"license,omitempty"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
//
Namespace string `json:"namespace,omitempty"`
-
//
NamespaceUrl string `json:"namespace_url,omitempty"`
-
//
NumFiles int32 `json:"num_files,omitempty"`
-
// The type of package contents.
PackageType string `json:"package_type,omitempty"`
-
// The release of the package version (if any).
Release string `json:"release,omitempty"`
-
//
Repository string `json:"repository,omitempty"`
-
//
RepositoryUrl string `json:"repository_url,omitempty"`
-
// The datetime the security scanning was completed.
SecurityScanCompletedAt string `json:"security_scan_completed_at,omitempty"`
-
// The datetime the security scanning was started.
SecurityScanStartedAt string `json:"security_scan_started_at,omitempty"`
-
//
SecurityScanStatus string `json:"security_scan_status,omitempty"`
-
// The datetime the security scanning status was updated.
SecurityScanStatusUpdatedAt string `json:"security_scan_status_updated_at,omitempty"`
-
//
SelfHtmlUrl string `json:"self_html_url,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SignatureUrl string `json:"signature_url,omitempty"`
-
// The calculated size of the package.
Size int32 `json:"size,omitempty"`
-
// The public unique identifier for the package.
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// The synchronisation (in progress) stage of the package.
Stage string `json:"stage,omitempty"`
-
//
StageStr string `json:"stage_str,omitempty"`
-
// The datetime the package stage was updated at.
StageUpdatedAt string `json:"stage_updated_at,omitempty"`
-
// The synchronisation status of the package.
Status string `json:"status,omitempty"`
-
// A textual description for the synchronous status reason (if any
StatusReason string `json:"status_reason,omitempty"`
-
//
StatusStr string `json:"status_str,omitempty"`
-
// The datetime the package status was updated at.
StatusUpdatedAt string `json:"status_updated_at,omitempty"`
-
//
StatusUrl string `json:"status_url,omitempty"`
-
//
Subtype string `json:"subtype,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// The datetime the package sync was finished at.
SyncFinishedAt string `json:"sync_finished_at,omitempty"`
-
// Synchronisation progress (from 0-100)
SyncProgress int32 `json:"sync_progress,omitempty"`
-
// All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted.
TagsImmutable interface{} `json:"tags_immutable,omitempty"`
-
//
TypeDisplay string `json:"type_display,omitempty"`
-
// The date this package was uploaded.
UploadedAt string `json:"uploaded_at,omitempty"`
-
//
Uploader string `json:"uploader,omitempty"`
-
//
UploaderUrl string `json:"uploader_url,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
-
//
VersionOrig string `json:"version_orig,omitempty"`
-
//
VulnerabilityScanResultsUrl string `json:"vulnerability_scan_results_url,omitempty"`
}
diff --git a/bindings/go/src/conan_package_upload.go b/bindings/go/src/model_conan_package_upload.go
similarity index 96%
rename from bindings/go/src/conan_package_upload.go
rename to bindings/go/src/model_conan_package_upload.go
index 0b6a2e08..d1828592 100644
--- a/bindings/go/src/conan_package_upload.go
+++ b/bindings/go/src/model_conan_package_upload.go
@@ -1,212 +1,146 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type ConanPackageUpload struct {
-
//
Architectures []PackagesownerrepoArchitectures `json:"architectures,omitempty"`
-
//
CdnUrl string `json:"cdn_url,omitempty"`
-
//
ChecksumMd5 string `json:"checksum_md5,omitempty"`
-
//
ChecksumSha1 string `json:"checksum_sha1,omitempty"`
-
//
ChecksumSha256 string `json:"checksum_sha256,omitempty"`
-
//
ChecksumSha512 string `json:"checksum_sha512,omitempty"`
-
// Conan channel.
ConanChannel string `json:"conan_channel,omitempty"`
-
// Conan prefix (User).
ConanPrefix string `json:"conan_prefix,omitempty"`
-
// A checksum of all of the package's dependencies.
DependenciesChecksumMd5 string `json:"dependencies_checksum_md5,omitempty"`
-
//
DependenciesUrl string `json:"dependencies_url,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
//
Distro interface{} `json:"distro,omitempty"`
-
//
DistroVersion interface{} `json:"distro_version,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
// The epoch of the package version (if any).
Epoch int32 `json:"epoch,omitempty"`
-
//
Extension string `json:"extension,omitempty"`
-
//
Filename string `json:"filename,omitempty"`
-
//
Files []PackagesownerrepoFiles `json:"files,omitempty"`
-
//
Format string `json:"format,omitempty"`
-
//
FormatUrl string `json:"format_url,omitempty"`
-
// Unique and permanent identifier for the package.
IdentifierPerm string `json:"identifier_perm,omitempty"`
-
//
Indexed bool `json:"indexed,omitempty"`
-
//
IsSyncAwaiting bool `json:"is_sync_awaiting,omitempty"`
-
//
IsSyncCompleted bool `json:"is_sync_completed,omitempty"`
-
//
IsSyncFailed bool `json:"is_sync_failed,omitempty"`
-
//
IsSyncInFlight bool `json:"is_sync_in_flight,omitempty"`
-
//
IsSyncInProgress bool `json:"is_sync_in_progress,omitempty"`
-
// The license of this package.
License string `json:"license,omitempty"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
//
Namespace string `json:"namespace,omitempty"`
-
//
NamespaceUrl string `json:"namespace_url,omitempty"`
-
//
NumFiles int32 `json:"num_files,omitempty"`
-
// The type of package contents.
PackageType string `json:"package_type,omitempty"`
-
// The release of the package version (if any).
Release string `json:"release,omitempty"`
-
//
Repository string `json:"repository,omitempty"`
-
//
RepositoryUrl string `json:"repository_url,omitempty"`
-
// The datetime the security scanning was completed.
SecurityScanCompletedAt string `json:"security_scan_completed_at,omitempty"`
-
// The datetime the security scanning was started.
SecurityScanStartedAt string `json:"security_scan_started_at,omitempty"`
-
//
SecurityScanStatus string `json:"security_scan_status,omitempty"`
-
// The datetime the security scanning status was updated.
SecurityScanStatusUpdatedAt string `json:"security_scan_status_updated_at,omitempty"`
-
//
SelfHtmlUrl string `json:"self_html_url,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SignatureUrl string `json:"signature_url,omitempty"`
-
// The calculated size of the package.
Size int32 `json:"size,omitempty"`
-
// The public unique identifier for the package.
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// The synchronisation (in progress) stage of the package.
Stage string `json:"stage,omitempty"`
-
//
StageStr string `json:"stage_str,omitempty"`
-
// The datetime the package stage was updated at.
StageUpdatedAt string `json:"stage_updated_at,omitempty"`
-
// The synchronisation status of the package.
Status string `json:"status,omitempty"`
-
// A textual description for the synchronous status reason (if any
StatusReason string `json:"status_reason,omitempty"`
-
//
StatusStr string `json:"status_str,omitempty"`
-
// The datetime the package status was updated at.
StatusUpdatedAt string `json:"status_updated_at,omitempty"`
-
//
StatusUrl string `json:"status_url,omitempty"`
-
//
Subtype string `json:"subtype,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// The datetime the package sync was finished at.
SyncFinishedAt string `json:"sync_finished_at,omitempty"`
-
// Synchronisation progress (from 0-100)
SyncProgress int32 `json:"sync_progress,omitempty"`
-
// All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted.
TagsImmutable interface{} `json:"tags_immutable,omitempty"`
-
//
TypeDisplay string `json:"type_display,omitempty"`
-
// The date this package was uploaded.
UploadedAt string `json:"uploaded_at,omitempty"`
-
//
Uploader string `json:"uploader,omitempty"`
-
//
UploaderUrl string `json:"uploader_url,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
-
//
VersionOrig string `json:"version_orig,omitempty"`
-
//
VulnerabilityScanResultsUrl string `json:"vulnerability_scan_results_url,omitempty"`
}
diff --git a/bindings/go/src/distribution.go b/bindings/go/src/model_distribution.go
similarity index 84%
rename from bindings/go/src/distribution.go
rename to bindings/go/src/model_distribution.go
index 26bf10c0..515509c8 100644
--- a/bindings/go/src/distribution.go
+++ b/bindings/go/src/model_distribution.go
@@ -1,35 +1,28 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type Distribution struct {
-
//
Format string `json:"format,omitempty"`
-
//
FormatUrl string `json:"format_url,omitempty"`
-
//
Name string `json:"name"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
// The slug identifier for this distribution
Slug string `json:"slug,omitempty"`
-
//
Variants string `json:"variants,omitempty"`
-
// A list of the versions for this distribution
Versions []DistrosVersions `json:"versions,omitempty"`
}
diff --git a/bindings/go/src/distros_versions.go b/bindings/go/src/model_distros_versions.go
similarity index 74%
rename from bindings/go/src/distros_versions.go
rename to bindings/go/src/model_distros_versions.go
index 0dc3184b..2deabf91 100644
--- a/bindings/go/src/distros_versions.go
+++ b/bindings/go/src/model_distros_versions.go
@@ -1,20 +1,18 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type DistrosVersions struct {
-
// The textual name for this version.
Name string `json:"name,omitempty"`
-
// The slug identifier for this version
Slug string `json:"slug,omitempty"`
}
diff --git a/bindings/go/src/entitlement_usage_metrics.go b/bindings/go/src/model_entitlement_usage_metrics.go
similarity index 65%
rename from bindings/go/src/entitlement_usage_metrics.go
rename to bindings/go/src/model_entitlement_usage_metrics.go
index f70e2b5c..113358aa 100644
--- a/bindings/go/src/entitlement_usage_metrics.go
+++ b/bindings/go/src/model_entitlement_usage_metrics.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type EntitlementUsageMetrics struct {
-
//
Tokens interface{} `json:"tokens"`
}
diff --git a/bindings/go/src/entitlements_create.go b/bindings/go/src/model_entitlements_create.go
similarity index 96%
rename from bindings/go/src/entitlements_create.go
rename to bindings/go/src/model_entitlements_create.go
index 13d447a3..803fd26b 100644
--- a/bindings/go/src/entitlements_create.go
+++ b/bindings/go/src/model_entitlements_create.go
@@ -1,59 +1,44 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type EntitlementsCreate struct {
-
// If checked, a EULA acceptance is required for this token.
EulaRequired bool `json:"eula_required,omitempty"`
-
// If enabled, the token will allow downloads based on configured restrictions (if any).
IsActive bool `json:"is_active,omitempty"`
-
// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitBandwidth int32 `json:"limit_bandwidth,omitempty"`
-
// None
LimitBandwidthUnit string `json:"limit_bandwidth_unit,omitempty"`
-
// The starting date/time the token is allowed to be used from.
LimitDateRangeFrom string `json:"limit_date_range_from,omitempty"`
-
// The ending date/time the token is allowed to be used until.
LimitDateRangeTo string `json:"limit_date_range_to,omitempty"`
-
// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumClients int32 `json:"limit_num_clients,omitempty"`
-
// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumDownloads int32 `json:"limit_num_downloads,omitempty"`
-
// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata.
LimitPackageQuery string `json:"limit_package_query,omitempty"`
-
// The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash.
LimitPathQuery string `json:"limit_path_query,omitempty"`
-
// None
Metadata interface{} `json:"metadata,omitempty"`
-
// None
Name string `json:"name"`
-
// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero.
ScheduledResetAt string `json:"scheduled_reset_at,omitempty"`
-
// None
ScheduledResetPeriod string `json:"scheduled_reset_period,omitempty"`
-
// None
Token string `json:"token,omitempty"`
}
diff --git a/bindings/go/src/entitlements_partial_update.go b/bindings/go/src/model_entitlements_partial_update.go
similarity index 96%
rename from bindings/go/src/entitlements_partial_update.go
rename to bindings/go/src/model_entitlements_partial_update.go
index 4a4b4c86..f9a2d4b2 100644
--- a/bindings/go/src/entitlements_partial_update.go
+++ b/bindings/go/src/model_entitlements_partial_update.go
@@ -1,59 +1,44 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type EntitlementsPartialUpdate struct {
-
// If checked, a EULA acceptance is required for this token.
EulaRequired bool `json:"eula_required,omitempty"`
-
// If enabled, the token will allow downloads based on configured restrictions (if any).
IsActive bool `json:"is_active,omitempty"`
-
// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitBandwidth int32 `json:"limit_bandwidth,omitempty"`
-
// None
LimitBandwidthUnit string `json:"limit_bandwidth_unit,omitempty"`
-
// The starting date/time the token is allowed to be used from.
LimitDateRangeFrom string `json:"limit_date_range_from,omitempty"`
-
// The ending date/time the token is allowed to be used until.
LimitDateRangeTo string `json:"limit_date_range_to,omitempty"`
-
// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumClients int32 `json:"limit_num_clients,omitempty"`
-
// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumDownloads int32 `json:"limit_num_downloads,omitempty"`
-
// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata.
LimitPackageQuery string `json:"limit_package_query,omitempty"`
-
// The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash.
LimitPathQuery string `json:"limit_path_query,omitempty"`
-
// None
Metadata interface{} `json:"metadata,omitempty"`
-
// None
Name string `json:"name,omitempty"`
-
// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero.
ScheduledResetAt string `json:"scheduled_reset_at,omitempty"`
-
// None
ScheduledResetPeriod string `json:"scheduled_reset_period,omitempty"`
-
// None
Token string `json:"token,omitempty"`
}
diff --git a/bindings/go/src/entitlements_refresh.go b/bindings/go/src/model_entitlements_refresh.go
similarity index 96%
rename from bindings/go/src/entitlements_refresh.go
rename to bindings/go/src/model_entitlements_refresh.go
index dec84291..ce785854 100644
--- a/bindings/go/src/entitlements_refresh.go
+++ b/bindings/go/src/model_entitlements_refresh.go
@@ -1,56 +1,42 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type EntitlementsRefresh struct {
-
// If checked, a EULA acceptance is required for this token.
EulaRequired bool `json:"eula_required,omitempty"`
-
// If enabled, the token will allow downloads based on configured restrictions (if any).
IsActive bool `json:"is_active,omitempty"`
-
// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitBandwidth int32 `json:"limit_bandwidth,omitempty"`
-
// None
LimitBandwidthUnit string `json:"limit_bandwidth_unit,omitempty"`
-
// The starting date/time the token is allowed to be used from.
LimitDateRangeFrom string `json:"limit_date_range_from,omitempty"`
-
// The ending date/time the token is allowed to be used until.
LimitDateRangeTo string `json:"limit_date_range_to,omitempty"`
-
// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumClients int32 `json:"limit_num_clients,omitempty"`
-
// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumDownloads int32 `json:"limit_num_downloads,omitempty"`
-
// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata.
LimitPackageQuery string `json:"limit_package_query,omitempty"`
-
// The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash.
LimitPathQuery string `json:"limit_path_query,omitempty"`
-
// None
Metadata interface{} `json:"metadata,omitempty"`
-
// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero.
ScheduledResetAt string `json:"scheduled_reset_at,omitempty"`
-
// None
ScheduledResetPeriod string `json:"scheduled_reset_period,omitempty"`
-
// None
Token string `json:"token,omitempty"`
}
diff --git a/bindings/go/src/entitlements_sync.go b/bindings/go/src/model_entitlements_sync.go
similarity index 69%
rename from bindings/go/src/entitlements_sync.go
rename to bindings/go/src/model_entitlements_sync.go
index 6c79904f..ec9f4af7 100644
--- a/bindings/go/src/entitlements_sync.go
+++ b/bindings/go/src/model_entitlements_sync.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type EntitlementsSync struct {
-
// The source repository slug (in the same owner namespace).
Source string `json:"source"`
}
diff --git a/bindings/go/src/files_abort.go b/bindings/go/src/model_files_abort.go
similarity index 83%
rename from bindings/go/src/files_abort.go
rename to bindings/go/src/model_files_abort.go
index 81be90de..725b0298 100644
--- a/bindings/go/src/files_abort.go
+++ b/bindings/go/src/model_files_abort.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type FilesAbort struct {
-
// Filename for the package file upload.
Filename string `json:"filename"`
-
// MD5 checksum for a POST-based package file upload.
Md5Checksum string `json:"md5_checksum,omitempty"`
-
// The method to use for package file upload.
Method string `json:"method,omitempty"`
-
// SHA256 checksum for a PUT-based package file upload.
Sha256Checksum string `json:"sha256_checksum,omitempty"`
}
diff --git a/bindings/go/src/files_complete.go b/bindings/go/src/model_files_complete.go
similarity index 83%
rename from bindings/go/src/files_complete.go
rename to bindings/go/src/model_files_complete.go
index 332f254b..538e36d6 100644
--- a/bindings/go/src/files_complete.go
+++ b/bindings/go/src/model_files_complete.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type FilesComplete struct {
-
// Filename for the package file upload.
Filename string `json:"filename"`
-
// MD5 checksum for a POST-based package file upload.
Md5Checksum string `json:"md5_checksum,omitempty"`
-
// The method to use for package file upload.
Method string `json:"method,omitempty"`
-
// SHA256 checksum for a PUT-based package file upload.
Sha256Checksum string `json:"sha256_checksum,omitempty"`
}
diff --git a/bindings/go/src/files_create.go b/bindings/go/src/model_files_create.go
similarity index 83%
rename from bindings/go/src/files_create.go
rename to bindings/go/src/model_files_create.go
index 2bcf6d46..5079b9d1 100644
--- a/bindings/go/src/files_create.go
+++ b/bindings/go/src/model_files_create.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type FilesCreate struct {
-
// Filename for the package file upload.
Filename string `json:"filename"`
-
// MD5 checksum for a POST-based package file upload.
Md5Checksum string `json:"md5_checksum,omitempty"`
-
// The method to use for package file upload.
Method string `json:"method,omitempty"`
-
// SHA256 checksum for a PUT-based package file upload.
Sha256Checksum string `json:"sha256_checksum,omitempty"`
}
diff --git a/bindings/go/src/files_validate.go b/bindings/go/src/model_files_validate.go
similarity index 83%
rename from bindings/go/src/files_validate.go
rename to bindings/go/src/model_files_validate.go
index 6caecc25..7e2ecce4 100644
--- a/bindings/go/src/files_validate.go
+++ b/bindings/go/src/model_files_validate.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type FilesValidate struct {
-
// Filename for the package file upload.
Filename string `json:"filename"`
-
// MD5 checksum for a POST-based package file upload.
Md5Checksum string `json:"md5_checksum,omitempty"`
-
// The method to use for package file upload.
Method string `json:"method,omitempty"`
-
// SHA256 checksum for a PUT-based package file upload.
Sha256Checksum string `json:"sha256_checksum,omitempty"`
}
diff --git a/bindings/go/src/format.go b/bindings/go/src/model_format.go
similarity index 89%
rename from bindings/go/src/format.go
rename to bindings/go/src/model_format.go
index 3c72d0e9..888345f1 100644
--- a/bindings/go/src/format.go
+++ b/bindings/go/src/model_format.go
@@ -1,41 +1,32 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type Format struct {
-
// Description of the package format
Description string `json:"description"`
-
// The distributions supported by this package format
Distributions []FormatsDistributions `json:"distributions,omitempty"`
-
// A non-exhaustive list of extensions supported
Extensions []string `json:"extensions"`
-
// Name for the package format
Name string `json:"name"`
-
// If true the package format is a premium-only feature
Premium bool `json:"premium"`
-
// The minimum plan id required for this package format
PremiumPlanId string `json:"premium_plan_id,omitempty"`
-
// The minimum plan name required for this package format
PremiumPlanName string `json:"premium_plan_name,omitempty"`
-
// Slug for the package format
Slug string `json:"slug"`
-
// A set of what the package format supports
Supports interface{} `json:"supports"`
}
diff --git a/bindings/go/src/formats_distributions.go b/bindings/go/src/model_formats_distributions.go
similarity index 78%
rename from bindings/go/src/formats_distributions.go
rename to bindings/go/src/model_formats_distributions.go
index 45f18909..f0ccedad 100644
--- a/bindings/go/src/formats_distributions.go
+++ b/bindings/go/src/model_formats_distributions.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type FormatsDistributions struct {
-
//
Name string `json:"name,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
// The slug identifier for this distribution
Slug string `json:"slug,omitempty"`
-
//
Variants string `json:"variants,omitempty"`
}
diff --git a/bindings/go/src/maven_package_upload.go b/bindings/go/src/model_maven_package_upload.go
similarity index 96%
rename from bindings/go/src/maven_package_upload.go
rename to bindings/go/src/model_maven_package_upload.go
index 73cd9932..cc494182 100644
--- a/bindings/go/src/maven_package_upload.go
+++ b/bindings/go/src/model_maven_package_upload.go
@@ -1,215 +1,148 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type MavenPackageUpload struct {
-
//
Architectures []PackagesownerrepoArchitectures `json:"architectures,omitempty"`
-
// The ID of the artifact.
ArtifactId string `json:"artifact_id,omitempty"`
-
//
CdnUrl string `json:"cdn_url,omitempty"`
-
//
ChecksumMd5 string `json:"checksum_md5,omitempty"`
-
//
ChecksumSha1 string `json:"checksum_sha1,omitempty"`
-
//
ChecksumSha256 string `json:"checksum_sha256,omitempty"`
-
//
ChecksumSha512 string `json:"checksum_sha512,omitempty"`
-
// A checksum of all of the package's dependencies.
DependenciesChecksumMd5 string `json:"dependencies_checksum_md5,omitempty"`
-
//
DependenciesUrl string `json:"dependencies_url,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
//
Distro interface{} `json:"distro,omitempty"`
-
//
DistroVersion interface{} `json:"distro_version,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
// The epoch of the package version (if any).
Epoch int32 `json:"epoch,omitempty"`
-
//
Extension string `json:"extension,omitempty"`
-
//
Filename string `json:"filename,omitempty"`
-
//
Files []PackagesownerrepoFiles `json:"files,omitempty"`
-
//
Format string `json:"format,omitempty"`
-
//
FormatUrl string `json:"format_url,omitempty"`
-
// Artifact's group ID.
GroupId string `json:"group_id,omitempty"`
-
// Unique and permanent identifier for the package.
IdentifierPerm string `json:"identifier_perm,omitempty"`
-
//
Indexed bool `json:"indexed,omitempty"`
-
//
IsSyncAwaiting bool `json:"is_sync_awaiting,omitempty"`
-
//
IsSyncCompleted bool `json:"is_sync_completed,omitempty"`
-
//
IsSyncFailed bool `json:"is_sync_failed,omitempty"`
-
//
IsSyncInFlight bool `json:"is_sync_in_flight,omitempty"`
-
//
IsSyncInProgress bool `json:"is_sync_in_progress,omitempty"`
-
// The license of this package.
License string `json:"license,omitempty"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
//
Namespace string `json:"namespace,omitempty"`
-
//
NamespaceUrl string `json:"namespace_url,omitempty"`
-
//
NumFiles int32 `json:"num_files,omitempty"`
-
// The type of package contents.
PackageType string `json:"package_type,omitempty"`
-
// Artifact's Maven packaging type.
Packaging string `json:"packaging,omitempty"`
-
// The release of the package version (if any).
Release string `json:"release,omitempty"`
-
//
Repository string `json:"repository,omitempty"`
-
//
RepositoryUrl string `json:"repository_url,omitempty"`
-
// The datetime the security scanning was completed.
SecurityScanCompletedAt string `json:"security_scan_completed_at,omitempty"`
-
// The datetime the security scanning was started.
SecurityScanStartedAt string `json:"security_scan_started_at,omitempty"`
-
//
SecurityScanStatus string `json:"security_scan_status,omitempty"`
-
// The datetime the security scanning status was updated.
SecurityScanStatusUpdatedAt string `json:"security_scan_status_updated_at,omitempty"`
-
//
SelfHtmlUrl string `json:"self_html_url,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SignatureUrl string `json:"signature_url,omitempty"`
-
// The calculated size of the package.
Size int32 `json:"size,omitempty"`
-
// The public unique identifier for the package.
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// The synchronisation (in progress) stage of the package.
Stage string `json:"stage,omitempty"`
-
//
StageStr string `json:"stage_str,omitempty"`
-
// The datetime the package stage was updated at.
StageUpdatedAt string `json:"stage_updated_at,omitempty"`
-
// The synchronisation status of the package.
Status string `json:"status,omitempty"`
-
// A textual description for the synchronous status reason (if any
StatusReason string `json:"status_reason,omitempty"`
-
//
StatusStr string `json:"status_str,omitempty"`
-
// The datetime the package status was updated at.
StatusUpdatedAt string `json:"status_updated_at,omitempty"`
-
//
StatusUrl string `json:"status_url,omitempty"`
-
//
Subtype string `json:"subtype,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// The datetime the package sync was finished at.
SyncFinishedAt string `json:"sync_finished_at,omitempty"`
-
// Synchronisation progress (from 0-100)
SyncProgress int32 `json:"sync_progress,omitempty"`
-
// All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted.
TagsImmutable interface{} `json:"tags_immutable,omitempty"`
-
//
TypeDisplay string `json:"type_display,omitempty"`
-
// The date this package was uploaded.
UploadedAt string `json:"uploaded_at,omitempty"`
-
//
Uploader string `json:"uploader,omitempty"`
-
//
UploaderUrl string `json:"uploader_url,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
-
//
VersionOrig string `json:"version_orig,omitempty"`
-
//
VulnerabilityScanResultsUrl string `json:"vulnerability_scan_results_url,omitempty"`
}
diff --git a/bindings/go/src/namespace.go b/bindings/go/src/model_namespace.go
similarity index 75%
rename from bindings/go/src/namespace.go
rename to bindings/go/src/model_namespace.go
index 089e72cf..202a484d 100644
--- a/bindings/go/src/namespace.go
+++ b/bindings/go/src/model_namespace.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type Namespace struct {
-
//
Name string `json:"name,omitempty"`
-
//
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
//
TypeName string `json:"type_name,omitempty"`
}
diff --git a/bindings/go/src/organization.go b/bindings/go/src/model_organization.go
similarity index 85%
rename from bindings/go/src/organization.go
rename to bindings/go/src/model_organization.go
index 92e8a0c3..65151360 100644
--- a/bindings/go/src/organization.go
+++ b/bindings/go/src/model_organization.go
@@ -1,35 +1,28 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type Organization struct {
-
//
Country string `json:"country,omitempty"`
-
//
CreatedAt string `json:"created_at,omitempty"`
-
// The city/town/area your organization is based in.
Location string `json:"location,omitempty"`
-
// A descriptive name for your organization.
Name string `json:"name,omitempty"`
-
//
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// A short public descriptive for your organization.
Tagline string `json:"tagline,omitempty"`
}
diff --git a/bindings/go/src/organization_membership.go b/bindings/go/src/model_organization_membership.go
similarity index 85%
rename from bindings/go/src/organization_membership.go
rename to bindings/go/src/model_organization_membership.go
index a0c77c8c..472436b9 100644
--- a/bindings/go/src/organization_membership.go
+++ b/bindings/go/src/model_organization_membership.go
@@ -1,44 +1,34 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type OrganizationMembership struct {
-
//
Email string `json:"email,omitempty"`
-
//
HasTwoFactor bool `json:"has_two_factor,omitempty"`
-
//
JoinedAt string `json:"joined_at,omitempty"`
-
//
LastLoginAt string `json:"last_login_at,omitempty"`
-
//
Role string `json:"role,omitempty"`
-
//
User string `json:"user,omitempty"`
-
//
UserId string `json:"user_id,omitempty"`
-
//
UserName string `json:"user_name,omitempty"`
-
//
UserUrl string `json:"user_url,omitempty"`
-
//
Visibility string `json:"visibility,omitempty"`
}
diff --git a/bindings/go/src/model_package.go b/bindings/go/src/model_package.go
index f02c68ae..c067a911 100644
--- a/bindings/go/src/model_package.go
+++ b/bindings/go/src/model_package.go
@@ -1,209 +1,144 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type ModelPackage struct {
-
//
Architectures []PackagesownerrepoArchitectures `json:"architectures,omitempty"`
-
//
CdnUrl string `json:"cdn_url,omitempty"`
-
//
ChecksumMd5 string `json:"checksum_md5,omitempty"`
-
//
ChecksumSha1 string `json:"checksum_sha1,omitempty"`
-
//
ChecksumSha256 string `json:"checksum_sha256,omitempty"`
-
//
ChecksumSha512 string `json:"checksum_sha512,omitempty"`
-
// A checksum of all of the package's dependencies.
DependenciesChecksumMd5 string `json:"dependencies_checksum_md5,omitempty"`
-
//
DependenciesUrl string `json:"dependencies_url,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
//
Distro interface{} `json:"distro,omitempty"`
-
//
DistroVersion interface{} `json:"distro_version,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
// The epoch of the package version (if any).
Epoch int32 `json:"epoch,omitempty"`
-
//
Extension string `json:"extension,omitempty"`
-
//
Filename string `json:"filename,omitempty"`
-
//
Files []PackagesownerrepoFiles `json:"files,omitempty"`
-
//
Format string `json:"format,omitempty"`
-
//
FormatUrl string `json:"format_url,omitempty"`
-
// Unique and permanent identifier for the package.
IdentifierPerm string `json:"identifier_perm,omitempty"`
-
//
Indexed bool `json:"indexed,omitempty"`
-
//
IsSyncAwaiting bool `json:"is_sync_awaiting,omitempty"`
-
//
IsSyncCompleted bool `json:"is_sync_completed,omitempty"`
-
//
IsSyncFailed bool `json:"is_sync_failed,omitempty"`
-
//
IsSyncInFlight bool `json:"is_sync_in_flight,omitempty"`
-
//
IsSyncInProgress bool `json:"is_sync_in_progress,omitempty"`
-
// The license of this package.
License string `json:"license,omitempty"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
//
Namespace string `json:"namespace,omitempty"`
-
//
NamespaceUrl string `json:"namespace_url,omitempty"`
-
//
NumFiles int32 `json:"num_files,omitempty"`
-
// The type of package contents.
PackageType string `json:"package_type,omitempty"`
-
// The release of the package version (if any).
Release string `json:"release,omitempty"`
-
//
Repository string `json:"repository,omitempty"`
-
//
RepositoryUrl string `json:"repository_url,omitempty"`
-
// The datetime the security scanning was completed.
SecurityScanCompletedAt string `json:"security_scan_completed_at,omitempty"`
-
// The datetime the security scanning was started.
SecurityScanStartedAt string `json:"security_scan_started_at,omitempty"`
-
//
SecurityScanStatus string `json:"security_scan_status,omitempty"`
-
// The datetime the security scanning status was updated.
SecurityScanStatusUpdatedAt string `json:"security_scan_status_updated_at,omitempty"`
-
//
SelfHtmlUrl string `json:"self_html_url,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SignatureUrl string `json:"signature_url,omitempty"`
-
// The calculated size of the package.
Size int32 `json:"size,omitempty"`
-
// The public unique identifier for the package.
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// The synchronisation (in progress) stage of the package.
Stage string `json:"stage,omitempty"`
-
//
StageStr string `json:"stage_str,omitempty"`
-
// The datetime the package stage was updated at.
StageUpdatedAt string `json:"stage_updated_at,omitempty"`
-
// The synchronisation status of the package.
Status string `json:"status,omitempty"`
-
// A textual description for the synchronous status reason (if any
StatusReason string `json:"status_reason,omitempty"`
-
//
StatusStr string `json:"status_str,omitempty"`
-
// The datetime the package status was updated at.
StatusUpdatedAt string `json:"status_updated_at,omitempty"`
-
//
StatusUrl string `json:"status_url,omitempty"`
-
//
Subtype string `json:"subtype,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// The datetime the package sync was finished at.
SyncFinishedAt string `json:"sync_finished_at,omitempty"`
-
// Synchronisation progress (from 0-100)
SyncProgress int32 `json:"sync_progress,omitempty"`
-
// All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field.
Tags interface{} `json:"tags,omitempty"`
-
// All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted.
TagsImmutable interface{} `json:"tags_immutable,omitempty"`
-
//
TypeDisplay string `json:"type_display,omitempty"`
-
// The date this package was uploaded.
UploadedAt string `json:"uploaded_at,omitempty"`
-
//
Uploader string `json:"uploader,omitempty"`
-
//
UploaderUrl string `json:"uploader_url,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
-
//
VersionOrig string `json:"version_orig,omitempty"`
-
//
VulnerabilityScanResultsUrl string `json:"vulnerability_scan_results_url,omitempty"`
}
diff --git a/bindings/go/src/package_copy.go b/bindings/go/src/model_package_copy.go
similarity index 96%
rename from bindings/go/src/package_copy.go
rename to bindings/go/src/model_package_copy.go
index 522f154f..c7a116d7 100644
--- a/bindings/go/src/package_copy.go
+++ b/bindings/go/src/model_package_copy.go
@@ -1,209 +1,144 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackageCopy struct {
-
//
Architectures []PackagesownerrepoArchitectures `json:"architectures,omitempty"`
-
//
CdnUrl string `json:"cdn_url,omitempty"`
-
//
ChecksumMd5 string `json:"checksum_md5,omitempty"`
-
//
ChecksumSha1 string `json:"checksum_sha1,omitempty"`
-
//
ChecksumSha256 string `json:"checksum_sha256,omitempty"`
-
//
ChecksumSha512 string `json:"checksum_sha512,omitempty"`
-
// A checksum of all of the package's dependencies.
DependenciesChecksumMd5 string `json:"dependencies_checksum_md5,omitempty"`
-
//
DependenciesUrl string `json:"dependencies_url,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
//
Distro interface{} `json:"distro,omitempty"`
-
//
DistroVersion interface{} `json:"distro_version,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
// The epoch of the package version (if any).
Epoch int32 `json:"epoch,omitempty"`
-
//
Extension string `json:"extension,omitempty"`
-
//
Filename string `json:"filename,omitempty"`
-
//
Files []PackagesownerrepoFiles `json:"files,omitempty"`
-
//
Format string `json:"format,omitempty"`
-
//
FormatUrl string `json:"format_url,omitempty"`
-
// Unique and permanent identifier for the package.
IdentifierPerm string `json:"identifier_perm,omitempty"`
-
//
Indexed bool `json:"indexed,omitempty"`
-
//
IsSyncAwaiting bool `json:"is_sync_awaiting,omitempty"`
-
//
IsSyncCompleted bool `json:"is_sync_completed,omitempty"`
-
//
IsSyncFailed bool `json:"is_sync_failed,omitempty"`
-
//
IsSyncInFlight bool `json:"is_sync_in_flight,omitempty"`
-
//
IsSyncInProgress bool `json:"is_sync_in_progress,omitempty"`
-
// The license of this package.
License string `json:"license,omitempty"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
//
Namespace string `json:"namespace,omitempty"`
-
//
NamespaceUrl string `json:"namespace_url,omitempty"`
-
//
NumFiles int32 `json:"num_files,omitempty"`
-
// The type of package contents.
PackageType string `json:"package_type,omitempty"`
-
// The release of the package version (if any).
Release string `json:"release,omitempty"`
-
// The repository the package will be copied to.
Repository string `json:"repository,omitempty"`
-
//
RepositoryUrl string `json:"repository_url,omitempty"`
-
// The datetime the security scanning was completed.
SecurityScanCompletedAt string `json:"security_scan_completed_at,omitempty"`
-
// The datetime the security scanning was started.
SecurityScanStartedAt string `json:"security_scan_started_at,omitempty"`
-
//
SecurityScanStatus string `json:"security_scan_status,omitempty"`
-
// The datetime the security scanning status was updated.
SecurityScanStatusUpdatedAt string `json:"security_scan_status_updated_at,omitempty"`
-
//
SelfHtmlUrl string `json:"self_html_url,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SignatureUrl string `json:"signature_url,omitempty"`
-
// The calculated size of the package.
Size int32 `json:"size,omitempty"`
-
// The public unique identifier for the package.
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// The synchronisation (in progress) stage of the package.
Stage string `json:"stage,omitempty"`
-
//
StageStr string `json:"stage_str,omitempty"`
-
// The datetime the package stage was updated at.
StageUpdatedAt string `json:"stage_updated_at,omitempty"`
-
// The synchronisation status of the package.
Status string `json:"status,omitempty"`
-
// A textual description for the synchronous status reason (if any
StatusReason string `json:"status_reason,omitempty"`
-
//
StatusStr string `json:"status_str,omitempty"`
-
// The datetime the package status was updated at.
StatusUpdatedAt string `json:"status_updated_at,omitempty"`
-
//
StatusUrl string `json:"status_url,omitempty"`
-
//
Subtype string `json:"subtype,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// The datetime the package sync was finished at.
SyncFinishedAt string `json:"sync_finished_at,omitempty"`
-
// Synchronisation progress (from 0-100)
SyncProgress int32 `json:"sync_progress,omitempty"`
-
// All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field.
Tags interface{} `json:"tags,omitempty"`
-
// All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted.
TagsImmutable interface{} `json:"tags_immutable,omitempty"`
-
//
TypeDisplay string `json:"type_display,omitempty"`
-
// The date this package was uploaded.
UploadedAt string `json:"uploaded_at,omitempty"`
-
//
Uploader string `json:"uploader,omitempty"`
-
//
UploaderUrl string `json:"uploader_url,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
-
//
VersionOrig string `json:"version_orig,omitempty"`
-
//
VulnerabilityScanResultsUrl string `json:"vulnerability_scan_results_url,omitempty"`
}
diff --git a/bindings/go/src/package_dependencies.go b/bindings/go/src/model_package_dependencies.go
similarity index 68%
rename from bindings/go/src/package_dependencies.go
rename to bindings/go/src/model_package_dependencies.go
index c0fb4bff..3c125011 100644
--- a/bindings/go/src/package_dependencies.go
+++ b/bindings/go/src/model_package_dependencies.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackageDependencies struct {
-
//
Dependencies []PackageDependenciesDependencies `json:"dependencies"`
}
diff --git a/bindings/go/src/package_dependencies_dependencies.go b/bindings/go/src/model_package_dependencies_dependencies.go
similarity index 80%
rename from bindings/go/src/package_dependencies_dependencies.go
rename to bindings/go/src/model_package_dependencies_dependencies.go
index b2adeb2c..e64f5d01 100644
--- a/bindings/go/src/package_dependencies_dependencies.go
+++ b/bindings/go/src/model_package_dependencies_dependencies.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackageDependenciesDependencies struct {
-
//
DepType string `json:"dep_type,omitempty"`
-
// The name of the package dependency.
Name string `json:"name,omitempty"`
-
//
Operator string `json:"operator,omitempty"`
-
// The raw dependency version (if any).
Version string `json:"version,omitempty"`
}
diff --git a/bindings/go/src/package_file_parts_upload.go b/bindings/go/src/model_package_file_parts_upload.go
similarity index 81%
rename from bindings/go/src/package_file_parts_upload.go
rename to bindings/go/src/model_package_file_parts_upload.go
index 22f4a418..bf9fe49f 100644
--- a/bindings/go/src/package_file_parts_upload.go
+++ b/bindings/go/src/model_package_file_parts_upload.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackageFilePartsUpload struct {
-
// The identifier for the file to use uploading parts.
Identifier string `json:"identifier,omitempty"`
-
// The querystring to use for the next-step PUT upload.
UploadQuerystring string `json:"upload_querystring,omitempty"`
-
// The URL to use for the next-step PUT upload
UploadUrl string `json:"upload_url,omitempty"`
}
diff --git a/bindings/go/src/package_file_upload.go b/bindings/go/src/model_package_file_upload.go
similarity index 87%
rename from bindings/go/src/package_file_upload.go
rename to bindings/go/src/model_package_file_upload.go
index 220ec5ef..1474b06d 100644
--- a/bindings/go/src/package_file_upload.go
+++ b/bindings/go/src/model_package_file_upload.go
@@ -1,29 +1,24 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackageFileUpload struct {
-
// The identifier for the file to use when creating packages
Identifier string `json:"identifier,omitempty"`
-
// The dictionary of fields that must be sent with POST uploads
UploadFields interface{} `json:"upload_fields,omitempty"`
-
// The dictionary of headers that must be sent with uploads
UploadHeaders interface{} `json:"upload_headers,omitempty"`
-
// The querystring to use for the next-step POST or PUT upload
UploadQuerystring string `json:"upload_querystring,omitempty"`
-
// The URL to use for the next-step POST or PUT upload
UploadUrl string `json:"upload_url,omitempty"`
}
diff --git a/bindings/go/src/package_move.go b/bindings/go/src/model_package_move.go
similarity index 96%
rename from bindings/go/src/package_move.go
rename to bindings/go/src/model_package_move.go
index de202855..9c2eed1d 100644
--- a/bindings/go/src/package_move.go
+++ b/bindings/go/src/model_package_move.go
@@ -1,209 +1,144 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackageMove struct {
-
//
Architectures []PackagesownerrepoArchitectures `json:"architectures,omitempty"`
-
//
CdnUrl string `json:"cdn_url,omitempty"`
-
//
ChecksumMd5 string `json:"checksum_md5,omitempty"`
-
//
ChecksumSha1 string `json:"checksum_sha1,omitempty"`
-
//
ChecksumSha256 string `json:"checksum_sha256,omitempty"`
-
//
ChecksumSha512 string `json:"checksum_sha512,omitempty"`
-
// A checksum of all of the package's dependencies.
DependenciesChecksumMd5 string `json:"dependencies_checksum_md5,omitempty"`
-
//
DependenciesUrl string `json:"dependencies_url,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
//
Distro interface{} `json:"distro,omitempty"`
-
//
DistroVersion interface{} `json:"distro_version,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
// The epoch of the package version (if any).
Epoch int32 `json:"epoch,omitempty"`
-
//
Extension string `json:"extension,omitempty"`
-
//
Filename string `json:"filename,omitempty"`
-
//
Files []PackagesownerrepoFiles `json:"files,omitempty"`
-
//
Format string `json:"format,omitempty"`
-
//
FormatUrl string `json:"format_url,omitempty"`
-
// Unique and permanent identifier for the package.
IdentifierPerm string `json:"identifier_perm,omitempty"`
-
//
Indexed bool `json:"indexed,omitempty"`
-
//
IsSyncAwaiting bool `json:"is_sync_awaiting,omitempty"`
-
//
IsSyncCompleted bool `json:"is_sync_completed,omitempty"`
-
//
IsSyncFailed bool `json:"is_sync_failed,omitempty"`
-
//
IsSyncInFlight bool `json:"is_sync_in_flight,omitempty"`
-
//
IsSyncInProgress bool `json:"is_sync_in_progress,omitempty"`
-
// The license of this package.
License string `json:"license,omitempty"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
//
Namespace string `json:"namespace,omitempty"`
-
//
NamespaceUrl string `json:"namespace_url,omitempty"`
-
//
NumFiles int32 `json:"num_files,omitempty"`
-
// The type of package contents.
PackageType string `json:"package_type,omitempty"`
-
// The release of the package version (if any).
Release string `json:"release,omitempty"`
-
// The repository the package will be moved to.
Repository string `json:"repository,omitempty"`
-
//
RepositoryUrl string `json:"repository_url,omitempty"`
-
// The datetime the security scanning was completed.
SecurityScanCompletedAt string `json:"security_scan_completed_at,omitempty"`
-
// The datetime the security scanning was started.
SecurityScanStartedAt string `json:"security_scan_started_at,omitempty"`
-
//
SecurityScanStatus string `json:"security_scan_status,omitempty"`
-
// The datetime the security scanning status was updated.
SecurityScanStatusUpdatedAt string `json:"security_scan_status_updated_at,omitempty"`
-
//
SelfHtmlUrl string `json:"self_html_url,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SignatureUrl string `json:"signature_url,omitempty"`
-
// The calculated size of the package.
Size int32 `json:"size,omitempty"`
-
// The public unique identifier for the package.
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// The synchronisation (in progress) stage of the package.
Stage string `json:"stage,omitempty"`
-
//
StageStr string `json:"stage_str,omitempty"`
-
// The datetime the package stage was updated at.
StageUpdatedAt string `json:"stage_updated_at,omitempty"`
-
// The synchronisation status of the package.
Status string `json:"status,omitempty"`
-
// A textual description for the synchronous status reason (if any
StatusReason string `json:"status_reason,omitempty"`
-
//
StatusStr string `json:"status_str,omitempty"`
-
// The datetime the package status was updated at.
StatusUpdatedAt string `json:"status_updated_at,omitempty"`
-
//
StatusUrl string `json:"status_url,omitempty"`
-
//
Subtype string `json:"subtype,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// The datetime the package sync was finished at.
SyncFinishedAt string `json:"sync_finished_at,omitempty"`
-
// Synchronisation progress (from 0-100)
SyncProgress int32 `json:"sync_progress,omitempty"`
-
// All tags on the package, grouped by tag type. This includes immutable tags, but doesn't distinguish them from mutable. To see which tags are immutable specifically, see the tags_immutable field.
Tags interface{} `json:"tags,omitempty"`
-
// All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted.
TagsImmutable interface{} `json:"tags_immutable,omitempty"`
-
//
TypeDisplay string `json:"type_display,omitempty"`
-
// The date this package was uploaded.
UploadedAt string `json:"uploaded_at,omitempty"`
-
//
Uploader string `json:"uploader,omitempty"`
-
//
UploaderUrl string `json:"uploader_url,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
-
//
VersionOrig string `json:"version_orig,omitempty"`
-
//
VulnerabilityScanResultsUrl string `json:"vulnerability_scan_results_url,omitempty"`
}
diff --git a/bindings/go/src/package_status.go b/bindings/go/src/model_package_status.go
similarity index 92%
rename from bindings/go/src/package_status.go
rename to bindings/go/src/model_package_status.go
index 319c00d3..169d34b7 100644
--- a/bindings/go/src/package_status.go
+++ b/bindings/go/src/model_package_status.go
@@ -1,59 +1,44 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackageStatus struct {
-
//
IsSyncAwaiting bool `json:"is_sync_awaiting,omitempty"`
-
//
IsSyncCompleted bool `json:"is_sync_completed,omitempty"`
-
//
IsSyncFailed bool `json:"is_sync_failed,omitempty"`
-
//
IsSyncInFlight bool `json:"is_sync_in_flight,omitempty"`
-
//
IsSyncInProgress bool `json:"is_sync_in_progress,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
// The synchronisation (in progress) stage of the package.
Stage string `json:"stage,omitempty"`
-
//
StageStr string `json:"stage_str,omitempty"`
-
// The datetime the package stage was updated at.
StageUpdatedAt string `json:"stage_updated_at,omitempty"`
-
// The synchronisation status of the package.
Status string `json:"status,omitempty"`
-
// A textual description for the synchronous status reason (if any
StatusReason string `json:"status_reason,omitempty"`
-
//
StatusStr string `json:"status_str,omitempty"`
-
// The datetime the package status was updated at.
StatusUpdatedAt string `json:"status_updated_at,omitempty"`
-
// The datetime the package sync was finished at.
SyncFinishedAt string `json:"sync_finished_at,omitempty"`
-
// Synchronisation progress (from 0-100)
SyncProgress int32 `json:"sync_progress,omitempty"`
}
diff --git a/bindings/go/src/package_usage_metrics.go b/bindings/go/src/model_package_usage_metrics.go
similarity index 65%
rename from bindings/go/src/package_usage_metrics.go
rename to bindings/go/src/model_package_usage_metrics.go
index af33ffc7..a2cf490b 100644
--- a/bindings/go/src/package_usage_metrics.go
+++ b/bindings/go/src/model_package_usage_metrics.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackageUsageMetrics struct {
-
//
Packages interface{} `json:"packages"`
}
diff --git a/bindings/go/src/packages_copy.go b/bindings/go/src/model_packages_copy.go
similarity index 78%
rename from bindings/go/src/packages_copy.go
rename to bindings/go/src/model_packages_copy.go
index c6fdcdb5..e70e3871 100644
--- a/bindings/go/src/packages_copy.go
+++ b/bindings/go/src/model_packages_copy.go
@@ -1,20 +1,18 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesCopy struct {
-
// None
Destination string `json:"destination"`
-
// If true, the package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
}
diff --git a/bindings/go/src/packages_move.go b/bindings/go/src/model_packages_move.go
similarity index 65%
rename from bindings/go/src/packages_move.go
rename to bindings/go/src/model_packages_move.go
index 274661a2..a4fc6c28 100644
--- a/bindings/go/src/packages_move.go
+++ b/bindings/go/src/model_packages_move.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesMove struct {
-
// None
Destination string `json:"destination"`
}
diff --git a/bindings/go/src/packages_tag.go b/bindings/go/src/model_packages_tag.go
similarity index 81%
rename from bindings/go/src/packages_tag.go
rename to bindings/go/src/model_packages_tag.go
index 79693809..417c79c3 100644
--- a/bindings/go/src/packages_tag.go
+++ b/bindings/go/src/model_packages_tag.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesTag struct {
-
// None
Action string `json:"action,omitempty"`
-
// If true, created tags will be immutable. An immutable flag is a tag that cannot be removed from a package.
IsImmutable bool `json:"is_immutable,omitempty"`
-
// A list of tags to apply the action to. Not required for clears.
Tags []string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_alpine.go b/bindings/go/src/model_packages_upload_alpine.go
similarity index 85%
rename from bindings/go/src/packages_upload_alpine.go
rename to bindings/go/src/model_packages_upload_alpine.go
index fc645d50..d46b4b67 100644
--- a/bindings/go/src/packages_upload_alpine.go
+++ b/bindings/go/src/model_packages_upload_alpine.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadAlpine struct {
-
// The distribution to store the package for.
Distribution string `json:"distribution"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_cargo.go b/bindings/go/src/model_packages_upload_cargo.go
similarity index 83%
rename from bindings/go/src/packages_upload_cargo.go
rename to bindings/go/src/model_packages_upload_cargo.go
index 0b5ae487..c2a9c59c 100644
--- a/bindings/go/src/packages_upload_cargo.go
+++ b/bindings/go/src/model_packages_upload_cargo.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadCargo struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_cocoapods.go b/bindings/go/src/model_packages_upload_cocoapods.go
similarity index 83%
rename from bindings/go/src/packages_upload_cocoapods.go
rename to bindings/go/src/model_packages_upload_cocoapods.go
index 3a475239..bba5ae2f 100644
--- a/bindings/go/src/packages_upload_cocoapods.go
+++ b/bindings/go/src/model_packages_upload_cocoapods.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadCocoapods struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_composer.go b/bindings/go/src/model_packages_upload_composer.go
similarity index 83%
rename from bindings/go/src/packages_upload_composer.go
rename to bindings/go/src/model_packages_upload_composer.go
index 74571ed0..87d52aed 100644
--- a/bindings/go/src/packages_upload_composer.go
+++ b/bindings/go/src/model_packages_upload_composer.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadComposer struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_conan.go b/bindings/go/src/model_packages_upload_conan.go
similarity index 91%
rename from bindings/go/src/packages_upload_conan.go
rename to bindings/go/src/model_packages_upload_conan.go
index 71292531..4cad9bd0 100644
--- a/bindings/go/src/packages_upload_conan.go
+++ b/bindings/go/src/model_packages_upload_conan.go
@@ -1,44 +1,34 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadConan struct {
-
// Conan channel.
ConanChannel string `json:"conan_channel,omitempty"`
-
// Conan prefix (User).
ConanPrefix string `json:"conan_prefix,omitempty"`
-
// The info file is an python file containing the package metadata.
InfoFile string `json:"info_file"`
-
// The info file is an python file containing the package metadata.
ManifestFile string `json:"manifest_file"`
-
// The conan file is an python file containing the package metadata.
MetadataFile string `json:"metadata_file"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_conda.go b/bindings/go/src/model_packages_upload_conda.go
similarity index 83%
rename from bindings/go/src/packages_upload_conda.go
rename to bindings/go/src/model_packages_upload_conda.go
index f31955f5..cba6d11e 100644
--- a/bindings/go/src/packages_upload_conda.go
+++ b/bindings/go/src/model_packages_upload_conda.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadConda struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_cran.go b/bindings/go/src/model_packages_upload_cran.go
similarity index 83%
rename from bindings/go/src/packages_upload_cran.go
rename to bindings/go/src/model_packages_upload_cran.go
index 74f86688..d93ab386 100644
--- a/bindings/go/src/packages_upload_cran.go
+++ b/bindings/go/src/model_packages_upload_cran.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadCran struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_dart.go b/bindings/go/src/model_packages_upload_dart.go
similarity index 83%
rename from bindings/go/src/packages_upload_dart.go
rename to bindings/go/src/model_packages_upload_dart.go
index 5cc6eb8f..801f3885 100644
--- a/bindings/go/src/packages_upload_dart.go
+++ b/bindings/go/src/model_packages_upload_dart.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadDart struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_deb.go b/bindings/go/src/model_packages_upload_deb.go
similarity index 89%
rename from bindings/go/src/packages_upload_deb.go
rename to bindings/go/src/model_packages_upload_deb.go
index 5debcb8e..26a76597 100644
--- a/bindings/go/src/packages_upload_deb.go
+++ b/bindings/go/src/model_packages_upload_deb.go
@@ -1,32 +1,26 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadDeb struct {
-
// The changes archive containing the changes made to the source and debian packaging files
ChangesFile string `json:"changes_file,omitempty"`
-
// The distribution to store the package for.
Distribution string `json:"distribution"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// The sources archive containing the source code for the binary
SourcesFile string `json:"sources_file,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_docker.go b/bindings/go/src/model_packages_upload_docker.go
similarity index 83%
rename from bindings/go/src/packages_upload_docker.go
rename to bindings/go/src/model_packages_upload_docker.go
index e28f879a..de6348b9 100644
--- a/bindings/go/src/packages_upload_docker.go
+++ b/bindings/go/src/model_packages_upload_docker.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadDocker struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_go.go b/bindings/go/src/model_packages_upload_go.go
similarity index 83%
rename from bindings/go/src/packages_upload_go.go
rename to bindings/go/src/model_packages_upload_go.go
index 650e7882..c24ae987 100644
--- a/bindings/go/src/packages_upload_go.go
+++ b/bindings/go/src/model_packages_upload_go.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadGo struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_helm.go b/bindings/go/src/model_packages_upload_helm.go
similarity index 83%
rename from bindings/go/src/packages_upload_helm.go
rename to bindings/go/src/model_packages_upload_helm.go
index d50fae8a..c974f3a4 100644
--- a/bindings/go/src/packages_upload_helm.go
+++ b/bindings/go/src/model_packages_upload_helm.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadHelm struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_luarocks.go b/bindings/go/src/model_packages_upload_luarocks.go
similarity index 83%
rename from bindings/go/src/packages_upload_luarocks.go
rename to bindings/go/src/model_packages_upload_luarocks.go
index d2cfc798..836f56fd 100644
--- a/bindings/go/src/packages_upload_luarocks.go
+++ b/bindings/go/src/model_packages_upload_luarocks.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadLuarocks struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_maven.go b/bindings/go/src/model_packages_upload_maven.go
similarity index 91%
rename from bindings/go/src/packages_upload_maven.go
rename to bindings/go/src/model_packages_upload_maven.go
index 6f68cc4b..4e38ab10 100644
--- a/bindings/go/src/packages_upload_maven.go
+++ b/bindings/go/src/model_packages_upload_maven.go
@@ -1,47 +1,36 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadMaven struct {
-
// The ID of the artifact.
ArtifactId string `json:"artifact_id,omitempty"`
-
// Artifact's group ID.
GroupId string `json:"group_id,omitempty"`
-
// Adds bundled Java documentation to the Maven package
JavadocFile string `json:"javadoc_file,omitempty"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// Artifact's Maven packaging type.
Packaging string `json:"packaging,omitempty"`
-
// The POM file is an XML file containing the Maven coordinates.
PomFile string `json:"pom_file,omitempty"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// Adds bundled Java source code to the Maven package.
SourcesFile string `json:"sources_file,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
-
// Adds bundled Java tests to the Maven package.
TestsFile string `json:"tests_file,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_npm.go b/bindings/go/src/model_packages_upload_npm.go
similarity index 86%
rename from bindings/go/src/packages_upload_npm.go
rename to bindings/go/src/model_packages_upload_npm.go
index 08513a73..e4ccdad1 100644
--- a/bindings/go/src/packages_upload_npm.go
+++ b/bindings/go/src/model_packages_upload_npm.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadNpm struct {
-
// The default npm dist-tag for this package/version - This will replace any other package/version if they are using the same tag.
NpmDistTag string `json:"npm_dist_tag,omitempty"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_nuget.go b/bindings/go/src/model_packages_upload_nuget.go
similarity index 85%
rename from bindings/go/src/packages_upload_nuget.go
rename to bindings/go/src/model_packages_upload_nuget.go
index 5d4ac772..8eef6d24 100644
--- a/bindings/go/src/packages_upload_nuget.go
+++ b/bindings/go/src/model_packages_upload_nuget.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadNuget struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// Attaches a symbols file to the package.
SymbolsFile string `json:"symbols_file,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_p2.go b/bindings/go/src/model_packages_upload_p2.go
similarity index 83%
rename from bindings/go/src/packages_upload_p2.go
rename to bindings/go/src/model_packages_upload_p2.go
index 2bdef620..2267f2fa 100644
--- a/bindings/go/src/packages_upload_p2.go
+++ b/bindings/go/src/model_packages_upload_p2.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadP2 struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_python.go b/bindings/go/src/model_packages_upload_python.go
similarity index 83%
rename from bindings/go/src/packages_upload_python.go
rename to bindings/go/src/model_packages_upload_python.go
index dd1e73d1..4e13743c 100644
--- a/bindings/go/src/packages_upload_python.go
+++ b/bindings/go/src/model_packages_upload_python.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadPython struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_raw.go b/bindings/go/src/model_packages_upload_raw.go
similarity index 91%
rename from bindings/go/src/packages_upload_raw.go
rename to bindings/go/src/model_packages_upload_raw.go
index 0e18a838..a325766b 100644
--- a/bindings/go/src/packages_upload_raw.go
+++ b/bindings/go/src/model_packages_upload_raw.go
@@ -1,38 +1,30 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadRaw struct {
-
// A custom content/media (also known as MIME) type to be sent when downloading this file. By default Cloudsmith will attempt to detect the type, but if you need to override it, you can specify it here.
ContentType string `json:"content_type,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_rpm.go b/bindings/go/src/model_packages_upload_rpm.go
similarity index 85%
rename from bindings/go/src/packages_upload_rpm.go
rename to bindings/go/src/model_packages_upload_rpm.go
index 2ebf45a6..53af919c 100644
--- a/bindings/go/src/packages_upload_rpm.go
+++ b/bindings/go/src/model_packages_upload_rpm.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadRpm struct {
-
// The distribution to store the package for.
Distribution string `json:"distribution"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_ruby.go b/bindings/go/src/model_packages_upload_ruby.go
similarity index 83%
rename from bindings/go/src/packages_upload_ruby.go
rename to bindings/go/src/model_packages_upload_ruby.go
index 814e0a83..f7d8ba08 100644
--- a/bindings/go/src/packages_upload_ruby.go
+++ b/bindings/go/src/model_packages_upload_ruby.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadRuby struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_terraform.go b/bindings/go/src/model_packages_upload_terraform.go
similarity index 83%
rename from bindings/go/src/packages_upload_terraform.go
rename to bindings/go/src/model_packages_upload_terraform.go
index c91acf73..1724820b 100644
--- a/bindings/go/src/packages_upload_terraform.go
+++ b/bindings/go/src/model_packages_upload_terraform.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadTerraform struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_upload_vagrant.go b/bindings/go/src/model_packages_upload_vagrant.go
similarity index 87%
rename from bindings/go/src/packages_upload_vagrant.go
rename to bindings/go/src/model_packages_upload_vagrant.go
index 74f63065..62a9bf6e 100644
--- a/bindings/go/src/packages_upload_vagrant.go
+++ b/bindings/go/src/model_packages_upload_vagrant.go
@@ -1,32 +1,26 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesUploadVagrant struct {
-
// The name of this package.
Name string `json:"name"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// The virtual machine provider for the box.
Provider string `json:"provider"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
-
// The raw version for this package.
Version string `json:"version"`
}
diff --git a/bindings/go/src/packages_validateupload_alpine.go b/bindings/go/src/model_packages_validateupload_alpine.go
similarity index 85%
rename from bindings/go/src/packages_validateupload_alpine.go
rename to bindings/go/src/model_packages_validateupload_alpine.go
index f232d2c8..c59ad9cf 100644
--- a/bindings/go/src/packages_validateupload_alpine.go
+++ b/bindings/go/src/model_packages_validateupload_alpine.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadAlpine struct {
-
// The distribution to store the package for.
Distribution string `json:"distribution"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_cargo.go b/bindings/go/src/model_packages_validateupload_cargo.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_cargo.go
rename to bindings/go/src/model_packages_validateupload_cargo.go
index 9ae26ada..5309328e 100644
--- a/bindings/go/src/packages_validateupload_cargo.go
+++ b/bindings/go/src/model_packages_validateupload_cargo.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadCargo struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_cocoapods.go b/bindings/go/src/model_packages_validateupload_cocoapods.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_cocoapods.go
rename to bindings/go/src/model_packages_validateupload_cocoapods.go
index 64306281..85f50902 100644
--- a/bindings/go/src/packages_validateupload_cocoapods.go
+++ b/bindings/go/src/model_packages_validateupload_cocoapods.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadCocoapods struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_composer.go b/bindings/go/src/model_packages_validateupload_composer.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_composer.go
rename to bindings/go/src/model_packages_validateupload_composer.go
index 5ff09f26..c3ead3fb 100644
--- a/bindings/go/src/packages_validateupload_composer.go
+++ b/bindings/go/src/model_packages_validateupload_composer.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadComposer struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_conan.go b/bindings/go/src/model_packages_validateupload_conan.go
similarity index 91%
rename from bindings/go/src/packages_validateupload_conan.go
rename to bindings/go/src/model_packages_validateupload_conan.go
index 768bf67a..87e1706d 100644
--- a/bindings/go/src/packages_validateupload_conan.go
+++ b/bindings/go/src/model_packages_validateupload_conan.go
@@ -1,44 +1,34 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadConan struct {
-
// Conan channel.
ConanChannel string `json:"conan_channel,omitempty"`
-
// Conan prefix (User).
ConanPrefix string `json:"conan_prefix,omitempty"`
-
// The info file is an python file containing the package metadata.
InfoFile string `json:"info_file"`
-
// The info file is an python file containing the package metadata.
ManifestFile string `json:"manifest_file"`
-
// The conan file is an python file containing the package metadata.
MetadataFile string `json:"metadata_file"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_conda.go b/bindings/go/src/model_packages_validateupload_conda.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_conda.go
rename to bindings/go/src/model_packages_validateupload_conda.go
index b8ebcbf1..05b0a7cf 100644
--- a/bindings/go/src/packages_validateupload_conda.go
+++ b/bindings/go/src/model_packages_validateupload_conda.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadConda struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_cran.go b/bindings/go/src/model_packages_validateupload_cran.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_cran.go
rename to bindings/go/src/model_packages_validateupload_cran.go
index 95d71f63..a98a0fef 100644
--- a/bindings/go/src/packages_validateupload_cran.go
+++ b/bindings/go/src/model_packages_validateupload_cran.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadCran struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_dart.go b/bindings/go/src/model_packages_validateupload_dart.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_dart.go
rename to bindings/go/src/model_packages_validateupload_dart.go
index afbd4720..c06ec70b 100644
--- a/bindings/go/src/packages_validateupload_dart.go
+++ b/bindings/go/src/model_packages_validateupload_dart.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadDart struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_deb.go b/bindings/go/src/model_packages_validateupload_deb.go
similarity index 89%
rename from bindings/go/src/packages_validateupload_deb.go
rename to bindings/go/src/model_packages_validateupload_deb.go
index 46a4c6e4..33aea4e1 100644
--- a/bindings/go/src/packages_validateupload_deb.go
+++ b/bindings/go/src/model_packages_validateupload_deb.go
@@ -1,32 +1,26 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadDeb struct {
-
// The changes archive containing the changes made to the source and debian packaging files
ChangesFile string `json:"changes_file,omitempty"`
-
// The distribution to store the package for.
Distribution string `json:"distribution"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// The sources archive containing the source code for the binary
SourcesFile string `json:"sources_file,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_docker.go b/bindings/go/src/model_packages_validateupload_docker.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_docker.go
rename to bindings/go/src/model_packages_validateupload_docker.go
index 65a2386d..2e9e8b30 100644
--- a/bindings/go/src/packages_validateupload_docker.go
+++ b/bindings/go/src/model_packages_validateupload_docker.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadDocker struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_go.go b/bindings/go/src/model_packages_validateupload_go.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_go.go
rename to bindings/go/src/model_packages_validateupload_go.go
index 6cdc3acc..87edd83f 100644
--- a/bindings/go/src/packages_validateupload_go.go
+++ b/bindings/go/src/model_packages_validateupload_go.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadGo struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_helm.go b/bindings/go/src/model_packages_validateupload_helm.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_helm.go
rename to bindings/go/src/model_packages_validateupload_helm.go
index 17c1ff95..14187f7a 100644
--- a/bindings/go/src/packages_validateupload_helm.go
+++ b/bindings/go/src/model_packages_validateupload_helm.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadHelm struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_luarocks.go b/bindings/go/src/model_packages_validateupload_luarocks.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_luarocks.go
rename to bindings/go/src/model_packages_validateupload_luarocks.go
index 547e122f..589e1c7e 100644
--- a/bindings/go/src/packages_validateupload_luarocks.go
+++ b/bindings/go/src/model_packages_validateupload_luarocks.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadLuarocks struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_maven.go b/bindings/go/src/model_packages_validateupload_maven.go
similarity index 92%
rename from bindings/go/src/packages_validateupload_maven.go
rename to bindings/go/src/model_packages_validateupload_maven.go
index a6ed732d..74ff9f2c 100644
--- a/bindings/go/src/packages_validateupload_maven.go
+++ b/bindings/go/src/model_packages_validateupload_maven.go
@@ -1,47 +1,36 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadMaven struct {
-
// The ID of the artifact.
ArtifactId string `json:"artifact_id,omitempty"`
-
// Artifact's group ID.
GroupId string `json:"group_id,omitempty"`
-
// Adds bundled Java documentation to the Maven package
JavadocFile string `json:"javadoc_file,omitempty"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// Artifact's Maven packaging type.
Packaging string `json:"packaging,omitempty"`
-
// The POM file is an XML file containing the Maven coordinates.
PomFile string `json:"pom_file,omitempty"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// Adds bundled Java source code to the Maven package.
SourcesFile string `json:"sources_file,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
-
// Adds bundled Java tests to the Maven package.
TestsFile string `json:"tests_file,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_npm.go b/bindings/go/src/model_packages_validateupload_npm.go
similarity index 87%
rename from bindings/go/src/packages_validateupload_npm.go
rename to bindings/go/src/model_packages_validateupload_npm.go
index e3fe0c12..b7f617d9 100644
--- a/bindings/go/src/packages_validateupload_npm.go
+++ b/bindings/go/src/model_packages_validateupload_npm.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadNpm struct {
-
// The default npm dist-tag for this package/version - This will replace any other package/version if they are using the same tag.
NpmDistTag string `json:"npm_dist_tag,omitempty"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_nuget.go b/bindings/go/src/model_packages_validateupload_nuget.go
similarity index 85%
rename from bindings/go/src/packages_validateupload_nuget.go
rename to bindings/go/src/model_packages_validateupload_nuget.go
index 5d75ef8b..9e4f5b3e 100644
--- a/bindings/go/src/packages_validateupload_nuget.go
+++ b/bindings/go/src/model_packages_validateupload_nuget.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadNuget struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// Attaches a symbols file to the package.
SymbolsFile string `json:"symbols_file,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_p2.go b/bindings/go/src/model_packages_validateupload_p2.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_p2.go
rename to bindings/go/src/model_packages_validateupload_p2.go
index 297bfb56..03bc241e 100644
--- a/bindings/go/src/packages_validateupload_p2.go
+++ b/bindings/go/src/model_packages_validateupload_p2.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadP2 struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_python.go b/bindings/go/src/model_packages_validateupload_python.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_python.go
rename to bindings/go/src/model_packages_validateupload_python.go
index c4c92c67..943592b0 100644
--- a/bindings/go/src/packages_validateupload_python.go
+++ b/bindings/go/src/model_packages_validateupload_python.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadPython struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_raw.go b/bindings/go/src/model_packages_validateupload_raw.go
similarity index 91%
rename from bindings/go/src/packages_validateupload_raw.go
rename to bindings/go/src/model_packages_validateupload_raw.go
index e81f8cf1..4f78a38b 100644
--- a/bindings/go/src/packages_validateupload_raw.go
+++ b/bindings/go/src/model_packages_validateupload_raw.go
@@ -1,38 +1,30 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadRaw struct {
-
// A custom content/media (also known as MIME) type to be sent when downloading this file. By default Cloudsmith will attempt to detect the type, but if you need to override it, you can specify it here.
ContentType string `json:"content_type,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_rpm.go b/bindings/go/src/model_packages_validateupload_rpm.go
similarity index 85%
rename from bindings/go/src/packages_validateupload_rpm.go
rename to bindings/go/src/model_packages_validateupload_rpm.go
index c4468fd5..9891b80c 100644
--- a/bindings/go/src/packages_validateupload_rpm.go
+++ b/bindings/go/src/model_packages_validateupload_rpm.go
@@ -1,26 +1,22 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadRpm struct {
-
// The distribution to store the package for.
Distribution string `json:"distribution"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_ruby.go b/bindings/go/src/model_packages_validateupload_ruby.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_ruby.go
rename to bindings/go/src/model_packages_validateupload_ruby.go
index 5509cf3c..741fac80 100644
--- a/bindings/go/src/packages_validateupload_ruby.go
+++ b/bindings/go/src/model_packages_validateupload_ruby.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadRuby struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_terraform.go b/bindings/go/src/model_packages_validateupload_terraform.go
similarity index 83%
rename from bindings/go/src/packages_validateupload_terraform.go
rename to bindings/go/src/model_packages_validateupload_terraform.go
index fc8697ad..968f94a2 100644
--- a/bindings/go/src/packages_validateupload_terraform.go
+++ b/bindings/go/src/model_packages_validateupload_terraform.go
@@ -1,23 +1,20 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadTerraform struct {
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
}
diff --git a/bindings/go/src/packages_validateupload_vagrant.go b/bindings/go/src/model_packages_validateupload_vagrant.go
similarity index 87%
rename from bindings/go/src/packages_validateupload_vagrant.go
rename to bindings/go/src/model_packages_validateupload_vagrant.go
index 0465fdc6..5e74bb11 100644
--- a/bindings/go/src/packages_validateupload_vagrant.go
+++ b/bindings/go/src/model_packages_validateupload_vagrant.go
@@ -1,32 +1,26 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesValidateuploadVagrant struct {
-
// The name of this package.
Name string `json:"name"`
-
// The primary file for the package.
PackageFile string `json:"package_file"`
-
// The virtual machine provider for the box.
Provider string `json:"provider"`
-
// If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
Republish bool `json:"republish,omitempty"`
-
// A comma-separated values list of tags to add to the package.
Tags string `json:"tags,omitempty"`
-
// The raw version for this package.
Version string `json:"version"`
}
diff --git a/bindings/go/src/packagesownerrepo_architectures.go b/bindings/go/src/model_packagesownerrepo_architectures.go
similarity index 71%
rename from bindings/go/src/packagesownerrepo_architectures.go
rename to bindings/go/src/model_packagesownerrepo_architectures.go
index e9d3b526..032d66e4 100644
--- a/bindings/go/src/packagesownerrepo_architectures.go
+++ b/bindings/go/src/model_packagesownerrepo_architectures.go
@@ -1,20 +1,18 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesownerrepoArchitectures struct {
-
//
Description string `json:"description,omitempty"`
-
//
Name string `json:"name,omitempty"`
}
diff --git a/bindings/go/src/packagesownerrepo_files.go b/bindings/go/src/model_packagesownerrepo_files.go
similarity index 89%
rename from bindings/go/src/packagesownerrepo_files.go
rename to bindings/go/src/model_packagesownerrepo_files.go
index 20f8033f..943dbd4c 100644
--- a/bindings/go/src/packagesownerrepo_files.go
+++ b/bindings/go/src/model_packagesownerrepo_files.go
@@ -1,56 +1,42 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type PackagesownerrepoFiles struct {
-
//
CdnUrl string `json:"cdn_url,omitempty"`
-
//
ChecksumMd5 string `json:"checksum_md5,omitempty"`
-
//
ChecksumSha1 string `json:"checksum_sha1,omitempty"`
-
//
ChecksumSha256 string `json:"checksum_sha256,omitempty"`
-
//
ChecksumSha512 string `json:"checksum_sha512,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
//
Filename string `json:"filename,omitempty"`
-
//
IsDownloadable bool `json:"is_downloadable,omitempty"`
-
//
IsPrimary bool `json:"is_primary,omitempty"`
-
//
IsSynchronised bool `json:"is_synchronised,omitempty"`
-
//
SignatureUrl string `json:"signature_url,omitempty"`
-
// The calculated size of the file.
Size int32 `json:"size,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// Freeform descriptor that describes what the file is.
Tag string `json:"tag,omitempty"`
}
diff --git a/bindings/go/src/quota.go b/bindings/go/src/model_quota.go
similarity index 63%
rename from bindings/go/src/quota.go
rename to bindings/go/src/model_quota.go
index 1893efc7..976f0f77 100644
--- a/bindings/go/src/quota.go
+++ b/bindings/go/src/model_quota.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type Quota struct {
-
//
Usage interface{} `json:"usage"`
}
diff --git a/bindings/go/src/quota_history.go b/bindings/go/src/model_quota_history.go
similarity index 65%
rename from bindings/go/src/quota_history.go
rename to bindings/go/src/model_quota_history.go
index 347b3db6..a3466b74 100644
--- a/bindings/go/src/quota_history.go
+++ b/bindings/go/src/model_quota_history.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type QuotaHistory struct {
-
//
History []QuotaHistoryHistory `json:"history"`
}
diff --git a/bindings/go/src/quota_history_history.go b/bindings/go/src/model_quota_history_history.go
similarity index 79%
rename from bindings/go/src/quota_history_history.go
rename to bindings/go/src/model_quota_history_history.go
index 486b294c..6ceb6448 100644
--- a/bindings/go/src/quota_history_history.go
+++ b/bindings/go/src/model_quota_history_history.go
@@ -1,32 +1,26 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type QuotaHistoryHistory struct {
-
//
Days int32 `json:"days,omitempty"`
-
//
Display interface{} `json:"display,omitempty"`
-
//
End string `json:"end,omitempty"`
-
//
Plan string `json:"plan,omitempty"`
-
//
Raw interface{} `json:"raw,omitempty"`
-
//
Start string `json:"start,omitempty"`
}
diff --git a/bindings/go/src/raw_package_upload.go b/bindings/go/src/model_raw_package_upload.go
similarity index 96%
rename from bindings/go/src/raw_package_upload.go
rename to bindings/go/src/model_raw_package_upload.go
index ae9d34f9..eb1b4041 100644
--- a/bindings/go/src/raw_package_upload.go
+++ b/bindings/go/src/model_raw_package_upload.go
@@ -1,206 +1,142 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type RawPackageUpload struct {
-
//
Architectures []PackagesownerrepoArchitectures `json:"architectures,omitempty"`
-
//
CdnUrl string `json:"cdn_url,omitempty"`
-
//
ChecksumMd5 string `json:"checksum_md5,omitempty"`
-
//
ChecksumSha1 string `json:"checksum_sha1,omitempty"`
-
//
ChecksumSha256 string `json:"checksum_sha256,omitempty"`
-
//
ChecksumSha512 string `json:"checksum_sha512,omitempty"`
-
// A checksum of all of the package's dependencies.
DependenciesChecksumMd5 string `json:"dependencies_checksum_md5,omitempty"`
-
//
DependenciesUrl string `json:"dependencies_url,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
//
Distro interface{} `json:"distro,omitempty"`
-
//
DistroVersion interface{} `json:"distro_version,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
// The epoch of the package version (if any).
Epoch int32 `json:"epoch,omitempty"`
-
//
Extension string `json:"extension,omitempty"`
-
//
Filename string `json:"filename,omitempty"`
-
//
Files []PackagesownerrepoFiles `json:"files,omitempty"`
-
//
Format string `json:"format,omitempty"`
-
//
FormatUrl string `json:"format_url,omitempty"`
-
// Unique and permanent identifier for the package.
IdentifierPerm string `json:"identifier_perm,omitempty"`
-
//
Indexed bool `json:"indexed,omitempty"`
-
//
IsSyncAwaiting bool `json:"is_sync_awaiting,omitempty"`
-
//
IsSyncCompleted bool `json:"is_sync_completed,omitempty"`
-
//
IsSyncFailed bool `json:"is_sync_failed,omitempty"`
-
//
IsSyncInFlight bool `json:"is_sync_in_flight,omitempty"`
-
//
IsSyncInProgress bool `json:"is_sync_in_progress,omitempty"`
-
// The license of this package.
License string `json:"license,omitempty"`
-
// The name of this package.
Name string `json:"name,omitempty"`
-
//
Namespace string `json:"namespace,omitempty"`
-
//
NamespaceUrl string `json:"namespace_url,omitempty"`
-
//
NumFiles int32 `json:"num_files,omitempty"`
-
// The type of package contents.
PackageType string `json:"package_type,omitempty"`
-
// The release of the package version (if any).
Release string `json:"release,omitempty"`
-
//
Repository string `json:"repository,omitempty"`
-
//
RepositoryUrl string `json:"repository_url,omitempty"`
-
// The datetime the security scanning was completed.
SecurityScanCompletedAt string `json:"security_scan_completed_at,omitempty"`
-
// The datetime the security scanning was started.
SecurityScanStartedAt string `json:"security_scan_started_at,omitempty"`
-
//
SecurityScanStatus string `json:"security_scan_status,omitempty"`
-
// The datetime the security scanning status was updated.
SecurityScanStatusUpdatedAt string `json:"security_scan_status_updated_at,omitempty"`
-
//
SelfHtmlUrl string `json:"self_html_url,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SignatureUrl string `json:"signature_url,omitempty"`
-
// The calculated size of the package.
Size int32 `json:"size,omitempty"`
-
// The public unique identifier for the package.
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// The synchronisation (in progress) stage of the package.
Stage string `json:"stage,omitempty"`
-
//
StageStr string `json:"stage_str,omitempty"`
-
// The datetime the package stage was updated at.
StageUpdatedAt string `json:"stage_updated_at,omitempty"`
-
// The synchronisation status of the package.
Status string `json:"status,omitempty"`
-
// A textual description for the synchronous status reason (if any
StatusReason string `json:"status_reason,omitempty"`
-
//
StatusStr string `json:"status_str,omitempty"`
-
// The datetime the package status was updated at.
StatusUpdatedAt string `json:"status_updated_at,omitempty"`
-
//
StatusUrl string `json:"status_url,omitempty"`
-
//
Subtype string `json:"subtype,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// The datetime the package sync was finished at.
SyncFinishedAt string `json:"sync_finished_at,omitempty"`
-
// Synchronisation progress (from 0-100)
SyncProgress int32 `json:"sync_progress,omitempty"`
-
// All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted.
TagsImmutable interface{} `json:"tags_immutable,omitempty"`
-
//
TypeDisplay string `json:"type_display,omitempty"`
-
// The date this package was uploaded.
UploadedAt string `json:"uploaded_at,omitempty"`
-
//
Uploader string `json:"uploader,omitempty"`
-
//
UploaderUrl string `json:"uploader_url,omitempty"`
-
// The raw version for this package.
Version string `json:"version,omitempty"`
-
//
VersionOrig string `json:"version_orig,omitempty"`
-
//
VulnerabilityScanResultsUrl string `json:"vulnerability_scan_results_url,omitempty"`
}
diff --git a/bindings/go/src/repos_create.go b/bindings/go/src/model_repos_create.go
similarity index 91%
rename from bindings/go/src/repos_create.go
rename to bindings/go/src/model_repos_create.go
index 2a48d58f..85df8fcf 100644
--- a/bindings/go/src/repos_create.go
+++ b/bindings/go/src/model_repos_create.go
@@ -1,32 +1,26 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type ReposCreate struct {
-
// A description of the repository's purpose/contents.
Description string `json:"description,omitempty"`
-
// If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted.
IndexFiles bool `json:"index_files,omitempty"`
-
// A descriptive name for the repository.
Name string `json:"name"`
-
// The repository type changes how it is accessed and billed. Private repositories can only be used on paid plans, but are visible only to you or authorised delegates. Public repositories are free to use on all plans and visible to all Cloudsmith users.
RepositoryTypeStr string `json:"repository_type_str,omitempty"`
-
// The slug identifies the repository in URIs.
Slug string `json:"slug,omitempty"`
-
// The Cloudsmith region in which package files are stored.
StorageRegion string `json:"storage_region,omitempty"`
}
diff --git a/bindings/go/src/repos_gpg_keys.go b/bindings/go/src/model_repos_gpg_keys.go
similarity index 86%
rename from bindings/go/src/repos_gpg_keys.go
rename to bindings/go/src/model_repos_gpg_keys.go
index 8383c7b9..06c8a7b7 100644
--- a/bindings/go/src/repos_gpg_keys.go
+++ b/bindings/go/src/model_repos_gpg_keys.go
@@ -1,35 +1,28 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type ReposGpgKeys struct {
-
// If selected this is the active key for this repository.
Active bool `json:"active,omitempty"`
-
//
Comment string `json:"comment,omitempty"`
-
//
CreatedAt string `json:"created_at,omitempty"`
-
// If selected this is the default key for this repository.
Default_ bool `json:"default,omitempty"`
-
// The long identifier used by GPG for this key.
Fingerprint string `json:"fingerprint,omitempty"`
-
//
FingerprintShort string `json:"fingerprint_short,omitempty"`
-
// The public key given to repository users.
PublicKey string `json:"public_key,omitempty"`
}
diff --git a/bindings/go/src/repos_partial_update.go b/bindings/go/src/model_repos_partial_update.go
similarity index 90%
rename from bindings/go/src/repos_partial_update.go
rename to bindings/go/src/model_repos_partial_update.go
index d6b6dc39..9521ca21 100644
--- a/bindings/go/src/repos_partial_update.go
+++ b/bindings/go/src/model_repos_partial_update.go
@@ -1,29 +1,24 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type ReposPartialUpdate struct {
-
// A description of the repository's purpose/contents.
Description string `json:"description,omitempty"`
-
// If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted.
IndexFiles bool `json:"index_files,omitempty"`
-
// A descriptive name for the repository.
Name string `json:"name,omitempty"`
-
// The repository type changes how it is accessed and billed. Private repositories can only be used on paid plans, but are visible only to you or authorised delegates. Public repositories are free to use on all plans and visible to all Cloudsmith users.
RepositoryTypeStr string `json:"repository_type_str,omitempty"`
-
// The slug identifies the repository in URIs.
Slug string `json:"slug,omitempty"`
}
diff --git a/bindings/go/src/repository.go b/bindings/go/src/model_repository.go
similarity index 96%
rename from bindings/go/src/repository.go
rename to bindings/go/src/model_repository.go
index e7965d61..273e7edc 100644
--- a/bindings/go/src/repository.go
+++ b/bindings/go/src/model_repository.go
@@ -1,86 +1,62 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type Repository struct {
-
// Base URL from which packages and other artifacts are downloaded.
CdnUrl string `json:"cdn_url,omitempty"`
-
//
CreatedAt string `json:"created_at,omitempty"`
-
//
DeletedAt string `json:"deleted_at,omitempty"`
-
// A description of the repository's purpose/contents.
Description string `json:"description,omitempty"`
-
//
GpgKeys []ReposGpgKeys `json:"gpg_keys,omitempty"`
-
// If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted.
IndexFiles bool `json:"index_files,omitempty"`
-
//
IsOpenSource bool `json:"is_open_source,omitempty"`
-
//
IsPrivate bool `json:"is_private,omitempty"`
-
//
IsPublic bool `json:"is_public,omitempty"`
-
// A descriptive name for the repository.
Name string `json:"name"`
-
// Namespace to which this repository belongs.
Namespace string `json:"namespace,omitempty"`
-
// API endpoint where data about this namespace can be retrieved.
NamespaceUrl string `json:"namespace_url,omitempty"`
-
// The number of downloads for packages in the repository.
NumDownloads int32 `json:"num_downloads,omitempty"`
-
// The number of packages in the repository.
PackageCount int32 `json:"package_count,omitempty"`
-
// The number of groups in the repository.
PackageGroupCount int32 `json:"package_group_count,omitempty"`
-
// The repository type changes how it is accessed and billed. Private repositories can only be used on paid plans, but are visible only to you or authorised delegates. Open-Source repositories are always visible to everyone and are restricted by licensing, but are free to use and come with generous bandwidth/storage. You can only select Open-Source at repository creation time.
RepositoryType string `json:"repository_type,omitempty"`
-
// The repository type changes how it is accessed and billed. Private repositories can only be used on paid plans, but are visible only to you or authorised delegates. Public repositories are free to use on all plans and visible to all Cloudsmith users.
RepositoryTypeStr string `json:"repository_type_str,omitempty"`
-
// Website URL for this repository.
SelfHtmlUrl string `json:"self_html_url,omitempty"`
-
// API endpoint where data about this repository can be retrieved.
SelfUrl string `json:"self_url,omitempty"`
-
// The calculated size of the repository.
Size int32 `json:"size,omitempty"`
-
// The calculated size of the repository (human readable).
SizeStr string `json:"size_str,omitempty"`
-
// The slug identifies the repository in URIs.
Slug string `json:"slug,omitempty"`
-
// The slug_perm immutably identifies the repository. It will never change once a repository has been created.
SlugPerm string `json:"slug_perm,omitempty"`
-
// The Cloudsmith region in which package files are stored.
StorageRegion string `json:"storage_region,omitempty"`
}
diff --git a/bindings/go/src/repository_token.go b/bindings/go/src/model_repository_token.go
similarity index 96%
rename from bindings/go/src/repository_token.go
rename to bindings/go/src/model_repository_token.go
index 1b6c3ec8..58a143ea 100644
--- a/bindings/go/src/repository_token.go
+++ b/bindings/go/src/model_repository_token.go
@@ -1,131 +1,92 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type RepositoryToken struct {
-
//
Clients int32 `json:"clients,omitempty"`
-
// The datetime the token was updated at.
CreatedAt string `json:"created_at,omitempty"`
-
//
CreatedBy string `json:"created_by,omitempty"`
-
//
CreatedByUrl string `json:"created_by_url,omitempty"`
-
// If selected this is the default token for this repository.
Default_ bool `json:"default,omitempty"`
-
//
DisableUrl string `json:"disable_url,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
//
EnableUrl string `json:"enable_url,omitempty"`
-
//
EulaAccepted interface{} `json:"eula_accepted,omitempty"`
-
// The datetime the EULA was accepted at.
EulaAcceptedAt string `json:"eula_accepted_at,omitempty"`
-
//
EulaAcceptedFrom string `json:"eula_accepted_from,omitempty"`
-
// If checked, a EULA acceptance is required for this token.
EulaRequired bool `json:"eula_required,omitempty"`
-
//
HasLimits bool `json:"has_limits,omitempty"`
-
//
Identifier int32 `json:"identifier,omitempty"`
-
// If enabled, the token will allow downloads based on configured restrictions (if any).
IsActive bool `json:"is_active,omitempty"`
-
//
IsLimited bool `json:"is_limited,omitempty"`
-
// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitBandwidth int32 `json:"limit_bandwidth,omitempty"`
-
//
LimitBandwidthUnit string `json:"limit_bandwidth_unit,omitempty"`
-
// The starting date/time the token is allowed to be used from.
LimitDateRangeFrom string `json:"limit_date_range_from,omitempty"`
-
// The ending date/time the token is allowed to be used until.
LimitDateRangeTo string `json:"limit_date_range_to,omitempty"`
-
// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumClients int32 `json:"limit_num_clients,omitempty"`
-
// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumDownloads int32 `json:"limit_num_downloads,omitempty"`
-
// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata.
LimitPackageQuery string `json:"limit_package_query,omitempty"`
-
// The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash.
LimitPathQuery string `json:"limit_path_query,omitempty"`
-
//
Metadata interface{} `json:"metadata,omitempty"`
-
//
Name string `json:"name"`
-
//
RefreshUrl string `json:"refresh_url,omitempty"`
-
//
ResetUrl string `json:"reset_url,omitempty"`
-
// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero.
ScheduledResetAt string `json:"scheduled_reset_at,omitempty"`
-
//
ScheduledResetPeriod string `json:"scheduled_reset_period,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
//
Token string `json:"token,omitempty"`
-
// The datetime the token was updated at.
UpdatedAt string `json:"updated_at,omitempty"`
-
//
UpdatedBy string `json:"updated_by,omitempty"`
-
//
UpdatedByUrl string `json:"updated_by_url,omitempty"`
-
//
Usage string `json:"usage,omitempty"`
-
//
User string `json:"user,omitempty"`
-
//
UserUrl string `json:"user_url,omitempty"`
}
diff --git a/bindings/go/src/repository_token_refresh.go b/bindings/go/src/model_repository_token_refresh.go
similarity index 96%
rename from bindings/go/src/repository_token_refresh.go
rename to bindings/go/src/model_repository_token_refresh.go
index 7d9fcdfa..3b7a5357 100644
--- a/bindings/go/src/repository_token_refresh.go
+++ b/bindings/go/src/model_repository_token_refresh.go
@@ -1,131 +1,92 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type RepositoryTokenRefresh struct {
-
//
Clients int32 `json:"clients,omitempty"`
-
// The datetime the token was updated at.
CreatedAt string `json:"created_at,omitempty"`
-
//
CreatedBy string `json:"created_by,omitempty"`
-
//
CreatedByUrl string `json:"created_by_url,omitempty"`
-
// If selected this is the default token for this repository.
Default_ bool `json:"default,omitempty"`
-
//
DisableUrl string `json:"disable_url,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
//
EnableUrl string `json:"enable_url,omitempty"`
-
//
EulaAccepted interface{} `json:"eula_accepted,omitempty"`
-
// The datetime the EULA was accepted at.
EulaAcceptedAt string `json:"eula_accepted_at,omitempty"`
-
//
EulaAcceptedFrom string `json:"eula_accepted_from,omitempty"`
-
// If checked, a EULA acceptance is required for this token.
EulaRequired bool `json:"eula_required,omitempty"`
-
//
HasLimits bool `json:"has_limits,omitempty"`
-
//
Identifier int32 `json:"identifier,omitempty"`
-
// If enabled, the token will allow downloads based on configured restrictions (if any).
IsActive bool `json:"is_active,omitempty"`
-
//
IsLimited bool `json:"is_limited,omitempty"`
-
// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitBandwidth int32 `json:"limit_bandwidth,omitempty"`
-
//
LimitBandwidthUnit string `json:"limit_bandwidth_unit,omitempty"`
-
// The starting date/time the token is allowed to be used from.
LimitDateRangeFrom string `json:"limit_date_range_from,omitempty"`
-
// The ending date/time the token is allowed to be used until.
LimitDateRangeTo string `json:"limit_date_range_to,omitempty"`
-
// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumClients int32 `json:"limit_num_clients,omitempty"`
-
// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumDownloads int32 `json:"limit_num_downloads,omitempty"`
-
// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata.
LimitPackageQuery string `json:"limit_package_query,omitempty"`
-
// The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash.
LimitPathQuery string `json:"limit_path_query,omitempty"`
-
//
Metadata interface{} `json:"metadata,omitempty"`
-
//
Name string `json:"name,omitempty"`
-
//
RefreshUrl string `json:"refresh_url,omitempty"`
-
//
ResetUrl string `json:"reset_url,omitempty"`
-
// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero.
ScheduledResetAt string `json:"scheduled_reset_at,omitempty"`
-
//
ScheduledResetPeriod string `json:"scheduled_reset_period,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
//
Token string `json:"token,omitempty"`
-
// The datetime the token was updated at.
UpdatedAt string `json:"updated_at,omitempty"`
-
//
UpdatedBy string `json:"updated_by,omitempty"`
-
//
UpdatedByUrl string `json:"updated_by_url,omitempty"`
-
//
Usage string `json:"usage,omitempty"`
-
//
User string `json:"user,omitempty"`
-
//
UserUrl string `json:"user_url,omitempty"`
}
diff --git a/bindings/go/src/repository_token_sync.go b/bindings/go/src/model_repository_token_sync.go
similarity index 71%
rename from bindings/go/src/repository_token_sync.go
rename to bindings/go/src/model_repository_token_sync.go
index dcf19e79..bde3f61a 100644
--- a/bindings/go/src/repository_token_sync.go
+++ b/bindings/go/src/model_repository_token_sync.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type RepositoryTokenSync struct {
-
// The entitlements that have been synchronised.
Tokens []RepositoryTokenSyncTokens `json:"tokens,omitempty"`
}
diff --git a/bindings/go/src/repository_token_sync_tokens.go b/bindings/go/src/model_repository_token_sync_tokens.go
similarity index 96%
rename from bindings/go/src/repository_token_sync_tokens.go
rename to bindings/go/src/model_repository_token_sync_tokens.go
index 86e2745d..1f036acd 100644
--- a/bindings/go/src/repository_token_sync_tokens.go
+++ b/bindings/go/src/model_repository_token_sync_tokens.go
@@ -1,131 +1,92 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type RepositoryTokenSyncTokens struct {
-
//
Clients int32 `json:"clients,omitempty"`
-
// The datetime the token was updated at.
CreatedAt string `json:"created_at,omitempty"`
-
//
CreatedBy string `json:"created_by,omitempty"`
-
//
CreatedByUrl string `json:"created_by_url,omitempty"`
-
// If selected this is the default token for this repository.
Default_ bool `json:"default,omitempty"`
-
//
DisableUrl string `json:"disable_url,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
//
EnableUrl string `json:"enable_url,omitempty"`
-
//
EulaAccepted interface{} `json:"eula_accepted,omitempty"`
-
// The datetime the EULA was accepted at.
EulaAcceptedAt string `json:"eula_accepted_at,omitempty"`
-
//
EulaAcceptedFrom string `json:"eula_accepted_from,omitempty"`
-
// If checked, a EULA acceptance is required for this token.
EulaRequired bool `json:"eula_required,omitempty"`
-
//
HasLimits bool `json:"has_limits,omitempty"`
-
//
Identifier int32 `json:"identifier,omitempty"`
-
// If enabled, the token will allow downloads based on configured restrictions (if any).
IsActive bool `json:"is_active,omitempty"`
-
//
IsLimited bool `json:"is_limited,omitempty"`
-
// The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitBandwidth int32 `json:"limit_bandwidth,omitempty"`
-
//
LimitBandwidthUnit string `json:"limit_bandwidth_unit,omitempty"`
-
// The starting date/time the token is allowed to be used from.
LimitDateRangeFrom string `json:"limit_date_range_from,omitempty"`
-
// The ending date/time the token is allowed to be used until.
LimitDateRangeTo string `json:"limit_date_range_to,omitempty"`
-
// The maximum number of unique clients allowed for the token. Please note that since clients are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumClients int32 `json:"limit_num_clients,omitempty"`
-
// The maximum number of downloads allowed for the token. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
LimitNumDownloads int32 `json:"limit_num_downloads,omitempty"`
-
// The package-based search query to apply to restrict downloads to. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. This will still allow access to non-package files, such as metadata.
LimitPackageQuery string `json:"limit_package_query,omitempty"`
-
// The path-based search query to apply to restrict downloads to. This supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. The path evaluated does not include the domain name, the namespace, the entitlement code used, the package format, etc. and it always starts with a forward slash.
LimitPathQuery string `json:"limit_path_query,omitempty"`
-
//
Metadata string `json:"metadata,omitempty"`
-
//
Name string `json:"name,omitempty"`
-
//
RefreshUrl string `json:"refresh_url,omitempty"`
-
//
ResetUrl string `json:"reset_url,omitempty"`
-
// The time at which the scheduled reset period has elapsed and the token limits were automatically reset to zero.
ScheduledResetAt string `json:"scheduled_reset_at,omitempty"`
-
//
ScheduledResetPeriod string `json:"scheduled_reset_period,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
//
Token string `json:"token,omitempty"`
-
// The datetime the token was updated at.
UpdatedAt string `json:"updated_at,omitempty"`
-
//
UpdatedBy string `json:"updated_by,omitempty"`
-
//
UpdatedByUrl string `json:"updated_by_url,omitempty"`
-
//
Usage string `json:"usage,omitempty"`
-
//
User string `json:"user,omitempty"`
-
//
UserUrl string `json:"user_url,omitempty"`
}
diff --git a/bindings/go/src/repository_webhook.go b/bindings/go/src/model_repository_webhook.go
similarity index 95%
rename from bindings/go/src/repository_webhook.go
rename to bindings/go/src/model_repository_webhook.go
index 03859d2e..e584188c 100644
--- a/bindings/go/src/repository_webhook.go
+++ b/bindings/go/src/model_repository_webhook.go
@@ -1,95 +1,68 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type RepositoryWebhook struct {
-
//
CreatedAt string `json:"created_at,omitempty"`
-
//
CreatedBy string `json:"created_by,omitempty"`
-
//
CreatedByUrl string `json:"created_by_url,omitempty"`
-
//
DisableReason string `json:"disable_reason,omitempty"`
-
//
DisableReasonStr string `json:"disable_reason_str,omitempty"`
-
//
Events []string `json:"events"`
-
//
Identifier int32 `json:"identifier,omitempty"`
-
// If enabled, the webhook will trigger on events and send payloads to the configured target URL.
IsActive bool `json:"is_active,omitempty"`
-
//
IsLastResponseBad bool `json:"is_last_response_bad,omitempty"`
-
//
LastResponseStatus int32 `json:"last_response_status,omitempty"`
-
//
LastResponseStatusStr string `json:"last_response_status_str,omitempty"`
-
//
NumSent int32 `json:"num_sent,omitempty"`
-
// The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire.
PackageQuery string `json:"package_query,omitempty"`
-
// The format of the payloads for webhook requests.
RequestBodyFormat string `json:"request_body_format,omitempty"`
-
//
RequestBodyFormatStr string `json:"request_body_format_str,omitempty"`
-
// The format of the payloads for webhook requests.
RequestBodyTemplateFormat string `json:"request_body_template_format,omitempty"`
-
//
RequestBodyTemplateFormatStr string `json:"request_body_template_format_str,omitempty"`
-
// The value that will be sent for the 'Content Type' header.
RequestContentType string `json:"request_content_type,omitempty"`
-
// The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side.
SecretHeader string `json:"secret_header,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// The destination URL that webhook payloads will be POST'ed to.
TargetUrl string `json:"target_url"`
-
//
Templates []WebhooksownerrepoTemplates `json:"templates"`
-
//
UpdatedAt string `json:"updated_at,omitempty"`
-
//
UpdatedBy string `json:"updated_by,omitempty"`
-
//
UpdatedByUrl string `json:"updated_by_url,omitempty"`
-
// If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks.
VerifySsl bool `json:"verify_ssl,omitempty"`
}
diff --git a/bindings/go/src/resources_rate_check.go b/bindings/go/src/model_resources_rate_check.go
similarity index 69%
rename from bindings/go/src/resources_rate_check.go
rename to bindings/go/src/model_resources_rate_check.go
index c3cfc52f..ea07060c 100644
--- a/bindings/go/src/resources_rate_check.go
+++ b/bindings/go/src/model_resources_rate_check.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type ResourcesRateCheck struct {
-
// Rate limit values per resource
Resources interface{} `json:"resources,omitempty"`
}
diff --git a/bindings/go/src/status.go b/bindings/go/src/model_status.go
similarity index 67%
rename from bindings/go/src/status.go
rename to bindings/go/src/model_status.go
index b128974e..baf0e5ea 100644
--- a/bindings/go/src/status.go
+++ b/bindings/go/src/model_status.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type Status struct {
-
// An extended message for the response.
Detail string `json:"detail"`
}
diff --git a/bindings/go/src/status_basic.go b/bindings/go/src/model_status_basic.go
similarity index 75%
rename from bindings/go/src/status_basic.go
rename to bindings/go/src/model_status_basic.go
index 8f35b820..56006073 100644
--- a/bindings/go/src/status_basic.go
+++ b/bindings/go/src/model_status_basic.go
@@ -1,20 +1,18 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type StatusBasic struct {
-
// The message describing the state of the API.
Detail string `json:"detail,omitempty"`
-
// The current version for the Cloudsmith service.
Version string `json:"version,omitempty"`
}
diff --git a/bindings/go/src/storage_region.go b/bindings/go/src/model_storage_region.go
similarity index 71%
rename from bindings/go/src/storage_region.go
rename to bindings/go/src/model_storage_region.go
index 6714f87e..9c323849 100644
--- a/bindings/go/src/storage_region.go
+++ b/bindings/go/src/model_storage_region.go
@@ -1,20 +1,18 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type StorageRegion struct {
-
// Name of the storage region
Label string `json:"label"`
-
// Slug for the storage region
Slug string `json:"slug"`
}
diff --git a/bindings/go/src/user_auth_token.go b/bindings/go/src/model_user_auth_token.go
similarity index 68%
rename from bindings/go/src/user_auth_token.go
rename to bindings/go/src/model_user_auth_token.go
index 921f9918..f940d9aa 100644
--- a/bindings/go/src/user_auth_token.go
+++ b/bindings/go/src/model_user_auth_token.go
@@ -1,17 +1,16 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type UserAuthToken struct {
-
// API token for the authenticated user
Token string `json:"token,omitempty"`
}
diff --git a/bindings/go/src/user_brief.go b/bindings/go/src/model_user_brief.go
similarity index 86%
rename from bindings/go/src/user_brief.go
rename to bindings/go/src/model_user_brief.go
index 434c9495..5baaf971 100644
--- a/bindings/go/src/user_brief.go
+++ b/bindings/go/src/model_user_brief.go
@@ -1,35 +1,28 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type UserBrief struct {
-
// If true then you're logged in as a user.
Authenticated bool `json:"authenticated,omitempty"`
-
// Your email address that we use to contact you. This is only visible to you.
Email string `json:"email,omitempty"`
-
// The full name of the user (if any).
Name string `json:"name,omitempty"`
-
// The URL for the full profile of the user.
ProfileUrl string `json:"profile_url,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
}
diff --git a/bindings/go/src/user_profile.go b/bindings/go/src/model_user_profile.go
similarity index 87%
rename from bindings/go/src/user_profile.go
rename to bindings/go/src/model_user_profile.go
index a4b44ebc..ec5c2013 100644
--- a/bindings/go/src/user_profile.go
+++ b/bindings/go/src/model_user_profile.go
@@ -1,44 +1,34 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type UserProfile struct {
-
//
Company string `json:"company,omitempty"`
-
//
FirstName string `json:"first_name"`
-
//
JobTitle string `json:"job_title,omitempty"`
-
//
JoinedAt string `json:"joined_at,omitempty"`
-
//
LastName string `json:"last_name"`
-
//
Name string `json:"name,omitempty"`
-
//
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// Your tagline is a sentence about you. Make it funny. Make it professional. Either way, it's public and it represents who you are.
Tagline string `json:"tagline,omitempty"`
-
//
Url string `json:"url,omitempty"`
}
diff --git a/bindings/go/src/user_token_create.go b/bindings/go/src/model_user_token_create.go
similarity index 74%
rename from bindings/go/src/user_token_create.go
rename to bindings/go/src/model_user_token_create.go
index 1d07706a..82c42617 100644
--- a/bindings/go/src/user_token_create.go
+++ b/bindings/go/src/model_user_token_create.go
@@ -1,20 +1,18 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type UserTokenCreate struct {
-
// Email address to authenticate with
Email string `json:"email,omitempty"`
-
// Password to authenticate with
Password string `json:"password,omitempty"`
}
diff --git a/bindings/go/src/vagrant_package_upload.go b/bindings/go/src/model_vagrant_package_upload.go
similarity index 96%
rename from bindings/go/src/vagrant_package_upload.go
rename to bindings/go/src/model_vagrant_package_upload.go
index e371dd20..1f17a3b3 100644
--- a/bindings/go/src/vagrant_package_upload.go
+++ b/bindings/go/src/model_vagrant_package_upload.go
@@ -1,209 +1,144 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type VagrantPackageUpload struct {
-
//
Architectures []PackagesownerrepoArchitectures `json:"architectures,omitempty"`
-
//
CdnUrl string `json:"cdn_url,omitempty"`
-
//
ChecksumMd5 string `json:"checksum_md5,omitempty"`
-
//
ChecksumSha1 string `json:"checksum_sha1,omitempty"`
-
//
ChecksumSha256 string `json:"checksum_sha256,omitempty"`
-
//
ChecksumSha512 string `json:"checksum_sha512,omitempty"`
-
// A checksum of all of the package's dependencies.
DependenciesChecksumMd5 string `json:"dependencies_checksum_md5,omitempty"`
-
//
DependenciesUrl string `json:"dependencies_url,omitempty"`
-
// A textual description of this package.
Description string `json:"description,omitempty"`
-
//
Distro interface{} `json:"distro,omitempty"`
-
//
DistroVersion interface{} `json:"distro_version,omitempty"`
-
//
Downloads int32 `json:"downloads,omitempty"`
-
// The epoch of the package version (if any).
Epoch int32 `json:"epoch,omitempty"`
-
//
Extension string `json:"extension,omitempty"`
-
//
Filename string `json:"filename,omitempty"`
-
//
Files []PackagesownerrepoFiles `json:"files,omitempty"`
-
//
Format string `json:"format,omitempty"`
-
//
FormatUrl string `json:"format_url,omitempty"`
-
// Unique and permanent identifier for the package.
IdentifierPerm string `json:"identifier_perm,omitempty"`
-
//
Indexed bool `json:"indexed,omitempty"`
-
//
IsSyncAwaiting bool `json:"is_sync_awaiting,omitempty"`
-
//
IsSyncCompleted bool `json:"is_sync_completed,omitempty"`
-
//
IsSyncFailed bool `json:"is_sync_failed,omitempty"`
-
//
IsSyncInFlight bool `json:"is_sync_in_flight,omitempty"`
-
//
IsSyncInProgress bool `json:"is_sync_in_progress,omitempty"`
-
// The license of this package.
License string `json:"license,omitempty"`
-
// The name of this package.
Name string `json:"name"`
-
//
Namespace string `json:"namespace,omitempty"`
-
//
NamespaceUrl string `json:"namespace_url,omitempty"`
-
//
NumFiles int32 `json:"num_files,omitempty"`
-
// The type of package contents.
PackageType string `json:"package_type,omitempty"`
-
// The virtual machine provider for the box.
Provider string `json:"provider"`
-
// The release of the package version (if any).
Release string `json:"release,omitempty"`
-
//
Repository string `json:"repository,omitempty"`
-
//
RepositoryUrl string `json:"repository_url,omitempty"`
-
// The datetime the security scanning was completed.
SecurityScanCompletedAt string `json:"security_scan_completed_at,omitempty"`
-
// The datetime the security scanning was started.
SecurityScanStartedAt string `json:"security_scan_started_at,omitempty"`
-
//
SecurityScanStatus string `json:"security_scan_status,omitempty"`
-
// The datetime the security scanning status was updated.
SecurityScanStatusUpdatedAt string `json:"security_scan_status_updated_at,omitempty"`
-
//
SelfHtmlUrl string `json:"self_html_url,omitempty"`
-
//
SelfUrl string `json:"self_url,omitempty"`
-
//
SignatureUrl string `json:"signature_url,omitempty"`
-
// The calculated size of the package.
Size int32 `json:"size,omitempty"`
-
// The public unique identifier for the package.
Slug string `json:"slug,omitempty"`
-
//
SlugPerm string `json:"slug_perm,omitempty"`
-
// The synchronisation (in progress) stage of the package.
Stage string `json:"stage,omitempty"`
-
//
StageStr string `json:"stage_str,omitempty"`
-
// The datetime the package stage was updated at.
StageUpdatedAt string `json:"stage_updated_at,omitempty"`
-
// The synchronisation status of the package.
Status string `json:"status,omitempty"`
-
// A textual description for the synchronous status reason (if any
StatusReason string `json:"status_reason,omitempty"`
-
//
StatusStr string `json:"status_str,omitempty"`
-
// The datetime the package status was updated at.
StatusUpdatedAt string `json:"status_updated_at,omitempty"`
-
//
StatusUrl string `json:"status_url,omitempty"`
-
//
Subtype string `json:"subtype,omitempty"`
-
// A one-liner synopsis of this package.
Summary string `json:"summary,omitempty"`
-
// The datetime the package sync was finished at.
SyncFinishedAt string `json:"sync_finished_at,omitempty"`
-
// Synchronisation progress (from 0-100)
SyncProgress int32 `json:"sync_progress,omitempty"`
-
// All immutable tags on the package, grouped by tag type. Immutable tags cannot be (easily) deleted.
TagsImmutable interface{} `json:"tags_immutable,omitempty"`
-
//
TypeDisplay string `json:"type_display,omitempty"`
-
// The date this package was uploaded.
UploadedAt string `json:"uploaded_at,omitempty"`
-
//
Uploader string `json:"uploader,omitempty"`
-
//
UploaderUrl string `json:"uploader_url,omitempty"`
-
// The raw version for this package.
Version string `json:"version"`
-
//
VersionOrig string `json:"version_orig,omitempty"`
-
//
VulnerabilityScanResultsUrl string `json:"vulnerability_scan_results_url,omitempty"`
}
diff --git a/bindings/go/src/vulnerability_scan_results.go b/bindings/go/src/model_vulnerability_scan_results.go
similarity index 85%
rename from bindings/go/src/vulnerability_scan_results.go
rename to bindings/go/src/model_vulnerability_scan_results.go
index 2d5d0b2a..63169943 100644
--- a/bindings/go/src/vulnerability_scan_results.go
+++ b/bindings/go/src/model_vulnerability_scan_results.go
@@ -1,38 +1,30 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type VulnerabilityScanResults struct {
-
// The time this scan result was stored.
CreatedAt string `json:"created_at,omitempty"`
-
// Do the results contain any known vulnerabilities?
HasVulnerabilities bool `json:"has_vulnerabilities,omitempty"`
-
//
Identifier string `json:"identifier"`
-
//
MaxSeverity string `json:"max_severity,omitempty"`
-
//
NumVulnerabilities int32 `json:"num_vulnerabilities,omitempty"`
-
//
Package_ interface{} `json:"package"`
-
//
Scan interface{} `json:"scan"`
-
//
ScanId int32 `json:"scan_id"`
}
diff --git a/bindings/go/src/vulnerability_scan_results_list.go b/bindings/go/src/model_vulnerability_scan_results_list.go
similarity index 85%
rename from bindings/go/src/vulnerability_scan_results_list.go
rename to bindings/go/src/model_vulnerability_scan_results_list.go
index b245fc82..c3e45fef 100644
--- a/bindings/go/src/vulnerability_scan_results_list.go
+++ b/bindings/go/src/model_vulnerability_scan_results_list.go
@@ -1,35 +1,28 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type VulnerabilityScanResultsList struct {
-
// The time this scan result was stored.
CreatedAt string `json:"created_at,omitempty"`
-
// Do the results contain any known vulnerabilities?
HasVulnerabilities bool `json:"has_vulnerabilities,omitempty"`
-
//
Identifier string `json:"identifier"`
-
//
MaxSeverity string `json:"max_severity,omitempty"`
-
//
NumVulnerabilities int32 `json:"num_vulnerabilities,omitempty"`
-
//
Package_ interface{} `json:"package"`
-
//
ScanId int32 `json:"scan_id"`
}
diff --git a/bindings/go/src/webhooks_create.go b/bindings/go/src/model_webhooks_create.go
similarity index 95%
rename from bindings/go/src/webhooks_create.go
rename to bindings/go/src/model_webhooks_create.go
index 2e44b382..2188d1ed 100644
--- a/bindings/go/src/webhooks_create.go
+++ b/bindings/go/src/model_webhooks_create.go
@@ -1,50 +1,38 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type WebhooksCreate struct {
-
// None
Events []string `json:"events"`
-
// If enabled, the webhook will trigger on events and send payloads to the configured target URL.
IsActive bool `json:"is_active,omitempty"`
-
// The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire.
PackageQuery string `json:"package_query,omitempty"`
-
// The format of the payloads for webhook requests.
RequestBodyFormat string `json:"request_body_format,omitempty"`
-
// The format of the payloads for webhook requests.
RequestBodyTemplateFormat string `json:"request_body_template_format,omitempty"`
-
// The value that will be sent for the 'Content Type' header.
RequestContentType string `json:"request_content_type,omitempty"`
-
// The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side.
SecretHeader string `json:"secret_header,omitempty"`
-
// The value for the predefined secret (note: this is treated as a passphrase and is encrypted when we store it). You can use this as a form of authentication on the endpoint side.
SecretValue string `json:"secret_value,omitempty"`
-
// The value for the signature key - This is used to generate an HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature header so that you can ensure that the request wasn't modified by a malicious party (note: this is treated as a passphrase and is encrypted when we store it).
SignatureKey string `json:"signature_key,omitempty"`
-
// The destination URL that webhook payloads will be POST'ed to.
TargetUrl string `json:"target_url"`
-
// None
Templates []WebhooksownerrepoTemplates `json:"templates"`
-
// If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks.
VerifySsl bool `json:"verify_ssl,omitempty"`
}
diff --git a/bindings/go/src/webhooks_partial_update.go b/bindings/go/src/model_webhooks_partial_update.go
similarity index 95%
rename from bindings/go/src/webhooks_partial_update.go
rename to bindings/go/src/model_webhooks_partial_update.go
index c6fc6631..d335b0a2 100644
--- a/bindings/go/src/webhooks_partial_update.go
+++ b/bindings/go/src/model_webhooks_partial_update.go
@@ -1,50 +1,38 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type WebhooksPartialUpdate struct {
-
// None
Events []string `json:"events,omitempty"`
-
// If enabled, the webhook will trigger on events and send payloads to the configured target URL.
IsActive bool `json:"is_active,omitempty"`
-
// The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire.
PackageQuery string `json:"package_query,omitempty"`
-
// The format of the payloads for webhook requests.
RequestBodyFormat string `json:"request_body_format,omitempty"`
-
// The format of the payloads for webhook requests.
RequestBodyTemplateFormat string `json:"request_body_template_format,omitempty"`
-
// The value that will be sent for the 'Content Type' header.
RequestContentType string `json:"request_content_type,omitempty"`
-
// The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side.
SecretHeader string `json:"secret_header,omitempty"`
-
// The value for the predefined secret (note: this is treated as a passphrase and is encrypted when we store it). You can use this as a form of authentication on the endpoint side.
SecretValue string `json:"secret_value,omitempty"`
-
// The value for the signature key - This is used to generate an HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature header so that you can ensure that the request wasn't modified by a malicious party (note: this is treated as a passphrase and is encrypted when we store it).
SignatureKey string `json:"signature_key,omitempty"`
-
// The destination URL that webhook payloads will be POST'ed to.
TargetUrl string `json:"target_url,omitempty"`
-
// None
Templates []WebhooksownerrepoTemplates `json:"templates,omitempty"`
-
// If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks.
VerifySsl bool `json:"verify_ssl,omitempty"`
}
diff --git a/bindings/go/src/webhooksownerrepo_templates.go b/bindings/go/src/model_webhooksownerrepo_templates.go
similarity index 70%
rename from bindings/go/src/webhooksownerrepo_templates.go
rename to bindings/go/src/model_webhooksownerrepo_templates.go
index 4b3cb6d6..b584a18f 100644
--- a/bindings/go/src/webhooksownerrepo_templates.go
+++ b/bindings/go/src/model_webhooksownerrepo_templates.go
@@ -1,20 +1,18 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
type WebhooksownerrepoTemplates struct {
-
//
Event string `json:"event,omitempty"`
-
//
Template string `json:"template,omitempty"`
}
diff --git a/bindings/go/src/namespaces_api.go b/bindings/go/src/namespaces_api.go
deleted file mode 100644
index d1be6e11..00000000
--- a/bindings/go/src/namespaces_api.go
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type NamespacesApi struct {
- Configuration *Configuration
-}
-
-func NewNamespacesApi() *NamespacesApi {
- configuration := NewConfiguration()
- return &NamespacesApi{
- Configuration: configuration,
- }
-}
-
-func NewNamespacesApiWithBasePath(basePath string) *NamespacesApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &NamespacesApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get a list of all namespaces the user belongs to.
- * Get a list of all namespaces the user belongs to.
- *
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @return []Namespace
- */
-func (a NamespacesApi) NamespacesList(page int32, pageSize int32) ([]Namespace, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/namespaces/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]Namespace)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "NamespacesList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Views for working with namespaces.
- * Views for working with namespaces.
- *
- * @param slug
- * @return *Namespace
- */
-func (a NamespacesApi) NamespacesRead(slug string) (*Namespace, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/namespaces/{slug}/"
- localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(Namespace)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "NamespacesRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/orgs_api.go b/bindings/go/src/orgs_api.go
deleted file mode 100644
index 70078e73..00000000
--- a/bindings/go/src/orgs_api.go
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type OrgsApi struct {
- Configuration *Configuration
-}
-
-func NewOrgsApi() *OrgsApi {
- configuration := NewConfiguration()
- return &OrgsApi{
- Configuration: configuration,
- }
-}
-
-func NewOrgsApiWithBasePath(basePath string) *OrgsApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &OrgsApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get a list of all the organizations you are associated with.
- * Get a list of all the organizations you are associated with.
- *
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @return []Organization
- */
-func (a OrgsApi) OrgsList(page int32, pageSize int32) ([]Organization, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/orgs/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]Organization)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "OrgsList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get the details for all organization members.
- * Get the details for all organization members.
- *
- * @param org
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @return []OrganizationMembership
- */
-func (a OrgsApi) OrgsMembersList(org string, page int32, pageSize int32) ([]OrganizationMembership, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/orgs/{org}/members/"
- localVarPath = strings.Replace(localVarPath, "{"+"org"+"}", fmt.Sprintf("%v", org), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]OrganizationMembership)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "OrgsMembersList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get the details for a specific organization member.
- * Get the details for a specific organization member.
- *
- * @param org
- * @param member
- * @return *OrganizationMembership
- */
-func (a OrgsApi) OrgsMembersRead(org string, member string) (*OrganizationMembership, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/orgs/{org}/members/{member}/"
- localVarPath = strings.Replace(localVarPath, "{"+"org"+"}", fmt.Sprintf("%v", org), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"member"+"}", fmt.Sprintf("%v", member), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(OrganizationMembership)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "OrgsMembersRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Removes a member from the organization.
- * Removes a member from the organization.
- *
- * @param org
- * @param member
- * @return *OrganizationMembership
- */
-func (a OrgsApi) OrgsMembersRemove(org string, member string) (*OrganizationMembership, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/orgs/{org}/members/{member}/remove/"
- localVarPath = strings.Replace(localVarPath, "{"+"org"+"}", fmt.Sprintf("%v", org), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"member"+"}", fmt.Sprintf("%v", member), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(OrganizationMembership)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "OrgsMembersRemove", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get the details for the specific organization.
- * Get the details for the specific organization.
- *
- * @param org
- * @return *Organization
- */
-func (a OrgsApi) OrgsRead(org string) (*Organization, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/orgs/{org}/"
- localVarPath = strings.Replace(localVarPath, "{"+"org"+"}", fmt.Sprintf("%v", org), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(Organization)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "OrgsRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/packages_api.go b/bindings/go/src/packages_api.go
deleted file mode 100644
index be83ab50..00000000
--- a/bindings/go/src/packages_api.go
+++ /dev/null
@@ -1,3804 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type PackagesApi struct {
- Configuration *Configuration
-}
-
-func NewPackagesApi() *PackagesApi {
- configuration := NewConfiguration()
- return &PackagesApi{
- Configuration: configuration,
- }
-}
-
-func NewPackagesApiWithBasePath(basePath string) *PackagesApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &PackagesApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Copy a package to another repository.
- * Copy a package to another repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param data
- * @return *PackageCopy
- */
-func (a PackagesApi) PackagesCopy(owner string, repo string, identifier string, data PackagesCopy) (*PackageCopy, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/{identifier}/copy/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(PackageCopy)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesCopy", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Delete a specific package in a repository.
- * Delete a specific package in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return void
- */
-func (a PackagesApi) PackagesDelete(owner string, repo string, identifier string) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Delete")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesDelete", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Get the direct (non-transitive) dependencies list for a package.
- * Get the direct (non-transitive) dependencies list for a package.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return *PackageDependencies
- */
-func (a PackagesApi) PackagesDependencies(owner string, repo string, identifier string) (*PackageDependencies, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/{identifier}/dependencies/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(PackageDependencies)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesDependencies", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get a list of all packages associated with repository.
- * Get a list of all packages associated with repository.
- *
- * @param owner
- * @param repo
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @param query A search term for querying names, filenames, versions, distributions, architectures, formats or statuses of packages.
- * @param sort A field for sorting objects in ascending or descending order.
- * @return []ModelPackage
- */
-func (a PackagesApi) PackagesList(owner string, repo string, page int32, pageSize int32, query string, sort string) ([]ModelPackage, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
- localVarQueryParams.Add("query", a.Configuration.APIClient.ParameterToString(query, ""))
- localVarQueryParams.Add("sort", a.Configuration.APIClient.ParameterToString(sort, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]ModelPackage)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Move a package to another repository.
- * Move a package to another repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param data
- * @return *PackageMove
- */
-func (a PackagesApi) PackagesMove(owner string, repo string, identifier string, data PackagesMove) (*PackageMove, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/{identifier}/move/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(PackageMove)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesMove", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get a specific package in a repository.
- * Get a specific package in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return *ModelPackage
- */
-func (a PackagesApi) PackagesRead(owner string, repo string, identifier string) (*ModelPackage, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(ModelPackage)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Schedule a package for resynchronisation.
- * Schedule a package for resynchronisation.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return *ModelPackage
- */
-func (a PackagesApi) PackagesResync(owner string, repo string, identifier string) (*ModelPackage, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/{identifier}/resync/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(ModelPackage)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesResync", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Schedule a package for scanning.
- * Schedule a package for scanning.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return *ModelPackage
- */
-func (a PackagesApi) PackagesScan(owner string, repo string, identifier string) (*ModelPackage, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/{identifier}/scan/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(ModelPackage)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesScan", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get the synchronisation status for a package.
- * Get the synchronisation status for a package.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return *PackageStatus
- */
-func (a PackagesApi) PackagesStatus(owner string, repo string, identifier string) (*PackageStatus, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/{identifier}/status/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(PackageStatus)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesStatus", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Add/Replace/Remove tags for a package.
- * Add/Replace/Remove tags for a package.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param data
- * @return *ModelPackage
- */
-func (a PackagesApi) PackagesTag(owner string, repo string, identifier string, data PackagesTag) (*ModelPackage, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/{identifier}/tag/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(ModelPackage)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesTag", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Alpine package
- * Create a new Alpine package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadAlpine(owner string, repo string, data PackagesUploadAlpine) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/alpine/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadAlpine", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Cargo package
- * Create a new Cargo package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadCargo(owner string, repo string, data PackagesUploadCargo) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/cargo/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadCargo", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new CocoaPods package
- * Create a new CocoaPods package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadCocoapods(owner string, repo string, data PackagesUploadCocoapods) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/cocoapods/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadCocoapods", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Composer package
- * Create a new Composer package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadComposer(owner string, repo string, data PackagesUploadComposer) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/composer/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadComposer", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Conan package
- * Create a new Conan package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *ConanPackageUpload
- */
-func (a PackagesApi) PackagesUploadConan(owner string, repo string, data PackagesUploadConan) (*ConanPackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/conan/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(ConanPackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadConan", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Conda package
- * Create a new Conda package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadConda(owner string, repo string, data PackagesUploadConda) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/conda/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadConda", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new CRAN package
- * Create a new CRAN package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadCran(owner string, repo string, data PackagesUploadCran) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/cran/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadCran", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Dart package
- * Create a new Dart package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadDart(owner string, repo string, data PackagesUploadDart) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/dart/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadDart", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Debian package
- * Create a new Debian package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadDeb(owner string, repo string, data PackagesUploadDeb) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/deb/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadDeb", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Docker package
- * Create a new Docker package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadDocker(owner string, repo string, data PackagesUploadDocker) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/docker/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadDocker", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Go package
- * Create a new Go package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadGo(owner string, repo string, data PackagesUploadGo) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/go/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadGo", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Helm package
- * Create a new Helm package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadHelm(owner string, repo string, data PackagesUploadHelm) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/helm/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadHelm", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new LuaRocks package
- * Create a new LuaRocks package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadLuarocks(owner string, repo string, data PackagesUploadLuarocks) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/luarocks/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadLuarocks", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Maven package
- * Create a new Maven package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *MavenPackageUpload
- */
-func (a PackagesApi) PackagesUploadMaven(owner string, repo string, data PackagesUploadMaven) (*MavenPackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/maven/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(MavenPackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadMaven", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new npm package
- * Create a new npm package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadNpm(owner string, repo string, data PackagesUploadNpm) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/npm/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadNpm", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new NuGet package
- * Create a new NuGet package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadNuget(owner string, repo string, data PackagesUploadNuget) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/nuget/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadNuget", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new P2 package
- * Create a new P2 package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadP2(owner string, repo string, data PackagesUploadP2) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/p2/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadP2", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Python package
- * Create a new Python package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadPython(owner string, repo string, data PackagesUploadPython) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/python/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadPython", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Raw package
- * Create a new Raw package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *RawPackageUpload
- */
-func (a PackagesApi) PackagesUploadRaw(owner string, repo string, data PackagesUploadRaw) (*RawPackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/raw/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(RawPackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadRaw", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new RedHat package
- * Create a new RedHat package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadRpm(owner string, repo string, data PackagesUploadRpm) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/rpm/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadRpm", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Ruby package
- * Create a new Ruby package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadRuby(owner string, repo string, data PackagesUploadRuby) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/ruby/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadRuby", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Terraform package
- * Create a new Terraform package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *AlpinePackageUpload
- */
-func (a PackagesApi) PackagesUploadTerraform(owner string, repo string, data PackagesUploadTerraform) (*AlpinePackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/terraform/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(AlpinePackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadTerraform", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new Vagrant package
- * Create a new Vagrant package
- *
- * @param owner
- * @param repo
- * @param data
- * @return *VagrantPackageUpload
- */
-func (a PackagesApi) PackagesUploadVagrant(owner string, repo string, data PackagesUploadVagrant) (*VagrantPackageUpload, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/upload/vagrant/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(VagrantPackageUpload)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesUploadVagrant", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Alpine package
- * Validate parameters for create Alpine package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadAlpine(owner string, repo string, data PackagesValidateuploadAlpine) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/alpine/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadAlpine", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Cargo package
- * Validate parameters for create Cargo package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadCargo(owner string, repo string, data PackagesValidateuploadCargo) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/cargo/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadCargo", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create CocoaPods package
- * Validate parameters for create CocoaPods package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadCocoapods(owner string, repo string, data PackagesValidateuploadCocoapods) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/cocoapods/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadCocoapods", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Composer package
- * Validate parameters for create Composer package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadComposer(owner string, repo string, data PackagesValidateuploadComposer) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/composer/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadComposer", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Conan package
- * Validate parameters for create Conan package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadConan(owner string, repo string, data PackagesValidateuploadConan) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/conan/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadConan", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Conda package
- * Validate parameters for create Conda package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadConda(owner string, repo string, data PackagesValidateuploadConda) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/conda/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadConda", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create CRAN package
- * Validate parameters for create CRAN package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadCran(owner string, repo string, data PackagesValidateuploadCran) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/cran/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadCran", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Dart package
- * Validate parameters for create Dart package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadDart(owner string, repo string, data PackagesValidateuploadDart) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/dart/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadDart", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Debian package
- * Validate parameters for create Debian package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadDeb(owner string, repo string, data PackagesValidateuploadDeb) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/deb/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadDeb", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Docker package
- * Validate parameters for create Docker package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadDocker(owner string, repo string, data PackagesValidateuploadDocker) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/docker/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadDocker", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Go package
- * Validate parameters for create Go package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadGo(owner string, repo string, data PackagesValidateuploadGo) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/go/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadGo", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Helm package
- * Validate parameters for create Helm package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadHelm(owner string, repo string, data PackagesValidateuploadHelm) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/helm/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadHelm", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create LuaRocks package
- * Validate parameters for create LuaRocks package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadLuarocks(owner string, repo string, data PackagesValidateuploadLuarocks) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/luarocks/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadLuarocks", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Maven package
- * Validate parameters for create Maven package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadMaven(owner string, repo string, data PackagesValidateuploadMaven) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/maven/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadMaven", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create npm package
- * Validate parameters for create npm package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadNpm(owner string, repo string, data PackagesValidateuploadNpm) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/npm/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadNpm", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create NuGet package
- * Validate parameters for create NuGet package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadNuget(owner string, repo string, data PackagesValidateuploadNuget) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/nuget/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadNuget", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create P2 package
- * Validate parameters for create P2 package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadP2(owner string, repo string, data PackagesValidateuploadP2) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/p2/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadP2", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Python package
- * Validate parameters for create Python package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadPython(owner string, repo string, data PackagesValidateuploadPython) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/python/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadPython", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Raw package
- * Validate parameters for create Raw package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadRaw(owner string, repo string, data PackagesValidateuploadRaw) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/raw/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadRaw", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create RedHat package
- * Validate parameters for create RedHat package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadRpm(owner string, repo string, data PackagesValidateuploadRpm) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/rpm/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadRpm", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Ruby package
- * Validate parameters for create Ruby package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadRuby(owner string, repo string, data PackagesValidateuploadRuby) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/ruby/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadRuby", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Terraform package
- * Validate parameters for create Terraform package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadTerraform(owner string, repo string, data PackagesValidateuploadTerraform) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/terraform/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadTerraform", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Validate parameters for create Vagrant package
- * Validate parameters for create Vagrant package
- *
- * @param owner
- * @param repo
- * @param data
- * @return void
- */
-func (a PackagesApi) PackagesValidateUploadVagrant(owner string, repo string, data PackagesValidateuploadVagrant) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/packages/{owner}/{repo}/validate-upload/vagrant/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "PackagesValidateUploadVagrant", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/quota_api.go b/bindings/go/src/quota_api.go
deleted file mode 100644
index 3574d92e..00000000
--- a/bindings/go/src/quota_api.go
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type QuotaApi struct {
- Configuration *Configuration
-}
-
-func NewQuotaApi() *QuotaApi {
- configuration := NewConfiguration()
- return &QuotaApi{
- Configuration: configuration,
- }
-}
-
-func NewQuotaApiWithBasePath(basePath string) *QuotaApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &QuotaApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Quota history for a given namespace.
- * Quota history for a given namespace.
- *
- * @param owner
- * @return *QuotaHistory
- */
-func (a QuotaApi) QuotaHistoryRead(owner string) (*QuotaHistory, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/quota/history/{owner}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(QuotaHistory)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "QuotaHistoryRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Open-source Quota history for a given namespace.
- * Open-source Quota history for a given namespace.
- *
- * @param owner
- * @return *QuotaHistory
- */
-func (a QuotaApi) QuotaOssHistoryRead(owner string) (*QuotaHistory, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/quota/oss/history/{owner}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(QuotaHistory)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "QuotaOssHistoryRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Open-source Quota usage for a given namespace.
- * Open-source Quota usage for a given namespace.
- *
- * @param owner
- * @return *Quota
- */
-func (a QuotaApi) QuotaOssRead(owner string) (*Quota, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/quota/oss/{owner}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(Quota)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "QuotaOssRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Quota usage for a given namespace.
- * Quota usage for a given namespace.
- *
- * @param owner
- * @return *Quota
- */
-func (a QuotaApi) QuotaRead(owner string) (*Quota, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/quota/{owner}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(Quota)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "QuotaRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/rates_api.go b/bindings/go/src/rates_api.go
deleted file mode 100644
index 6d63d110..00000000
--- a/bindings/go/src/rates_api.go
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
-)
-
-type RatesApi struct {
- Configuration *Configuration
-}
-
-func NewRatesApi() *RatesApi {
- configuration := NewConfiguration()
- return &RatesApi{
- Configuration: configuration,
- }
-}
-
-func NewRatesApiWithBasePath(basePath string) *RatesApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &RatesApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Endpoint to check rate limits for current user.
- * Endpoint to check rate limits for current user.
- *
- * @return *ResourcesRateCheck
- */
-func (a RatesApi) RatesLimitsList() (*ResourcesRateCheck, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/rates/limits/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(ResourcesRateCheck)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "RatesLimitsList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/repos_api.go b/bindings/go/src/repos_api.go
deleted file mode 100644
index 82d75883..00000000
--- a/bindings/go/src/repos_api.go
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type ReposApi struct {
- Configuration *Configuration
-}
-
-func NewReposApi() *ReposApi {
- configuration := NewConfiguration()
- return &ReposApi{
- Configuration: configuration,
- }
-}
-
-func NewReposApiWithBasePath(basePath string) *ReposApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &ReposApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get a list of all repositories associated with current user.
- * Get a list of all repositories associated with current user.
- *
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @return []Repository
- */
-func (a ReposApi) ReposAllList(page int32, pageSize int32) ([]Repository, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/repos/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]Repository)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "ReposAllList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create a new repository in a given namespace.
- * Create a new repository in a given namespace.
- *
- * @param owner
- * @param data
- * @return *Repository
- */
-func (a ReposApi) ReposCreate(owner string, data ReposCreate) (*Repository, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/repos/{owner}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(Repository)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "ReposCreate", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Delete a repository in a given namespace.
- * Delete a repository in a given namespace.
- *
- * @param owner
- * @param identifier
- * @return void
- */
-func (a ReposApi) ReposDelete(owner string, identifier string) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Delete")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/repos/{owner}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "ReposDelete", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Get a list of all repositories within a namespace.
- * Get a list of all repositories within a namespace.
- *
- * @param owner
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @return []Repository
- */
-func (a ReposApi) ReposList(owner string, page int32, pageSize int32) ([]Repository, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/repos/{owner}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]Repository)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "ReposList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Update details about a repository in a given namespace.
- * Update details about a repository in a given namespace.
- *
- * @param owner
- * @param identifier
- * @param data
- * @return *Repository
- */
-func (a ReposApi) ReposPartialUpdate(owner string, identifier string, data ReposPartialUpdate) (*Repository, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Patch")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/repos/{owner}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(Repository)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "ReposPartialUpdate", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get a specific repository.
- * Get a specific repository.
- *
- * @param owner
- * @param identifier
- * @return *Repository
- */
-func (a ReposApi) ReposRead(owner string, identifier string) (*Repository, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/repos/{owner}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(Repository)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "ReposRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/api_response.go b/bindings/go/src/response.go
similarity index 76%
rename from bindings/go/src/api_response.go
rename to bindings/go/src/response.go
index 9e80a548..c23a0b9d 100644
--- a/bindings/go/src/api_response.go
+++ b/bindings/go/src/response.go
@@ -1,11 +1,11 @@
-/*
+/*
* Cloudsmith API
*
* The API to the Cloudsmith Service
*
- * OpenAPI spec version: v1
+ * API version: v1
* Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package cloudsmith_api
@@ -16,15 +16,15 @@ import (
type APIResponse struct {
*http.Response `json:"-"`
- Message string `json:"message,omitempty"`
+ Message string `json:"message,omitempty"`
// Operation is the name of the swagger operation.
- Operation string `json:"operation,omitempty"`
+ Operation string `json:"operation,omitempty"`
// RequestURL is the request URL. This value is always available, even if the
// embedded *http.Response is nil.
- RequestURL string `json:"url,omitempty"`
+ RequestURL string `json:"url,omitempty"`
// Method is the HTTP method used for the request. This value is always
// available, even if the embedded *http.Response is nil.
- Method string `json:"method,omitempty"`
+ Method string `json:"method,omitempty"`
// Payload holds the contents of the response body (which may be nil or empty).
// This is provided here as the raw response.Body() reader will have already
// been drained.
diff --git a/bindings/go/src/status_api.go b/bindings/go/src/status_api.go
deleted file mode 100644
index 2fc1331b..00000000
--- a/bindings/go/src/status_api.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
-)
-
-type StatusApi struct {
- Configuration *Configuration
-}
-
-func NewStatusApi() *StatusApi {
- configuration := NewConfiguration()
- return &StatusApi{
- Configuration: configuration,
- }
-}
-
-func NewStatusApiWithBasePath(basePath string) *StatusApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &StatusApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Endpoint to check basic API connectivity.
- * Endpoint to check basic API connectivity.
- *
- * @return *StatusBasic
- */
-func (a StatusApi) StatusCheckBasic() (*StatusBasic, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/status/check/basic/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(StatusBasic)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "StatusCheckBasic", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/storageregions_api.go b/bindings/go/src/storageregions_api.go
deleted file mode 100644
index 8d0d48e5..00000000
--- a/bindings/go/src/storageregions_api.go
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type StorageregionsApi struct {
- Configuration *Configuration
-}
-
-func NewStorageregionsApi() *StorageregionsApi {
- configuration := NewConfiguration()
- return &StorageregionsApi{
- Configuration: configuration,
- }
-}
-
-func NewStorageregionsApiWithBasePath(basePath string) *StorageregionsApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &StorageregionsApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get a list of all available storage regions.
- * Get a list of all available storage regions.
- *
- * @return []StorageRegion
- */
-func (a StorageregionsApi) StorageRegionsList() ([]StorageRegion, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/storage-regions/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]StorageRegion)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "StorageRegionsList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get a specific storage region.
- * Get a specific storage region.
- *
- * @param slug
- * @return *StorageRegion
- */
-func (a StorageregionsApi) StorageRegionsRead(slug string) (*StorageRegion, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/storage-regions/{slug}/"
- localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(StorageRegion)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "StorageRegionsRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/user_api.go b/bindings/go/src/user_api.go
deleted file mode 100644
index 2e953943..00000000
--- a/bindings/go/src/user_api.go
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
-)
-
-type UserApi struct {
- Configuration *Configuration
-}
-
-func NewUserApi() *UserApi {
- configuration := NewConfiguration()
- return &UserApi{
- Configuration: configuration,
- }
-}
-
-func NewUserApiWithBasePath(basePath string) *UserApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &UserApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Provide a brief for the current user (if any).
- * Provide a brief for the current user (if any).
- *
- * @return *UserBrief
- */
-func (a UserApi) UserSelf() (*UserBrief, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/user/self/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(UserBrief)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "UserSelf", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Retrieve the API key/token for the authenticated user.
- * Retrieve the API key/token for the authenticated user.
- *
- * @param data
- * @return *UserAuthToken
- */
-func (a UserApi) UserTokenCreate(data UserTokenCreate) (*UserAuthToken, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/user/token/"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(UserAuthToken)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "UserTokenCreate", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/users_api.go b/bindings/go/src/users_api.go
deleted file mode 100644
index 78d70ebb..00000000
--- a/bindings/go/src/users_api.go
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type UsersApi struct {
- Configuration *Configuration
-}
-
-func NewUsersApi() *UsersApi {
- configuration := NewConfiguration()
- return &UsersApi{
- Configuration: configuration,
- }
-}
-
-func NewUsersApiWithBasePath(basePath string) *UsersApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &UsersApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Provide a brief for the specified user (if any).
- * Provide a brief for the specified user (if any).
- *
- * @param slug
- * @return *UserProfile
- */
-func (a UsersApi) UsersProfileRead(slug string) (*UserProfile, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/users/profile/{slug}/"
- localVarPath = strings.Replace(localVarPath, "{"+"slug"+"}", fmt.Sprintf("%v", slug), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(UserProfile)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "UsersProfileRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/vulnerabilities_api.go b/bindings/go/src/vulnerabilities_api.go
deleted file mode 100644
index 8d8139fc..00000000
--- a/bindings/go/src/vulnerabilities_api.go
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type VulnerabilitiesApi struct {
- Configuration *Configuration
-}
-
-func NewVulnerabilitiesApi() *VulnerabilitiesApi {
- configuration := NewConfiguration()
- return &VulnerabilitiesApi{
- Configuration: configuration,
- }
-}
-
-func NewVulnerabilitiesApiWithBasePath(basePath string) *VulnerabilitiesApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &VulnerabilitiesApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Lists scan results for a specific namespace.
- * Lists scan results for a specific namespace.
- *
- * @param owner
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @return []VulnerabilityScanResultsList
- */
-func (a VulnerabilitiesApi) VulnerabilitiesList(owner string, page int32, pageSize int32) ([]VulnerabilityScanResultsList, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/vulnerabilities/{owner}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]VulnerabilityScanResultsList)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "VulnerabilitiesList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Lists scan results for a specific repository.
- * Lists scan results for a specific repository.
- *
- * @param owner
- * @param repo
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @return []VulnerabilityScanResultsList
- */
-func (a VulnerabilitiesApi) VulnerabilitiesList0(owner string, repo string, page int32, pageSize int32) ([]VulnerabilityScanResultsList, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/vulnerabilities/{owner}/{repo}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]VulnerabilityScanResultsList)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "VulnerabilitiesList0", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Lists scan results for a specific package.
- * Lists scan results for a specific package.
- *
- * @param owner
- * @param repo
- * @param package_
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @return []VulnerabilityScanResultsList
- */
-func (a VulnerabilitiesApi) VulnerabilitiesList1(owner string, repo string, package_ string, page int32, pageSize int32) ([]VulnerabilityScanResultsList, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/vulnerabilities/{owner}/{repo}/{package}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"package"+"}", fmt.Sprintf("%v", package_), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]VulnerabilityScanResultsList)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "VulnerabilitiesList1", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Returns a Scan Result.
- * Returns a Scan Result.
- *
- * @param owner
- * @param repo
- * @param package_
- * @param scanId
- * @return *VulnerabilityScanResults
- */
-func (a VulnerabilitiesApi) VulnerabilitiesRead(owner string, repo string, package_ string, scanId string) (*VulnerabilityScanResults, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/vulnerabilities/{owner}/{repo}/{package}/{scan_id}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"package"+"}", fmt.Sprintf("%v", package_), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"scan_id"+"}", fmt.Sprintf("%v", scanId), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(VulnerabilityScanResults)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "VulnerabilitiesRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/src/webhooks_api.go b/bindings/go/src/webhooks_api.go
deleted file mode 100644
index d03ac2b4..00000000
--- a/bindings/go/src/webhooks_api.go
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Cloudsmith API
- *
- * The API to the Cloudsmith Service
- *
- * OpenAPI spec version: v1
- * Contact: support@cloudsmith.io
- * Generated by: https://github.com/swagger-api/swagger-codegen.git
- */
-
-package cloudsmith_api
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type WebhooksApi struct {
- Configuration *Configuration
-}
-
-func NewWebhooksApi() *WebhooksApi {
- configuration := NewConfiguration()
- return &WebhooksApi{
- Configuration: configuration,
- }
-}
-
-func NewWebhooksApiWithBasePath(basePath string) *WebhooksApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &WebhooksApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Create a specific webhook in a repository.
- * Create a specific webhook in a repository.
- *
- * @param owner
- * @param repo
- * @param data
- * @return *RepositoryWebhook
- */
-func (a WebhooksApi) WebhooksCreate(owner string, repo string, data WebhooksCreate) (*RepositoryWebhook, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/webhooks/{owner}/{repo}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(RepositoryWebhook)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "WebhooksCreate", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Delete a specific webhook in a repository.
- * Delete a specific webhook in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return void
- */
-func (a WebhooksApi) WebhooksDelete(owner string, repo string, identifier string) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Delete")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/webhooks/{owner}/{repo}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "WebhooksDelete", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Get a list of all webhooks in a repository.
- * Get a list of all webhooks in a repository.
- *
- * @param owner
- * @param repo
- * @param page A page number within the paginated result set.
- * @param pageSize Number of results to return per page.
- * @return []RepositoryWebhook
- */
-func (a WebhooksApi) WebhooksList(owner string, repo string, page int32, pageSize int32) ([]RepositoryWebhook, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/webhooks/{owner}/{repo}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
- localVarQueryParams.Add("page", a.Configuration.APIClient.ParameterToString(page, ""))
- localVarQueryParams.Add("page_size", a.Configuration.APIClient.ParameterToString(pageSize, ""))
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new([]RepositoryWebhook)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "WebhooksList", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return *successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return *successPayload, localVarAPIResponse, err
-}
-
-/**
- * Update a specific webhook in a repository.
- * Update a specific webhook in a repository.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @param data
- * @return *RepositoryWebhook
- */
-func (a WebhooksApi) WebhooksPartialUpdate(owner string, repo string, identifier string, data WebhooksPartialUpdate) (*RepositoryWebhook, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Patch")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/webhooks/{owner}/{repo}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &data
- var successPayload = new(RepositoryWebhook)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "WebhooksPartialUpdate", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Views for working with repository webhooks.
- * Views for working with repository webhooks.
- *
- * @param owner
- * @param repo
- * @param identifier
- * @return *RepositoryWebhook
- */
-func (a WebhooksApi) WebhooksRead(owner string, repo string, identifier string) (*RepositoryWebhook, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/webhooks/{owner}/{repo}/{identifier}/"
- localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // authentication '(apikey)' required
- // set key with prefix in header
- localVarHeaderParams["X-Api-Key"] = a.Configuration.GetAPIKeyWithPrefix("X-Api-Key")
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(RepositoryWebhook)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "WebhooksRead", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/bindings/go/test.sh b/bindings/go/test.sh
index 5e795087..2a2db325 100755
--- a/bindings/go/test.sh
+++ b/bindings/go/test.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+set -e
+
self=$(readlink -f $BASH_SOURCE)
self_dir=$(dirname $self)
root_dir=$(readlink -f "$self_dir/../..")
diff --git a/bindings/java/build.sh b/bindings/java/build.sh
index 2da56347..b8928a9d 100755
--- a/bindings/java/build.sh
+++ b/bindings/java/build.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+set -e
+
self=$(readlink -f $BASH_SOURCE)
self_dir=$(dirname $self)
root_dir=$(readlink -f "$self_dir/../..")
diff --git a/bindings/java/deploy.sh b/bindings/java/deploy.sh
index e536bc17..40c63539 100755
--- a/bindings/java/deploy.sh
+++ b/bindings/java/deploy.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+set -e
+
self=$(readlink -f $BASH_SOURCE)
self_dir=$(dirname $self)
root_dir=$(readlink -f "$self_dir/../..")
diff --git a/bindings/java/src/.swagger-codegen/VERSION b/bindings/java/src/.swagger-codegen/VERSION
index 6b4d1577..21f40d97 100644
--- a/bindings/java/src/.swagger-codegen/VERSION
+++ b/bindings/java/src/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.2.3
\ No newline at end of file
+2.4.26
\ No newline at end of file
diff --git a/bindings/java/src/README.md b/bindings/java/src/README.md
index 76605ddc..49bac9da 100644
--- a/bindings/java/src/README.md
+++ b/bindings/java/src/README.md
@@ -1,24 +1,36 @@
# cloudsmith-api
+Cloudsmith API
+- API version: v1
+
+The API to the Cloudsmith Service
+
+ For more information, please visit [https://help.cloudsmith.io](https://help.cloudsmith.io)
+
+*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*
+
+
## Requirements
-Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
+Building the API client library requires:
+1. Java 1.7+
+2. Maven/Gradle
## Installation
To install the API client library to your local Maven repository, simply execute:
```shell
-mvn install
+mvn clean install
```
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
```shell
-mvn deploy
+mvn clean deploy
```
-Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
+Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
### Maven users
@@ -26,10 +38,10 @@ Add this dependency to your project's POM:
```xml
- io.cloudsmith.api
- cloudsmith-api
- 1.30.0
- compile
+ io.cloudsmith.api
+ cloudsmith-api
+ 1.33.7
+ compile
```
@@ -38,19 +50,21 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:
```groovy
-compile "io.cloudsmith.api:cloudsmith-api:1.30.0"
+compile "io.cloudsmith.api:cloudsmith-api:1.33.7"
```
### Others
At first generate the JAR by executing:
- mvn package
+```shell
+mvn clean package
+```
Then manually install the following JARs:
-* target/cloudsmith-api-1.30.0.jar
-* target/lib/*.jar
+* `target/cloudsmith-api-1.33.7.jar`
+* `target/lib/*.jar`
## Getting Started
@@ -96,7 +110,8 @@ public class BadgesApiExample {
Boolean showLatest = true; // Boolean | If true, for latest version badges a '(latest)' suffix is added
String style = "style_example"; // String | Override the shields.io badge style value.
try {
- apiInstance.badgesVersionList(owner, repo, packageFormat, packageName, packageVersion, packageIdentifiers, badgeToken, cacheSeconds, color, label, labelColor, logoColor, logoWidth, render, shields, showLatest, style);
+ Object result = apiInstance.badgesVersionList(owner, repo, packageFormat, packageName, packageVersion, packageIdentifiers, badgeToken, cacheSeconds, color, label, labelColor, logoColor, logoWidth, render, shields, showLatest, style);
+ System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BadgesApi#badgesVersionList");
e.printStackTrace();
diff --git a/bindings/java/src/build.gradle b/bindings/java/src/build.gradle
index 1a865d39..ff37b243 100644
--- a/bindings/java/src/build.gradle
+++ b/bindings/java/src/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'io.cloudsmith.api'
-version = '1.30.0'
+version = '1.33.7'
buildscript {
repositories {
@@ -94,9 +94,10 @@ if(hasProperty('target') && target == 'android') {
}
dependencies {
- compile 'io.swagger:swagger-annotations:1.5.15'
+ compile 'io.swagger:swagger-annotations:1.5.17'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.squareup.okhttp:logging-interceptor:2.7.5'
compile 'com.google.code.gson:gson:2.8.1'
+ compile 'io.gsonfire:gson-fire:1.8.0'
testCompile 'junit:junit:4.12'
}
diff --git a/bindings/java/src/build.json b/bindings/java/src/build.json
index 3a26e032..48422685 100644
--- a/bindings/java/src/build.json
+++ b/bindings/java/src/build.json
@@ -3,7 +3,7 @@
"apiPackage": "io.cloudsmith.api.apis",
"artifactId": "cloudsmith-api",
"artifactUrl": "https://api.cloudsmith.io/?format=openapi",
- "artifactVersion": "1.30.0",
+ "artifactVersion": "1.33.7",
"artifactDescription": "Cloudsmith API",
"dateLibrary": "java8",
"developerName": "Cloudsmith Ltd",
diff --git a/bindings/java/src/build.sbt b/bindings/java/src/build.sbt
index 5df832de..7613636e 100644
--- a/bindings/java/src/build.sbt
+++ b/bindings/java/src/build.sbt
@@ -2,17 +2,18 @@ lazy val root = (project in file(".")).
settings(
organization := "io.cloudsmith.api",
name := "cloudsmith-api",
- version := "1.30.0",
+ version := "1.33.7",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
publishArtifact in (Compile, packageDoc) := false,
resolvers += Resolver.mavenLocal,
libraryDependencies ++= Seq(
- "io.swagger" % "swagger-annotations" % "1.5.15",
+ "io.swagger" % "swagger-annotations" % "1.5.17",
"com.squareup.okhttp" % "okhttp" % "2.7.5",
"com.squareup.okhttp" % "logging-interceptor" % "2.7.5",
"com.google.code.gson" % "gson" % "2.8.1",
+ "io.gsonfire" % "gson-fire" % "1.8.3" % "compile",
"junit" % "junit" % "4.12" % "test",
"com.novocode" % "junit-interface" % "0.10" % "test"
)
diff --git a/bindings/java/src/docs/BadgesApi.md b/bindings/java/src/docs/BadgesApi.md
index 25ae7bd6..834760b6 100644
--- a/bindings/java/src/docs/BadgesApi.md
+++ b/bindings/java/src/docs/BadgesApi.md
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **badgesVersionList**
-> badgesVersionList(owner, repo, packageFormat, packageName, packageVersion, packageIdentifiers, badgeToken, cacheSeconds, color, label, labelColor, logoColor, logoWidth, render, shields, showLatest, style)
+> Object badgesVersionList(owner, repo, packageFormat, packageName, packageVersion, packageIdentifiers, badgeToken, cacheSeconds, color, label, labelColor, logoColor, logoWidth, render, shields, showLatest, style)
Get latest package version for a package or package group.
@@ -51,7 +51,8 @@ Boolean shields = true; // Boolean | If true, a shields response will be generat
Boolean showLatest = true; // Boolean | If true, for latest version badges a '(latest)' suffix is added
String style = "style_example"; // String | Override the shields.io badge style value.
try {
- apiInstance.badgesVersionList(owner, repo, packageFormat, packageName, packageVersion, packageIdentifiers, badgeToken, cacheSeconds, color, label, labelColor, logoColor, logoWidth, render, shields, showLatest, style);
+ Object result = apiInstance.badgesVersionList(owner, repo, packageFormat, packageName, packageVersion, packageIdentifiers, badgeToken, cacheSeconds, color, label, labelColor, logoColor, logoWidth, render, shields, showLatest, style);
+ System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BadgesApi#badgesVersionList");
e.printStackTrace();
@@ -82,7 +83,7 @@ Name | Type | Description | Notes
### Return type
-null (empty response body)
+**Object**
### Authorization
diff --git a/bindings/java/src/git_push.sh b/bindings/java/src/git_push.sh
index bb3f01ed..4fda2ff0 100644
--- a/bindings/java/src/git_push.sh
+++ b/bindings/java/src/git_push.sh
@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
diff --git a/bindings/java/src/pom.xml b/bindings/java/src/pom.xml
index cba1b6f8..b210c37c 100644
--- a/bindings/java/src/pom.xml
+++ b/bindings/java/src/pom.xml
@@ -1,230 +1,254 @@
- 4.0.0
- io.cloudsmith.api
- cloudsmith-api
- jar
- cloudsmith-api
- 1.30.0
- https://api.cloudsmith.io/?format=openapi
- Cloudsmith API
-
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
-
-
- 2.2.0
-
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 4.0.0
+ io.cloudsmith.api
+ cloudsmith-api
+ jar
+ cloudsmith-api
+ 1.33.7
+ https://api.cloudsmith.io/?format=openapi
+ Cloudsmith API
+
+ scm:git:git@github.com:swagger-api/swagger-codegen.git
+ scm:git:git@github.com:swagger-api/swagger-codegen.git
+ https://github.com/swagger-api/swagger-codegen
+
-
-
- Apache License 2.0
- https://opensource.org/licenses/MIT
- repo
-
-
+
+
+ Apache License 2.0
+ https://opensource.org/licenses/MIT
+ repo
+
+
-
-
- Cloudsmith Ltd
- support@cloudsmith.io
- Cloudsmith Ltd
- https://cloudsmith.io
-
-
+
+
+ Cloudsmith Ltd
+ support@cloudsmith.io
+ Cloudsmith Ltd
+ https://cloudsmith.io
+
+
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.12
-
-
-
- loggerPath
- conf/log4j.properties
-
-
- -Xms512m -Xmx1500m
- methods
- pertest
-
-
-
- maven-dependency-plugin
-
-
- package
-
- copy-dependencies
-
-
- ${project.build.directory}/lib
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.2
-
-
-
- jar
- test-jar
-
-
-
-
-
-
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 3.0.0-M1
+
+
+ enforce-maven
+
+ enforce
+
+
+
+
+ 2.2.0
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.12
+
+
+
+ loggerPath
+ conf/log4j.properties
+
+
+ -Xms512m -Xmx1500m
+ methods
+ pertest
+
+
+
+ maven-dependency-plugin
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}/lib
+
+
+
+
-
- org.codehaus.mojo
- build-helper-maven-plugin
- 1.10
-
-
- add_sources
- generate-sources
-
- add-source
-
-
-
- src/main/java
-
-
-
-
- add_test_sources
- generate-test-sources
-
- add-test-source
-
-
-
- src/test/java
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.10.4
-
-
- attach-javadocs
-
- jar
-
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 2.2.1
-
-
- attach-sources
-
- jar-no-fork
-
-
-
-
-
-
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 2.2
+
+
+
+ jar
+ test-jar
+
+
+
+
+
+
-
-
- sign-artifacts
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
- 1.5
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.10
+
+
+ add_sources
+ generate-sources
+
+ add-source
+
+
+
+
+ src/main/java
+
+
+
+
+ add_test_sources
+ generate-test-sources
+
+ add-test-source
+
+
+
+
+ src/test/java
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.2.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
-
-
-
+
+
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
-
-
- io.swagger
- swagger-annotations
- ${swagger-core-version}
-
-
- com.squareup.okhttp
- okhttp
- ${okhttp-version}
-
-
- com.squareup.okhttp
- logging-interceptor
- ${okhttp-version}
-
-
- com.google.code.gson
- gson
- ${gson-version}
-
-
-
- javax.validation
- validation-api
- 1.1.0.Final
- provided
-
-
-
- org.hibernate
- hibernate-validator
- 5.4.1.Final
-
-
- javax.el
- el-api
- 2.2
-
-
-
- junit
- junit
- ${junit-version}
- test
-
-
-
- 1.8
- ${java.version}
- ${java.version}
- 1.5.15
- 2.7.5
- 2.8.1
- 2.9.9
- 1.0.0
- 4.12
- UTF-8
-
+
+
+ io.swagger
+ swagger-annotations
+ ${swagger-core-version}
+
+
+ com.squareup.okhttp
+ okhttp
+ ${okhttp-version}
+
+
+ com.squareup.okhttp
+ logging-interceptor
+ ${okhttp-version}
+
+
+ com.google.code.gson
+ gson
+ ${gson-version}
+
+
+ io.gsonfire
+ gson-fire
+ ${gson-fire-version}
+
+
+
+ javax.validation
+ validation-api
+ 1.1.0.Final
+ provided
+
+
+
+ org.hibernate
+ hibernate-validator
+ 5.4.1.Final
+
+
+ javax.el
+ el-api
+ 2.2
+
+
+
+ junit
+ junit
+ ${junit-version}
+ test
+
+
+
+ 1.8
+ ${java.version}
+ ${java.version}
+ 1.8.3
+ 1.5.24
+ 2.7.5
+ 2.8.1
+ 1.0.0
+ 4.13.1
+ UTF-8
+
diff --git a/bindings/java/src/src/main/java/io/cloudsmith/api/ApiClient.java b/bindings/java/src/src/main/java/io/cloudsmith/api/ApiClient.java
index ec6f38b2..156c0495 100644
--- a/bindings/java/src/src/main/java/io/cloudsmith/api/ApiClient.java
+++ b/bindings/java/src/src/main/java/io/cloudsmith/api/ApiClient.java
@@ -13,43 +13,23 @@
package io.cloudsmith.api;
-import com.squareup.okhttp.Call;
-import com.squareup.okhttp.Callback;
-import com.squareup.okhttp.OkHttpClient;
-import com.squareup.okhttp.Request;
-import com.squareup.okhttp.Response;
-import com.squareup.okhttp.RequestBody;
-import com.squareup.okhttp.FormEncodingBuilder;
-import com.squareup.okhttp.MultipartBuilder;
-import com.squareup.okhttp.MediaType;
-import com.squareup.okhttp.Headers;
+import com.squareup.okhttp.*;
import com.squareup.okhttp.internal.http.HttpMethod;
import com.squareup.okhttp.logging.HttpLoggingInterceptor;
import com.squareup.okhttp.logging.HttpLoggingInterceptor.Level;
+import okio.BufferedSink;
+import okio.Okio;
-import java.lang.reflect.Type;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.TimeZone;
-import java.util.concurrent.TimeUnit;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import java.net.URLEncoder;
-import java.net.URLConnection;
-
+import javax.net.ssl.*;
import java.io.File;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.UnsupportedEncodingException;
-
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.lang.reflect.Type;
+import java.net.URLConnection;
+import java.net.URLEncoder;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.SecureRandom;
@@ -57,22 +37,15 @@
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
-
import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.text.ParseException;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactory;
-import javax.net.ssl.X509TrustManager;
-
-import okio.BufferedSink;
-import okio.Okio;
+import java.time.LocalDate;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import io.cloudsmith.api.auth.Authentication;
import io.cloudsmith.api.auth.HttpBasicAuth;
@@ -80,40 +53,8 @@
import io.cloudsmith.api.auth.OAuth;
public class ApiClient {
- public static final double JAVA_VERSION;
- public static final boolean IS_ANDROID;
- public static final int ANDROID_SDK_VERSION;
-
- static {
- JAVA_VERSION = Double.parseDouble(System.getProperty("java.specification.version"));
- boolean isAndroid;
- try {
- Class.forName("android.app.Activity");
- isAndroid = true;
- } catch (ClassNotFoundException e) {
- isAndroid = false;
- }
- IS_ANDROID = isAndroid;
- int sdkVersion = 0;
- if (IS_ANDROID) {
- try {
- sdkVersion = Class.forName("android.os.Build$VERSION").getField("SDK_INT").getInt(null);
- } catch (Exception e) {
- try {
- sdkVersion = Integer.parseInt((String) Class.forName("android.os.Build$VERSION").getField("SDK").get(null));
- } catch (Exception e2) { }
- }
- }
- ANDROID_SDK_VERSION = sdkVersion;
- }
-
- /**
- * The datetime format to be used when lenientDatetimeFormat is enabled.
- */
- public static final String LENIENT_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
private String basePath = "https://api.cloudsmith.io/v1";
- private boolean lenientOnJson = false;
private boolean debugging = false;
private Map defaultHeaderMap = new HashMap();
private String tempFolderPath = null;
@@ -143,23 +84,10 @@ public ApiClient() {
verifyingSsl = true;
- json = new JSON(this);
-
- /*
- * Use RFC3339 format for date and datetime.
- * See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14
- */
- this.dateFormat = new SimpleDateFormat("yyyy-MM-dd");
- // Always use UTC as the default time zone when dealing with date (without time).
- this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
- initDatetimeFormat();
-
- // Be lenient on datetime formats when parsing datetime from string.
- // See parseDatetime.
- this.lenientDatetimeFormat = true;
+ json = new JSON();
// Set default User-Agent.
- setUserAgent("Swagger-Codegen/1.30.0/java");
+ setUserAgent("Swagger-Codegen/1.33.7/java");
// Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap();
@@ -296,138 +224,28 @@ public DateFormat getDateFormat() {
}
public ApiClient setDateFormat(DateFormat dateFormat) {
- this.dateFormat = dateFormat;
- this.dateLength = this.dateFormat.format(new Date()).length();
+ this.json.setDateFormat(dateFormat);
return this;
}
- public DateFormat getDatetimeFormat() {
- return datetimeFormat;
- }
-
- public ApiClient setDatetimeFormat(DateFormat datetimeFormat) {
- this.datetimeFormat = datetimeFormat;
+ public ApiClient setSqlDateFormat(DateFormat dateFormat) {
+ this.json.setSqlDateFormat(dateFormat);
return this;
}
- /**
- * Whether to allow various ISO 8601 datetime formats when parsing a datetime string.
- * @see #parseDatetime(String)
- * @return True if lenientDatetimeFormat flag is set to true
- */
- public boolean isLenientDatetimeFormat() {
- return lenientDatetimeFormat;
- }
-
- public ApiClient setLenientDatetimeFormat(boolean lenientDatetimeFormat) {
- this.lenientDatetimeFormat = lenientDatetimeFormat;
+ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
+ this.json.setOffsetDateTimeFormat(dateFormat);
return this;
}
- /**
- * Parse the given date string into Date object.
- * The default dateFormat supports these ISO 8601 date formats:
- * 2015-08-16
- * 2015-8-16
- * @param str String to be parsed
- * @return Date
- */
- public Date parseDate(String str) {
- if (str == null)
- return null;
- try {
- return dateFormat.parse(str);
- } catch (ParseException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Parse the given datetime string into Date object.
- * When lenientDatetimeFormat is enabled, the following ISO 8601 datetime formats are supported:
- * 2015-08-16T08:20:05Z
- * 2015-8-16T8:20:05Z
- * 2015-08-16T08:20:05+00:00
- * 2015-08-16T08:20:05+0000
- * 2015-08-16T08:20:05.376Z
- * 2015-08-16T08:20:05.376+00:00
- * 2015-08-16T08:20:05.376+00
- * Note: The 3-digit milli-seconds is optional. Time zone is required and can be in one of
- * these formats:
- * Z (same with +0000)
- * +08:00 (same with +0800)
- * -02 (same with -0200)
- * -0200
- * @see ISO 8601
- * @param str Date time string to be parsed
- * @return Date representation of the string
- */
- public Date parseDatetime(String str) {
- if (str == null)
- return null;
-
- DateFormat format;
- if (lenientDatetimeFormat) {
- /*
- * When lenientDatetimeFormat is enabled, normalize the date string
- * into LENIENT_DATETIME_FORMAT to support various formats
- * defined by ISO 8601.
- */
- // normalize time zone
- // trailing "Z": 2015-08-16T08:20:05Z => 2015-08-16T08:20:05+0000
- str = str.replaceAll("[zZ]\\z", "+0000");
- // remove colon in time zone: 2015-08-16T08:20:05+00:00 => 2015-08-16T08:20:05+0000
- str = str.replaceAll("([+-]\\d{2}):(\\d{2})\\z", "$1$2");
- // expand time zone: 2015-08-16T08:20:05+00 => 2015-08-16T08:20:05+0000
- str = str.replaceAll("([+-]\\d{2})\\z", "$100");
- // add milliseconds when missing
- // 2015-08-16T08:20:05+0000 => 2015-08-16T08:20:05.000+0000
- str = str.replaceAll("(:\\d{1,2})([+-]\\d{4})\\z", "$1.000$2");
- format = new SimpleDateFormat(LENIENT_DATETIME_FORMAT);
- } else {
- format = this.datetimeFormat;
- }
-
- try {
- return format.parse(str);
- } catch (ParseException e) {
- throw new RuntimeException(e);
- }
- }
-
- /*
- * Parse date or date time in string format into Date object.
- *
- * @param str Date time string to be parsed
- * @return Date representation of the string
- */
- public Date parseDateOrDatetime(String str) {
- if (str == null)
- return null;
- else if (str.length() <= dateLength)
- return parseDate(str);
- else
- return parseDatetime(str);
- }
-
- /**
- * Format the given Date object into string (Date format).
- *
- * @param date Date object
- * @return Formatted date in string representation
- */
- public String formatDate(Date date) {
- return dateFormat.format(date);
+ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) {
+ this.json.setLocalDateFormat(dateFormat);
+ return this;
}
- /**
- * Format the given Date object into string (Datetime format).
- *
- * @param date Date object
- * @return Formatted datetime in string representation
- */
- public String formatDatetime(Date date) {
- return datetimeFormat.format(date);
+ public ApiClient setLenientOnJson(boolean lenientOnJson) {
+ this.json.setLenientOnJson(lenientOnJson);
+ return this;
}
/**
@@ -547,26 +365,6 @@ public ApiClient addDefaultHeader(String key, String value) {
return this;
}
- /**
- * @see setLenient
- *
- * @return True if lenientOnJson is enabled, false otherwise.
- */
- public boolean isLenientOnJson() {
- return lenientOnJson;
- }
-
- /**
- * Set LenientOnJson
- *
- * @param lenient True to enable lenientOnJson
- * @return ApiClient
- */
- public ApiClient setLenientOnJson(boolean lenient) {
- this.lenientOnJson = lenient;
- return this;
- }
-
/**
* Check that whether debugging is enabled for this API client.
*
@@ -610,7 +408,7 @@ public String getTempFolderPath() {
}
/**
- * Set the tempoaray folder path (for downloading files)
+ * Set the temporary folder path (for downloading files)
*
* @param tempFolderPath Temporary folder path
* @return ApiClient
@@ -632,6 +430,7 @@ public int getConnectTimeout() {
/**
* Sets the connect timeout (in milliseconds).
* A value of 0 means no timeout, otherwise values must be between 1 and
+ * {@link Integer#MAX_VALUE}.
*
* @param connectionTimeout connection timeout in milliseconds
* @return Api client
@@ -641,6 +440,50 @@ public ApiClient setConnectTimeout(int connectionTimeout) {
return this;
}
+ /**
+ * Get read timeout (in milliseconds).
+ *
+ * @return Timeout in milliseconds
+ */
+ public int getReadTimeout() {
+ return httpClient.getReadTimeout();
+ }
+
+ /**
+ * Sets the read timeout (in milliseconds).
+ * A value of 0 means no timeout, otherwise values must be between 1 and
+ * {@link Integer#MAX_VALUE}.
+ *
+ * @param readTimeout read timeout in milliseconds
+ * @return Api client
+ */
+ public ApiClient setReadTimeout(int readTimeout) {
+ httpClient.setReadTimeout(readTimeout, TimeUnit.MILLISECONDS);
+ return this;
+ }
+
+ /**
+ * Get write timeout (in milliseconds).
+ *
+ * @return Timeout in milliseconds
+ */
+ public int getWriteTimeout() {
+ return httpClient.getWriteTimeout();
+ }
+
+ /**
+ * Sets the write timeout (in milliseconds).
+ * A value of 0 means no timeout, otherwise values must be between 1 and
+ * {@link Integer#MAX_VALUE}.
+ *
+ * @param writeTimeout connection timeout in milliseconds
+ * @return Api client
+ */
+ public ApiClient setWriteTimeout(int writeTimeout) {
+ httpClient.setWriteTimeout(writeTimeout, TimeUnit.MILLISECONDS);
+ return this;
+ }
+
/**
* Format the given parameter object into string.
*
@@ -650,8 +493,10 @@ public ApiClient setConnectTimeout(int connectionTimeout) {
public String parameterToString(Object param) {
if (param == null) {
return "";
- } else if (param instanceof Date) {
- return formatDatetime((Date) param);
+ } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) {
+ //Serialize to json string and remove the " enclosing characters
+ String jsonStr = json.serialize(param);
+ return jsonStr.substring(1, jsonStr.length() - 1);
} else if (param instanceof Collection) {
StringBuilder b = new StringBuilder();
for (Object o : (Collection)param) {
@@ -667,62 +512,70 @@ public String parameterToString(Object param) {
}
/**
- * Format to {@code Pair} objects.
+ * Formats the specified query parameter to a list containing a single {@code Pair} object.
*
- * @param collectionFormat collection format (e.g. csv, tsv)
- * @param name Name
- * @param value Value
- * @return A list of Pair objects
+ * Note that {@code value} must not be a collection.
+ *
+ * @param name The name of the parameter.
+ * @param value The value of the parameter.
+ * @return A list containing a single {@code Pair} object.
*/
- public List parameterToPairs(String collectionFormat, String name, Object value){
+ public List parameterToPair(String name, Object value) {
List params = new ArrayList();
// preconditions
- if (name == null || name.isEmpty() || value == null) return params;
+ if (name == null || name.isEmpty() || value == null || value instanceof Collection) return params;
- Collection valueCollection = null;
- if (value instanceof Collection) {
- valueCollection = (Collection) value;
- } else {
- params.add(new Pair(name, parameterToString(value)));
- return params;
- }
+ params.add(new Pair(name, parameterToString(value)));
+ return params;
+ }
- if (valueCollection.isEmpty()){
+ /**
+ * Formats the specified collection query parameters to a list of {@code Pair} objects.
+ *
+ * Note that the values of each of the returned Pair objects are percent-encoded.
+ *
+ * @param collectionFormat The collection format of the parameter.
+ * @param name The name of the parameter.
+ * @param value The value of the parameter.
+ * @return A list of {@code Pair} objects.
+ */
+ public List parameterToPairs(String collectionFormat, String name, Collection value) {
+ List params = new ArrayList();
+
+ // preconditions
+ if (name == null || name.isEmpty() || value == null || value.isEmpty()) {
return params;
}
- // get the collection format
- collectionFormat = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv
-
// create the params based on the collection format
- if (collectionFormat.equals("multi")) {
- for (Object item : valueCollection) {
- params.add(new Pair(name, parameterToString(item)));
+ if ("multi".equals(collectionFormat)) {
+ for (Object item : value) {
+ params.add(new Pair(name, escapeString(parameterToString(item))));
}
-
return params;
}
+ // collectionFormat is assumed to be "csv" by default
String delimiter = ",";
- if (collectionFormat.equals("csv")) {
- delimiter = ",";
- } else if (collectionFormat.equals("ssv")) {
- delimiter = " ";
- } else if (collectionFormat.equals("tsv")) {
- delimiter = "\t";
- } else if (collectionFormat.equals("pipes")) {
- delimiter = "|";
+ // escape all delimiters except commas, which are URI reserved
+ // characters
+ if ("ssv".equals(collectionFormat)) {
+ delimiter = escapeString(" ");
+ } else if ("tsv".equals(collectionFormat)) {
+ delimiter = escapeString("\t");
+ } else if ("pipes".equals(collectionFormat)) {
+ delimiter = escapeString("|");
}
StringBuilder sb = new StringBuilder() ;
- for (Object item : valueCollection) {
+ for (Object item : value) {
sb.append(delimiter);
- sb.append(parameterToString(item));
+ sb.append(escapeString(parameterToString(item)));
}
- params.add(new Pair(name, sb.substring(1)));
+ params.add(new Pair(name, sb.substring(delimiter.length())));
return params;
}
@@ -745,12 +598,13 @@ public String sanitizeFilename(String filename) {
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
+ * "* / *" is also default to JSON
* @param mime MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
public boolean isJsonMime(String mime) {
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
- return mime != null && (mime.matches(jsonMime) || mime.equalsIgnoreCase("application/json-patch+json"));
+ return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
}
/**
@@ -781,11 +635,11 @@ public String selectHeaderAccept(String[] accepts) {
*
* @param contentTypes The Content-Type array to select from
* @return The Content-Type header to use. If the given array is empty,
- * JSON will be used.
+ * or matches "any", JSON will be used.
*/
public String selectHeaderContentType(String[] contentTypes) {
- if (contentTypes.length == 0) {
- return "application/json";
+ if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) {
+ return "application/json";
}
for (String contentType : contentTypes) {
if (isJsonMime(contentType)) {
@@ -957,9 +811,9 @@ public File prepareDownloadFile(Response response) throws IOException {
}
if (tempFolderPath == null)
- return File.createTempFile(prefix, suffix);
+ return Files.createTempFile(prefix, suffix).toFile();
else
- return File.createTempFile(prefix, suffix, new File(tempFolderPath));
+ return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile();
}
/**
@@ -1082,6 +936,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept
* @param path The sub-path of the HTTP URL
* @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
* @param queryParams The query parameters
+ * @param collectionQueryParams The collection query parameters
* @param body The request body object
* @param headerParams The header parameters
* @param formParams The form parameters
@@ -1090,8 +945,8 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept
* @return The HTTP call
* @throws ApiException If fail to serialize the request body object
*/
- public Call buildCall(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Request request = buildRequest(path, method, queryParams, body, headerParams, formParams, authNames, progressRequestListener);
+ public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, progressRequestListener);
return httpClient.newCall(request);
}
@@ -1102,18 +957,19 @@ public Call buildCall(String path, String method, List queryParams, Object
* @param path The sub-path of the HTTP URL
* @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
* @param queryParams The query parameters
+ * @param collectionQueryParams The collection query parameters
* @param body The request body object
* @param headerParams The header parameters
* @param formParams The form parameters
* @param authNames The authentications to apply
* @param progressRequestListener Progress request listener
- * @return The HTTP request
+ * @return The HTTP request
* @throws ApiException If fail to serialize the request body object
*/
- public Request buildRequest(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams);
- final String url = buildUrl(path, queryParams);
+ final String url = buildUrl(path, queryParams, collectionQueryParams);
final Request.Builder reqBuilder = new Request.Builder().url(url);
processHeaderParams(headerParams, reqBuilder);
@@ -1159,9 +1015,10 @@ public Request buildRequest(String path, String method, List queryParams,
*
* @param path The sub path
* @param queryParams The query parameters
+ * @param collectionQueryParams The collection query parameters
* @return The full URL
*/
- public String buildUrl(String path, List queryParams) {
+ public String buildUrl(String path, List queryParams, List collectionQueryParams) {
final StringBuilder url = new StringBuilder();
url.append(basePath).append(path);
@@ -1182,6 +1039,23 @@ public String buildUrl(String path, List queryParams) {
}
}
+ if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) {
+ String prefix = url.toString().contains("?") ? "&" : "?";
+ for (Pair param : collectionQueryParams) {
+ if (param.getValue() != null) {
+ if (prefix != null) {
+ url.append(prefix);
+ prefix = null;
+ } else {
+ url.append("&");
+ }
+ String value = parameterToString(param.getValue());
+ // collection query parameter value already escaped as part of parameterToPairs
+ url.append(escapeString(param.getName())).append("=").append(value);
+ }
+ }
+ }
+
return url.toString();
}
@@ -1269,31 +1143,6 @@ public String guessContentTypeFromFile(File file) {
}
}
- /**
- * Initialize datetime format according to the current environment, e.g. Java 1.7 and Android.
- */
- private void initDatetimeFormat() {
- String formatWithTimeZone = null;
- if (IS_ANDROID) {
- if (ANDROID_SDK_VERSION >= 18) {
- // The time zone format "ZZZZZ" is available since Android 4.3 (SDK version 18)
- formatWithTimeZone = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ";
- }
- } else if (JAVA_VERSION >= 1.7) {
- // The time zone format "XXX" is available since Java 1.7
- formatWithTimeZone = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
- }
- if (formatWithTimeZone != null) {
- this.datetimeFormat = new SimpleDateFormat(formatWithTimeZone);
- // NOTE: Use the system's default time zone (mainly for datetime formatting).
- } else {
- // Use a common format that works across all systems.
- this.datetimeFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
- // Always use the UTC time zone as we are using a constant trailing "Z" here.
- this.datetimeFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
- }
- }
-
/**
* Apply SSL related settings to httpClient according to the current values of
* verifyingSsl and sslCaCert.
diff --git a/bindings/java/src/src/main/java/io/cloudsmith/api/JSON.java b/bindings/java/src/src/main/java/io/cloudsmith/api/JSON.java
index a2fb224d..127d83f1 100644
--- a/bindings/java/src/src/main/java/io/cloudsmith/api/JSON.java
+++ b/bindings/java/src/src/main/java/io/cloudsmith/api/JSON.java
@@ -15,42 +15,70 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonDeserializer;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonNull;
import com.google.gson.JsonParseException;
-import com.google.gson.JsonPrimitive;
-import com.google.gson.JsonSerializationContext;
-import com.google.gson.JsonSerializer;
import com.google.gson.TypeAdapter;
+import com.google.gson.internal.bind.util.ISO8601Utils;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
+import com.google.gson.JsonElement;
+import io.gsonfire.GsonFireBuilder;
+import io.gsonfire.TypeSelector;
+
+import io.cloudsmith.api.models.*;
+import okio.ByteString;
import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.Type;
-import java.util.Date;
-
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.ParsePosition;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
+import java.util.Date;
+import java.util.Map;
+import java.util.HashMap;
public class JSON {
- private ApiClient apiClient;
private Gson gson;
+ private boolean isLenientOnJson = false;
+ private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
+ private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
+ private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
+ private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
+ private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
- /**
- * JSON constructor.
- *
- * @param apiClient An instance of ApiClient
- */
- public JSON(ApiClient apiClient) {
- this.apiClient = apiClient;
- gson = new GsonBuilder()
- .registerTypeAdapter(Date.class, new DateAdapter(apiClient))
- .registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeTypeAdapter())
- .registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter())
+ public static GsonBuilder createGson() {
+ GsonFireBuilder fireBuilder = new GsonFireBuilder()
+ ;
+ GsonBuilder builder = fireBuilder.createGsonBuilder();
+ return builder;
+ }
+
+ private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
+ JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
+ if(null == element) {
+ throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">");
+ }
+ return element.getAsString();
+ }
+
+ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
+ Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase());
+ if(null == clazz) {
+ throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">");
+ }
+ return clazz;
+ }
+
+ public JSON() {
+ gson = createGson()
+ .registerTypeAdapter(Date.class, dateTypeAdapter)
+ .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
+ .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
+ .registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
+ .registerTypeAdapter(byte[].class, byteArrayAdapter)
.create();
}
@@ -67,9 +95,16 @@ public Gson getGson() {
* Set Gson.
*
* @param gson Gson
+ * @return JSON
*/
- public void setGson(Gson gson) {
+ public JSON setGson(Gson gson) {
this.gson = gson;
+ return this;
+ }
+
+ public JSON setLenientOnJson(boolean lenientOnJson) {
+ isLenientOnJson = lenientOnJson;
+ return this;
}
/**
@@ -85,15 +120,15 @@ public String serialize(Object obj) {
/**
* Deserialize the given JSON string to Java object.
*
- * @param Type
- * @param body The JSON string
+ * @param Type
+ * @param body The JSON string
* @param returnType The type to deserialize into
* @return The deserialized Java object
*/
@SuppressWarnings("unchecked")
public T deserialize(String body, Type returnType) {
try {
- if (apiClient.isLenientOnJson()) {
+ if (isLenientOnJson) {
JsonReader jsonReader = new JsonReader(new StringReader(body));
// see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
jsonReader.setLenient(true);
@@ -103,125 +138,257 @@ public T deserialize(String body, Type returnType) {
}
} catch (JsonParseException e) {
// Fallback processing when failed to parse JSON form response body:
- // return the response body string directly for the String return type;
- // parse response body into date or datetime for the Date return type.
+ // return the response body string directly for the String return type;
if (returnType.equals(String.class))
return (T) body;
- else if (returnType.equals(Date.class))
- return (T) apiClient.parseDateOrDatetime(body);
- else throw(e);
+ else throw (e);
}
}
-}
-
-class DateAdapter implements JsonSerializer, JsonDeserializer {
- private final ApiClient apiClient;
/**
- * Constructor for DateAdapter
- *
- * @param apiClient Api client
+ * Gson TypeAdapter for Byte Array type
*/
- public DateAdapter(ApiClient apiClient) {
- super();
- this.apiClient = apiClient;
+ public class ByteArrayAdapter extends TypeAdapter {
+
+ @Override
+ public void write(JsonWriter out, byte[] value) throws IOException {
+ if (value == null) {
+ out.nullValue();
+ } else {
+ out.value(ByteString.of(value).base64());
+ }
+ }
+
+ @Override
+ public byte[] read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String bytesAsBase64 = in.nextString();
+ ByteString byteString = ByteString.decodeBase64(bytesAsBase64);
+ return byteString.toByteArray();
+ }
+ }
}
/**
- * Serialize
- *
- * @param src Date
- * @param typeOfSrc Type
- * @param context Json Serialization Context
- * @return Json Element
+ * Gson TypeAdapter for JSR310 OffsetDateTime type
*/
- @Override
- public JsonElement serialize(Date src, Type typeOfSrc, JsonSerializationContext context) {
- if (src == null) {
- return JsonNull.INSTANCE;
- } else {
- return new JsonPrimitive(apiClient.formatDatetime(src));
+ public static class OffsetDateTimeTypeAdapter extends TypeAdapter {
+
+ private DateTimeFormatter formatter;
+
+ public OffsetDateTimeTypeAdapter() {
+ this(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
+ }
+
+ public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) {
+ this.formatter = formatter;
+ }
+
+ public void setFormat(DateTimeFormatter dateFormat) {
+ this.formatter = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, OffsetDateTime date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ out.value(formatter.format(date));
+ }
+ }
+
+ @Override
+ public OffsetDateTime read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ if (date.endsWith("+0000")) {
+ date = date.substring(0, date.length()-5) + "Z";
+ }
+ return OffsetDateTime.parse(date, formatter);
+ }
}
}
/**
- * Deserialize
- *
- * @param json Json element
- * @param date Type
- * @param context Json Serialization Context
- * @return Date
- * @throws JsonParseException if fail to parse
+ * Gson TypeAdapter for JSR310 LocalDate type
*/
- @Override
- public Date deserialize(JsonElement json, Type date, JsonDeserializationContext context) throws JsonParseException {
- String str = json.getAsJsonPrimitive().getAsString();
- try {
- return apiClient.parseDateOrDatetime(str);
- } catch (RuntimeException e) {
- throw new JsonParseException(e);
+ public class LocalDateTypeAdapter extends TypeAdapter {
+
+ private DateTimeFormatter formatter;
+
+ public LocalDateTypeAdapter() {
+ this(DateTimeFormatter.ISO_LOCAL_DATE);
}
- }
-}
-/**
- * Gson TypeAdapter for jsr310 OffsetDateTime type
- */
-class OffsetDateTimeTypeAdapter extends TypeAdapter {
+ public LocalDateTypeAdapter(DateTimeFormatter formatter) {
+ this.formatter = formatter;
+ }
- private final DateTimeFormatter formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
+ public void setFormat(DateTimeFormatter dateFormat) {
+ this.formatter = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, LocalDate date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ out.value(formatter.format(date));
+ }
+ }
- @Override
- public void write(JsonWriter out, OffsetDateTime date) throws IOException {
- if (date == null) {
- out.nullValue();
- } else {
- out.value(formatter.format(date));
+ @Override
+ public LocalDate read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ return LocalDate.parse(date, formatter);
+ }
}
}
- @Override
- public OffsetDateTime read(JsonReader in) throws IOException {
- switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- if (date.endsWith("+0000")) {
- date = date.substring(0, date.length()-5) + "Z";
+ public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
+ offsetDateTimeTypeAdapter.setFormat(dateFormat);
+ return this;
+ }
+
+ public JSON setLocalDateFormat(DateTimeFormatter dateFormat) {
+ localDateTypeAdapter.setFormat(dateFormat);
+ return this;
+ }
+
+ /**
+ * Gson TypeAdapter for java.sql.Date type
+ * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used
+ * (more efficient than SimpleDateFormat).
+ */
+ public static class SqlDateTypeAdapter extends TypeAdapter {
+
+ private DateFormat dateFormat;
+
+ public SqlDateTypeAdapter() {
+ }
+
+ public SqlDateTypeAdapter(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ public void setFormat(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, java.sql.Date date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ String value;
+ if (dateFormat != null) {
+ value = dateFormat.format(date);
+ } else {
+ value = date.toString();
}
+ out.value(value);
+ }
+ }
- return OffsetDateTime.parse(date, formatter);
+ @Override
+ public java.sql.Date read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return new java.sql.Date(dateFormat.parse(date).getTime());
+ }
+ return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
+ }
+ }
}
}
-}
-/**
- * Gson TypeAdapter for jsr310 LocalDate type
- */
-class LocalDateTypeAdapter extends TypeAdapter {
+ /**
+ * Gson TypeAdapter for java.util.Date type
+ * If the dateFormat is null, ISO8601Utils will be used.
+ */
+ public static class DateTypeAdapter extends TypeAdapter {
- private final DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE;
+ private DateFormat dateFormat;
- @Override
- public void write(JsonWriter out, LocalDate date) throws IOException {
- if (date == null) {
- out.nullValue();
- } else {
- out.value(formatter.format(date));
+ public DateTypeAdapter() {
+ }
+
+ public DateTypeAdapter(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ public void setFormat(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
}
- }
- @Override
- public LocalDate read(JsonReader in) throws IOException {
- switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- return LocalDate.parse(date, formatter);
+ @Override
+ public void write(JsonWriter out, Date date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ String value;
+ if (dateFormat != null) {
+ value = dateFormat.format(date);
+ } else {
+ value = ISO8601Utils.format(date, true);
+ }
+ out.value(value);
+ }
+ }
+
+ @Override
+ public Date read(JsonReader in) throws IOException {
+ try {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return dateFormat.parse(date);
+ }
+ return ISO8601Utils.parse(date, new ParsePosition(0));
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ } catch (IllegalArgumentException e) {
+ throw new JsonParseException(e);
+ }
}
}
+
+ public JSON setDateFormat(DateFormat dateFormat) {
+ dateTypeAdapter.setFormat(dateFormat);
+ return this;
+ }
+
+ public JSON setSqlDateFormat(DateFormat dateFormat) {
+ sqlDateTypeAdapter.setFormat(dateFormat);
+ return this;
+ }
+
}
diff --git a/bindings/java/src/src/main/java/io/cloudsmith/api/apis/BadgesApi.java b/bindings/java/src/src/main/java/io/cloudsmith/api/apis/BadgesApi.java
index fa620151..1ef0bc93 100644
--- a/bindings/java/src/src/main/java/io/cloudsmith/api/apis/BadgesApi.java
+++ b/bindings/java/src/src/main/java/io/cloudsmith/api/apis/BadgesApi.java
@@ -89,7 +89,7 @@ public void setApiClient(ApiClient apiClient) {
*/
public com.squareup.okhttp.Call badgesVersionListCall(String owner, String repo, String packageFormat, String packageName, String packageVersion, String packageIdentifiers, String badgeToken, String cacheSeconds, String color, String label, String labelColor, String logoColor, String logoWidth, Boolean render, Boolean shields, Boolean showLatest, String style, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
-
+
// create path and map variables
String localVarPath = "/badges/version/{owner}/{repo}/{package_format}/{package_name}/{package_version}/{package_identifiers}/"
.replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString()))
@@ -100,28 +100,29 @@ public com.squareup.okhttp.Call badgesVersionListCall(String owner, String repo,
.replaceAll("\\{" + "package_identifiers" + "\\}", apiClient.escapeString(packageIdentifiers.toString()));
List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
if (badgeToken != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "badge_token", badgeToken));
+ localVarQueryParams.addAll(apiClient.parameterToPair("badge_token", badgeToken));
if (cacheSeconds != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "cacheSeconds", cacheSeconds));
+ localVarQueryParams.addAll(apiClient.parameterToPair("cacheSeconds", cacheSeconds));
if (color != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "color", color));
+ localVarQueryParams.addAll(apiClient.parameterToPair("color", color));
if (label != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "label", label));
+ localVarQueryParams.addAll(apiClient.parameterToPair("label", label));
if (labelColor != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "labelColor", labelColor));
+ localVarQueryParams.addAll(apiClient.parameterToPair("labelColor", labelColor));
if (logoColor != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "logoColor", logoColor));
+ localVarQueryParams.addAll(apiClient.parameterToPair("logoColor", logoColor));
if (logoWidth != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "logoWidth", logoWidth));
+ localVarQueryParams.addAll(apiClient.parameterToPair("logoWidth", logoWidth));
if (render != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "render", render));
+ localVarQueryParams.addAll(apiClient.parameterToPair("render", render));
if (shields != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "shields", shields));
+ localVarQueryParams.addAll(apiClient.parameterToPair("shields", shields));
if (showLatest != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "show_latest", showLatest));
+ localVarQueryParams.addAll(apiClient.parameterToPair("show_latest", showLatest));
if (style != null)
- localVarQueryParams.addAll(apiClient.parameterToPairs("", "style", style));
+ localVarQueryParams.addAll(apiClient.parameterToPair("style", style));
Map localVarHeaderParams = new HashMap();
@@ -152,9 +153,9 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { "apikey" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
-
+
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call badgesVersionListValidateBeforeCall(String owner, String repo, String packageFormat, String packageName, String packageVersion, String packageIdentifiers, String badgeToken, String cacheSeconds, String color, String label, String labelColor, String logoColor, String logoWidth, Boolean render, Boolean shields, Boolean showLatest, String style, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
try {
@@ -169,7 +170,7 @@ private com.squareup.okhttp.Call badgesVersionListValidateBeforeCall(String owne
if (violations.size() == 0) {
com.squareup.okhttp.Call call = badgesVersionListCall(owner, repo, packageFormat, packageName, packageVersion, packageIdentifiers, badgeToken, cacheSeconds, color, label, labelColor, logoColor, logoWidth, render, shields, showLatest, style, progressListener, progressRequestListener);
return call;
-
+
} else {
throw new BeanValidationException((Set) violations);
}
@@ -180,11 +181,7 @@ private com.squareup.okhttp.Call badgesVersionListValidateBeforeCall(String owne
e.printStackTrace();
throw new ApiException(e.getMessage());
}
-
-
-
-
-
+
}
/**
@@ -207,10 +204,12 @@ private com.squareup.okhttp.Call badgesVersionListValidateBeforeCall(String owne
* @param shields If true, a shields response will be generated (optional)
* @param showLatest If true, for latest version badges a '(latest)' suffix is added (optional)
* @param style Override the shields.io badge style value. (optional)
+ * @return Object
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
- public void badgesVersionList(String owner, String repo, String packageFormat, String packageName, String packageVersion, String packageIdentifiers, String badgeToken, String cacheSeconds, String color, String label, String labelColor, String logoColor, String logoWidth, Boolean render, Boolean shields, Boolean showLatest, String style) throws ApiException {
- badgesVersionListWithHttpInfo(owner, repo, packageFormat, packageName, packageVersion, packageIdentifiers, badgeToken, cacheSeconds, color, label, labelColor, logoColor, logoWidth, render, shields, showLatest, style);
+ public Object badgesVersionList(String owner, String repo, String packageFormat, String packageName, String packageVersion, String packageIdentifiers, String badgeToken, String cacheSeconds, String color, String label, String labelColor, String logoColor, String logoWidth, Boolean render, Boolean shields, Boolean showLatest, String style) throws ApiException {
+ ApiResponse