package
0.0.0-20240111055552-5f78fbbb6142
Repository: https://github.com/portworx/pds-api-go-client.git
Documentation: pkg.go.dev

# README

Go API client for pds

Portworx Data Services API Server

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: 121
  • 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 pds "github.com/GIT_USER_ID/GIT_REPO_ID"

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

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
APIVersionApiApiVersionGetGet /api/versionGet version information
AccountRoleBindingsApiApiAccountsIdInvitationsPostPost /api/accounts/{id}/invitationsCreate Invitation
AccountRoleBindingsApiApiAccountsIdRoleBindingsDeleteDelete /api/accounts/{id}/role-bindingsDelete AccountRoleBinding
AccountRoleBindingsApiApiAccountsIdRoleBindingsGetGet /api/accounts/{id}/role-bindingsList AccountRoleBinding
AccountRoleBindingsApiApiAccountsIdRoleBindingsPutPut /api/accounts/{id}/role-bindingsCreate/Update AccountRoleBinding
AccountRoleBindingsApiApiUsersIdAccountRoleBindingsGetGet /api/users/{id}/account-role-bindingsList User's AccountRoleBindings
AccountsApiApiAccountsGetGet /api/accountsList Accounts
AccountsApiApiAccountsIdAccountRoleInvitationsGetGet /api/accounts/{id}/account-role-invitationsList Account Role Invitations
AccountsApiApiAccountsIdEulaPutPut /api/accounts/{id}/eulaAccept EULA
AccountsApiApiAccountsIdGetGet /api/accounts/{id}Get Account
AccountsApiApiAccountsIdGlobalConfigPutPut /api/accounts/{id}/global-configUpdate AccountGlobalConfig
AccountsApiApiAccountsIdPatchPatch /api/accounts/{id}Update Account
AccountsApiApiAccountsIdUsersGetGet /api/accounts/{id}/usersList Account Users
AccountsApiApiAccountsPostPost /api/accountsCreate Account
AccountsDNSApiApiAccountsIdDnsDetailsPutPut /api/accounts/{id}/dns-detailsUpdate DNS Details
AccountsMAASDetailsApiApiAccountsIdMaasDetailsGetGet /api/accounts/{id}/maas-detailsGet MAAS details
AccountsMAASDetailsApiApiAccountsIdMaasDetailsPutPut /api/accounts/{id}/maas-detailsUpdate MAAS details
AccountsRoleInvitationsApiApiAccountRoleInvitationsIdDeleteDelete /api/account-role-invitations/{id}Delete AccountRoleInvitation
AccountsRoleInvitationsApiApiAccountRoleInvitationsIdPatchPatch /api/account-role-invitations/{id}Patch AccountRoleInvitation role_name
ApplicationConfigurationTemplatesApiApiApplicationConfigurationTemplatesIdDeleteDelete /api/application-configuration-templates/{id}Delete ApplicationConfigurationTemplates
ApplicationConfigurationTemplatesApiApiApplicationConfigurationTemplatesIdGetGet /api/application-configuration-templates/{id}Get ApplicationConfigurationTemplate
ApplicationConfigurationTemplatesApiApiApplicationConfigurationTemplatesIdPutPut /api/application-configuration-templates/{id}Update ApplicationConfigurationTemplate
ApplicationConfigurationTemplatesApiApiTenantsIdApplicationConfigurationTemplatesGetGet /api/tenants/{id}/application-configuration-templatesList ApplicationConfigurationTemplates
ApplicationConfigurationTemplatesApiApiTenantsIdApplicationConfigurationTemplatesPostPost /api/tenants/{id}/application-configuration-templatesCreate ApplicationConfigurationTemplate
AuthenticationApiAuthAuthorizationCodePostPost /auth/authorization-codeAuthorization code exchange
AuthenticationApiAuthOidcInfoGetGet /auth/oidc-infoOIDC info
AuthenticationApiAuthRefreshTokenPostPost /auth/refresh-tokenUse refresh token to generate new tokens.
AuthorizerApiApiAuthorizerPostPost /api/authorizerAuthorize operation
BackupCredentialsApiApiBackupCredentialsIdCredentialsGetGet /api/backup-credentials/{id}/credentialsGet cloud configuration for BackupCredentials
BackupCredentialsApiApiBackupCredentialsIdDeleteDelete /api/backup-credentials/{id}Delete BackupCredentials
BackupCredentialsApiApiBackupCredentialsIdGetGet /api/backup-credentials/{id}Get BackupCredentials
BackupCredentialsApiApiBackupCredentialsIdPutPut /api/backup-credentials/{id}Update BackupCredentials
BackupCredentialsApiApiTenantsIdBackupCredentialsGetGet /api/tenants/{id}/backup-credentialsList BackupCredentials
BackupCredentialsApiApiTenantsIdBackupCredentialsPostPost /api/tenants/{id}/backup-credentialsCreate BackupCredentials
BackupJobsApiApiBackupJobsIdDeleteDelete /api/backup-jobs/{id}Delete BackupJob
BackupJobsApiApiBackupJobsIdGetGet /api/backup-jobs/{id}Get BackupJob
BackupJobsApiApiBackupJobsIdPutPut /api/backup-jobs/{id}Upsert BackupJob
BackupJobsApiApiBackupsIdJobsGetGet /api/backups/{id}/jobsList Backup's Jobs
BackupJobsApiApiProjectsIdBackupJobsGetGet /api/projects/{id}/backup-jobsList Project's BackupJobs
BackupPoliciesApiApiBackupPoliciesIdDeleteDelete /api/backup-policies/{id}Delete BackupPolicies
BackupPoliciesApiApiBackupPoliciesIdGetGet /api/backup-policies/{id}Get BackupPolicy
BackupPoliciesApiApiBackupPoliciesIdPutPut /api/backup-policies/{id}Update BackupPolicy
BackupPoliciesApiApiTenantsIdBackupPoliciesGetGet /api/tenants/{id}/backup-policiesList BackupPolicies
BackupPoliciesApiApiTenantsIdBackupPoliciesPostPost /api/tenants/{id}/backup-policiesCreate BackupPolicy
BackupTargetsApiApiBackupTargetsIdDeleteDelete /api/backup-targets/{id}Delete BackupTargets
BackupTargetsApiApiBackupTargetsIdGetGet /api/backup-targets/{id}Get BackupTarget
BackupTargetsApiApiBackupTargetsIdPutPut /api/backup-targets/{id}Update BackupTarget
BackupTargetsApiApiBackupTargetsIdRetryPostPost /api/backup-targets/{id}/retryRetry sync of a BackupTarget
BackupTargetsApiApiBackupTargetsIdStatesGetGet /api/backup-targets/{id}/statesList BackupTarget's BackupTargetStates
BackupTargetsApiApiProjectsIdBackupTargetsGetGet /api/projects/{id}/backup-targetsList Project's BackupTargets
BackupTargetsApiApiTenantsIdBackupTargetsGetGet /api/tenants/{id}/backup-targetsList Tenant's BackupTargets
BackupTargetsApiApiTenantsIdBackupTargetsPostPost /api/tenants/{id}/backup-targetsCreate BackupTarget
BackupsApiApiBackupTargetsIdBackupsGetGet /api/backup-targets/{id}/backupsList BackupTarget's Backups
BackupsApiApiBackupsIdDeleteDelete /api/backups/{id}Delete Backup
BackupsApiApiBackupsIdGetGet /api/backups/{id}Get Backup
BackupsApiApiBackupsIdJobsNameDeleteDelete /api/backups/{id}/jobs/{name}Delete Backup jobs
BackupsApiApiBackupsIdPutPut /api/backups/{id}Update Backup
BackupsApiApiDeploymentsIdBackupsGetGet /api/deployments/{id}/backupsList Deployment's Backups
BackupsApiApiDeploymentsIdBackupsPostPost /api/deployments/{id}/backupsCreate Backup
CopilotApiApiCopilotSearchPostPost /api/copilot/searchSearch Database query
DataServicesApiApiDataServicesGetGet /api/data-servicesList Data Services
DataServicesApiApiDataServicesIdGetGet /api/data-services/{id}Get Data Service
DeploymentManifestsApiApiDeploymentsIdUpdateManifestPostPost /api/deployments/{id}/update-manifestPost DeploymentManifest
DeploymentTargetsApiApiDeploymentTargetsIdAgentMetadataPatchPatch /api/deployment-targets/{id}/agent-metadataPatch DeploymentTarget agent-metadata
DeploymentTargetsApiApiDeploymentTargetsIdConfigGetGet /api/deployment-targets/{id}/configGet configuration values for a DeploymentTarget
DeploymentTargetsApiApiDeploymentTargetsIdCredentialsGetGet /api/deployment-targets/{id}/credentialsGet join credentials of a DeploymentTarget
DeploymentTargetsApiApiDeploymentTargetsIdDeleteDelete /api/deployment-targets/{id}Delete DeploymentTarget
DeploymentTargetsApiApiDeploymentTargetsIdGetGet /api/deployment-targets/{id}Get DeploymentTarget
DeploymentTargetsApiApiDeploymentTargetsIdHeartbeatPostPost /api/deployment-targets/{id}/heartbeatMake DeploymentTarget heart beat request
DeploymentTargetsApiApiDeploymentTargetsIdMetadataPostPost /api/deployment-targets/{id}/metadataUpdate DeploymentTarget metadata
DeploymentTargetsApiApiDeploymentTargetsIdOperatorHeartbeatPostPost /api/deployment-targets/{id}/operator-heartbeatMake DeploymentTarget operator heart beat request
DeploymentTargetsApiApiDeploymentTargetsIdOperatorMetadataPatchPatch /api/deployment-targets/{id}/operator-metadataUpdate target operator metadata
DeploymentTargetsApiApiDeploymentTargetsIdPatchPatch /api/deployment-targets/{id}Patch DeploymentTarget
DeploymentTargetsApiApiDeploymentTargetsIdPutPut /api/deployment-targets/{id}Update DeploymentTarget
DeploymentTargetsApiApiDeploymentTargetsIdUpdateCapabilitiesPostPost /api/deployment-targets/{id}/update-capabilitiesUpdate target capabilities
DeploymentTargetsApiApiProjectsIdDeploymentTargetsGetGet /api/projects/{id}/deployment-targetsList Project's DeploymentTargets
DeploymentTargetsApiApiTenantsIdDeploymentTargetsGetGet /api/tenants/{id}/deployment-targetsList Tenant's DeploymentTargets
DeploymentTargetsApiApiTenantsIdDeploymentTargetsPostPost /api/tenants/{id}/deployment-targetsCreate DeploymentTarget
DeploymentsApiApiDeploymentsIdConnectionInfoGetGet /api/deployments/{id}/connection-infoDeployment Connection Information
DeploymentsApiApiDeploymentsIdCredentialsGetGet /api/deployments/{id}/credentialsDeployment Credentials
DeploymentsApiApiDeploymentsIdDeleteDelete /api/deployments/{id}Delete Deployment
DeploymentsApiApiDeploymentsIdGetGet /api/deployments/{id}Get Deployment
DeploymentsApiApiDeploymentsIdPutPut /api/deployments/{id}Update Deployment
DeploymentsApiApiDeploymentsIdStatusGetGet /api/deployments/{id}/statusGet Deployment Status
DeploymentsApiApiDeploymentsPostPost /api/deploymentsCreate Deployment
DeploymentsApiApiProjectsIdDeploymentsGetGet /api/projects/{id}/deploymentsList Project's Deployments
DeploymentsApiApiProjectsIdDeploymentsPostPost /api/projects/{id}/deploymentsCreate Deployment
EventsApiApiDeploymentTargetsIdDeploymentEventsPostPost /api/deployment-targets/{id}/deployment/eventsAdds k8s generated events for a deployment
EventsApiApiDeploymentTargetsIdEventsLastSyncedTimeGetGet /api/deployment-targets/{id}/events/last-synced-timeGet the timestamp of the latest event
EventsApiApiDeploymentsIdEventsGetGet /api/deployments/{id}/eventsGet Deployment Events
GlobalRoleBindingsApiApiGlobalRoleBindingsDeleteDelete /api/global-role-bindingsDelete GlobalRoleBinding
GlobalRoleBindingsApiApiGlobalRoleBindingsGetGet /api/global-role-bindingsList GlobalRoleBindings
GlobalRoleBindingsApiApiGlobalRoleBindingsPutPut /api/global-role-bindingsSet GlobalRoleBinding
IAMApiApiAccountsIdIamActorIdDeleteDelete /api/accounts/{id}/iam/{actor-id}Delete IAM
IAMApiApiAccountsIdIamActorIdGetGet /api/accounts/{id}/iam/{actor-id}Get IAM
IAMApiApiAccountsIdIamGetGet /api/accounts/{id}/iamList IAM
IAMApiApiAccountsIdIamPostPost /api/accounts/{id}/iamCreate IAM
IAMApiApiAccountsIdIamPutPut /api/accounts/{id}/iamUpdate IAM
ImagesApiApiImagesGetGet /api/imagesList Images
ImagesApiApiImagesIdGetGet /api/images/{id}Get Image
ImagesApiApiVersionsIdImagesGetGet /api/versions/{id}/imagesList Version's Images
MetadataApiApiMetadataGetGet /api/metadataGet metadata information
NamespacesApiApiDeploymentTargetsIdNamespacesGetGet /api/deployment-targets/{id}/namespacesList DeploymentTarget's Namespaces
NamespacesApiApiDeploymentTargetsIdNamespacesPostPost /api/deployment-targets/{id}/namespacesCreate Namespace
NamespacesApiApiNamespacesIdDeleteDelete /api/namespaces/{id}Delete Namespace
NamespacesApiApiNamespacesIdGetGet /api/namespaces/{id}Get Namespace
NamespacesApiApiNamespacesIdPutPut /api/namespaces/{id}Update namespace
ProjectRoleBindingsApiApiProjectsIdRoleBindingsDeleteDelete /api/projects/{id}/role-bindingsDelete ProjectRoleBinding
ProjectRoleBindingsApiApiProjectsIdRoleBindingsGetGet /api/projects/{id}/role-bindingsList ProjectRoleBindings
ProjectRoleBindingsApiApiProjectsIdRoleBindingsPutPut /api/projects/{id}/role-bindingsCreate ProjectRoleBinding
ProjectsApiApiProjectsIdGetGet /api/projects/{id}Get Project
ProjectsApiApiTenantsIdProjectsGetGet /api/tenants/{id}/projectsList Tenant's Projects
ResourceSettingsTemplatesApiApiResourceSettingsTemplatesIdDeleteDelete /api/resource-settings-templates/{id}Delete ResourceSettingsTemplates
ResourceSettingsTemplatesApiApiResourceSettingsTemplatesIdGetGet /api/resource-settings-templates/{id}Get ResourceSettingsTemplate
ResourceSettingsTemplatesApiApiResourceSettingsTemplatesIdPutPut /api/resource-settings-templates/{id}Update ResourceSettingsTemplate
ResourceSettingsTemplatesApiApiTenantsIdResourceSettingsTemplatesGetGet /api/tenants/{id}/resource-settings-templatesList ResourceSettingsTemplates
ResourceSettingsTemplatesApiApiTenantsIdResourceSettingsTemplatesPostPost /api/tenants/{id}/resource-settings-templatesCreate ResourceSettingsTemplate
RestoresApiApiBackupJobsIdRestorePostPost /api/backup-jobs/{id}/restoreStart Restore
RestoresApiApiRestoresIdGetGet /api/restores/{id}Get Restore
RestoresApiApiRestoresIdRetryPostPost /api/restores/{id}/retryRetry Restore
RestoresApiApiRestoresIdUpdatePostPost /api/restores/{id}/updateUpdate Restore
RestoresApiApiRestoresRestorabilityMatrixGetGet /api/restores/restorability-matrixRestorability Matrix
RolesApiApiRolesGetGet /api/rolesList Roles
SampleTemplatesApiApiDefaultTemplatesApplicationConfigurationGetGet /api/default-templates/application-configurationList ApplicationConfigurationSamples
SampleTemplatesApiApiDefaultTemplatesBackupPoliciesGetGet /api/default-templates/backup-policiesList BackupPolicySamples
SampleTemplatesApiApiDefaultTemplatesResourceSettingsGetGet /api/default-templates/resource-settingsList ResourceSettingsSamples
SampleTemplatesApiApiDefaultTemplatesStorageOptionsGetGet /api/default-templates/storage-optionsList StorageOptionsSamples
ServiceAccountsApiApiServiceAccountsIdDeleteDelete /api/service-accounts/{id}Delete ServiceAccounts
ServiceAccountsApiApiServiceAccountsIdGetGet /api/service-accounts/{id}Get ServiceAccounts
ServiceAccountsApiApiServiceAccountsIdTokenGetGet /api/service-accounts/{id}/tokenGet token of a ServiceAccount
ServiceAccountsApiApiTenantsIdServiceAccountsGetGet /api/tenants/{id}/service-accountsList Tenant's ServiceAccounts
ServiceAccountsApiApiTenantsIdServiceAccountsPostPost /api/tenants/{id}/service-accountsCreate ServiceAccounts
ServiceIdentityApiApiAccountsIdServiceIdentityGetGet /api/accounts/{id}/service-identityList Service Identity
ServiceIdentityApiApiAccountsIdServiceIdentityPostPost /api/accounts/{id}/service-identityCreate a Service Identity
ServiceIdentityApiApiServiceIdentityIdDeleteDelete /api/service-identity/{id}Delete service identity
ServiceIdentityApiApiServiceIdentityIdGetGet /api/service-identity/{id}Get service identity by ID
ServiceIdentityApiApiServiceIdentityIdPutPut /api/service-identity/{id}Update service identity
ServiceIdentityApiApiServiceIdentityIdRegenerateGetGet /api/service-identity/{id}/regenerateRegenerate service identity credentials
ServiceIdentityApiServiceIdentityGenerateTokenPostPost /service-identity/generate-tokenGenerate JWT token for service identity
StorageOptionsTemplatesApiApiStorageOptionsTemplatesIdDeleteDelete /api/storage-options-templates/{id}Delete StorageOptionsTemplates
StorageOptionsTemplatesApiApiStorageOptionsTemplatesIdGetGet /api/storage-options-templates/{id}Get StorageOptionsTemplate
StorageOptionsTemplatesApiApiStorageOptionsTemplatesIdPutPut /api/storage-options-templates/{id}Update StorageOptionsTemplate
StorageOptionsTemplatesApiApiTenantsIdStorageOptionsTemplatesGetGet /api/tenants/{id}/storage-options-templatesList StorageOptionsTemplates
StorageOptionsTemplatesApiApiTenantsIdStorageOptionsTemplatesPostPost /api/tenants/{id}/storage-options-templatesCreate StorageOptionsTemplate
TasksApiApiDbTasksIdGetGet /api/db-tasks/{id}Get Task
TeamsApiApiTeamsIdGetGet /api/teams/{id}Get Team
TenantRoleBindingsApiApiTenantsIdRoleBindingsDeleteDelete /api/tenants/{id}/role-bindingsDelete TenantRoleBinding
TenantRoleBindingsApiApiTenantsIdRoleBindingsGetGet /api/tenants/{id}/role-bindingsList TenantRoleBindings
TenantRoleBindingsApiApiTenantsIdRoleBindingsPutPut /api/tenants/{id}/role-bindingsCreate TenantRoleBinding
TenantsApiApiAccountsIdTenantsGetGet /api/accounts/{id}/tenantsList Account's Tenants
TenantsApiApiTenantsIdDnsDetailsGetGet /api/tenants/{id}/dns-detailsGet DNS details for Tenant
TenantsApiApiTenantsIdGetGet /api/tenants/{id}Get Tenant
UserAPIKeyApiApiUserApiKeyGetGet /api/user-api-keyList UserAPIKeys
UserAPIKeyApiApiUserApiKeyIdDeleteDelete /api/user-api-key/{id}Delete UserAPIKey
UserAPIKeyApiApiUserApiKeyIdGetGet /api/user-api-key/{id}Get UserAPIKey
UserAPIKeyApiApiUserApiKeyIdPatchPatch /api/user-api-key/{id}Patch UserAPIKey
UserAPIKeyApiApiUserApiKeyPostPost /api/user-api-keyCreate UserAPIKey
UsersApiApiUsersIdGetGet /api/users/{id}Get User
VersionsApiApiCompatibleVersionsGetGet /api/compatible-versionsList compatible versions
VersionsApiApiDataServicesIdVersionsGetGet /api/data-services/{id}/versionsList Data Service's Versions
VersionsApiApiVersionsIdGetGet /api/versions/{id}Get Version
WhoAmIApiApiWhoamiGetGet /api/whoamiGet Current Actor

Documentation For Models

Documentation For Authorization

ApiKeyAuth

  • 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.

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