Skip to content

Commit 63e8252

Browse files
committed
auto-generated version 1.1.1
1 parent 221b424 commit 63e8252

File tree

3 files changed

+96
-106
lines changed

3 files changed

+96
-106
lines changed

README.md

Lines changed: 86 additions & 96 deletions
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 managed Apache Kafka cluster is designed to be highly fault-tolerant and scalable,
@@ -11,7 +13,7 @@ analytics.
1113
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.
1214

1315
- API version: 1.7.1
14-
- Package version: 1.1.0
16+
- Package version: 1.1.1
1517
- Build package: org.openapitools.codegen.languages.GoClientCodegen
1618
For more information, please visit [https://docs.ionos.com/support/general-information/contact-information](https://docs.ionos.com/support/general-information/contact-information)
1719

@@ -21,128 +23,116 @@ Install the following dependencies:
2123

2224
```shell
2325
go get github.com/stretchr/testify/assert
26+
go get golang.org/x/oauth2
2427
go get golang.org/x/net/context
28+
go get github.com/antihax/optional
2529
```
2630

2731
Put the package under your project folder and add the following in import:
2832

2933
```golang
30-
import ionoscloud "github.com/ionos-cloud/sdk-go-kafka"
34+
import "./ionoscloud"
3135
```
3236

33-
To use a proxy, set the environment variable `HTTP_PROXY`:
37+
## Authentication
3438

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

39-
## Configuration of Server URL
41+
- *https://kafka.de-fra.ionos.com* - Production de-fra
42+
- *https://kafka.de-txl.ionos.com* - Production de-txl
43+
- *https://kafka.es-vit.ionos.com* - Production es-vit
44+
- *https://kafka.gb-lhr.ionos.com* - Production gb-lhr
45+
- *https://kafka.us-ewr.ionos.com* - Production us-ewr
46+
- *https://kafka.us-las.ionos.com* - Production us-las
47+
- *https://kafka.us-mci.ionos.com* - Production us-mci
48+
- *https://kafka.fr-par.ionos.com* - Production fr-par
4049

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

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

4757
```golang
48-
ctx := context.WithValue(context.Background(), ionoscloud.ContextServerIndex, 1)
49-
```
5058

51-
### Templated Server URL
59+
client := ionoscloud.NewAPIClient(ionoscloud.NewConfiguration(username, password, token, hostUrl))
5260

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

61-
Note, enum values are always validated and all unused variables are silently ignored.
62-
63-
## Documentation for API Endpoints
64-
65-
All URIs are relative to *https://kafka.de-fra.ionos.com*
66-
67-
Class | Method | HTTP request | Description
68-
------------ | ------------- | ------------- | -------------
69-
*ClustersApi* | [**ClustersDelete**](docs/api/ClustersApi.md#clustersdelete) | **Delete** /clusters/{clusterId} | Delete Cluster
70-
*ClustersApi* | [**ClustersFindById**](docs/api/ClustersApi.md#clustersfindbyid) | **Get** /clusters/{clusterId} | Retrieve Cluster
71-
*ClustersApi* | [**ClustersGet**](docs/api/ClustersApi.md#clustersget) | **Get** /clusters | Retrieve all Clusters
72-
*ClustersApi* | [**ClustersPost**](docs/api/ClustersApi.md#clusterspost) | **Post** /clusters | Create Cluster
73-
*TopicsApi* | [**ClustersTopicsDelete**](docs/api/TopicsApi.md#clusterstopicsdelete) | **Delete** /clusters/{clusterId}/topics/{topicId} | Delete Topic
74-
*TopicsApi* | [**ClustersTopicsFindById**](docs/api/TopicsApi.md#clusterstopicsfindbyid) | **Get** /clusters/{clusterId}/topics/{topicId} | Retrieve Topic
75-
*TopicsApi* | [**ClustersTopicsGet**](docs/api/TopicsApi.md#clusterstopicsget) | **Get** /clusters/{clusterId}/topics | Retrieve all Topics
76-
*TopicsApi* | [**ClustersTopicsPost**](docs/api/TopicsApi.md#clusterstopicspost) | **Post** /clusters/{clusterId}/topics | Create Topic
77-
*UsersApi* | [**ClustersUsersAccessGet**](docs/api/UsersApi.md#clustersusersaccessget) | **Get** /clusters/{clusterId}/users/{userId}/access | Retrieve Kafka User with credentials.
78-
*UsersApi* | [**ClustersUsersGet**](docs/api/UsersApi.md#clustersusersget) | **Get** /clusters/{clusterId}/users | Retrieve all Users
63+
Environment variables can also be used. The sdk uses the following variables:
64+
- IONOS_TOKEN - login via token. This is the recommended way to authenticate.
65+
- IONOS_USERNAME - to specify the username used to login
66+
- IONOS_PASSWORD - to specify the password
67+
- IONOS_API_URL - to specify the API server URL
7968

69+
In this case, the client configuration needs to be initialized using `NewConfigurationFromEnv()`.
8070

81-
## Documentation For Models
71+
```golang
8272

83-
- [Cluster](docs/models/Cluster.md)
84-
- [ClusterCreate](docs/models/ClusterCreate.md)
85-
- [ClusterMetadata](docs/models/ClusterMetadata.md)
86-
- [ClusterMetadataAllOf](docs/models/ClusterMetadataAllOf.md)
87-
- [ClusterRead](docs/models/ClusterRead.md)
88-
- [ClusterReadList](docs/models/ClusterReadList.md)
89-
- [ClusterReadListAllOf](docs/models/ClusterReadListAllOf.md)
90-
- [Error](docs/models/Error.md)
91-
- [ErrorMessages](docs/models/ErrorMessages.md)
92-
- [KafkaClusterConnection](docs/models/KafkaClusterConnection.md)
93-
- [Links](docs/models/Links.md)
94-
- [Metadata](docs/models/Metadata.md)
95-
- [Pagination](docs/models/Pagination.md)
96-
- [ResourceMetadata](docs/models/ResourceMetadata.md)
97-
- [ResourceState](docs/models/ResourceState.md)
98-
- [Topic](docs/models/Topic.md)
99-
- [TopicCreate](docs/models/TopicCreate.md)
100-
- [TopicLogRetention](docs/models/TopicLogRetention.md)
101-
- [TopicRead](docs/models/TopicRead.md)
102-
- [TopicReadList](docs/models/TopicReadList.md)
103-
- [TopicReadListAllOf](docs/models/TopicReadListAllOf.md)
104-
- [User](docs/models/User.md)
105-
- [UserAccessMetadata](docs/models/UserAccessMetadata.md)
106-
- [UserAccessMetadataAllOf](docs/models/UserAccessMetadataAllOf.md)
107-
- [UserRead](docs/models/UserRead.md)
108-
- [UserReadAccess](docs/models/UserReadAccess.md)
109-
- [UserReadList](docs/models/UserReadList.md)
110-
- [UserReadListAllOf](docs/models/UserReadListAllOf.md)
111-
112-
113-
## Documentation For Authorization
114-
115-
116-
Authentication schemes defined for the API:
117-
### tokenAuth
118-
119-
- **Type**: HTTP Bearer token authentication
120-
121-
Example
73+
client := ionoscloud.NewAPIClient(ionoscloud.NewConfigurationFromEnv())
12274

123-
```golang
124-
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
125-
r, err := client.Service.Operation(auth, args)
12675
```
12776

12877

129-
## Documentation for Utility Methods
78+
## Documentation for API Endpoints
13079

131-
Due to the fact that model structure members are all pointers, this package contains
132-
a number of utility functions to easily obtain pointers to values of basic types.
133-
Each of these functions takes a value of the given basic type and returns a pointer to it:
80+
All URIs are relative to *https://kafka.de-fra.ionos.com*
81+
<details >
82+
<summary title="Click to toggle">API Endpoints table</summary>
13483

135-
* `PtrBool`
136-
* `PtrInt`
137-
* `PtrInt32`
138-
* `PtrInt64`
139-
* `PtrFloat`
140-
* `PtrFloat32`
141-
* `PtrFloat64`
142-
* `PtrString`
143-
* `PtrTime`
14484

145-
## Author
85+
| Class | Method | HTTP request | Description |
86+
| ------------- | ------------- | ------------- | ------------- |
87+
| ClustersApi | [**ClustersDelete**](docs/api/ClustersApi.md#ClustersDelete) | **Delete** /clusters/{clusterId} | Delete Cluster |
88+
| ClustersApi | [**ClustersFindById**](docs/api/ClustersApi.md#ClustersFindById) | **Get** /clusters/{clusterId} | Retrieve Cluster |
89+
| ClustersApi | [**ClustersGet**](docs/api/ClustersApi.md#ClustersGet) | **Get** /clusters | Retrieve all Clusters |
90+
| ClustersApi | [**ClustersPost**](docs/api/ClustersApi.md#ClustersPost) | **Post** /clusters | Create Cluster |
91+
| TopicsApi | [**ClustersTopicsDelete**](docs/api/TopicsApi.md#ClustersTopicsDelete) | **Delete** /clusters/{clusterId}/topics/{topicId} | Delete Topic |
92+
| TopicsApi | [**ClustersTopicsFindById**](docs/api/TopicsApi.md#ClustersTopicsFindById) | **Get** /clusters/{clusterId}/topics/{topicId} | Retrieve Topic |
93+
| TopicsApi | [**ClustersTopicsGet**](docs/api/TopicsApi.md#ClustersTopicsGet) | **Get** /clusters/{clusterId}/topics | Retrieve all Topics |
94+
| TopicsApi | [**ClustersTopicsPost**](docs/api/TopicsApi.md#ClustersTopicsPost) | **Post** /clusters/{clusterId}/topics | Create Topic |
95+
| UsersApi | [**ClustersUsersAccessGet**](docs/api/UsersApi.md#ClustersUsersAccessGet) | **Get** /clusters/{clusterId}/users/{userId}/access | Retrieve Kafka User with credentials. |
96+
| UsersApi | [**ClustersUsersGet**](docs/api/UsersApi.md#ClustersUsersGet) | **Get** /clusters/{clusterId}/users | Retrieve all Users |
14697

147-
98+
</details>
14899

100+
## Documentation For Models
101+
102+
All URIs are relative to *https://kafka.de-fra.ionos.com*
103+
<details >
104+
<summary title="Click to toggle">API models list</summary>
105+
106+
- [Cluster](docs/models/Cluster)
107+
- [ClusterCreate](docs/models/ClusterCreate)
108+
- [ClusterMetadata](docs/models/ClusterMetadata)
109+
- [ClusterMetadataAllOf](docs/models/ClusterMetadataAllOf)
110+
- [ClusterRead](docs/models/ClusterRead)
111+
- [ClusterReadList](docs/models/ClusterReadList)
112+
- [ClusterReadListAllOf](docs/models/ClusterReadListAllOf)
113+
- [Error](docs/models/Error)
114+
- [ErrorMessages](docs/models/ErrorMessages)
115+
- [KafkaClusterConnection](docs/models/KafkaClusterConnection)
116+
- [Links](docs/models/Links)
117+
- [Metadata](docs/models/Metadata)
118+
- [Pagination](docs/models/Pagination)
119+
- [ResourceMetadata](docs/models/ResourceMetadata)
120+
- [ResourceState](docs/models/ResourceState)
121+
- [Topic](docs/models/Topic)
122+
- [TopicCreate](docs/models/TopicCreate)
123+
- [TopicLogRetention](docs/models/TopicLogRetention)
124+
- [TopicRead](docs/models/TopicRead)
125+
- [TopicReadList](docs/models/TopicReadList)
126+
- [TopicReadListAllOf](docs/models/TopicReadListAllOf)
127+
- [User](docs/models/User)
128+
- [UserAccessMetadata](docs/models/UserAccessMetadata)
129+
- [UserAccessMetadataAllOf](docs/models/UserAccessMetadataAllOf)
130+
- [UserRead](docs/models/UserRead)
131+
- [UserReadAccess](docs/models/UserReadAccess)
132+
- [UserReadList](docs/models/UserReadList)
133+
- [UserReadListAllOf](docs/models/UserReadListAllOf)
134+
135+
136+
[[Back to API list]](#documentation-for-api-endpoints) [[Back to Model list]](#documentation-for-models)
137+
138+
</details>

client.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configuration.go

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)