ionoscloud

package module
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 27 Imported by: 7

README

Go API client for ionoscloud

Use the Auth API to manage tokens for secure access to IONOS Cloud APIs (Auth API, Cloud API, Reseller API, Activity Log API, and others).

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: 1.0
  • Package version: 1.0.7
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

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-auth"

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.

URLs Configuration per Operation

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(), ionoscloud.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), ionoscloud.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://api.ionos.com/auth/v1

Class Method HTTP request Description
TokensApi TokensDeleteByCriteria Delete /tokens Delete tokens by criteria
TokensApi TokensDeleteById Delete /tokens/{tokenId} Delete tokens
TokensApi TokensFindById Get /tokens/{tokenId} Get tokens by Key ID
TokensApi TokensGenerate Get /tokens/generate Create new tokens
TokensApi TokensGet Get /tokens List all tokens

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

Basic Authentication
  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)
Token Authentication
  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

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.

Example

auth := context.WithValue(
		context.Background(),
		sw.ContextAPIKeys,
		map[string]sw.APIKey{
			"Authorization": {Key: "API_KEY_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

Documentation

Index

Constants

View Source
const (
	RequestStatusQueued  = "QUEUED"
	RequestStatusRunning = "RUNNING"
	RequestStatusFailed  = "FAILED"
	RequestStatusDone    = "DONE"

	Version = "1.0.7"
)
View Source
const (
	IonosUsernameEnvVar   = "IONOS_USERNAME"
	IonosPasswordEnvVar   = "IONOS_PASSWORD"
	IonosTokenEnvVar      = "IONOS_TOKEN"
	IonosApiUrlEnvVar     = "IONOS_API_URL"
	IonosPinnedCertEnvVar = "IONOS_PINNED_CERT"
	IonosLogLevelEnvVar   = "IONOS_LOG_LEVEL"
	DefaultIonosServerUrl = "https://api.ionos.com/auth/v1"
	DefaultIonosBasePath  = "/auth/v1"
)

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKeys takes a string apikey as authentication for the request
	ContextAPIKeys = contextKey("apiKeys")

	// ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
	ContextHttpSignatureAuth = contextKey("httpsignature")

	// ContextServerIndex uses a server configuration from the index.
	ContextServerIndex = contextKey("serverIndex")

	// ContextOperationServerIndices uses a server configuration from the index mapping.
	ContextOperationServerIndices = contextKey("serverOperationIndices")

	// ContextServerVariables overrides a server configuration variables.
	ContextServerVariables = contextKey("serverVariables")

	// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
	ContextOperationServerVariables = contextKey("serverOperationVariables")
)
View Source
var LogLevelMap = map[string]LogLevel{
	"off":   Off,
	"debug": Debug,
	"trace": Trace,
}

Functions

func AddPinnedCert added in v1.0.7

func AddPinnedCert(transport *http.Transport, pkFingerprint string)

AddPinnedCert - enables pinning of the sha256 public fingerprint to the http client's transport

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func IsNil added in v1.0.6

func IsNil(i interface{}) bool

IsNil checks if an input is nil

func PtrBool

func PtrBool(v bool) *bool

PtrBool - returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 - returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 - returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt - returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 - returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 - returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString - returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime - returns a pointer to given Time value.

func SliceToValueDefault added in v1.0.6

func SliceToValueDefault[T any](ptrSlice *[]T) []T

func ToBool added in v1.0.4

func ToBool(ptr *bool) bool

ToBool - returns the value of the bool pointer passed in

func ToBoolDefault added in v1.0.4

func ToBoolDefault(ptr *bool) bool

ToBoolDefault - returns the value of the bool pointer passed in, or false if the pointer is nil

func ToBoolSlice added in v1.0.4

func ToBoolSlice(ptrSlice *[]bool) []bool

ToBoolSlice - returns a bool slice of the pointer passed in

func ToByte added in v1.0.4

func ToByte(ptr *byte) byte

ToByte - returns the value of the byte pointer passed in

func ToByteDefault added in v1.0.4

func ToByteDefault(ptr *byte) byte

ToByteDefault - returns the value of the byte pointer passed in, or 0 if the pointer is nil

func ToByteSlice added in v1.0.4

func ToByteSlice(ptrSlice *[]byte) []byte

ToByteSlice - returns a byte slice of the pointer passed in

func ToFloat32 added in v1.0.4

func ToFloat32(ptr *float32) float32

ToFloat32 - returns the value of the float32 pointer passed in

func ToFloat32Default added in v1.0.4

func ToFloat32Default(ptr *float32) float32

ToFloat32Default - returns the value of the float32 pointer passed in, or 0 if the pointer is nil

func ToFloat32Slice added in v1.0.4

func ToFloat32Slice(ptrSlice *[]float32) []float32

ToFloat32Slice - returns a float32 slice of the pointer passed in

func ToFloat64 added in v1.0.4

func ToFloat64(ptr *float64) float64

ToFloat64 - returns the value of the float64 pointer passed in

func ToFloat64Default added in v1.0.4

func ToFloat64Default(ptr *float64) float64

ToFloat64Default - returns the value of the float64 pointer passed in, or 0 if the pointer is nil

func ToFloat64Slice added in v1.0.4

func ToFloat64Slice(ptrSlice *[]float64) []float64

ToFloat64Slice - returns a float64 slice of the pointer passed in

func ToInt added in v1.0.4

func ToInt(ptr *int) int

ToInt - returns the value of the int pointer passed in

func ToInt16 added in v1.0.4

func ToInt16(ptr *int16) int16

ToInt16 - returns the value of the int16 pointer passed in

func ToInt16Default added in v1.0.4

func ToInt16Default(ptr *int16) int16

ToInt16Default - returns the value of the int16 pointer passed in, or 0 if the pointer is nil

func ToInt16Slice added in v1.0.4

func ToInt16Slice(ptrSlice *[]int16) []int16

ToInt16Slice - returns a int16 slice of the pointer passed in

func ToInt32 added in v1.0.4

func ToInt32(ptr *int32) int32

ToInt32 - returns the value of the int32 pointer passed in

func ToInt32Default added in v1.0.4

func ToInt32Default(ptr *int32) int32

ToInt32Default - returns the value of the int32 pointer passed in, or 0 if the pointer is nil

func ToInt32Slice added in v1.0.4

func ToInt32Slice(ptrSlice *[]int32) []int32

ToInt32Slice - returns a int32 slice of the pointer passed in

func ToInt64 added in v1.0.4

func ToInt64(ptr *int64) int64

ToInt64 - returns the value of the int64 pointer passed in

func ToInt64Default added in v1.0.4

func ToInt64Default(ptr *int64) int64

ToInt64Default - returns the value of the int64 pointer passed in, or 0 if the pointer is nil

func ToInt64Slice added in v1.0.4

func ToInt64Slice(ptrSlice *[]int64) []int64

ToInt64Slice - returns a int64 slice of the pointer passed in

func ToInt8 added in v1.0.4

func ToInt8(ptr *int8) int8

ToInt8 - returns the value of the int8 pointer passed in

func ToInt8Default added in v1.0.4

func ToInt8Default(ptr *int8) int8

ToInt8Default - returns the value of the int8 pointer passed in, or 0 if the pointer is nil

func ToInt8Slice added in v1.0.4

func ToInt8Slice(ptrSlice *[]int8) []int8

ToInt8Slice - returns a int8 slice of the pointer passed in

func ToIntDefault added in v1.0.4

func ToIntDefault(ptr *int) int

ToIntDefault - returns the value of the int pointer passed in, or 0 if the pointer is nil

func ToIntSlice added in v1.0.4

func ToIntSlice(ptrSlice *[]int) []int

ToIntSlice - returns a int slice of the pointer passed in

func ToPtr added in v1.0.6

func ToPtr[T any](v T) *T

ToPtr - returns a pointer to the given value.

func ToString added in v1.0.4

func ToString(ptr *string) string

ToString - returns the value of the string pointer passed in

func ToStringDefault added in v1.0.4

func ToStringDefault(ptr *string) string

ToStringDefault - returns the value of the string pointer passed in, or "" if the pointer is nil

func ToStringSlice added in v1.0.4

func ToStringSlice(ptrSlice *[]string) []string

ToStringSlice - returns a string slice of the pointer passed in

func ToTime added in v1.0.4

func ToTime(ptr *time.Time) time.Time

ToTime - returns the value of the Time pointer passed in

func ToTimeDefault added in v1.0.4

func ToTimeDefault(ptr *time.Time) time.Time

ToTimeDefault - returns the value of the Time pointer passed in, or 0001-01-01 00:00:00 +0000 UTC if the pointer is nil

func ToTimeSlice added in v1.0.4

func ToTimeSlice(ptrSlice *[]time.Time) []time.Time

ToTimeSlice - returns a Time slice of the pointer passed in

func ToUint added in v1.0.4

func ToUint(ptr *uint) uint

ToUint - returns the value of the uint pointer passed in

func ToUint16 added in v1.0.4

func ToUint16(ptr *uint16) uint16

ToUint16 - returns the value of the uint16 pointer passed in

func ToUint16Default added in v1.0.4

func ToUint16Default(ptr *uint16) uint16

ToUint16Default - returns the value of the uint16 pointer passed in, or 0 if the pointer is nil

func ToUint16Slice added in v1.0.4

func ToUint16Slice(ptrSlice *[]uint16) []uint16

ToUint16Slice - returns a uint16 slice of the pointer passed in

func ToUint32 added in v1.0.4

func ToUint32(ptr *uint32) uint32

ToUint32 - returns the value of the uint32 pointer passed in

func ToUint32Default added in v1.0.4

func ToUint32Default(ptr *uint32) uint32

ToUint32Default - returns the value of the uint32 pointer passed in, or 0 if the pointer is nil

func ToUint32Slice added in v1.0.4

func ToUint32Slice(ptrSlice *[]uint32) []uint32

ToUint32Slice - returns a uint32 slice of the pointer passed in

func ToUint64 added in v1.0.4

func ToUint64(ptr *uint64) uint64

ToUint64 - returns the value of the uint64 pointer passed in

func ToUint64Default added in v1.0.4

func ToUint64Default(ptr *uint64) uint64

ToUint64Default - returns the value of the uint64 pointer passed in, or 0 if the pointer is nil

func ToUint64Slice added in v1.0.4

func ToUint64Slice(ptrSlice *[]uint64) []uint64

ToUint64Slice - returns a uint63 slice of the pointer passed in

func ToUint8 added in v1.0.4

func ToUint8(ptr *uint8) uint8

ToUint8 -returns the value of the uint8 pointer passed in

func ToUint8Default added in v1.0.4

func ToUint8Default(ptr *uint8) uint8

ToUint8Default - returns the value of the uint8 pointer passed in, or 0 if the pointer is nil

func ToUint8Slice added in v1.0.4

func ToUint8Slice(ptrSlice *[]uint8) []uint8

ToUint8Slice - returns a uint8 slice of the pointer passed in

func ToUintDefault added in v1.0.4

func ToUintDefault(ptr *uint) uint

ToUintDefault - returns the value of the uint pointer passed in, or 0 if the pointer is nil

func ToUintSlice added in v1.0.4

func ToUintSlice(ptrSlice *[]uint) []uint

ToUintSlice - returns a uint slice of the pointer passed in

func ToValue added in v1.0.6

func ToValue[T any](ptr *T) T

ToValue - returns the value of the pointer passed in

func ToValueDefault added in v1.0.6

func ToValueDefault[T any](ptr *T) T

ToValueDefault - returns the value of the pointer passed in, or the default type value if the pointer is nil

Types

type APIClient

type APIClient struct {
	TokensApi *TokensApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Auth API API v1.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// RequestTime is the time duration from the moment the APIClient sends
	// the HTTP request to the moment it receives an HTTP response.
	RequestTime time.Duration `json:"duration,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResponse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

func (*APIResponse) HttpNotFound added in v1.0.7

func (resp *APIResponse) HttpNotFound() bool

HttpNotFound - returns true if a 404 status code was returned returns false for nil APIResponse values

func (*APIResponse) LogInfo added in v1.0.7

func (resp *APIResponse) LogInfo()

LogInfo - logs APIResponse values like RequestTime, Operation and StatusCode does not print anything for nil APIResponse values

type ApiTokensDeleteByCriteriaRequest added in v1.0.2

type ApiTokensDeleteByCriteriaRequest struct {
	ApiService *TokensApiService
	// contains filtered or unexported fields
}

func (ApiTokensDeleteByCriteriaRequest) Criteria added in v1.0.2

func (ApiTokensDeleteByCriteriaRequest) Execute added in v1.0.2

func (ApiTokensDeleteByCriteriaRequest) XContractNumber added in v1.0.2

func (r ApiTokensDeleteByCriteriaRequest) XContractNumber(xContractNumber int32) ApiTokensDeleteByCriteriaRequest

type ApiTokensDeleteByIdRequest added in v1.0.2

type ApiTokensDeleteByIdRequest struct {
	ApiService *TokensApiService
	// contains filtered or unexported fields
}

func (ApiTokensDeleteByIdRequest) Execute added in v1.0.2

func (ApiTokensDeleteByIdRequest) XContractNumber added in v1.0.2

func (r ApiTokensDeleteByIdRequest) XContractNumber(xContractNumber int32) ApiTokensDeleteByIdRequest

type ApiTokensFindByIdRequest added in v1.0.2

type ApiTokensFindByIdRequest struct {
	ApiService *TokensApiService
	// contains filtered or unexported fields
}

func (ApiTokensFindByIdRequest) Execute added in v1.0.2

func (ApiTokensFindByIdRequest) XContractNumber added in v1.0.2

func (r ApiTokensFindByIdRequest) XContractNumber(xContractNumber int32) ApiTokensFindByIdRequest

type ApiTokensGenerateRequest added in v1.0.2

type ApiTokensGenerateRequest struct {
	ApiService *TokensApiService
	// contains filtered or unexported fields
}

func (ApiTokensGenerateRequest) Execute added in v1.0.2

func (r ApiTokensGenerateRequest) Execute() (Jwt, *APIResponse, error)

func (ApiTokensGenerateRequest) XContractNumber added in v1.0.2

func (r ApiTokensGenerateRequest) XContractNumber(xContractNumber int32) ApiTokensGenerateRequest

type ApiTokensGetRequest added in v1.0.2

type ApiTokensGetRequest struct {
	ApiService *TokensApiService
	// contains filtered or unexported fields
}

func (ApiTokensGetRequest) Execute added in v1.0.2

func (r ApiTokensGetRequest) Execute() (Tokens, *APIResponse, error)

func (ApiTokensGetRequest) XContractNumber added in v1.0.2

func (r ApiTokensGetRequest) XContractNumber(xContractNumber int32) ApiTokensGetRequest

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	Host               string            `json:"host,omitempty"`
	Scheme             string            `json:"scheme,omitempty"`
	DefaultHeader      map[string]string `json:"defaultHeader,omitempty"`
	DefaultQueryParams url.Values        `json:"defaultQueryParams,omitempty"`
	UserAgent          string            `json:"userAgent,omitempty"`
	Debug              bool              `json:"debug,omitempty"`
	Servers            ServerConfigurations
	OperationServers   map[string]ServerConfigurations
	HTTPClient         *http.Client
	LogLevel           LogLevel
	Logger             Logger
	Username           string        `json:"username,omitempty"`
	Password           string        `json:"password,omitempty"`
	Token              string        `json:"token,omitempty"`
	MaxRetries         int           `json:"maxRetries,omitempty"`
	WaitTime           time.Duration `json:"waitTime,omitempty"`
	MaxWaitTime        time.Duration `json:"maxWaitTime,omitempty"`
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration(username, password, token, hostUrl string) *Configuration

NewConfiguration returns a new Configuration object

func NewConfigurationFromEnv

func NewConfigurationFromEnv() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) AddDefaultQueryParam

func (c *Configuration) AddDefaultQueryParam(key string, value string)

func (*Configuration) ServerURL

func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error)

ServerURL returns URL based on server settings

func (*Configuration) ServerURLWithContext

func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error)

ServerURLWithContext returns a new server URL given an endpoint

type DeleteResponse added in v1.0.1

type DeleteResponse struct {
	Success *bool `json:"success,omitempty"`
}

DeleteResponse struct for DeleteResponse

func NewDeleteResponse added in v1.0.7

func NewDeleteResponse() *DeleteResponse

NewDeleteResponse instantiates a new DeleteResponse 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

func NewDeleteResponseWithDefaults added in v1.0.7

func NewDeleteResponseWithDefaults() *DeleteResponse

NewDeleteResponseWithDefaults instantiates a new DeleteResponse 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

func (*DeleteResponse) GetSuccess added in v1.0.1

func (o *DeleteResponse) GetSuccess() *bool

GetSuccess returns the Success field value If the value is explicit nil, the zero value for bool will be returned

func (*DeleteResponse) GetSuccessOk added in v1.0.1

func (o *DeleteResponse) GetSuccessOk() (*bool, bool)

GetSuccessOk returns a tuple with the Success field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*DeleteResponse) HasSuccess added in v1.0.1

func (o *DeleteResponse) HasSuccess() bool

HasSuccess returns a boolean if a field has been set.

func (DeleteResponse) MarshalJSON added in v1.0.1

func (o DeleteResponse) MarshalJSON() ([]byte, error)

func (*DeleteResponse) SetSuccess added in v1.0.1

func (o *DeleteResponse) SetSuccess(v bool)

SetSuccess sets field value

type Error

type Error struct {
	// HTTP Response Code
	HttpStatus *int32           `json:"httpStatus,omitempty"`
	Messages   *[]ErrorMessages `json:"messages,omitempty"`
}

Error struct for Error

func NewError added in v1.0.7

func NewError() *Error

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

func NewErrorWithDefaults added in v1.0.7

func NewErrorWithDefaults() *Error

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

func (*Error) GetHttpStatus

func (o *Error) GetHttpStatus() *int32

GetHttpStatus returns the HttpStatus field value If the value is explicit nil, the zero value for int32 will be returned

func (*Error) GetHttpStatusOk

func (o *Error) GetHttpStatusOk() (*int32, bool)

GetHttpStatusOk returns a tuple with the HttpStatus field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*Error) GetMessages

func (o *Error) GetMessages() *[]ErrorMessages

GetMessages returns the Messages field value If the value is explicit nil, the zero value for []ErrorMessages will be returned

func (*Error) GetMessagesOk

func (o *Error) GetMessagesOk() (*[]ErrorMessages, bool)

GetMessagesOk returns a tuple with the Messages field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*Error) HasHttpStatus

func (o *Error) HasHttpStatus() bool

HasHttpStatus returns a boolean if a field has been set.

func (*Error) HasMessages

func (o *Error) HasMessages() bool

HasMessages returns a boolean if a field has been set.

func (Error) MarshalJSON

func (o Error) MarshalJSON() ([]byte, error)

func (*Error) SetHttpStatus

func (o *Error) SetHttpStatus(v int32)

SetHttpStatus sets field value

func (*Error) SetMessages

func (o *Error) SetMessages(v []ErrorMessages)

SetMessages sets field value

type ErrorMessages

type ErrorMessages struct {
	// Numeric error code of error message.
	ErrorCode *string `json:"errorCode,omitempty"`
	// Error message.
	Message *string `json:"message,omitempty"`
}

ErrorMessages struct for ErrorMessages

func NewErrorMessages added in v1.0.7

func NewErrorMessages() *ErrorMessages

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

func NewErrorMessagesWithDefaults added in v1.0.7

func NewErrorMessagesWithDefaults() *ErrorMessages

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

func (*ErrorMessages) GetErrorCode

func (o *ErrorMessages) GetErrorCode() *string

GetErrorCode returns the ErrorCode field value If the value is explicit nil, the zero value for string will be returned

func (*ErrorMessages) GetErrorCodeOk

func (o *ErrorMessages) GetErrorCodeOk() (*string, bool)

GetErrorCodeOk returns a tuple with the ErrorCode field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*ErrorMessages) GetMessage

func (o *ErrorMessages) GetMessage() *string

GetMessage returns the Message field value If the value is explicit nil, the zero value for string will be returned

func (*ErrorMessages) GetMessageOk

func (o *ErrorMessages) GetMessageOk() (*string, bool)

GetMessageOk returns a tuple with the Message field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*ErrorMessages) HasErrorCode

func (o *ErrorMessages) HasErrorCode() bool

HasErrorCode returns a boolean if a field has been set.

func (*ErrorMessages) HasMessage

func (o *ErrorMessages) HasMessage() bool

HasMessage returns a boolean if a field has been set.

func (ErrorMessages) MarshalJSON

func (o ErrorMessages) MarshalJSON() ([]byte, error)

func (*ErrorMessages) SetErrorCode

func (o *ErrorMessages) SetErrorCode(v string)

SetErrorCode sets field value

func (*ErrorMessages) SetMessage

func (o *ErrorMessages) SetMessage(v string)

SetMessage sets field value

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func NewGenericOpenAPIError added in v1.0.5

func NewGenericOpenAPIError(message string, body []byte, model interface{}, statusCode int) *GenericOpenAPIError

NewGenericOpenAPIError - constructor for GenericOpenAPIError

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

func (*GenericOpenAPIError) SetBody added in v1.0.5

func (e *GenericOpenAPIError) SetBody(body []byte)

SetBody sets the raw body of the error

func (*GenericOpenAPIError) SetError added in v1.0.5

func (e *GenericOpenAPIError) SetError(error string)

SetError sets the error string

func (*GenericOpenAPIError) SetModel added in v1.0.5

func (e *GenericOpenAPIError) SetModel(model interface{})

SetModel sets the model of the error

func (*GenericOpenAPIError) SetStatusCode added in v1.0.5

func (e *GenericOpenAPIError) SetStatusCode(statusCode int)

SetStatusCode sets the status code of the error

func (GenericOpenAPIError) StatusCode

func (e GenericOpenAPIError) StatusCode() int

StatusCode returns the status code of the error

type IonosTime

type IonosTime struct {
	time.Time
}

func (*IonosTime) UnmarshalJSON

func (t *IonosTime) UnmarshalJSON(data []byte) error

type Jwt

type Jwt struct {
	// JSON Web Token (JWT) Base64url strings separated by dots
	Token *string `json:"token,omitempty"`
}

Jwt struct for Jwt

func NewJwt added in v1.0.7

func NewJwt() *Jwt

NewJwt instantiates a new Jwt 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

func NewJwtWithDefaults added in v1.0.7

func NewJwtWithDefaults() *Jwt

NewJwtWithDefaults instantiates a new Jwt 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

func (*Jwt) GetToken

func (o *Jwt) GetToken() *string

GetToken returns the Token field value If the value is explicit nil, the zero value for string will be returned

func (*Jwt) GetTokenOk

func (o *Jwt) GetTokenOk() (*string, bool)

GetTokenOk returns a tuple with the Token field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*Jwt) HasToken

func (o *Jwt) HasToken() bool

HasToken returns a boolean if a field has been set.

func (Jwt) MarshalJSON

func (o Jwt) MarshalJSON() ([]byte, error)

func (*Jwt) SetToken

func (o *Jwt) SetToken(v string)

SetToken sets field value

type LogLevel added in v1.0.5

type LogLevel uint
const (
	Off LogLevel = 0x100 * iota
	Debug
	// Trace We recommend you only set this field for debugging purposes.
	// Disable it in your production environments because it can log sensitive data.
	// It logs the full request and response without encryption, even for an HTTPS call.
	// Verbose request and response logging can also significantly impact your application's performance.
	Trace
)

func (*LogLevel) Get added in v1.0.5

func (l *LogLevel) Get() LogLevel

func (*LogLevel) Satisfies added in v1.0.5

func (l *LogLevel) Satisfies(v LogLevel) bool

Satisfies returns true if this LogLevel is at least high enough for v

type Logger added in v1.0.5

type Logger interface {
	Printf(format string, args ...interface{})
}

func NewDefaultLogger added in v1.0.5

func NewDefaultLogger() Logger

type NullableBool

type NullableBool struct {
	// contains filtered or unexported fields
}

func NewNullableBool

func NewNullableBool(val *bool) *NullableBool

func (NullableBool) Get

func (v NullableBool) Get() *bool

func (NullableBool) IsSet

func (v NullableBool) IsSet() bool

func (NullableBool) MarshalJSON

func (v NullableBool) MarshalJSON() ([]byte, error)

func (*NullableBool) Set

func (v *NullableBool) Set(val *bool)

func (*NullableBool) UnmarshalJSON

func (v *NullableBool) UnmarshalJSON(src []byte) error

func (*NullableBool) Unset

func (v *NullableBool) Unset()

type NullableDeleteResponse added in v1.0.1

type NullableDeleteResponse struct {
	// contains filtered or unexported fields
}

func NewNullableDeleteResponse added in v1.0.1

func NewNullableDeleteResponse(val *DeleteResponse) *NullableDeleteResponse

func (NullableDeleteResponse) Get added in v1.0.1

func (NullableDeleteResponse) IsSet added in v1.0.1

func (v NullableDeleteResponse) IsSet() bool

func (NullableDeleteResponse) MarshalJSON added in v1.0.1

func (v NullableDeleteResponse) MarshalJSON() ([]byte, error)

func (*NullableDeleteResponse) Set added in v1.0.1

func (*NullableDeleteResponse) UnmarshalJSON added in v1.0.1

func (v *NullableDeleteResponse) UnmarshalJSON(src []byte) error

func (*NullableDeleteResponse) Unset added in v1.0.1

func (v *NullableDeleteResponse) Unset()

type NullableError

type NullableError struct {
	// contains filtered or unexported fields
}

func NewNullableError

func NewNullableError(val *Error) *NullableError

func (NullableError) Get

func (v NullableError) Get() *Error

func (NullableError) IsSet

func (v NullableError) IsSet() bool

func (NullableError) MarshalJSON

func (v NullableError) MarshalJSON() ([]byte, error)

func (*NullableError) Set

func (v *NullableError) Set(val *Error)

func (*NullableError) UnmarshalJSON

func (v *NullableError) UnmarshalJSON(src []byte) error

func (*NullableError) Unset

func (v *NullableError) Unset()

type NullableErrorMessages

type NullableErrorMessages struct {
	// contains filtered or unexported fields
}

func NewNullableErrorMessages

func NewNullableErrorMessages(val *ErrorMessages) *NullableErrorMessages

func (NullableErrorMessages) Get

func (NullableErrorMessages) IsSet

func (v NullableErrorMessages) IsSet() bool

func (NullableErrorMessages) MarshalJSON

func (v NullableErrorMessages) MarshalJSON() ([]byte, error)

func (*NullableErrorMessages) Set

func (v *NullableErrorMessages) Set(val *ErrorMessages)

func (*NullableErrorMessages) UnmarshalJSON

func (v *NullableErrorMessages) UnmarshalJSON(src []byte) error

func (*NullableErrorMessages) Unset

func (v *NullableErrorMessages) Unset()

type NullableFloat32

type NullableFloat32 struct {
	// contains filtered or unexported fields
}

func NewNullableFloat32

func NewNullableFloat32(val *float32) *NullableFloat32

func (NullableFloat32) Get

func (v NullableFloat32) Get() *float32

func (NullableFloat32) IsSet

func (v NullableFloat32) IsSet() bool

func (NullableFloat32) MarshalJSON

func (v NullableFloat32) MarshalJSON() ([]byte, error)

func (*NullableFloat32) Set

func (v *NullableFloat32) Set(val *float32)

func (*NullableFloat32) UnmarshalJSON

func (v *NullableFloat32) UnmarshalJSON(src []byte) error

func (*NullableFloat32) Unset

func (v *NullableFloat32) Unset()

type NullableFloat64

type NullableFloat64 struct {
	// contains filtered or unexported fields
}

func NewNullableFloat64

func NewNullableFloat64(val *float64) *NullableFloat64

func (NullableFloat64) Get

func (v NullableFloat64) Get() *float64

func (NullableFloat64) IsSet

func (v NullableFloat64) IsSet() bool

func (NullableFloat64) MarshalJSON

func (v NullableFloat64) MarshalJSON() ([]byte, error)

func (*NullableFloat64) Set

func (v *NullableFloat64) Set(val *float64)

func (*NullableFloat64) UnmarshalJSON

func (v *NullableFloat64) UnmarshalJSON(src []byte) error

func (*NullableFloat64) Unset

func (v *NullableFloat64) Unset()

type NullableInt

type NullableInt struct {
	// contains filtered or unexported fields
}

func NewNullableInt

func NewNullableInt(val *int) *NullableInt

func (NullableInt) Get

func (v NullableInt) Get() *int

func (NullableInt) IsSet

func (v NullableInt) IsSet() bool

func (NullableInt) MarshalJSON

func (v NullableInt) MarshalJSON() ([]byte, error)

func (*NullableInt) Set

func (v *NullableInt) Set(val *int)

func (*NullableInt) UnmarshalJSON

func (v *NullableInt) UnmarshalJSON(src []byte) error

func (*NullableInt) Unset

func (v *NullableInt) Unset()

type NullableInt32

type NullableInt32 struct {
	// contains filtered or unexported fields
}

func NewNullableInt32

func NewNullableInt32(val *int32) *NullableInt32

func (NullableInt32) Get

func (v NullableInt32) Get() *int32

func (NullableInt32) IsSet

func (v NullableInt32) IsSet() bool

func (NullableInt32) MarshalJSON

func (v NullableInt32) MarshalJSON() ([]byte, error)

func (*NullableInt32) Set

func (v *NullableInt32) Set(val *int32)

func (*NullableInt32) UnmarshalJSON

func (v *NullableInt32) UnmarshalJSON(src []byte) error

func (*NullableInt32) Unset

func (v *NullableInt32) Unset()

type NullableInt64

type NullableInt64 struct {
	// contains filtered or unexported fields
}

func NewNullableInt64

func NewNullableInt64(val *int64) *NullableInt64

func (NullableInt64) Get

func (v NullableInt64) Get() *int64

func (NullableInt64) IsSet

func (v NullableInt64) IsSet() bool

func (NullableInt64) MarshalJSON

func (v NullableInt64) MarshalJSON() ([]byte, error)

func (*NullableInt64) Set

func (v *NullableInt64) Set(val *int64)

func (*NullableInt64) UnmarshalJSON

func (v *NullableInt64) UnmarshalJSON(src []byte) error

func (*NullableInt64) Unset

func (v *NullableInt64) Unset()

type NullableJwt

type NullableJwt struct {
	// contains filtered or unexported fields
}

func NewNullableJwt

func NewNullableJwt(val *Jwt) *NullableJwt

func (NullableJwt) Get

func (v NullableJwt) Get() *Jwt

func (NullableJwt) IsSet

func (v NullableJwt) IsSet() bool

func (NullableJwt) MarshalJSON

func (v NullableJwt) MarshalJSON() ([]byte, error)

func (*NullableJwt) Set

func (v *NullableJwt) Set(val *Jwt)

func (*NullableJwt) UnmarshalJSON

func (v *NullableJwt) UnmarshalJSON(src []byte) error

func (*NullableJwt) Unset

func (v *NullableJwt) Unset()

type NullableString

type NullableString struct {
	// contains filtered or unexported fields
}

func NewNullableString

func NewNullableString(val *string) *NullableString

func (NullableString) Get

func (v NullableString) Get() *string

func (NullableString) IsSet

func (v NullableString) IsSet() bool

func (NullableString) MarshalJSON

func (v NullableString) MarshalJSON() ([]byte, error)

func (*NullableString) Set

func (v *NullableString) Set(val *string)

func (*NullableString) UnmarshalJSON

func (v *NullableString) UnmarshalJSON(src []byte) error

func (*NullableString) Unset

func (v *NullableString) Unset()

type NullableTime

type NullableTime struct {
	// contains filtered or unexported fields
}

func NewNullableTime

func NewNullableTime(val *time.Time) *NullableTime

func (NullableTime) Get

func (v NullableTime) Get() *time.Time

func (NullableTime) IsSet

func (v NullableTime) IsSet() bool

func (NullableTime) MarshalJSON

func (v NullableTime) MarshalJSON() ([]byte, error)

func (*NullableTime) Set

func (v *NullableTime) Set(val *time.Time)

func (*NullableTime) UnmarshalJSON

func (v *NullableTime) UnmarshalJSON(src []byte) error

func (*NullableTime) Unset

func (v *NullableTime) Unset()

type NullableToken

type NullableToken struct {
	// contains filtered or unexported fields
}

func NewNullableToken

func NewNullableToken(val *Token) *NullableToken

func (NullableToken) Get

func (v NullableToken) Get() *Token

func (NullableToken) IsSet

func (v NullableToken) IsSet() bool

func (NullableToken) MarshalJSON

func (v NullableToken) MarshalJSON() ([]byte, error)

func (*NullableToken) Set

func (v *NullableToken) Set(val *Token)

func (*NullableToken) UnmarshalJSON

func (v *NullableToken) UnmarshalJSON(src []byte) error

func (*NullableToken) Unset

func (v *NullableToken) Unset()

type NullableTokens

type NullableTokens struct {
	// contains filtered or unexported fields
}

func NewNullableTokens

func NewNullableTokens(val *Tokens) *NullableTokens

func (NullableTokens) Get

func (v NullableTokens) Get() *Tokens

func (NullableTokens) IsSet

func (v NullableTokens) IsSet() bool

func (NullableTokens) MarshalJSON

func (v NullableTokens) MarshalJSON() ([]byte, error)

func (*NullableTokens) Set

func (v *NullableTokens) Set(val *Tokens)

func (*NullableTokens) UnmarshalJSON

func (v *NullableTokens) UnmarshalJSON(src []byte) error

func (*NullableTokens) Unset

func (v *NullableTokens) Unset()

type ServerConfiguration

type ServerConfiguration struct {
	URL         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerConfigurations

type ServerConfigurations []ServerConfiguration

ServerConfigurations stores multiple ServerConfiguration items

func (ServerConfigurations) URL

func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error)

URL formats template on a index using given variables

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type TLSDial added in v1.0.7

type TLSDial func(ctx context.Context, network, addr string) (net.Conn, error)

TLSDial can be assigned to a http.Transport's DialTLS field.

type Token

type Token struct {
	// Identifier of the token.
	Id *string `json:"id"`
	// Hypertext REFerence for the specified token.
	Href *string `json:"href"`
	// The date the token was generated.
	CreatedDate *string `json:"createdDate"`
	// The date the token will expire.
	ExpirationDate *string `json:"expirationDate"`
}

Token struct for Token

func NewToken added in v1.0.7

func NewToken(id string, href string, createdDate string, expirationDate string) *Token

NewToken instantiates a new Token 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

func NewTokenWithDefaults added in v1.0.7

func NewTokenWithDefaults() *Token

NewTokenWithDefaults instantiates a new Token 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

func (*Token) GetCreatedDate

func (o *Token) GetCreatedDate() *string

GetCreatedDate returns the CreatedDate field value If the value is explicit nil, the zero value for string will be returned

func (*Token) GetCreatedDateOk

func (o *Token) GetCreatedDateOk() (*string, bool)

GetCreatedDateOk returns a tuple with the CreatedDate field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*Token) GetExpirationDate

func (o *Token) GetExpirationDate() *string

GetExpirationDate returns the ExpirationDate field value If the value is explicit nil, the zero value for string will be returned

func (*Token) GetExpirationDateOk

func (o *Token) GetExpirationDateOk() (*string, bool)

GetExpirationDateOk returns a tuple with the ExpirationDate field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*Token) GetHref

func (o *Token) GetHref() *string

GetHref returns the Href field value If the value is explicit nil, the zero value for string will be returned

func (*Token) GetHrefOk

func (o *Token) GetHrefOk() (*string, bool)

GetHrefOk returns a tuple with the Href field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*Token) GetId

func (o *Token) GetId() *string

GetId returns the Id field value If the value is explicit nil, the zero value for string will be returned

func (*Token) GetIdOk

func (o *Token) GetIdOk() (*string, bool)

GetIdOk returns a tuple with the Id field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*Token) HasCreatedDate

func (o *Token) HasCreatedDate() bool

HasCreatedDate returns a boolean if a field has been set.

func (*Token) HasExpirationDate

func (o *Token) HasExpirationDate() bool

HasExpirationDate returns a boolean if a field has been set.

func (*Token) HasHref

func (o *Token) HasHref() bool

HasHref returns a boolean if a field has been set.

func (*Token) HasId

func (o *Token) HasId() bool

HasId returns a boolean if a field has been set.

func (Token) MarshalJSON

func (o Token) MarshalJSON() ([]byte, error)

func (*Token) SetCreatedDate

func (o *Token) SetCreatedDate(v string)

SetCreatedDate sets field value

func (*Token) SetExpirationDate

func (o *Token) SetExpirationDate(v string)

SetExpirationDate sets field value

func (*Token) SetHref

func (o *Token) SetHref(v string)

SetHref sets field value

func (*Token) SetId

func (o *Token) SetId(v string)

SetId sets field value

type Tokens

type Tokens struct {
	// Array of items in that collection.
	Tokens *[]Token `json:"tokens,omitempty"`
}

Tokens struct for Tokens

func NewTokens added in v1.0.7

func NewTokens() *Tokens

NewTokens instantiates a new Tokens 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

func NewTokensWithDefaults added in v1.0.7

func NewTokensWithDefaults() *Tokens

NewTokensWithDefaults instantiates a new Tokens 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

func (*Tokens) GetTokens

func (o *Tokens) GetTokens() *[]Token

GetTokens returns the Tokens field value If the value is explicit nil, the zero value for []Token will be returned

func (*Tokens) GetTokensOk

func (o *Tokens) GetTokensOk() (*[]Token, bool)

GetTokensOk returns a tuple with the Tokens field value and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*Tokens) HasTokens

func (o *Tokens) HasTokens() bool

HasTokens returns a boolean if a field has been set.

func (Tokens) MarshalJSON

func (o Tokens) MarshalJSON() ([]byte, error)

func (*Tokens) SetTokens

func (o *Tokens) SetTokens(v []Token)

SetTokens sets field value

type TokensApiService added in v1.0.2

type TokensApiService service

TokensApiService TokensApi service

func (*TokensApiService) TokensDeleteByCriteria added in v1.0.2

func (a *TokensApiService) TokensDeleteByCriteria(ctx _context.Context) ApiTokensDeleteByCriteriaRequest

* TokensDeleteByCriteria Delete tokens by criteria * Delete one or multiple tokens by the required `criteria` parameter values: `ALL`, `EXPIRED` and `CURRENT`. With parameter values `ALL` and `EXPIRED`, 'Basic Authentication' or 'Token Authentication' tokens with valid credentials must be encapsulated in the header. With value `CURRENT`, only the 'Token Authentication' with valid credentials is required. Users with multiple contracts must also provide a valid contract number in the `X-Contract-Number` header. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiTokensDeleteByCriteriaRequest

func (*TokensApiService) TokensDeleteByCriteriaExecute added in v1.0.2

func (a *TokensApiService) TokensDeleteByCriteriaExecute(r ApiTokensDeleteByCriteriaRequest) (DeleteResponse, *APIResponse, error)

* Execute executes the request * @return DeleteResponse

func (*TokensApiService) TokensDeleteById added in v1.0.2

func (a *TokensApiService) TokensDeleteById(ctx _context.Context, tokenId string) ApiTokensDeleteByIdRequest

* TokensDeleteById Delete tokens * Delete a token by Key ID (`tokenId`). To access the endpoint, 'Basic Authentication' or 'Token Authentication' tokens with valid credentials must be encapsulated in the header. Users with multiple contracts must also provide a valid contract number in the `X-Contract-Number` header. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param tokenId The Key ID of the token (can be retrieved from the header section of the token). * @return ApiTokensDeleteByIdRequest

func (*TokensApiService) TokensDeleteByIdExecute added in v1.0.2

func (a *TokensApiService) TokensDeleteByIdExecute(r ApiTokensDeleteByIdRequest) (DeleteResponse, *APIResponse, error)

* Execute executes the request * @return DeleteResponse

func (*TokensApiService) TokensFindById added in v1.0.2

func (a *TokensApiService) TokensFindById(ctx _context.Context, tokenId string) ApiTokensFindByIdRequest

* TokensFindById Get tokens by Key ID * Retrieve the details for a token by the Key ID (`tokenId`). To access this endpoint, 'Basic Authentication' or 'Token Authentication' tokens with valid credentials must be encapsulated in the header. Users with multiple contracts must also provide a valid contract number in the `X-Contract-Number` header. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param tokenId The Key ID of the token (can be retrieved from the header section of the token). * @return ApiTokensFindByIdRequest

func (*TokensApiService) TokensFindByIdExecute added in v1.0.2

func (a *TokensApiService) TokensFindByIdExecute(r ApiTokensFindByIdRequest) (Token, *APIResponse, error)

* Execute executes the request * @return Token

func (*TokensApiService) TokensGenerate added in v1.0.2

  • TokensGenerate Create new tokens
  • Users can generate new tokens ([JWT](https://jwt.io/) or [JSON Web Token](https://tools.ietf.org/html/rfc7519)). By default, new tokens are linked to the user’s contract. Users with multiple contracts must provide the contract number, for which the token is generated, in the `X-Contract-Number` header; otherwise, an error response is returned.

To access this endpoint, 'Basic Authentication' or 'Token Authentication' tokens with valid credentials must be encapsulated in the header, by users with one or with multiple contracts.

The response will contain a newly-generated token for accessing any IONOS Cloud APIs (Auth API, Cloud API, Reseller API, Activity Log API, and others). The token can be used to access the APIs without providing the contract number in the `X-Contract-Number` header, by users with one or with multiple contracts. However, a valid contract number must be provided in the `X-Contract-Number` header to access the Auth API. By default, generated access tokens will expire after one year (subject to change).

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @return ApiTokensGenerateRequest

func (*TokensApiService) TokensGenerateExecute added in v1.0.2

func (a *TokensApiService) TokensGenerateExecute(r ApiTokensGenerateRequest) (Jwt, *APIResponse, error)

* Execute executes the request * @return Jwt

func (*TokensApiService) TokensGet added in v1.0.2

* TokensGet List all tokens * List the details of all tokens, generated by the user. To access this endpoint, 'Basic Authentication' or 'Token Authentication' tokens with valid credentials must be encapsulated in the header. Users with multiple contracts must also provide a valid contract number in the `X-Contract-Number` header. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return ApiTokensGetRequest

func (*TokensApiService) TokensGetExecute added in v1.0.2

func (a *TokensApiService) TokensGetExecute(r ApiTokensGetRequest) (Tokens, *APIResponse, error)

* Execute executes the request * @return Tokens

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL