peridot/vendor/openapi.peridot.resf.org/peridotopenapi
Mustafa Gezen d3e5d9ea92
Wait for rpm import to finish in CLI
Signed-off-by: Mustafa Gezen <mustafa@ctrliq.com>
2022-08-31 20:06:02 +02:00
..
.gitignore Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
.openapi-generator-ignore Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
.travis.yml Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
api_build_service.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
api_import_service.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
api_package_service.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
api_project_service.go Wait for rpm import to finish in CLI 2022-08-31 20:06:02 +02:00
api_search_service.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
api_task_service.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
BUILD.bazel Wait for rpm import to finish in CLI 2022-08-31 20:06:02 +02:00
client.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
configuration.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
git_push.sh Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
go.mod Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
go.sum Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_api_http_body.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_import_package_request_is_the_request_message_for_import_service_import_package.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_inline_object_1.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_inline_object_2.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_inline_object_3.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_inline_object_4.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_inline_object_5.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_inline_object_6.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_inline_object_7.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_inline_object_8.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_inline_object.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_protobuf_any.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_rpc_status.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_stream_result_of_api_http_body.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_stream_result_of_v1_search_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_async_task.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_batch_filter.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_build_batch.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_build_filters.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_build.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_create_project_request.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_create_project_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_get_build_batch_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_get_build_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_get_import_batch_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_get_import_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_get_package_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_get_project_credentials_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_get_project_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_get_repository_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_get_task_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_import_batch_retry_failed_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_import_batch.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_import_package_batch_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_import_package_request.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_import_revision.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_import.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_list_build_batches_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_list_builds_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_list_import_batches_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_list_imports_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_list_packages_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_list_projects_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_list_repositories_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_list_tasks_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_lookaside_file_upload_request.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_lookaside_file_upload_response.go Wait for rpm import to finish in CLI 2022-08-31 20:06:02 +02:00
model_v1_package_filters.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_package_type.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_package.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_project.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_repository.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_search_request.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_search_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_set_project_credentials_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_submit_build_batch_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_submit_build_request.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_subtask.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_task_status.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_task_type.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_update_project_response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
model_v1_version_release.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
README.md Wait for rpm import to finish in CLI 2022-08-31 20:06:02 +02:00
response.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00
utils.go Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support 2022-08-31 20:06:01 +02:00

Go API client for peridotopenapi

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: version not set
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import sw "./peridotopenapi"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identifield by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
BuildServiceApi GetBuild Get /v1/projects/{projectId}/builds/{buildId} GetBuild returns a build by its id
BuildServiceApi GetBuildBatch Get /v1/projects/{projectId}/build_batches/{buildBatchId} GetBuildBatch returns a build batch by its id
BuildServiceApi ListBuildBatches Get /v1/projects/{projectId}/build_batches ListBuildBatches returns all build batches
BuildServiceApi ListBuilds Get /v1/projects/{projectId}/builds ListBuilds returns all builds filtered through given filters
BuildServiceApi RpmImport Post /v1/projects/{projectId}/builds/rpm-import RpmImport imports rpm files into a project (packaged into tar format)
BuildServiceApi RpmLookasideBatchImport Post /v1/projects/{projectId}/builds/rpm-lookaside-batch-import RpmLookasideBatchImport imports rpm files into a project (stored in Lookaside)
BuildServiceApi SubmitBuild Post /v1/projects/{projectId}/builds SubmitBuild builds a package scoped to a project The project has to contain an import for the specific package This method is asynchronous. Peridot uses the AsyncTask abstraction. Check out `//peridot/proto/v1:task.proto` for more information
BuildServiceApi SubmitBuildBatch Post /v1/projects/{projectId}/build_batches SubmitBuildBatch submits a batch of builds.
ImportServiceApi GetImport Get /v1/projects/{projectId}/imports/{importId} GetImport gets an import by ID.
ImportServiceApi GetImportBatch Get /v1/projects/{projectId}/import_batches/{importBatchId} GetImportBatch gets an import batch by ID.
ImportServiceApi ImportBatchRetryFailed Post /v1/projects/{projectId}/import_batches/{importBatchId}/retry_failed ImportBatchRetryFailed retries failed imports in a batch.
ImportServiceApi ImportPackage Post /v1/projects/{projectId}/imports ImportPackage imports a package scoped to a project This method is asynchronous. Peridot uses the AsyncTask abstraction. Check out `//peridot/proto/v1:task.proto` for more information TODO low-pri: Support inter-project imports
ImportServiceApi ImportPackageBatch Post /v1/projects/{projectId}/import_batches ImportPackageBatch imports a batch of packages scoped to a project
ImportServiceApi ListImportBatches Get /v1/projects/{projectId}/import_batches ListImportBatches lists all import batches for a project.
ImportServiceApi ListImports Get /v1/projects/{projectId}/imports ListImports lists all imports for a project.
PackageServiceApi GetPackage Get /v1/projects/{projectId}/packages/{field}/{value} GetPackage returns a package by its id or name
PackageServiceApi ListPackages Get /v1/projects/{projectId}/packages ListPackages returns all packages with filters applied
ProjectServiceApi CreateHashedRepositories Post /v1/projects/{projectId}/repositories/hashed
ProjectServiceApi CreateProject Post /v1/projects
ProjectServiceApi GetProject Get /v1/projects/{id}
ProjectServiceApi GetProjectCredentials Get /v1/projects/{projectId}/credentials
ProjectServiceApi GetRepository Get /v1/projects/{projectId}/repositories/{id}
ProjectServiceApi ListProjects Get /v1/projects
ProjectServiceApi ListRepositories Get /v1/projects/{projectId}/repositories
ProjectServiceApi LookasideFileUpload Post /v1/lookaside
ProjectServiceApi SetProjectCredentials Post /v1/projects/{projectId}/credentials
ProjectServiceApi SyncCatalog Post /v1/projects/{projectId}/catalogsync
ProjectServiceApi UpdateProject Put /v1/projects/{projectId}
SearchServiceApi Search Post /v1/search
TaskServiceApi CancelTask Post /v1/projects/{projectId}/tasks/{id}/cancel CancelTask cancels a task with the given ID. Only parent tasks can be cancelled and if they're in the PENDING or RUNNING state.
TaskServiceApi GetTask Get /v1/projects/{projectId}/tasks/{id} GetTask returns a specific task with the given ID
TaskServiceApi ListTasks Get /v1/projects/{projectId}/tasks ListTasks returns a list of tasks from all projects List mode won't return task responses. The reason being responses being able to reach huge sizes. To get the response for a specific task, you can use GetTask, either on the specific subtask or the parent task.
TaskServiceApi StreamTaskLogs Get /v1/projects/{projectId}/tasks/{id}/logs StreamTaskLogs streams the logs of a specific task with the given ID

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author