Categorygithub.com/ionos-cloud/sdk-go-dbaas-mariadb
modulepackage
1.1.1
Repository: https://github.com/ionos-cloud/sdk-go-dbaas-mariadb.git
Documentation: pkg.go.dev

# README

Gitter

Go API client for ionoscloud

An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based "Data Center Designer" (DCD) tool or via an easy to use API.

The API allows you to create additional MariaDB database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.

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.

  • API version: 0.1.0
  • Package version: 1.1.1
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

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

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

import "./ionoscloud"

Authentication

All available server URLs are:

By default, https://mariadb.de-txl.ionos.com is used, however this can be overriden at authentication, either by setting the IONOS_API_URL environment variable or by specifying the hostUrl parameter when initializing the sdk client.

The username and password or the authentication token can be manually specified when initializing the sdk client:


client := ionoscloud.NewAPIClient(ionoscloud.NewConfiguration(username, password, token, hostUrl))

Environment variables can also be used. The sdk uses the following variables:

  • IONOS_TOKEN - login via token. This is the recommended way to authenticate.
  • IONOS_USERNAME - to specify the username used to login
  • IONOS_PASSWORD - to specify the password
  • IONOS_API_URL - to specify the API server URL

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


client := ionoscloud.NewAPIClient(ionoscloud.NewConfigurationFromEnv())

Documentation for API Endpoints

All URIs are relative to https://mariadb.de-txl.ionos.com

API Endpoints table
ClassMethodHTTP requestDescription
BackupsApiBackupsFindByIdGet /backups/{backupId}Fetch backups
BackupsApiBackupsGetGet /backupsList of backups.
BackupsApiClusterBackupsGetGet /clusters/{clusterId}/backupsList backups of cluster
ClustersApiClustersDeleteDelete /clusters/{clusterId}Delete a cluster
ClustersApiClustersFindByIdGet /clusters/{clusterId}Fetch a cluster
ClustersApiClustersGetGet /clustersList clusters
ClustersApiClustersPatchPatch /clusters/{clusterId}Update a cluster
ClustersApiClustersPostPost /clustersCreate a cluster
RestoreApiClustersRestorePost /clusters/{clusterId}/restoreIn-place restore of a cluster.

Documentation For Models

All URIs are relative to https://mariadb.de-txl.ionos.com

API models list

[Back to API list] [Back to Model list]

# 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.
NewBackup instantiates a new Backup 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.
NewBackupList instantiates a new BackupList 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.
NewBackupListAllOf instantiates a new BackupListAllOf 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.
NewBackupListAllOfWithDefaults instantiates a new BackupListAllOf 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.
NewBackupListWithDefaults instantiates a new BackupList 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.
NewBackupResponse instantiates a new BackupResponse 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.
NewBackupResponseWithDefaults instantiates a new BackupResponse 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.
NewBackupWithDefaults instantiates a new Backup 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.
NewBaseBackup instantiates a new BaseBackup 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.
NewBaseBackupWithDefaults instantiates a new BaseBackup 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.
NewClusterList instantiates a new ClusterList 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.
NewClusterListAllOf instantiates a new ClusterListAllOf 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.
NewClusterListAllOfWithDefaults instantiates a new ClusterListAllOf 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.
NewClusterListWithDefaults instantiates a new ClusterList 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.
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.
NewClusterProperties instantiates a new ClusterProperties 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.
NewClusterPropertiesWithDefaults instantiates a new ClusterProperties 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.
NewClusterResponse instantiates a new ClusterResponse 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.
NewClusterResponseWithDefaults instantiates a new ClusterResponse 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.
NewClustersGet400Response instantiates a new ClustersGet400Response 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.
NewClustersGet400ResponseWithDefaults instantiates a new ClustersGet400Response 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.
NewClustersGet401Response instantiates a new ClustersGet401Response 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.
NewClustersGet401ResponseWithDefaults instantiates a new ClustersGet401Response 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.
NewClustersGet403Response instantiates a new ClustersGet403Response 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.
NewClustersGet403ResponseWithDefaults instantiates a new ClustersGet403Response 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.
NewClustersGet404Response instantiates a new ClustersGet404Response 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.
NewClustersGet404ResponseWithDefaults instantiates a new ClustersGet404Response 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.
NewClustersGet405Response instantiates a new ClustersGet405Response 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.
NewClustersGet405ResponseWithDefaults instantiates a new ClustersGet405Response 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.
NewClustersGet415Response instantiates a new ClustersGet415Response 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.
NewClustersGet415ResponseWithDefaults instantiates a new ClustersGet415Response 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.
NewClustersGet422Response instantiates a new ClustersGet422Response 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.
NewClustersGet422ResponseWithDefaults instantiates a new ClustersGet422Response 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.
NewClustersGet429Response instantiates a new ClustersGet429Response 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.
NewClustersGet429ResponseWithDefaults instantiates a new ClustersGet429Response 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.
NewClustersGet500Response instantiates a new ClustersGet500Response 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.
NewClustersGet500ResponseWithDefaults instantiates a new ClustersGet500Response 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.
NewClustersGet503Response instantiates a new ClustersGet503Response 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.
NewClustersGet503ResponseWithDefaults instantiates a new ClustersGet503Response 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
NewConnection instantiates a new Connection 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.
NewConnectionWithDefaults instantiates a new Connection 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.
NewCreateClusterProperties instantiates a new CreateClusterProperties 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.
NewCreateClusterPropertiesWithDefaults instantiates a new CreateClusterProperties 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.
NewCreateClusterRequest instantiates a new CreateClusterRequest 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.
NewCreateClusterRequestWithDefaults instantiates a new CreateClusterRequest 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.
NewDBUser instantiates a new DBUser 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.
NewDBUserWithDefaults instantiates a new DBUser 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
NewErrorMessage instantiates a new ErrorMessage 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.
NewErrorMessageWithDefaults instantiates a new ErrorMessage 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.
NewMaintenanceWindow instantiates a new MaintenanceWindow 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.
NewMaintenanceWindowWithDefaults instantiates a new MaintenanceWindow 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
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.
NewPaginationLinks instantiates a new PaginationLinks 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.
NewPaginationLinksWithDefaults instantiates a new PaginationLinks 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.
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.
NewPatchClusterProperties instantiates a new PatchClusterProperties 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.
NewPatchClusterPropertiesWithDefaults instantiates a new PatchClusterProperties 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.
NewPatchClusterRequest instantiates a new PatchClusterRequest 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.
NewPatchClusterRequestWithDefaults instantiates a new PatchClusterRequest 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.
NewRestoreRequest instantiates a new RestoreRequest 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.
NewRestoreRequestWithDefaults instantiates a new RestoreRequest 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

List of DayOfTheWeek.
List of DayOfTheWeek.
List of DayOfTheWeek.
List of DayOfTheWeek.
List of DayOfTheWeek.
List of DayOfTheWeek.
List of DayOfTheWeek.
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
List of MariadbVersion.
List of MariadbVersion.
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
List of State.
List of State.
List of State.
List of State.
List of State.
List of State.
List of State.
List of State.
List of State.
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

No description provided by the author
No description provided by the author
APIClient manages communication with the IONOS DBaaS MariaDB REST API API v0.1.0 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
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
APIResponse stores the API response returned by the server.
Backup A backup object.
BackupList List of backups.
BackupListAllOf struct for BackupListAllOf.
BackupResponse A database backup.
BaseBackup A single base backup.
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
ClusterList List of clusters.
ClusterListAllOf struct for ClusterListAllOf.
ClusterMetadata Metadata of the resource.
ClusterProperties Properties of a database cluster.
ClusterResponse A database cluster.
ClustersGet400Response struct for ClustersGet400Response.
ClustersGet401Response struct for ClustersGet401Response.
ClustersGet403Response struct for ClustersGet403Response.
ClustersGet404Response struct for ClustersGet404Response.
ClustersGet405Response struct for ClustersGet405Response.
ClustersGet415Response struct for ClustersGet415Response.
ClustersGet422Response struct for ClustersGet422Response.
ClustersGet429Response struct for ClustersGet429Response.
ClustersGet500Response struct for ClustersGet500Response.
ClustersGet503Response struct for ClustersGet503Response.
Configuration stores the configuration of the API client.
Connection Details about the network connection for your cluster.
CreateClusterProperties Properties with all data needed to create a new MariaDB cluster.
CreateClusterRequest Request payload with all data needed to create a new MariaDB cluster.
DBUser Credentials for the database user to be created.
ErrorMessage struct for ErrorMessage.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
No description provided by the author
MaintenanceWindow A weekly 4 hour-long window, during which maintenance might occur.
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
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 in list responses.
PaginationLinks URLs to navigate the different pages.
PatchClusterProperties Properties of the payload to change a cluster: - instances can only be increased (3, 5, 7), - mariadbVersion can only be increased (no downgrade) - storageSize can only be increased, - ram and cores can be both increased and decreased.
PatchClusterRequest Request payload to change a cluster.
RestoreRequest Request payload to restore a cluster from a backup.
ServerConfiguration stores the information about a server.
ServerVariable stores the information about a server variable.

# Interfaces

No description provided by the author

# Type aliases

BackupsApiService BackupsApi service.
ClustersApiService ClustersApi service.
DayOfTheWeek The name of the week day.
No description provided by the author
MariadbVersion The MariaDB version of your cluster.
RestoreApiService RestoreApi service.
ServerConfigurations stores multiple ServerConfiguration items.
State The current status reported back by the cluster.
TLSDial can be assigned to a http.Transport's DialTLS field.