Skip to content

Commit 321d3e4

Browse files
committed
auto-generated version 1.1.1
1 parent 9b24ae9 commit 321d3e4

16 files changed

+1950
-107
lines changed

README.md

+90-105
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Gitter](https://img.shields.io/gitter/room/ionos-cloud/sdk-general)](https://gitter.im/ionos-cloud/sdk-general)
2+
13
# Go API client for ionoscloud
24

35
An enterprise-grade Database is provided as a Service (DBaaS) solution that
@@ -14,7 +16,7 @@ their concepts and lend well to making the experience smooth and intuitive.
1416
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
1517

1618
- API version: 0.1.0
17-
- Package version: 1.1.0
19+
- Package version: 1.1.1
1820
- Build package: org.openapitools.codegen.languages.GoClientCodegen
1921

2022
## Installation
@@ -23,138 +25,121 @@ Install the following dependencies:
2325

2426
```shell
2527
go get github.com/stretchr/testify/assert
28+
go get golang.org/x/oauth2
2629
go get golang.org/x/net/context
30+
go get github.com/antihax/optional
2731
```
2832

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

3135
```golang
32-
import ionoscloud "github.com/ionos-cloud/sdk-go-dbaas-mariadb"
36+
import "./ionoscloud"
3337
```
3438

35-
To use a proxy, set the environment variable `HTTP_PROXY`:
39+
## Authentication
3640

37-
```golang
38-
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
39-
```
41+
All available server URLs are:
4042

41-
## Configuration of Server URL
43+
- *https://mariadb.de-txl.ionos.com* - Berlin, Germany
44+
- *https://mariadb.de-fra.ionos.com* - Frankfurt, Germany
45+
- *https://mariadb.es-vit.ionos.com* - Logroño, Spain
46+
- *https://mariadb.fr-par.ionos.com* - Paris, France
47+
- *https://mariadb.gb-lhr.ionos.com* - London, Great Britain
48+
- *https://mariadb.us-ewr.ionos.com* - Newark, USA
49+
- *https://mariadb.us-las.ionos.com* - Las Vegas, USA
50+
- *https://mariadb.us-mci.ionos.com* - Lenexa, USA
4251

43-
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
52+
By default, *https://mariadb.de-txl.ionos.com* is used, however this can be overriden at authentication, either
53+
by setting the `IONOS_API_URL` environment variable or by specifying the `hostUrl` parameter when
54+
initializing the sdk client.
4455

45-
### Select Server Configuration
46-
47-
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
56+
The username and password or the authentication token can be manually specified when initializing
57+
the sdk client:
4858

4959
```golang
50-
ctx := context.WithValue(context.Background(), ionoscloud.ContextServerIndex, 1)
51-
```
5260

53-
### Templated Server URL
61+
client := ionoscloud.NewAPIClient(ionoscloud.NewConfiguration(username, password, token, hostUrl))
5462

55-
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
56-
57-
```golang
58-
ctx := context.WithValue(context.Background(), ionoscloud.ContextServerVariables, map[string]string{
59-
"basePath": "v2",
60-
})
6163
```
6264

63-
Note, enum values are always validated and all unused variables are silently ignored.
65+
Environment variables can also be used. The sdk uses the following variables:
66+
- IONOS_TOKEN - login via token. This is the recommended way to authenticate.
67+
- IONOS_USERNAME - to specify the username used to login
68+
- IONOS_PASSWORD - to specify the password
69+
- IONOS_API_URL - to specify the API server URL
6470

65-
## Documentation for API Endpoints
66-
67-
All URIs are relative to *https://mariadb.de-txl.ionos.com*
71+
In this case, the client configuration needs to be initialized using `NewConfigurationFromEnv()`.
6872

69-
Class | Method | HTTP request | Description
70-
------------ | ------------- | ------------- | -------------
71-
*BackupsApi* | [**BackupsFindById**](docs/api/BackupsApi.md#backupsfindbyid) | **Get** /backups/{backupId} | Fetch backups
72-
*BackupsApi* | [**BackupsGet**](docs/api/BackupsApi.md#backupsget) | **Get** /backups | List of backups.
73-
*BackupsApi* | [**ClusterBackupsGet**](docs/api/BackupsApi.md#clusterbackupsget) | **Get** /clusters/{clusterId}/backups | List backups of cluster
74-
*ClustersApi* | [**ClustersDelete**](docs/api/ClustersApi.md#clustersdelete) | **Delete** /clusters/{clusterId} | Delete a cluster
75-
*ClustersApi* | [**ClustersFindById**](docs/api/ClustersApi.md#clustersfindbyid) | **Get** /clusters/{clusterId} | Fetch a cluster
76-
*ClustersApi* | [**ClustersGet**](docs/api/ClustersApi.md#clustersget) | **Get** /clusters | List clusters
77-
*ClustersApi* | [**ClustersPost**](docs/api/ClustersApi.md#clusterspost) | **Post** /clusters | Create a cluster
78-
79-
80-
## Documentation For Models
73+
```golang
8174

82-
- [Backup](docs/models/Backup.md)
83-
- [BackupList](docs/models/BackupList.md)
84-
- [BackupListAllOf](docs/models/BackupListAllOf.md)
85-
- [BackupResponse](docs/models/BackupResponse.md)
86-
- [BaseBackup](docs/models/BaseBackup.md)
87-
- [ClusterList](docs/models/ClusterList.md)
88-
- [ClusterListAllOf](docs/models/ClusterListAllOf.md)
89-
- [ClusterMetadata](docs/models/ClusterMetadata.md)
90-
- [ClusterProperties](docs/models/ClusterProperties.md)
91-
- [ClusterResponse](docs/models/ClusterResponse.md)
92-
- [ClustersGet400Response](docs/models/ClustersGet400Response.md)
93-
- [ClustersGet401Response](docs/models/ClustersGet401Response.md)
94-
- [ClustersGet403Response](docs/models/ClustersGet403Response.md)
95-
- [ClustersGet404Response](docs/models/ClustersGet404Response.md)
96-
- [ClustersGet405Response](docs/models/ClustersGet405Response.md)
97-
- [ClustersGet415Response](docs/models/ClustersGet415Response.md)
98-
- [ClustersGet422Response](docs/models/ClustersGet422Response.md)
99-
- [ClustersGet429Response](docs/models/ClustersGet429Response.md)
100-
- [ClustersGet500Response](docs/models/ClustersGet500Response.md)
101-
- [ClustersGet503Response](docs/models/ClustersGet503Response.md)
102-
- [Connection](docs/models/Connection.md)
103-
- [CreateClusterProperties](docs/models/CreateClusterProperties.md)
104-
- [CreateClusterRequest](docs/models/CreateClusterRequest.md)
105-
- [DBUser](docs/models/DBUser.md)
106-
- [DayOfTheWeek](docs/models/DayOfTheWeek.md)
107-
- [ErrorMessage](docs/models/ErrorMessage.md)
108-
- [MaintenanceWindow](docs/models/MaintenanceWindow.md)
109-
- [MariadbVersion](docs/models/MariadbVersion.md)
110-
- [Pagination](docs/models/Pagination.md)
111-
- [PaginationLinks](docs/models/PaginationLinks.md)
112-
- [State](docs/models/State.md)
113-
114-
115-
## Documentation For Authorization
116-
117-
118-
Authentication schemes defined for the API:
119-
### tokenAuth
120-
121-
- **Type**: API key
122-
- **API key parameter name**: Authorization
123-
- **Location**: HTTP header
124-
125-
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.
126-
127-
Example
75+
client := ionoscloud.NewAPIClient(ionoscloud.NewConfigurationFromEnv())
12876

129-
```golang
130-
auth := context.WithValue(
131-
context.Background(),
132-
sw.ContextAPIKeys,
133-
map[string]sw.APIKey{
134-
"Authorization": {Key: "API_KEY_STRING"},
135-
},
136-
)
137-
r, err := client.Service.Operation(auth, args)
13877
```
13978

14079

141-
## Documentation for Utility Methods
80+
## Documentation for API Endpoints
14281

143-
Due to the fact that model structure members are all pointers, this package contains
144-
a number of utility functions to easily obtain pointers to values of basic types.
145-
Each of these functions takes a value of the given basic type and returns a pointer to it:
82+
All URIs are relative to *https://mariadb.de-txl.ionos.com*
83+
<details >
84+
<summary title="Click to toggle">API Endpoints table</summary>
14685

147-
* `PtrBool`
148-
* `PtrInt`
149-
* `PtrInt32`
150-
* `PtrInt64`
151-
* `PtrFloat`
152-
* `PtrFloat32`
153-
* `PtrFloat64`
154-
* `PtrString`
155-
* `PtrTime`
15686

157-
## Author
87+
| Class | Method | HTTP request | Description |
88+
| ------------- | ------------- | ------------- | ------------- |
89+
| BackupsApi | [**BackupsFindById**](docs/api/BackupsApi.md#BackupsFindById) | **Get** /backups/{backupId} | Fetch backups |
90+
| BackupsApi | [**BackupsGet**](docs/api/BackupsApi.md#BackupsGet) | **Get** /backups | List of backups. |
91+
| BackupsApi | [**ClusterBackupsGet**](docs/api/BackupsApi.md#ClusterBackupsGet) | **Get** /clusters/{clusterId}/backups | List backups of cluster |
92+
| ClustersApi | [**ClustersDelete**](docs/api/ClustersApi.md#ClustersDelete) | **Delete** /clusters/{clusterId} | Delete a cluster |
93+
| ClustersApi | [**ClustersFindById**](docs/api/ClustersApi.md#ClustersFindById) | **Get** /clusters/{clusterId} | Fetch a cluster |
94+
| ClustersApi | [**ClustersGet**](docs/api/ClustersApi.md#ClustersGet) | **Get** /clusters | List clusters |
95+
| ClustersApi | [**ClustersPatch**](docs/api/ClustersApi.md#ClustersPatch) | **Patch** /clusters/{clusterId} | Update a cluster |
96+
| ClustersApi | [**ClustersPost**](docs/api/ClustersApi.md#ClustersPost) | **Post** /clusters | Create a cluster |
97+
| RestoreApi | [**ClustersRestore**](docs/api/RestoreApi.md#ClustersRestore) | **Post** /clusters/{clusterId}/restore | In-place restore of a cluster. |
15898

99+
</details>
159100

101+
## Documentation For Models
160102

103+
All URIs are relative to *https://mariadb.de-txl.ionos.com*
104+
<details >
105+
<summary title="Click to toggle">API models list</summary>
106+
107+
- [Backup](docs/models/Backup)
108+
- [BackupList](docs/models/BackupList)
109+
- [BackupListAllOf](docs/models/BackupListAllOf)
110+
- [BackupResponse](docs/models/BackupResponse)
111+
- [BaseBackup](docs/models/BaseBackup)
112+
- [ClusterList](docs/models/ClusterList)
113+
- [ClusterListAllOf](docs/models/ClusterListAllOf)
114+
- [ClusterMetadata](docs/models/ClusterMetadata)
115+
- [ClusterProperties](docs/models/ClusterProperties)
116+
- [ClusterResponse](docs/models/ClusterResponse)
117+
- [ClustersGet400Response](docs/models/ClustersGet400Response)
118+
- [ClustersGet401Response](docs/models/ClustersGet401Response)
119+
- [ClustersGet403Response](docs/models/ClustersGet403Response)
120+
- [ClustersGet404Response](docs/models/ClustersGet404Response)
121+
- [ClustersGet405Response](docs/models/ClustersGet405Response)
122+
- [ClustersGet415Response](docs/models/ClustersGet415Response)
123+
- [ClustersGet422Response](docs/models/ClustersGet422Response)
124+
- [ClustersGet429Response](docs/models/ClustersGet429Response)
125+
- [ClustersGet500Response](docs/models/ClustersGet500Response)
126+
- [ClustersGet503Response](docs/models/ClustersGet503Response)
127+
- [Connection](docs/models/Connection)
128+
- [CreateClusterProperties](docs/models/CreateClusterProperties)
129+
- [CreateClusterRequest](docs/models/CreateClusterRequest)
130+
- [DBUser](docs/models/DBUser)
131+
- [DayOfTheWeek](docs/models/DayOfTheWeek)
132+
- [ErrorMessage](docs/models/ErrorMessage)
133+
- [MaintenanceWindow](docs/models/MaintenanceWindow)
134+
- [MariadbVersion](docs/models/MariadbVersion)
135+
- [Pagination](docs/models/Pagination)
136+
- [PaginationLinks](docs/models/PaginationLinks)
137+
- [PatchClusterProperties](docs/models/PatchClusterProperties)
138+
- [PatchClusterRequest](docs/models/PatchClusterRequest)
139+
- [RestoreRequest](docs/models/RestoreRequest)
140+
- [State](docs/models/State)
141+
142+
143+
[[Back to API list]](#documentation-for-api-endpoints) [[Back to Model list]](#documentation-for-models)
144+
145+
</details>

0 commit comments

Comments
 (0)