Documentation ¶
Index ¶
- func GenerateCreateIPBlockInput(cr *v1alpha1.IPBlock) (*sdkgo.IpBlock, error)
- func GenerateUpdateIPBlockInput(cr *v1alpha1.IPBlock) (*sdkgo.IpBlockProperties, error)
- func IsIPBlockUpToDate(cr *v1alpha1.IPBlock, ipBlock sdkgo.IpBlock) bool
- func LateStatusInitializer(in *v1alpha1.IPBlockObservation, sg *sdkgo.IpBlock)
- type APIClient
- func (cp *APIClient) CheckDuplicateIPBlock(ctx context.Context, ipBlockName, location string) (*sdkgo.IpBlock, error)
- func (cp *APIClient) CreateIPBlock(ctx context.Context, ipBlock sdkgo.IpBlock) (sdkgo.IpBlock, *sdkgo.APIResponse, error)
- func (cp *APIClient) DeleteIPBlock(ctx context.Context, ipBlockID string) (*sdkgo.APIResponse, error)
- func (cp *APIClient) GetAPIClient() *sdkgo.APIClient
- func (cp *APIClient) GetIPBlock(ctx context.Context, ipBlockID string) (sdkgo.IpBlock, *sdkgo.APIResponse, error)
- func (cp *APIClient) GetIPBlockID(ipBlock *sdkgo.IpBlock) (string, error)
- func (cp *APIClient) GetIPs(ctx context.Context, ipBlockID string, indexes ...int) ([]string, error)
- func (cp *APIClient) UpdateIPBlock(ctx context.Context, ipBlockID string, ipBlock sdkgo.IpBlockProperties) (sdkgo.IpBlock, *sdkgo.APIResponse, error)
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCreateIPBlockInput ¶
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 ¶
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 ¶
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 ¶
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