Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

hartza-capital/argo-workflow-openapi-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for openapi

You can get examples of requests and responses by using the CLI with --gloglevel=9, e.g. argo list --gloglevel=9

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
  • 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 "./openapi"

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
ArchivedWorkflowServiceApi ArchivedWorkflowServiceDeleteArchivedWorkflow Delete /workflow/argo/api/v1/archived-workflows/{uid}
ArchivedWorkflowServiceApi ArchivedWorkflowServiceGetArchivedWorkflow Get /workflow/argo/api/v1/archived-workflows/{uid}
ArchivedWorkflowServiceApi ArchivedWorkflowServiceListArchivedWorkflowLabelKeys Get /workflow/argo/api/v1/archived-workflows-label-keys
ArchivedWorkflowServiceApi ArchivedWorkflowServiceListArchivedWorkflowLabelValues Get /workflow/argo/api/v1/archived-workflows-label-values
ArchivedWorkflowServiceApi ArchivedWorkflowServiceListArchivedWorkflows Get /workflow/argo/api/v1/archived-workflows
ArtifactServiceApi ArtifactServiceGetInputArtifact Get /input-artifacts/{namespace}/{name}/{podName}/{artifactName} Get an input artifact.
ArtifactServiceApi ArtifactServiceGetInputArtifactByUID Get /input-artifacts-by-uid/{uid}/{podName}/{artifactName} Get an input artifact by UID.
ArtifactServiceApi ArtifactServiceGetOutputArtifact Get /artifacts/{namespace}/{name}/{podName}/{artifactName} Get an output artifact.
ArtifactServiceApi ArtifactServiceGetOutputArtifactByUID Get /artifacts-by-uid/{uid}/{podName}/{artifactName} Get an output artifact by UID.
ClusterWorkflowTemplateServiceApi ClusterWorkflowTemplateServiceCreateClusterWorkflowTemplate Post /workflow/argo/api/v1/cluster-workflow-templates
ClusterWorkflowTemplateServiceApi ClusterWorkflowTemplateServiceDeleteClusterWorkflowTemplate Delete /workflow/argo/api/v1/cluster-workflow-templates/{name}
ClusterWorkflowTemplateServiceApi ClusterWorkflowTemplateServiceGetClusterWorkflowTemplate Get /workflow/argo/api/v1/cluster-workflow-templates/{name}
ClusterWorkflowTemplateServiceApi ClusterWorkflowTemplateServiceLintClusterWorkflowTemplate Post /workflow/argo/api/v1/cluster-workflow-templates/lint
ClusterWorkflowTemplateServiceApi ClusterWorkflowTemplateServiceListClusterWorkflowTemplates Get /workflow/argo/api/v1/cluster-workflow-templates
ClusterWorkflowTemplateServiceApi ClusterWorkflowTemplateServiceUpdateClusterWorkflowTemplate Put /workflow/argo/api/v1/cluster-workflow-templates/{name}
CronWorkflowServiceApi CronWorkflowServiceCreateCronWorkflow Post /workflow/argo/api/v1/cron-workflows/{namespace}
CronWorkflowServiceApi CronWorkflowServiceDeleteCronWorkflow Delete /workflow/argo/api/v1/cron-workflows/{namespace}/{name}
CronWorkflowServiceApi CronWorkflowServiceGetCronWorkflow Get /workflow/argo/api/v1/cron-workflows/{namespace}/{name}
CronWorkflowServiceApi CronWorkflowServiceLintCronWorkflow Post /workflow/argo/api/v1/cron-workflows/{namespace}/lint
CronWorkflowServiceApi CronWorkflowServiceListCronWorkflows Get /workflow/argo/api/v1/cron-workflows/{namespace}
CronWorkflowServiceApi CronWorkflowServiceResumeCronWorkflow Put /workflow/argo/api/v1/cron-workflows/{namespace}/{name}/resume
CronWorkflowServiceApi CronWorkflowServiceSuspendCronWorkflow Put /workflow/argo/api/v1/cron-workflows/{namespace}/{name}/suspend
CronWorkflowServiceApi CronWorkflowServiceUpdateCronWorkflow Put /workflow/argo/api/v1/cron-workflows/{namespace}/{name}
EventServiceApi EventServiceListWorkflowEventBindings Get /workflow/argo/api/v1/workflow-event-bindings/{namespace}
EventServiceApi EventServiceReceiveEvent Post /workflow/argo/api/v1/events/{namespace}/{discriminator}
EventSourceServiceApi EventSourceServiceCreateEventSource Post /workflow/argo/api/v1/event-sources/{namespace}
EventSourceServiceApi EventSourceServiceDeleteEventSource Delete /workflow/argo/api/v1/event-sources/{namespace}/{name}
EventSourceServiceApi EventSourceServiceEventSourcesLogs Get /workflow/argo/api/v1/stream/event-sources/{namespace}/logs
EventSourceServiceApi EventSourceServiceGetEventSource Get /workflow/argo/api/v1/event-sources/{namespace}/{name}
EventSourceServiceApi EventSourceServiceListEventSources Get /workflow/argo/api/v1/event-sources/{namespace}
EventSourceServiceApi EventSourceServiceUpdateEventSource Put /workflow/argo/api/v1/event-sources/{namespace}/{name}
EventSourceServiceApi EventSourceServiceWatchEventSources Get /workflow/argo/api/v1/stream/event-sources/{namespace}
InfoServiceApi InfoServiceGetInfo Get /workflow/argo/api/v1/info
InfoServiceApi InfoServiceGetUserInfo Get /workflow/argo/api/v1/userinfo
InfoServiceApi InfoServiceGetVersion Get /workflow/argo/api/v1/version
PipelineServiceApi PipelineServiceDeletePipeline Delete /workflow/argo/api/v1/pipelines/{namespace}/{name}
PipelineServiceApi PipelineServiceGetPipeline Get /workflow/argo/api/v1/pipelines/{namespace}/{name}
PipelineServiceApi PipelineServiceListPipelines Get /workflow/argo/api/v1/pipelines/{namespace}
PipelineServiceApi PipelineServicePipelineLogs Get /workflow/argo/api/v1/stream/pipelines/{namespace}/logs
PipelineServiceApi PipelineServiceRestartPipeline Post /workflow/argo/api/v1/pipelines/{namespace}/{name}/restart
PipelineServiceApi PipelineServiceWatchPipelines Get /workflow/argo/api/v1/stream/pipelines/{namespace}
PipelineServiceApi PipelineServiceWatchSteps Get /workflow/argo/api/v1/stream/steps/{namespace}
SensorServiceApi SensorServiceCreateSensor Post /workflow/argo/api/v1/sensors/{namespace}
SensorServiceApi SensorServiceDeleteSensor Delete /workflow/argo/api/v1/sensors/{namespace}/{name}
SensorServiceApi SensorServiceGetSensor Get /workflow/argo/api/v1/sensors/{namespace}/{name}
SensorServiceApi SensorServiceListSensors Get /workflow/argo/api/v1/sensors/{namespace}
SensorServiceApi SensorServiceSensorsLogs Get /workflow/argo/api/v1/stream/sensors/{namespace}/logs
SensorServiceApi SensorServiceUpdateSensor Put /workflow/argo/api/v1/sensors/{namespace}/{name}
SensorServiceApi SensorServiceWatchSensors Get /workflow/argo/api/v1/stream/sensors/{namespace}
WorkflowServiceApi WorkflowServiceCreateWorkflow Post /workflow/argo/api/v1/workflows/{namespace}
WorkflowServiceApi WorkflowServiceDeleteWorkflow Delete /workflow/argo/api/v1/workflows/{namespace}/{name}
WorkflowServiceApi WorkflowServiceGetWorkflow Get /workflow/argo/api/v1/workflows/{namespace}/{name}
WorkflowServiceApi WorkflowServiceLintWorkflow Post /workflow/argo/api/v1/workflows/{namespace}/lint
WorkflowServiceApi WorkflowServiceListWorkflows Get /workflow/argo/api/v1/workflows/{namespace}
WorkflowServiceApi WorkflowServicePodLogs Get /workflow/argo/api/v1/workflows/{namespace}/{name}/{podName}/log DEPRECATED: Cannot work via HTTP if podName is an empty string. Use WorkflowLogs.
WorkflowServiceApi WorkflowServiceResubmitWorkflow Put /workflow/argo/api/v1/workflows/{namespace}/{name}/resubmit
WorkflowServiceApi WorkflowServiceResumeWorkflow Put /workflow/argo/api/v1/workflows/{namespace}/{name}/resume
WorkflowServiceApi WorkflowServiceRetryWorkflow Put /workflow/argo/api/v1/workflows/{namespace}/{name}/retry
WorkflowServiceApi WorkflowServiceSetWorkflow Put /workflow/argo/api/v1/workflows/{namespace}/{name}/set
WorkflowServiceApi WorkflowServiceStopWorkflow Put /workflow/argo/api/v1/workflows/{namespace}/{name}/stop
WorkflowServiceApi WorkflowServiceSubmitWorkflow Post /workflow/argo/api/v1/workflows/{namespace}/submit
WorkflowServiceApi WorkflowServiceSuspendWorkflow Put /workflow/argo/api/v1/workflows/{namespace}/{name}/suspend
WorkflowServiceApi WorkflowServiceTerminateWorkflow Put /workflow/argo/api/v1/workflows/{namespace}/{name}/terminate
WorkflowServiceApi WorkflowServiceWatchEvents Get /workflow/argo/api/v1/stream/events/{namespace}
WorkflowServiceApi WorkflowServiceWatchWorkflows Get /workflow/argo/api/v1/workflow-events/{namespace}
WorkflowServiceApi WorkflowServiceWorkflowLogs Get /workflow/argo/api/v1/workflows/{namespace}/{name}/log
WorkflowTemplateServiceApi WorkflowTemplateServiceCreateWorkflowTemplate Post /workflow/argo/api/v1/workflow-templates/{namespace}
WorkflowTemplateServiceApi WorkflowTemplateServiceDeleteWorkflowTemplate Delete /workflow/argo/api/v1/workflow-templates/{namespace}/{name}
WorkflowTemplateServiceApi WorkflowTemplateServiceGetWorkflowTemplate Get /workflow/argo/api/v1/workflow-templates/{namespace}/{name}
WorkflowTemplateServiceApi WorkflowTemplateServiceLintWorkflowTemplate Post /workflow/argo/api/v1/workflow-templates/{namespace}/lint
WorkflowTemplateServiceApi WorkflowTemplateServiceListWorkflowTemplates Get /workflow/argo/api/v1/workflow-templates/{namespace}
WorkflowTemplateServiceApi WorkflowTemplateServiceUpdateWorkflowTemplate Put /workflow/argo/api/v1/workflow-templates/{namespace}/{name}

Documentation For Models

Documentation For Authorization

BearerToken

  • Type: API key
  • API key parameter name: authorization
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: authorization and passed in as the auth context for each request.

HTTPBasic

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages