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.4
- Package version: v1.6.4
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/contextPut the package under your project folder and add the following in import:
import begetOpenapiCloud "github.com/LTD-Beget/openapi-cloud-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(), begetOpenapiCloud.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(), begetOpenapiCloud.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(), begetOpenapiCloud.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), begetOpenapiCloud.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 |
|---|---|---|---|
| CdnServiceApi | CdnServiceChangeResourceDomains | Post /v1/cloud/cdn/{service_id}/resource-domains | |
| CdnServiceApi | CdnServiceChangeSetting | Post /v1/cloud/cdn/{service_id}/setting | |
| CdnServiceApi | CdnServiceGetIso3166Countries | Get /v1/cloud/cdn/iso3166-countries | |
| CdnServiceApi | CdnServiceGetIso3166Regions | Post /v1/cloud/cdn/iso3166-regions | |
| CdnServiceApi | CdnServiceGetPrice | Get /v1/cloud/cdn/price | |
| CdnServiceApi | CdnServiceGetSourceDomains | Get /v1/cloud/cdn/source-domains | |
| CdnServiceApi | CdnServicePreloadCacheByPaths | Post /v1/cloud/cdn/{service_id}/preload-cache-by-paths | |
| CdnServiceApi | CdnServicePurgeAllCache | Get /v1/cloud/cdn/{service_id}/purge-all-cache | |
| CdnServiceApi | CdnServicePurgeCacheByPaths | Post /v1/cloud/cdn/{service_id}/purge-cache-by-paths | |
| CdnStatisticServiceApi | CdnStatisticServiceGetNetwork | Get /v1/cloud/cdn/{service_id}/statistic/network | |
| CdnStatisticServiceApi | CdnStatisticServiceGetRequest | Get /v1/cloud/cdn/{service_id}/statistic/count-request | |
| CdnStatisticServiceApi | CdnStatisticServiceGetTraffic | Get /v1/cloud/cdn/{service_id}/statistic/traffic-usage | |
| CloudServiceApi | CloudServiceBindProject | Put /v1/cloud/{service_id}/project | |
| CloudServiceApi | CloudServiceChangeConfiguration | Patch /v1/cloud/{service_id}/configuration | |
| CloudServiceApi | CloudServiceChangePinned | Put /v1/cloud/{service_id}/pin | |
| CloudServiceApi | CloudServiceCreate | Post /v1/cloud | |
| CloudServiceApi | CloudServiceGet | Get /v1/cloud/{service_id} | |
| CloudServiceApi | CloudServiceGetConfigurationList | Get /v1/cloud/configuration | |
| CloudServiceApi | CloudServiceGetList | Get /v1/cloud | |
| CloudServiceApi | CloudServiceRemove | Delete /v1/cloud/{service_id} | |
| CloudServiceApi | CloudServiceUpdate | Patch /v1/cloud/{service_id} | |
| MysqlBackupServiceApi | MysqlBackupServiceGetList | Get /v1/cloud/mysql/backup | |
| MysqlBackupServiceApi | MysqlBackupServiceGetOrders | Get /v1/cloud/mysql/backup/orders | |
| MysqlBackupServiceApi | MysqlBackupServiceRestore | Post /v1/cloud/mysql/backup/{copy_id} | |
| MysqlServiceApi | MysqlServiceChangeAccessPassword | Patch /v1/cloud/mysql/{service_id}/db/{db_name}/access/{host} | |
| MysqlServiceApi | MysqlServiceCreateAccess | Post /v1/cloud/mysql/{service_id}/db/{db_name}/access | |
| MysqlServiceApi | MysqlServiceCreateDb | Post /v1/cloud/mysql/{service_id}/db | |
| MysqlServiceApi | MysqlServiceGetConfig | Get /v1/cloud/mysql/{service_id}/config | |
| MysqlServiceApi | MysqlServiceGetDbList | Get /v1/cloud/mysql/{service_id}/db | |
| MysqlServiceApi | MysqlServiceRemoveAccess | Delete /v1/cloud/mysql/{service_id}/db/{db_name}/access/{host} | |
| MysqlServiceApi | MysqlServiceRemoveDb | Delete /v1/cloud/mysql/{service_id}/db/{db_name} | |
| MysqlServiceApi | MysqlServiceSetConfig | Put /v1/cloud/mysql/{service_id}/config | |
| MysqlServiceApi | MysqlServiceUpdateDb | Patch /v1/cloud/mysql/{service_id}/db/{db_name} | |
| MysqlStatisticServiceApi | MysqlStatisticServiceGetCpu | Get /v1/cloud/mysql/{service_id}/statistic/cpu | |
| MysqlStatisticServiceApi | MysqlStatisticServiceGetCpuDetails | Get /v1/cloud/mysql/{service_id}/statistic/cpu-details | |
| MysqlStatisticServiceApi | MysqlStatisticServiceGetDisk | Get /v1/cloud/mysql/{service_id}/statistic/disk | |
| MysqlStatisticServiceApi | MysqlStatisticServiceGetDiskUsage | Get /v1/cloud/mysql/{service_id}/statistic/disk-usage | |
| MysqlStatisticServiceApi | MysqlStatisticServiceGetLoadAverage | Get /v1/cloud/mysql/{service_id}/statistic/load-average | |
| MysqlStatisticServiceApi | MysqlStatisticServiceGetMemory | Get /v1/cloud/mysql/{service_id}/statistic/memory | |
| MysqlStatisticServiceApi | MysqlStatisticServiceGetNetwork | Get /v1/cloud/mysql/{service_id}/statistic/network | |
| PostgresqlBackupServiceApi | PostgresqlBackupServiceGetList | Get /v1/cloud/postgresql/backup | |
| PostgresqlBackupServiceApi | PostgresqlBackupServiceGetOrders | Get /v1/cloud/postgresql/backup/orders | |
| PostgresqlBackupServiceApi | PostgresqlBackupServiceRestore | Post /v1/cloud/postgresql/backup/{copy_id} | |
| PostgresqlServiceApi | PostgresqlServiceCreateDb | Post /v1/cloud/postgresql/{service_id}/db | |
| PostgresqlServiceApi | PostgresqlServiceCreateRole | Post /v1/cloud/postgresql/{service_id}/role | |
| PostgresqlServiceApi | PostgresqlServiceGetConfig | Get /v1/cloud/postgresql/{service_id}/config | |
| PostgresqlServiceApi | PostgresqlServiceGetDbList | Get /v1/cloud/postgresql/{service_id}/db | |
| PostgresqlServiceApi | PostgresqlServiceGetRemoteAccess | Get /v1/cloud/postgresql/{service_id}/remote-access | |
| PostgresqlServiceApi | PostgresqlServiceGetRoleList | Get /v1/cloud/postgresql/{service_id}/role | |
| PostgresqlServiceApi | PostgresqlServiceRemoveDb | Delete /v1/cloud/postgresql/{service_id}/db/{db_name} | |
| PostgresqlServiceApi | PostgresqlServiceRemoveRole | Delete /v1/cloud/postgresql/{service_id}/role/{role_name} | |
| PostgresqlServiceApi | PostgresqlServiceSetConfig | Put /v1/cloud/postgresql/{service_id}/config | |
| PostgresqlServiceApi | PostgresqlServiceUpdateDb | Patch /v1/cloud/postgresql/{service_id}/db/{db_name} | |
| PostgresqlServiceApi | PostgresqlServiceUpdateRemoteAccess | Put /v1/cloud/postgresql/{service_id}/remote-access | |
| PostgresqlServiceApi | PostgresqlServiceUpdateRole | Patch /v1/cloud/postgresql/{service_id}/role/{role_name} | |
| PostgresqlStatisticServiceApi | PostgresqlStatisticServiceGetCpu | Get /v1/cloud/postgresql/{service_id}/statistic/cpu | |
| PostgresqlStatisticServiceApi | PostgresqlStatisticServiceGetCpuDetails | Get /v1/cloud/postgresql/{service_id}/statistic/cpu-details | |
| PostgresqlStatisticServiceApi | PostgresqlStatisticServiceGetDisk | Get /v1/cloud/postgresql/{service_id}/statistic/disk | |
| PostgresqlStatisticServiceApi | PostgresqlStatisticServiceGetDiskUsage | Get /v1/cloud/postgresql/{service_id}/statistic/disk-usage | |
| PostgresqlStatisticServiceApi | PostgresqlStatisticServiceGetLoadAverage | Get /v1/cloud/postgresql/{service_id}/statistic/load-average | |
| PostgresqlStatisticServiceApi | PostgresqlStatisticServiceGetMemory | Get /v1/cloud/postgresql/{service_id}/statistic/memory | |
| PostgresqlStatisticServiceApi | PostgresqlStatisticServiceGetNetwork | Get /v1/cloud/postgresql/{service_id}/statistic/network | |
| ProjectServiceApi | ProjectServiceChangePinned | Put /v1/cloud/projects/{project_id}/pin | |
| ProjectServiceApi | ProjectServiceCreate | Post /v1/cloud/projects | |
| ProjectServiceApi | ProjectServiceGetList | Get /v1/cloud/projects/list | |
| ProjectServiceApi | ProjectServiceRemove | Delete /v1/cloud/projects/{project_id} | |
| ProjectServiceApi | ProjectServiceUpdate | Put /v1/cloud/projects/{project_id} | |
| S3ServiceApi | S3ServiceChangeAccessKey | Patch /v1/cloud/s3/{service_id}/access-key | |
| S3ServiceApi | S3ServiceChangeCors | Patch /v1/cloud/s3/{service_id}/cors | |
| S3ServiceApi | S3ServiceChangeDomain | Patch /v1/cloud/s3/{service_id}/domain | |
| S3ServiceApi | S3ServiceChangePublic | Patch /v1/cloud/s3/{service_id}/public | |
| S3ServiceApi | S3ServiceEnableFtp | Patch /v1/cloud/s3/{service_id}/enable-ftp | |
| S3ServiceApi | S3ServiceGetPrefix | Get /v1/cloud/s3/prefix | |
| S3ServiceApi | S3ServiceGetPrice | Get /v1/cloud/s3/price | |
| S3ServiceApi | S3ServiceGetQuota | Get /v1/cloud/s3/quota | |
| S3StatisticServiceApi | S3StatisticServiceGetNetwork | Get /v1/cloud/s3/{service_id}/statistic/network | |
| S3StatisticServiceApi | S3StatisticServiceGetQuota | Get /v1/cloud/s3/{service_id}/statistic/quota | |
| S3StatisticServiceApi | S3StatisticServiceGetRequest | Get /v1/cloud/s3/{service_id}/statistic/count-request | |
| S3StatisticServiceApi | S3StatisticServiceGetTraffic | Get /v1/cloud/s3/{service_id}/statistic/traffic-usage |
- CdnCdn
- CdnCdnCreateError
- CdnCdnCreateErrorDomainError
- CdnCdnCreateErrorDomainErrorDomainAlreadyUsedDetails
- CdnCdnCreateErrorError
- CdnCdnCreateParams
- CdnChangeResourceDomainsRequest
- CdnChangeResourceDomainsResponse
- CdnChangeResourceDomainsResponseDomainError
- CdnChangeResourceDomainsResponseDomainErrorDomainAlreadyUsedDetails
- CdnChangeResourceDomainsResponseDomainErrors
- CdnChangeResourceDomainsResponseError
- CdnChangeResourceDomainsResponseResourceDomains
- CdnChangeSettingRequest
- CdnChangeSettingResponse
- CdnChangeSettingResponseError
- CdnGetCountriesResponse
- CdnGetCountriesResponseCountry
- CdnGetPriceResponse
- CdnGetPriceResponseCdn
- CdnGetRegionsRequest
- CdnGetRegionsResponse
- CdnGetRegionsResponseRegion
- CdnGetSourceDomainsResponse
- CdnPreloadCacheByPathsRequest
- CdnPreloadCacheByPathsResponse
- CdnPreloadCacheByPathsResponseError
- CdnPurgeAllCacheResponse
- CdnPurgeAllCacheResponseError
- CdnPurgeCacheByPathsRequest
- CdnPurgeCacheByPathsResponse
- CdnPurgeCacheByPathsResponseError
- CdnResourceDomain
- CdnSettings
- CdnSettingsAllowedHttpMethods
- CdnSettingsCachingTimeBrowser
- CdnSettingsCors
- CdnSettingsFollowOriginRedirect
- CdnSettingsGeoAcl
- CdnSettingsGeoAclStringArray
- CdnSettingsGzipCompression
- CdnSettingsIpAddressAcl
- CdnSettingsRefererAcl
- CdnSettingsResponseHeadersHidingPolicy
- CdnSettingsStale
- CdnSettingsStaticRequestHeaders
- CdnSettingsStaticResponseHeader
- CdnSettingsStaticResponseHeaderHeader
- CdnSettingsTokenizedUrlSecureKey
- CdnSettingsUserAgentAcl
- CdnSourceDomain
- CdnStatisticGetNetworkResponse
- CdnStatisticGetRequestResponse
- CdnStatisticGetTrafficResponse
- CloudBindProjectRequest
- CloudBindProjectResponse
- CloudBindProjectResponseError
- CloudChangeConfigurationRequest
- CloudChangeConfigurationResponse
- CloudChangeConfigurationResponseError
- CloudChangePinnedRequest
- CloudChangePinnedResponse
- CloudChangePinnedResponseError
- CloudCreateRequest
- CloudCreateResponse
- CloudGetConfigurationListResponse
- CloudGetListResponse
- CloudGetResponse
- CloudRemoveResponse
- CloudService
- CloudServiceConfiguration
- CloudUpdateRequest
- CloudUpdateResponse
- CloudUpdateResponseError
- MysqlBackupGetListResponse
- MysqlBackupGetOrdersResponse
- MysqlBackupRestoreRequest
- MysqlBackupRestoreResponse
- MysqlBackupRestoreResponseError
- MysqlChangeAccessPasswordRequest
- MysqlChangeAccessPasswordResponse
- MysqlChangeAccessPasswordResponseError
- MysqlConfigInfo
- MysqlCreateAccessRequest
- MysqlCreateAccessResponse
- MysqlCreateAccessResponseError
- MysqlCreateDbRequest
- MysqlCreateDbResponse
- MysqlCreateDbResponseError
- MysqlCreateError
- MysqlCreateParams
- MysqlDb
- MysqlDbAccess
- MysqlGetConfigResponse
- MysqlGetDbListResponse
- MysqlMysql5
- MysqlMysql5Configuration
- MysqlMysql8
- MysqlMysql84
- MysqlMysql84Configuration
- MysqlMysql8Configuration
- MysqlRemoveAccessResponse
- MysqlRemoveAccessResponseError
- MysqlRemoveDbResponse
- MysqlRemoveDbResponseError
- MysqlSetConfigRequest
- MysqlSetConfigResponse
- MysqlSetConfigResponseError
- MysqlStatisticGetCpuDetailsResponse
- MysqlStatisticGetCpuResponse
- MysqlStatisticGetDiskResponse
- MysqlStatisticGetDiskUsageResponse
- MysqlStatisticGetLoadAverageResponse
- MysqlStatisticGetMemoryResponse
- MysqlStatisticGetNetworkResponse
- MysqlUpdateDbRequest
- MysqlUpdateDbResponse
- MysqlUpdateDbResponseError
- PostgresqlBackupGetListResponse
- PostgresqlBackupGetOrdersResponse
- PostgresqlBackupRestoreRequest
- PostgresqlBackupRestoreResponse
- PostgresqlBackupRestoreResponseError
- PostgresqlPgConfigInfo
- PostgresqlPgCreateDbRequest
- PostgresqlPgCreateDbResponse
- PostgresqlPgCreateDbResponseError
- PostgresqlPgCreateError
- PostgresqlPgCreateParams
- PostgresqlPgCreateRoleRequest
- PostgresqlPgCreateRoleResponse
- PostgresqlPgCreateRoleResponseError
- PostgresqlPgDb
- PostgresqlPgGetConfigResponse
- PostgresqlPgGetDbListResponse
- PostgresqlPgGetRemoteAccessResponse
- PostgresqlPgGetRoleListResponse
- PostgresqlPgRemoteAccessState
- PostgresqlPgRemoveDbResponse
- PostgresqlPgRemoveDbResponseError
- PostgresqlPgRemoveRoleResponse
- PostgresqlPgRemoveRoleResponseError
- PostgresqlPgSetConfigRequest
- PostgresqlPgSetConfigResponse
- PostgresqlPgSetConfigResponseError
- PostgresqlPgUpdateDbRequest
- PostgresqlPgUpdateDbResponse
- PostgresqlPgUpdateDbResponseError
- PostgresqlPgUpdateRemoteAccessRequest
- PostgresqlPgUpdateRemoteAccessResponse
- PostgresqlPgUpdateRemoteAccessResponseError
- PostgresqlPgUpdateRoleRequest
- PostgresqlPgUpdateRoleResponse
- PostgresqlPgUpdateRoleResponseError
- PostgresqlPostgresql14
- PostgresqlPostgresql14Configuration
- PostgresqlPostgresql15
- PostgresqlPostgresql15Configuration
- PostgresqlPostgresql164
- PostgresqlPostgresql164Configuration
- PostgresqlRole
- PostgresqlStatisticGetCpuDetailsResponse
- PostgresqlStatisticGetCpuResponse
- PostgresqlStatisticGetDiskResponse
- PostgresqlStatisticGetDiskUsageResponse
- PostgresqlStatisticGetLoadAverageResponse
- PostgresqlStatisticGetMemoryResponse
- PostgresqlStatisticGetNetworkResponse
- ProjectChangePinnedRequest
- ProjectChangePinnedResponse
- ProjectChangePinnedResponseError
- ProjectCreateProjectRequest
- ProjectCreateProjectResponse
- ProjectCreateProjectResponseError
- ProjectGetProjectListResponse
- ProjectGetProjectListResponseProjectPage
- ProjectProject
- ProjectRemoveProjectResponse
- ProjectRemoveProjectResponseError
- ProjectUpdateProjectRequest
- ProjectUpdateProjectResponse
- ProjectUpdateProjectResponseError
- S3ChangeAccessKeyRequest
- S3ChangeAccessKeyResponse
- S3ChangeAccessKeyResponseError
- S3ChangeCorsRequest
- S3ChangeCorsResponse
- S3ChangeCorsResponseError
- S3ChangeDomainRequest
- S3ChangeDomainResponse
- S3ChangeDomainResponseError
- S3ChangeDomainResponseErrorDomainAlreadyUsedDetails
- S3ChangePublicRequest
- S3ChangePublicResponse
- S3ChangePublicResponseError
- S3Cors
- S3EnableFtpRequest
- S3EnableFtpResponse
- S3EnableFtpResponseError
- S3Ftp
- S3GetPrefixResponse
- S3GetPriceResponse
- S3GetPriceResponseBucket
- S3GetQuotaResponse
- S3S3
- S3S3Cdn
- S3S3Configuration
- S3S3CreateError
- S3S3CreateParams
- S3Sftp
- S3StatisticGetNetworkResponse
- S3StatisticGetQuotaResponse
- S3StatisticGetRequestResponse
- S3StatisticGetTrafficResponse
- StructuresAddressInfo
- StructuresAddressInfoPrivateAddress
- StructuresAddressInfoPublicAddress
- StructuresMysqlCopy
- StructuresMysqlRestoreOrder
- StructuresParamConfig
- StructuresParamConfigEnumValue
- StructuresParamConfigSetValue
- StructuresPostgresqlCopy
- StructuresPostgresqlRestoreOrder
- StructuresStatisticSeriesData
Authentication schemes defined for the API:
- 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:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime