ipblock

package
v0.3.7-test Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreateIPBlockInput

func GenerateCreateIPBlockInput(cr *v1alpha1.IPBlock) (*sdkgo.IpBlock, error)

GenerateCreateIPBlockInput returns IpBlock based on the CR spec

func GenerateUpdateIPBlockInput

func GenerateUpdateIPBlockInput(cr *v1alpha1.IPBlock) (*sdkgo.IpBlockProperties, error)

GenerateUpdateIPBlockInput returns IpBlockProperties based on the CR spec modifications

func IsIPBlockUpToDate

func IsIPBlockUpToDate(cr *v1alpha1.IPBlock, ipBlock sdkgo.IpBlock) bool

IsIPBlockUpToDate returns true if the IPBlock is up-to-date or false if it does not

func LateStatusInitializer

func LateStatusInitializer(in *v1alpha1.IPBlockObservation, sg *sdkgo.IpBlock)

LateStatusInitializer fills the empty fields in *v1alpha1.IPBlockObservation with the values seen in sdkgo.IpBlockProperties.

Types

type APIClient

type APIClient struct {
	*clients.IonosServices
}

APIClient is a wrapper around IONOS Service

func (*APIClient) CheckDuplicateIPBlock

func (cp *APIClient) CheckDuplicateIPBlock(ctx context.Context, ipBlockName, location string) (*sdkgo.IpBlock, error)

CheckDuplicateIPBlock based on ipBlockName, and the immutable property location

func (*APIClient) CreateIPBlock

func (cp *APIClient) CreateIPBlock(ctx context.Context, ipBlock sdkgo.IpBlock) (sdkgo.IpBlock, *sdkgo.APIResponse, error)

CreateIPBlock based on IPBlock properties

func (*APIClient) DeleteIPBlock

func (cp *APIClient) DeleteIPBlock(ctx context.Context, ipBlockID string) (*sdkgo.APIResponse, error)

DeleteIPBlock based on ipBlockID

func (*APIClient) GetAPIClient

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

GetAPIClient gets the APIClient

func (*APIClient) GetIPBlock

func (cp *APIClient) GetIPBlock(ctx context.Context, ipBlockID string) (sdkgo.IpBlock, *sdkgo.APIResponse, error)

GetIPBlock based on ipBlockID

func (*APIClient) GetIPBlockID

func (cp *APIClient) GetIPBlockID(ipBlock *sdkgo.IpBlock) (string, error)

GetIPBlockID based on ipBlock

func (*APIClient) GetIPs

func (cp *APIClient) GetIPs(ctx context.Context, ipBlockID string, indexes ...int) ([]string, error)

GetIPs based on ipBlockID and indexes (optional argument). If indexes (0-indexes) are not set, all IPs will be returned.

func (*APIClient) UpdateIPBlock

func (cp *APIClient) UpdateIPBlock(ctx context.Context, ipBlockID string, ipBlock sdkgo.IpBlockProperties) (sdkgo.IpBlock, *sdkgo.APIResponse, error)

UpdateIPBlock based on ipBlockID and IPBlock properties

type Client

type Client interface {
	CheckDuplicateIPBlock(ctx context.Context, ipBlockName, location string) (*sdkgo.IpBlock, error)
	GetIPBlockID(ipBlock *sdkgo.IpBlock) (string, error)
	GetIPBlock(ctx context.Context, ipBlockID string) (sdkgo.IpBlock, *sdkgo.APIResponse, error)
	CreateIPBlock(ctx context.Context, ipBlock sdkgo.IpBlock) (sdkgo.IpBlock, *sdkgo.APIResponse, error)
	UpdateIPBlock(ctx context.Context, ipBlockID string, ipBlock sdkgo.IpBlockProperties) (sdkgo.IpBlock, *sdkgo.APIResponse, error)
	DeleteIPBlock(ctx context.Context, ipBlockID string) (*sdkgo.APIResponse, error)
	GetIPs(ctx context.Context, ipBlockID string, indexes ...int) ([]string, error)
	GetAPIClient() *sdkgo.APIClient
}

Client is a wrapper around IONOS Service IPBlock methods

Jump to

Keyboard shortcuts

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