backupunit

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreateBackupUnitInput

func GenerateCreateBackupUnitInput(cr *v1alpha1.BackupUnit) (*sdkgo.BackupUnit, error)

GenerateCreateBackupUnitInput returns BackupUnit based on the CR spec

func GenerateUpdateBackupUnitInput

func GenerateUpdateBackupUnitInput(cr *v1alpha1.BackupUnit) (*sdkgo.BackupUnitProperties, error)

GenerateUpdateBackupUnitInput returns BackupUnitProperties based on the CR spec modifications

func IsBackupUnitUpToDate

func IsBackupUnitUpToDate(cr *v1alpha1.BackupUnit, backupUnit sdkgo.BackupUnit) bool

IsBackupUnitUpToDate returns true if the BackupUnit 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) CheckDuplicateBackupUnit

func (cp *APIClient) CheckDuplicateBackupUnit(ctx context.Context, backupUnitName, email string) (*sdkgo.BackupUnit, error)

CheckDuplicateBackupUnit based on backupUnitName

func (*APIClient) CreateBackupUnit

func (cp *APIClient) CreateBackupUnit(ctx context.Context, backupUnit sdkgo.BackupUnit) (sdkgo.BackupUnit, *sdkgo.APIResponse, error)

CreateBackupUnit based on BackupUnit properties

func (*APIClient) DeleteBackupUnit

func (cp *APIClient) DeleteBackupUnit(ctx context.Context, backupUnitID string) (*sdkgo.APIResponse, error)

DeleteBackupUnit based on backupUnitID

func (*APIClient) GetAPIClient

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

GetAPIClient gets the APIClient

func (*APIClient) GetBackupUnit

func (cp *APIClient) GetBackupUnit(ctx context.Context, backupUnitID string) (sdkgo.BackupUnit, *sdkgo.APIResponse, error)

GetBackupUnit based on backupUnitID

func (*APIClient) GetBackupUnitID

func (cp *APIClient) GetBackupUnitID(backupUnit *sdkgo.BackupUnit) (string, error)

GetBackupUnitID based on backupUnit

func (*APIClient) GetBackupUnitIDByName

func (cp *APIClient) GetBackupUnitIDByName(ctx context.Context, backupUnitName string) (string, error)

GetBackupUnitIDByName returns BackupUnit with the name specified

func (*APIClient) GetBackupUnits

func (cp *APIClient) GetBackupUnits(ctx context.Context) (sdkgo.BackupUnits, *sdkgo.APIResponse, error)

GetBackupUnits returns all existing BackupUnits

func (*APIClient) UpdateBackupUnit

func (cp *APIClient) UpdateBackupUnit(ctx context.Context, backupUnitID string, backupUnit sdkgo.BackupUnitProperties) (sdkgo.BackupUnit, *sdkgo.APIResponse, error)

UpdateBackupUnit based on backupUnitID and BackupUnit properties

type Client

type Client interface {
	CheckDuplicateBackupUnit(ctx context.Context, backupUnitName, email string) (*sdkgo.BackupUnit, error)
	GetBackupUnitID(backupUnit *sdkgo.BackupUnit) (string, error)
	GetBackupUnit(ctx context.Context, backupUnitID string) (sdkgo.BackupUnit, *sdkgo.APIResponse, error)
	GetBackupUnits(ctx context.Context) (sdkgo.BackupUnits, *sdkgo.APIResponse, error)
	GetBackupUnitIDByName(ctx context.Context, backupUnitName string) (string, error)
	CreateBackupUnit(ctx context.Context, backupUnit sdkgo.BackupUnit) (sdkgo.BackupUnit, *sdkgo.APIResponse, error)
	UpdateBackupUnit(ctx context.Context, backupUnitID string, backupUnit sdkgo.BackupUnitProperties) (sdkgo.BackupUnit, *sdkgo.APIResponse, error)
	DeleteBackupUnit(ctx context.Context, backupUnitID string) (*sdkgo.APIResponse, error)
	GetAPIClient() *sdkgo.APIClient
}

Client is a wrapper around IONOS Service BackupUnit methods

Jump to

Keyboard shortcuts

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