volume

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreateVolumeInput

func GenerateCreateVolumeInput(cr *v1alpha1.Volume) (*sdkgo.Volume, error)

GenerateCreateVolumeInput returns sdkgo.Volume based on the CR spec

func GenerateUpdateVolumeInput

func GenerateUpdateVolumeInput(cr *v1alpha1.Volume, properties *sdkgo.VolumeProperties) (*sdkgo.VolumeProperties, error)

GenerateUpdateVolumeInput returns sdkgo.VolumeProperties based on the CR spec modifications

func IsVolumeUpToDate

func IsVolumeUpToDate(cr *v1alpha1.Volume, volume *sdkgo.Volume) bool

IsVolumeUpToDate returns true if the Volume 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) CreateVolume

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

CreateVolume based on Volume properties

func (*APIClient) DeleteVolume

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

DeleteVolume based on datacenterID, volumeID

func (*APIClient) GetAPIClient

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

GetAPIClient gets the APIClient

func (*APIClient) GetVolume

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

GetVolume based on datacenterID and volumeID

func (*APIClient) UpdateVolume

func (cp *APIClient) UpdateVolume(ctx context.Context, datacenterID, volumeID string, volume sdkgo.VolumeProperties) (sdkgo.Volume, *sdkgo.APIResponse, error)

UpdateVolume based on datacenterID, volumeID and Volume properties

type Client

type Client interface {
	GetVolume(ctx context.Context, datacenterID, volumeID string) (sdkgo.Volume, *sdkgo.APIResponse, error)
	CreateVolume(ctx context.Context, datacenterID string, volume sdkgo.Volume) (sdkgo.Volume, *sdkgo.APIResponse, error)
	UpdateVolume(ctx context.Context, datacenterID, volumeID string, volume sdkgo.VolumeProperties) (sdkgo.Volume, *sdkgo.APIResponse, error)
	DeleteVolume(ctx context.Context, datacenterID, volumeID string) (*sdkgo.APIResponse, error)
	GetAPIClient() *sdkgo.APIClient
}

Client is a wrapper around IONOS Service Volume methods

Jump to

Keyboard shortcuts

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