ipblock

package
v1.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 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) 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) 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 {
	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