datacenter

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreateDatacenterInput

func GenerateCreateDatacenterInput(cr *v1alpha1.Datacenter) (*sdkgo.Datacenter, error)

GenerateCreateDatacenterInput returns sdkgo.Datacenter based on the CR spec

func GenerateUpdateDatacenterInput

func GenerateUpdateDatacenterInput(cr *v1alpha1.Datacenter) (*sdkgo.DatacenterProperties, error)

GenerateUpdateDatacenterInput returns sdkgo.DatacenterProperties based on the CR spec modifications

func IsDatacenterUpToDate

func IsDatacenterUpToDate(cr *v1alpha1.Datacenter, datacenter sdkgo.Datacenter) bool

IsDatacenterUpToDate returns true if the Datacenter is up-to-date or false if it does not

Types

type APIClient

type APIClient struct {
	*clients.IonosServices
}

APIClient is a wrapper around IONOS Service

func (*APIClient) CreateDatacenter

func (cp *APIClient) CreateDatacenter(ctx context.Context, datacenter sdkgo.Datacenter) (sdkgo.Datacenter, *sdkgo.APIResponse, error)

CreateDatacenter based on Datacenter properties

func (*APIClient) DeleteDatacenter

func (cp *APIClient) DeleteDatacenter(ctx context.Context, datacenterID string) (*sdkgo.APIResponse, error)

DeleteDatacenter based on datacenterID

func (*APIClient) GetAPIClient

func (cp *APIClient) GetAPIClient() *sdkgo.APIClient

GetAPIClient gets the APIClient

func (*APIClient) GetCPUFamiliesForDatacenter

func (cp *APIClient) GetCPUFamiliesForDatacenter(ctx context.Context, datacenterID string) ([]string, error)

GetCPUFamiliesForDatacenter based on datacenterID

func (*APIClient) GetDatacenter

func (cp *APIClient) GetDatacenter(ctx context.Context, datacenterID string) (sdkgo.Datacenter, *sdkgo.APIResponse, error)

GetDatacenter based on datacenterID

func (*APIClient) UpdateDatacenter

func (cp *APIClient) UpdateDatacenter(ctx context.Context, datacenterID string, datacenter sdkgo.DatacenterProperties) (sdkgo.Datacenter, *sdkgo.APIResponse, error)

UpdateDatacenter based on datacenterID and Datacenter properties

type Client

type Client interface {
	GetDatacenter(ctx context.Context, datacenterID string) (sdkgo.Datacenter, *sdkgo.APIResponse, error)
	CreateDatacenter(ctx context.Context, datacenter sdkgo.Datacenter) (sdkgo.Datacenter, *sdkgo.APIResponse, error)
	UpdateDatacenter(ctx context.Context, datacenterID string, datacenter sdkgo.DatacenterProperties) (sdkgo.Datacenter, *sdkgo.APIResponse, error)
	DeleteDatacenter(ctx context.Context, datacenterID string) (*sdkgo.APIResponse, error)
	GetCPUFamiliesForDatacenter(ctx context.Context, datacenterID string) ([]string, error)
	GetAPIClient() *sdkgo.APIClient
}

Client is a wrapper around IONOS Service Datacenter methods

Jump to

Keyboard shortcuts

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