package
0.0.0-20230310111928-80edec6b0b46
Repository: https://github.com/eschercloudai/argocd-client-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Go API client for api

Description of all APIs

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/net/context

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

import api "github.com/eschercloudai/argocd-client-go/pkg/api"

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(), api.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(), api.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 identified 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(), api.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), api.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
AccountServiceApiAccountServiceCanIGet /api/v1/account/can-i/{resource}/{action}/{subresource}CanI checks if the current account has permission to perform an action
AccountServiceApiAccountServiceCreateTokenPost /api/v1/account/{name}/tokenCreateToken creates a token
AccountServiceApiAccountServiceDeleteTokenDelete /api/v1/account/{name}/token/{id}DeleteToken deletes a token
AccountServiceApiAccountServiceGetAccountGet /api/v1/account/{name}GetAccount returns an account
AccountServiceApiAccountServiceListAccountsGet /api/v1/accountListAccounts returns the list of accounts
AccountServiceApiAccountServiceUpdatePasswordPut /api/v1/account/passwordUpdatePassword updates an account's password to a new value
ApplicationServiceApiApplicationServiceCreatePost /api/v1/applicationsCreate creates an application
ApplicationServiceApiApplicationServiceDeleteDelete /api/v1/applications/{name}Delete deletes an application
ApplicationServiceApiApplicationServiceDeleteResourceDelete /api/v1/applications/{name}/resourceDeleteResource deletes a single application resource
ApplicationServiceApiApplicationServiceGetGet /api/v1/applications/{name}Get returns an application by name
ApplicationServiceApiApplicationServiceGetApplicationSyncWindowsGet /api/v1/applications/{name}/syncwindowsGet returns sync windows of the application
ApplicationServiceApiApplicationServiceGetManifestsGet /api/v1/applications/{name}/manifestsGetManifests returns application manifests
ApplicationServiceApiApplicationServiceGetManifestsWithFilesPost /api/v1/applications/manifestsWithFilesGetManifestsWithFiles returns application manifests using provided files to generate them
ApplicationServiceApiApplicationServiceGetResourceGet /api/v1/applications/{name}/resourceGetResource returns single application resource
ApplicationServiceApiApplicationServiceListGet /api/v1/applicationsList returns list of applications
ApplicationServiceApiApplicationServiceListResourceActionsGet /api/v1/applications/{name}/resource/actionsListResourceActions returns list of resource actions
ApplicationServiceApiApplicationServiceListResourceEventsGet /api/v1/applications/{name}/eventsListResourceEvents returns a list of event resources
ApplicationServiceApiApplicationServiceManagedResourcesGet /api/v1/applications/{applicationName}/managed-resourcesManagedResources returns list of managed resources
ApplicationServiceApiApplicationServicePatchPatch /api/v1/applications/{name}Patch patch an application
ApplicationServiceApiApplicationServicePatchResourcePost /api/v1/applications/{name}/resourcePatchResource patch single application resource
ApplicationServiceApiApplicationServicePodLogsGet /api/v1/applications/{name}/pods/{podName}/logsPodLogs returns stream of log entries for the specified pod. Pod
ApplicationServiceApiApplicationServicePodLogs2Get /api/v1/applications/{name}/logsPodLogs returns stream of log entries for the specified pod. Pod
ApplicationServiceApiApplicationServiceResourceTreeGet /api/v1/applications/{applicationName}/resource-treeResourceTree returns resource tree
ApplicationServiceApiApplicationServiceRevisionMetadataGet /api/v1/applications/{name}/revisions/{revision}/metadataGet the meta-data (author, date, tags, message) for a specific revision of the application
ApplicationServiceApiApplicationServiceRollbackPost /api/v1/applications/{name}/rollbackRollback syncs an application to its target state
ApplicationServiceApiApplicationServiceRunResourceActionPost /api/v1/applications/{name}/resource/actionsRunResourceAction run resource action
ApplicationServiceApiApplicationServiceSyncPost /api/v1/applications/{name}/syncSync syncs an application to its target state
ApplicationServiceApiApplicationServiceTerminateOperationDelete /api/v1/applications/{name}/operationTerminateOperation terminates the currently running operation
ApplicationServiceApiApplicationServiceUpdatePut /api/v1/applications/{application.metadata.name}Update updates an application
ApplicationServiceApiApplicationServiceUpdateSpecPut /api/v1/applications/{name}/specUpdateSpec updates an application spec
ApplicationServiceApiApplicationServiceWatchGet /api/v1/stream/applicationsWatch returns stream of application change events
ApplicationServiceApiApplicationServiceWatchResourceTreeGet /api/v1/stream/applications/{applicationName}/resource-treeWatch returns stream of application resource tree
ApplicationSetServiceApiApplicationSetServiceCreatePost /api/v1/applicationsetsCreate creates an applicationset
ApplicationSetServiceApiApplicationSetServiceDeleteDelete /api/v1/applicationsets/{name}Delete deletes an application set
ApplicationSetServiceApiApplicationSetServiceGetGet /api/v1/applicationsets/{name}Get returns an applicationset by name
ApplicationSetServiceApiApplicationSetServiceListGet /api/v1/applicationsetsList returns list of applicationset
CertificateServiceApiCertificateServiceCreateCertificatePost /api/v1/certificatesCreates repository certificates on the server
CertificateServiceApiCertificateServiceDeleteCertificateDelete /api/v1/certificatesDelete the certificates that match the RepositoryCertificateQuery
CertificateServiceApiCertificateServiceListCertificatesGet /api/v1/certificatesList all available repository certificates
ClusterServiceApiClusterServiceCreatePost /api/v1/clustersCreate creates a cluster
ClusterServiceApiClusterServiceDeleteDelete /api/v1/clusters/{id.value}Delete deletes a cluster
ClusterServiceApiClusterServiceGetGet /api/v1/clusters/{id.value}Get returns a cluster by server address
ClusterServiceApiClusterServiceInvalidateCachePost /api/v1/clusters/{id.value}/invalidate-cacheInvalidateCache invalidates cluster cache
ClusterServiceApiClusterServiceListGet /api/v1/clustersList returns list of clusters
ClusterServiceApiClusterServiceRotateAuthPost /api/v1/clusters/{id.value}/rotate-authRotateAuth rotates the bearer token used for a cluster
ClusterServiceApiClusterServiceUpdatePut /api/v1/clusters/{id.value}Update updates a cluster
GPGKeyServiceApiGPGKeyServiceCreatePost /api/v1/gpgkeysCreate one or more GPG public keys in the server's configuration
GPGKeyServiceApiGPGKeyServiceDeleteDelete /api/v1/gpgkeysDelete specified GPG public key from the server's configuration
GPGKeyServiceApiGPGKeyServiceGetGet /api/v1/gpgkeys/{keyID}Get information about specified GPG public key from the server
GPGKeyServiceApiGPGKeyServiceListGet /api/v1/gpgkeysList all available repository certificates
NotificationServiceApiNotificationServiceListServicesGet /api/v1/notifications/servicesList returns list of services
NotificationServiceApiNotificationServiceListTemplatesGet /api/v1/notifications/templatesList returns list of templates
NotificationServiceApiNotificationServiceListTriggersGet /api/v1/notifications/triggersList returns list of triggers
ProjectServiceApiProjectServiceCreatePost /api/v1/projectsCreate a new project
ProjectServiceApiProjectServiceCreateTokenPost /api/v1/projects/{project}/roles/{role}/tokenCreate a new project token
ProjectServiceApiProjectServiceDeleteDelete /api/v1/projects/{name}Delete deletes a project
ProjectServiceApiProjectServiceDeleteTokenDelete /api/v1/projects/{project}/roles/{role}/token/{iat}Delete a new project token
ProjectServiceApiProjectServiceGetGet /api/v1/projects/{name}Get returns a project by name
ProjectServiceApiProjectServiceGetDetailedProjectGet /api/v1/projects/{name}/detailedGetDetailedProject returns a project that include project, global project and scoped resources by name
ProjectServiceApiProjectServiceGetGlobalProjectsGet /api/v1/projects/{name}/globalprojectsGet returns a virtual project by name
ProjectServiceApiProjectServiceGetSyncWindowsStateGet /api/v1/projects/{name}/syncwindowsGetSchedulesState returns true if there are any active sync syncWindows
ProjectServiceApiProjectServiceListGet /api/v1/projectsList returns list of projects
ProjectServiceApiProjectServiceListEventsGet /api/v1/projects/{name}/eventsListEvents returns a list of project events
ProjectServiceApiProjectServiceUpdatePut /api/v1/projects/{project.metadata.name}Update updates a project
RepoCredsServiceApiRepoCredsServiceCreateRepositoryCredentialsPost /api/v1/repocredsCreateRepositoryCredentials creates a new repository credential set
RepoCredsServiceApiRepoCredsServiceDeleteRepositoryCredentialsDelete /api/v1/repocreds/{url}DeleteRepositoryCredentials deletes a repository credential set from the configuration
RepoCredsServiceApiRepoCredsServiceListRepositoryCredentialsGet /api/v1/repocredsListRepositoryCredentials gets a list of all configured repository credential sets
RepoCredsServiceApiRepoCredsServiceUpdateRepositoryCredentialsPut /api/v1/repocreds/{creds.url}UpdateRepositoryCredentials updates a repository credential set
RepositoryServiceApiRepositoryServiceCreateRepositoryPost /api/v1/repositoriesCreateRepository creates a new repository configuration
RepositoryServiceApiRepositoryServiceDeleteRepositoryDelete /api/v1/repositories/{repo}DeleteRepository deletes a repository from the configuration
RepositoryServiceApiRepositoryServiceGetGet /api/v1/repositories/{repo}Get returns a repository or its credentials
RepositoryServiceApiRepositoryServiceGetAppDetailsPost /api/v1/repositories/{source.repoURL}/appdetailsGetAppDetails returns application details by given path
RepositoryServiceApiRepositoryServiceGetHelmChartsGet /api/v1/repositories/{repo}/helmchartsGetHelmCharts returns list of helm charts in the specified repository
RepositoryServiceApiRepositoryServiceListAppsGet /api/v1/repositories/{repo}/appsListApps returns list of apps in the repo
RepositoryServiceApiRepositoryServiceListRefsGet /api/v1/repositories/{repo}/refs
RepositoryServiceApiRepositoryServiceListRepositoriesGet /api/v1/repositoriesListRepositories gets a list of all configured repositories
RepositoryServiceApiRepositoryServiceUpdateRepositoryPut /api/v1/repositories/{repo.repo}UpdateRepository updates a repository configuration
RepositoryServiceApiRepositoryServiceValidateAccessPost /api/v1/repositories/{repo}/validateValidateAccess validates access to a repository with given parameters
SessionServiceApiSessionServiceCreatePost /api/v1/sessionCreate a new JWT for authentication and set a cookie if using HTTP
SessionServiceApiSessionServiceDeleteDelete /api/v1/sessionDelete an existing JWT cookie if using HTTP
SessionServiceApiSessionServiceGetUserInfoGet /api/v1/session/userinfoGet the current user's info
SettingsServiceApiSettingsServiceGetGet /api/v1/settingsGet returns Argo CD settings
VersionServiceApiVersionServiceVersionGet /api/versionVersion returns version information of the API server

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