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.3.1
- Package version: v1.3.1
- 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 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 |
---|---|---|---|
CloudServiceApi | CloudServiceChangeConfiguration | Patch /v1/cloud/{service_id}/configuration | |
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} | |
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 | |
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 |
- CloudChangeConfigurationRequest
- CloudChangeConfigurationResponse
- CloudChangeConfigurationResponseError
- CloudCreateRequest
- CloudCreateResponse
- CloudGetConfigurationListResponse
- CloudGetListResponse
- CloudGetResponse
- CloudRemoveResponse
- CloudService
- CloudServiceConfiguration
- CloudUpdateRequest
- CloudUpdateResponse
- CloudUpdateResponseError
- MysqlChangeAccessPasswordRequest
- MysqlChangeAccessPasswordResponse
- MysqlChangeAccessPasswordResponseError
- MysqlConfigInfo
- MysqlCreateAccessRequest
- MysqlCreateAccessResponse
- MysqlCreateAccessResponseError
- MysqlCreateDbRequest
- MysqlCreateDbResponse
- MysqlCreateDbResponseError
- MysqlCreateError
- MysqlCreateParams
- MysqlDb
- MysqlDbAccess
- MysqlGetConfigResponse
- MysqlGetDbListResponse
- MysqlMysql5
- MysqlMysql5Configuration
- MysqlMysql8
- MysqlMysql8Configuration
- MysqlRemoveAccessResponse
- MysqlRemoveAccessResponseError
- MysqlRemoveDbResponse
- MysqlRemoveDbResponseError
- MysqlSetConfigRequest
- MysqlSetConfigResponse
- MysqlSetConfigResponseError
- MysqlStatisticGetCpuDetailsResponse
- MysqlStatisticGetCpuResponse
- MysqlStatisticGetDiskResponse
- MysqlStatisticGetDiskUsageResponse
- MysqlStatisticGetLoadAverageResponse
- MysqlStatisticGetMemoryResponse
- MysqlStatisticGetNetworkResponse
- MysqlUpdateDbRequest
- MysqlUpdateDbResponse
- MysqlUpdateDbResponseError
- 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
- PostgresqlRole
- PostgresqlStatisticGetCpuDetailsResponse
- PostgresqlStatisticGetCpuResponse
- PostgresqlStatisticGetDiskResponse
- PostgresqlStatisticGetDiskUsageResponse
- PostgresqlStatisticGetLoadAverageResponse
- PostgresqlStatisticGetMemoryResponse
- PostgresqlStatisticGetNetworkResponse
- StructuresAddressInfo
- StructuresAddressInfoPrivateAddress
- StructuresAddressInfoPublicAddress
- StructuresParamConfig
- StructuresParamConfigEnumValue
- StructuresParamConfigSetValue
- StructuresStatisticSeriesData
- 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