Categorygithub.com/ionos-cloud/sdk-go-kafka
modulepackage
1.1.0
Repository: https://github.com/ionos-cloud/sdk-go-kafka.git
Documentation: pkg.go.dev

# README

Go API client for ionoscloud

An managed Apache Kafka cluster is designed to be highly fault-tolerant and scalable, allowing large volumes of data to be ingested, stored, and processed in real-time. By distributing data across multiple brokers, Kafka achieves high throughput and low latency, making it suitable for applications requiring real-time data processing and analytics.

Overview

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.

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

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

import ionoscloud "github.com/ionos-cloud/sdk-go-kafka"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), ionoscloud.ContextServerIndex, 1)

Templated Server URL

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(), ionoscloud.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

Documentation for API Endpoints

All URIs are relative to https://kafka.de-fra.ionos.com

ClassMethodHTTP requestDescription
ClustersApiClustersDeleteDelete /clusters/{clusterId}Delete Cluster
ClustersApiClustersFindByIdGet /clusters/{clusterId}Retrieve Cluster
ClustersApiClustersGetGet /clustersRetrieve all Clusters
ClustersApiClustersPostPost /clustersCreate Cluster
TopicsApiClustersTopicsDeleteDelete /clusters/{clusterId}/topics/{topicId}Delete Topic
TopicsApiClustersTopicsFindByIdGet /clusters/{clusterId}/topics/{topicId}Retrieve Topic
TopicsApiClustersTopicsGetGet /clusters/{clusterId}/topicsRetrieve all Topics
TopicsApiClustersTopicsPostPost /clusters/{clusterId}/topicsCreate Topic
UsersApiClustersUsersAccessGetGet /clusters/{clusterId}/users/{userId}/accessRetrieve Kafka User with credentials.
UsersApiClustersUsersGetGet /clusters/{clusterId}/usersRetrieve all Users

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

tokenAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

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

Author

[email protected]

# Functions

AddPinnedCert - enables pinning of the sha256 public fingerprint to the http client's transport.
CacheExpires helper function to determine remaining time before repeating a request.
IsNil checks if an input is nil.
NewAPIClient creates a new API client.
NewAPIResponse returns a new APIResponse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewCluster instantiates a new Cluster object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterCreate instantiates a new ClusterCreate object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterCreateWithDefaults instantiates a new ClusterCreate object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewClusterMetadata instantiates a new ClusterMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterMetadataAllOf instantiates a new ClusterMetadataAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterMetadataAllOfWithDefaults instantiates a new ClusterMetadataAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewClusterMetadataWithDefaults instantiates a new ClusterMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewClusterRead instantiates a new ClusterRead object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterReadList instantiates a new ClusterReadList object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterReadListAllOf instantiates a new ClusterReadListAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewClusterReadListAllOfWithDefaults instantiates a new ClusterReadListAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewClusterReadListWithDefaults instantiates a new ClusterReadList object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewClusterReadWithDefaults instantiates a new ClusterRead object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewClusterWithDefaults instantiates a new Cluster object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewConfiguration returns a new Configuration object.
No description provided by the author
No description provided by the author
NewError instantiates a new Error object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorMessages instantiates a new ErrorMessages object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorMessagesWithDefaults instantiates a new ErrorMessages object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewErrorWithDefaults instantiates a new Error object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewGenericOpenAPIError - constructor for GenericOpenAPIError.
NewKafkaClusterConnection instantiates a new KafkaClusterConnection object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewKafkaClusterConnectionWithDefaults instantiates a new KafkaClusterConnection object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewLinks instantiates a new Links object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewLinksWithDefaults instantiates a new Links object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewMetadata instantiates a new Metadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewMetadataWithDefaults instantiates a new Metadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPagination instantiates a new Pagination object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPaginationWithDefaults instantiates a new Pagination object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewResourceMetadata instantiates a new ResourceMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewResourceMetadataWithDefaults instantiates a new ResourceMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewResourceState instantiates a new ResourceState object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewResourceStateWithDefaults instantiates a new ResourceState object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewTopic instantiates a new Topic object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewTopicCreate instantiates a new TopicCreate object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewTopicCreateWithDefaults instantiates a new TopicCreate object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewTopicLogRetention instantiates a new TopicLogRetention object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewTopicLogRetentionWithDefaults instantiates a new TopicLogRetention object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewTopicRead instantiates a new TopicRead object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewTopicReadList instantiates a new TopicReadList object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewTopicReadListAllOf instantiates a new TopicReadListAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewTopicReadListAllOfWithDefaults instantiates a new TopicReadListAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewTopicReadListWithDefaults instantiates a new TopicReadList object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewTopicReadWithDefaults instantiates a new TopicRead object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewTopicWithDefaults instantiates a new Topic object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUser instantiates a new User object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserAccessMetadata instantiates a new UserAccessMetadata object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserAccessMetadataAllOf instantiates a new UserAccessMetadataAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserAccessMetadataAllOfWithDefaults instantiates a new UserAccessMetadataAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserAccessMetadataWithDefaults instantiates a new UserAccessMetadata object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserRead instantiates a new UserRead object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserReadAccess instantiates a new UserReadAccess object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserReadAccessWithDefaults instantiates a new UserReadAccess object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserReadList instantiates a new UserReadList object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserReadListAllOf instantiates a new UserReadListAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUserReadListAllOfWithDefaults instantiates a new UserReadListAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserReadListWithDefaults instantiates a new UserReadList object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserReadWithDefaults instantiates a new UserRead object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUserWithDefaults instantiates a new User object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
PtrBool - returns a pointer to given boolean value.
PtrFloat32 - returns a pointer to given float value.
PtrFloat64 - returns a pointer to given float value.
PtrInt - returns a pointer to given integer value.
PtrInt32 - returns a pointer to given integer value.
PtrInt64 - returns a pointer to given integer value.
PtrString - returns a pointer to given string value.
PtrTime - returns a pointer to given Time value.
No description provided by the author
ToBool - returns the value of the bool pointer passed in.
ToBoolDefault - returns the value of the bool pointer passed in, or false if the pointer is nil.
ToBoolSlice - returns a bool slice of the pointer passed in.
ToByte - returns the value of the byte pointer passed in.
ToByteDefault - returns the value of the byte pointer passed in, or 0 if the pointer is nil.
ToByteSlice - returns a byte slice of the pointer passed in.
ToFloat32 - returns the value of the float32 pointer passed in.
ToFloat32Default - returns the value of the float32 pointer passed in, or 0 if the pointer is nil.
ToFloat32Slice - returns a float32 slice of the pointer passed in.
ToFloat64 - returns the value of the float64 pointer passed in.
ToFloat64Default - returns the value of the float64 pointer passed in, or 0 if the pointer is nil.
ToFloat64Slice - returns a float64 slice of the pointer passed in.
ToInt - returns the value of the int pointer passed in.
ToInt16 - returns the value of the int16 pointer passed in.
ToInt16Default - returns the value of the int16 pointer passed in, or 0 if the pointer is nil.
ToInt16Slice - returns a int16 slice of the pointer passed in.
ToInt32 - returns the value of the int32 pointer passed in.
ToInt32Default - returns the value of the int32 pointer passed in, or 0 if the pointer is nil.
ToInt32Slice - returns a int32 slice of the pointer passed in.
ToInt64 - returns the value of the int64 pointer passed in.
ToInt64Default - returns the value of the int64 pointer passed in, or 0 if the pointer is nil.
ToInt64Slice - returns a int64 slice of the pointer passed in.
ToInt8 - returns the value of the int8 pointer passed in.
ToInt8Default - returns the value of the int8 pointer passed in, or 0 if the pointer is nil.
ToInt8Slice - returns a int8 slice of the pointer passed in.
ToIntDefault - returns the value of the int pointer passed in, or 0 if the pointer is nil.
ToIntSlice - returns a int slice of the pointer passed in.
ToPtr - returns a pointer to the given value.
ToString - returns the value of the string pointer passed in.
ToStringDefault - returns the value of the string pointer passed in, or "" if the pointer is nil.
ToStringSlice - returns a string slice of the pointer passed in.
ToTime - returns the value of the Time pointer passed in.
ToTimeDefault - returns the value of the Time pointer passed in, or 0001-01-01 00:00:00 +0000 UTC if the pointer is nil.
ToTimeSlice - returns a Time slice of the pointer passed in.
ToUint - returns the value of the uint pointer passed in.
ToUint16 - returns the value of the uint16 pointer passed in.
ToUint16Default - returns the value of the uint16 pointer passed in, or 0 if the pointer is nil.
ToUint16Slice - returns a uint16 slice of the pointer passed in.
ToUint32 - returns the value of the uint32 pointer passed in.
ToUint32Default - returns the value of the uint32 pointer passed in, or 0 if the pointer is nil.
ToUint32Slice - returns a uint32 slice of the pointer passed in.
ToUint64 - returns the value of the uint64 pointer passed in.
ToUint64Default - returns the value of the uint64 pointer passed in, or 0 if the pointer is nil.
ToUint64Slice - returns a uint63 slice of the pointer passed in.
ToUint8 -returns the value of the uint8 pointer passed in.
ToUint8Default - returns the value of the uint8 pointer passed in, or 0 if the pointer is nil.
ToUint8Slice - returns a uint8 slice of the pointer passed in.
ToUintDefault - returns the value of the uint pointer passed in, or 0 if the pointer is nil.
ToUintSlice - returns a uint slice of the pointer passed in.
ToValue - returns the value of the pointer passed in.
ToValueDefault - returns the value of the pointer passed in, or the default type value if the pointer is nil.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Trace We recommend you only set this field for debugging purposes.
No description provided by the author

# Variables

ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKeys takes a string apikey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
ContextOperationServerIndices uses a server configuration from the index mapping.
ContextOperationServerVariables overrides a server configuration variables using operation specific values.
ContextServerIndex uses a server configuration from the index.
ContextServerVariables overrides a server configuration variables.
No description provided by the author
No description provided by the author

# Structs

APIClient manages communication with the Kafka as a Service API API v1.7.1 In most cases there should be only one, shared, APIClient.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
APIResponse stores the API response returned by the server.
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
Cluster A Kafka cluster that stores data and serve client requests.
ClusterCreate struct for ClusterCreate.
ClusterMetadata struct for ClusterMetadata.
ClusterMetadataAllOf struct for ClusterMetadataAllOf.
ClusterRead struct for ClusterRead.
ClusterReadList struct for ClusterReadList.
ClusterReadListAllOf struct for ClusterReadListAllOf.
Configuration stores the configuration of the API client.
Error The Error object is used to represent an error response from the API.
ErrorMessages struct for ErrorMessages.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
No description provided by the author
KafkaClusterConnection Connection information of the Kafka cluster.
Links URLs to navigate the different pages.
Metadata Metadata of the resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Pagination Pagination information.
ResourceMetadata struct for ResourceMetadata.
ResourceState The current status of the resource.
ServerConfiguration stores the information about a server.
ServerVariable stores the information about a server variable.
Topic A topic is a category or feed name to which records are published.
TopicCreate struct for TopicCreate.
TopicLogRetention struct for TopicLogRetention.
TopicRead struct for TopicRead.
TopicReadList struct for TopicReadList.
TopicReadListAllOf struct for TopicReadListAllOf.
User The user of the apache cluster.
UserAccessMetadata struct for UserAccessMetadata.
UserAccessMetadataAllOf struct for UserAccessMetadataAllOf.
UserRead struct for UserRead.
UserReadAccess struct for UserReadAccess.
UserReadList struct for UserReadList.
UserReadListAllOf struct for UserReadListAllOf.

# Interfaces

No description provided by the author

# Type aliases

ClustersApiService ClustersApi service.
No description provided by the author
ServerConfigurations stores multiple ServerConfiguration items.
TLSDial can be assigned to a http.Transport's DialTLS field.
TopicsApiService TopicsApi service.
UsersApiService UsersApi service.