No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
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: v1.6.0
- Package version: v1.6.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
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 begetOpenapiVps "github.com/LTD-Beget/openapi-vps-go"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), begetOpenapiVps.ContextServerIndex, 1)
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(), begetOpenapiVps.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
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(), begetOpenapiVps.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), begetOpenapiVps.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://api.beget.com
Class | Method | HTTP request | Description |
---|---|---|---|
BackupServiceApi | BackupServiceGetAvailableCopies | Get /v1/vps/backup | |
BackupServiceApi | BackupServiceGetBackupFileList | Get /v1/vps/{id}/backup/{copy_id} | |
BackupServiceApi | BackupServiceGetOrders | Get /v1/vps/backup/orders | |
BackupServiceApi | BackupServiceRestoreFile | Post /v1/vps/{id}/backup/{copy_id}/file | |
BackupServiceApi | BackupServiceRestoreServer | Post /v1/vps/{id}/backup/{copy_id}/server | |
ConfiguratorServiceApi | ConfiguratorServiceGetCalculation | Get /v1/vps/configurator/calculation | |
ConfiguratorServiceApi | ConfiguratorServiceGetConfiguratorInfo | Get /v1/vps/configurator/info | |
ManageServiceApi | ManageServiceAttachIpAddress | Post /v1/vps/{id}/network/{ip_address} | |
ManageServiceApi | ManageServiceAttachSshKey | Post /v1/vps/{id}/sshKey/{ssh_key_id} | |
ManageServiceApi | ManageServiceAttachToPrivateNetwork | Post /v1/vps/{id}/private-network/{network_id} | |
ManageServiceApi | ManageServiceChangeConfiguration | Put /v1/vps/server/{id}/configuration | |
ManageServiceApi | ManageServiceChangeSshAccess | Put /v1/vps/{id}/ssh/access | |
ManageServiceApi | ManageServiceCheckSoftwareRequirements | Post /v1/vps/software/requirements | |
ManageServiceApi | ManageServiceCreateVps | Post /v1/vps/server | |
ManageServiceApi | ManageServiceDetachFromPrivateNetwork | Delete /v1/vps/{id}/private-network/{network_id} | |
ManageServiceApi | ManageServiceDetachIpAddress | Delete /v1/vps/network/detach/{ip_address} | |
ManageServiceApi | ManageServiceDetachSshKey | Delete /v1/vps/{id}/sshKey/{ssh_key_id} | |
ManageServiceApi | ManageServiceDisablePostInstallAlert | Delete /v1/vps/{id}/software/post-install-alert | |
ManageServiceApi | ManageServiceGetAvailableConfiguration | Get /v1/vps/configuration | |
ManageServiceApi | ManageServiceGetFileManagerSettings | Post /v1/vps/{id}/fm | |
ManageServiceApi | ManageServiceGetHistory | Get /v1/vps/{id}/history | |
ManageServiceApi | ManageServiceGetInfo | Get /v1/vps/server/{id} | |
ManageServiceApi | ManageServiceGetInstalledSoftware | Get /v1/vps/{id}/software | |
ManageServiceApi | ManageServiceGetList | Get /v1/vps/server/list | |
ManageServiceApi | ManageServiceGetRegionList | Get /v1/vps/region | |
ManageServiceApi | ManageServiceGetStatuses | Get /v1/vps/server/statuses | |
ManageServiceApi | ManageServiceRebootVps | Post /v1/vps/server/{id}/reboot | |
ManageServiceApi | ManageServiceReinstall | Post /v1/vps/server/{id}/reinstall | |
ManageServiceApi | ManageServiceRemoveVps | Post /v1/vps/server/{id}/remove | |
ManageServiceApi | ManageServiceReserveVpsSubdomain | Get /v1/vps/subdomain/reserve | |
ManageServiceApi | ManageServiceResetPassword | Put /v1/vps/{id}/password | |
ManageServiceApi | ManageServiceResetVps | Post /v1/vps/server/{id}/reset | |
ManageServiceApi | ManageServiceStartRescue | Post /v1/vps/server/{id}/rescue | |
ManageServiceApi | ManageServiceStartVps | Post /v1/vps/server/{id}/start | |
ManageServiceApi | ManageServiceStopRescue | Delete /v1/vps/server/{id}/rescue | |
ManageServiceApi | ManageServiceStopVps | Post /v1/vps/server/{id}/stop | |
ManageServiceApi | ManageServiceUnarchive | Delete /v1/vps/archive/{id} | |
ManageServiceApi | ManageServiceUpdateInfo | Put /v1/vps/server/{id}/info | |
MarketplaceServiceApi | MarketplaceServiceGetSoftwareInfo | Get /v1/vps/marketplace/software/{name}/{version} | |
MarketplaceServiceApi | MarketplaceServiceGetSoftwareList | Get /v1/vps/marketplace/software/list | |
NetworkServiceApi | NetworkServiceCreatePrivateNetwork | Post /v1/vps/private-network | |
NetworkServiceApi | NetworkServiceGetNetworkInfo | Get /v1/vps/network | |
NetworkServiceApi | NetworkServiceOrderIpAddress | Post /v1/vps/network | |
NetworkServiceApi | NetworkServiceRemoveIpAddress | Delete /v1/vps/network/{ip_address} | |
NetworkServiceApi | NetworkServiceSuggestPrivateAddress | Post /v1/vps/private-network/{network_id}/suggested-address | |
SnapshotServiceApi | SnapshotServiceCreate | Post /v1/vps/snapshot | |
SnapshotServiceApi | SnapshotServiceCreateCalculator | Post /v1/vps/snapshot/calculator | |
SnapshotServiceApi | SnapshotServiceEdit | Put /v1/vps/snapshot/{id} | |
SnapshotServiceApi | SnapshotServiceGetAll | Get /v1/vps/snapshot | |
SnapshotServiceApi | SnapshotServiceGetAllRestores | Get /v1/vps/snapshot/restore | |
SnapshotServiceApi | SnapshotServiceRemove | Delete /v1/vps/snapshot/{id} | |
SnapshotServiceApi | SnapshotServiceRestore | Post /v1/vps/snapshot/{id}/restore | |
SoftwareLicenseServiceApi | SoftwareLicenseServiceChangeLicensePlan | Patch /v1/vps/software/license/{vps_id} | |
SoftwareLicenseServiceApi | SoftwareLicenseServiceGetLicenseInfo | Get /v1/vps/software/license | |
SshKeyServiceApi | SshKeyServiceAdd | Post /v1/vps/sshKey | |
SshKeyServiceApi | SshKeyServiceGetAll | Get /v1/vps/sshKey | |
SshKeyServiceApi | SshKeyServiceRemove | Delete /v1/vps/sshKey/{id} | |
StatisticServiceApi | StatisticServiceGetCpu | Get /v1/vps/statistic/cpu/{id} | |
StatisticServiceApi | StatisticServiceGetCpuDetails | Get /v1/vps/statistic/cpu-details/{id} | |
StatisticServiceApi | StatisticServiceGetDisk | Get /v1/vps/statistic/disk/{id} | |
StatisticServiceApi | StatisticServiceGetDiskUsage | Get /v1/vps/statistic/disk-usage/{id} | |
StatisticServiceApi | StatisticServiceGetLoadAverage | Get /v1/vps/statistic/load-average/{id} | |
StatisticServiceApi | StatisticServiceGetMemory | Get /v1/vps/statistic/memory/{id} | |
StatisticServiceApi | StatisticServiceGetNetwork | Get /v1/vps/statistic/network/{id} | |
StatisticServiceApi | StatisticServiceGetProcessList | Get /v1/vps/statistic/processes/{id} |
- BackupGetAvailableCopiesResponse
- BackupGetBackupFileListResponse
- BackupGetOrdersResponse
- BackupRestoreFileRequest
- BackupRestoreFileResponse
- BackupRestoreFileResponseError
- BackupRestoreServerRequest
- BackupRestoreServerResponse
- BackupRestoreServerResponseError
- ConfiguratorConfiguratorSettings
- ConfiguratorCpuSettings
- ConfiguratorDiskSettings
- ConfiguratorGetCalculationResponse
- ConfiguratorGetCalculationResponseError
- ConfiguratorGetCalculationResponseSuccess
- ConfiguratorGetConfiguratorInfoResponse
- ConfiguratorMemorySettings
- ConfiguratorRange
- ManageAttachIpAddressRequest
- ManageAttachIpAddressResponse
- ManageAttachIpAddressResponseError
- ManageAttachSshKeyResponse
- ManageAttachSshKeyResponseError
- ManageAttachToPrivateNetworkRequest
- ManageAttachToPrivateNetworkResponse
- ManageAttachToPrivateNetworkResponseError
- ManageChangeConfigurationRequest
- ManageChangeConfigurationResponse
- ManageChangeConfigurationResponseError
- ManageChangeSshAccessRequest
- ManageChangeSshAccessResponse
- ManageChangeSshAccessResponseError
- ManageCheckSoftwareRequirementsRequest
- ManageCheckSoftwareRequirementsResponse
- ManageCheckSoftwareRequirementsResponseError
- ManageCreateVpsRequest
- ManageCreateVpsResponse
- ManageCreateVpsResponseError
- ManageCreateVpsResponseErrorInsufficientFundsError
- ManageCreateVpsResponseErrorSoftwareVariableError
- ManageCreateVpsResponseErrorSoftwareVariableErrorValueError
- ManageDetachFromPrivateNetworkResponse
- ManageDetachFromPrivateNetworkResponseError
- ManageDetachIpAddressResponse
- ManageDetachIpAddressResponseError
- ManageDetachSshKeyResponse
- ManageDetachSshKeyResponseError
- ManageDisablePostInstallAlertResponse
- ManageGetAvailableConfigurationResponse
- ManageGetFileManagerSettingsResponse
- ManageGetFileManagerSettingsResponseCredentials
- ManageGetFileManagerSettingsResponseError
- ManageGetHistoryResponse
- ManageGetInfoResponse
- ManageGetInstalledSoftwareResponse
- ManageGetListResponse
- ManageGetRegionListResponse
- ManageGetStatusesResponse
- ManageGetStatusesResponseStatusInfo
- ManageHistoryItem
- ManagePrivateNetworkInfo
- ManageRebootVpsResponse
- ManageRebootVpsResponseError
- ManageReinstallRequest
- ManageReinstallResponse
- ManageReinstallResponseError
- ManageReinstallResponseErrorInsufficientFundsError
- ManageReinstallResponseErrorSoftwareVariableError
- ManageReinstallResponseErrorSoftwareVariableErrorValueError
- ManageRemoveVpsResponse
- ManageRemoveVpsResponseError
- ManageReserveVpsSubdomainResponse
- ManageReserveVpsSubdomainResponseError
- ManageResetPasswordResponse
- ManageResetPasswordResponseError
- ManageResetVpsResponse
- ManageResetVpsResponseError
- ManageSoftwareInstallInfo
- ManageStartRescueResponse
- ManageStartRescueResponseError
- ManageStartVpsResponse
- ManageStartVpsResponseError
- ManageStopRescueResponse
- ManageStopRescueResponseError
- ManageStopVpsResponse
- ManageStopVpsResponseError
- ManageUnarchiveResponse
- ManageUpdateInfoRequest
- ManageUpdateInfoResponse
- ManageUpdateInfoResponseError
- ManageVpsConfiguration
- ManageVpsInfo
- MarketplaceDomainField
- MarketplaceEmailField
- MarketplaceFieldCommon
- MarketplaceFieldDesc
- MarketplaceGetSoftwareInfoResponse
- MarketplaceGetSoftwareListResponse
- MarketplacePasswordField
- MarketplaceSoftwareInfo
- MarketplaceSoftwareInfoRequirements
- MarketplaceTextField
- NetworkCreatePrivateNetworkRequest
- NetworkCreatePrivateNetworkResponse
- NetworkCreatePrivateNetworkResponseError
- NetworkGetNetworkInfoResponse
- NetworkOrderIpAddressRequest
- NetworkOrderIpAddressResponse
- NetworkOrderIpAddressResponseError
- NetworkRemoveIpAddressResponse
- NetworkRemoveIpAddressResponseError
- NetworkSuggestPrivateAddressRequest
- NetworkSuggestPrivateAddressResponse
- SnapshotCreateCalculatorRequest
- SnapshotCreateCalculatorResponse
- SnapshotCreateRequest
- SnapshotCreateResponse
- SnapshotCreateResponseError
- SnapshotEditRequest
- SnapshotEditResponse
- SnapshotGetAllResponse
- SnapshotGetAllRestoresResponse
- SnapshotRemoveResponse
- SnapshotRemoveResponseError
- SnapshotRequiredConfiguration
- SnapshotRestore
- SnapshotRestoreRequest
- SnapshotRestoreResponse
- SnapshotRestoreResponseError
- SnapshotSnapshot
- SoftwareLicenseChangeLicensePlanRequest
- SoftwareLicenseChangeLicensePlanResponse
- SoftwareLicenseChangeLicensePlanResponseError
- SoftwareLicenseChangeLicensePlanResponseErrorInsufficientFundsError
- SoftwareLicenseGetLicenseInfoResponse
- SshKeyAddRequest
- SshKeyAddResponse
- SshKeyAddResponseError
- SshKeyGetAllResponse
- SshKeyRemoveResponse
- SshKeyRemoveResponseError
- StatisticGetCpuDetailsResponse
- StatisticGetCpuResponse
- StatisticGetDiskResponse
- StatisticGetDiskUsageResponse
- StatisticGetLoadAverageResponse
- StatisticGetMemoryResponse
- StatisticGetNetworkResponse
- StatisticGetProcessListResponse
- StatisticGetProcessListResponseError
- StatisticGetProcessListResponseProcessList
- StatisticGetProcessListResponseProcessListProcessInfo
- StatisticSeriesData
- StructuresAdditionalIpInfo
- StructuresAttachedPrivateNetwork
- StructuresConfigurationParams
- StructuresCopyInfo
- StructuresCopyInfoConfiguration
- StructuresFileInfo
- StructuresInstalledSoftwareInfo
- StructuresInstalledSoftwareInfoFieldValue
- StructuresIpInfo
- StructuresIssuedSoftwareLicense
- StructuresOrderInfo
- StructuresOrderInfoErrorDetails
- StructuresOrderInfoErrorDetailsFileError
- StructuresPrivateNetwork
- StructuresRegionInfo
- StructuresSoftwareCategory
- StructuresSoftwareLicense
- StructuresSoftwareLicenseBillingType
- StructuresSoftwareLicenseBillingTypeDaily
- StructuresSoftwareLicenseBillingTypeMonthly
- StructuresSoftwareMetadata
- StructuresSshKeyInfo
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
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