firewallrule

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 GenerateCreateFirewallRuleInput

func GenerateCreateFirewallRuleInput(cr *v1alpha1.FirewallRule, sourceIP, targetIP string) (*sdkgo.FirewallRule, error)

GenerateCreateFirewallRuleInput returns sdkgo.FirewallRule based on the CR spec

func GenerateUpdateFirewallRuleInput

func GenerateUpdateFirewallRuleInput(cr *v1alpha1.FirewallRule, sourceIP, targetIP string) (*sdkgo.FirewallruleProperties, error)

GenerateUpdateFirewallRuleInput returns sdkgo.FirewallRuleProperties based on the CR spec modifications

func IsFirewallRuleUpToDate

func IsFirewallRuleUpToDate(cr *v1alpha1.FirewallRule, firewallRule sdkgo.FirewallRule, sourceIP, targetIP string) bool

IsFirewallRuleUpToDate returns true if the FirewallRule 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) CheckDuplicateFirewallRule

func (cp *APIClient) CheckDuplicateFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleName, protocol string) (*sdkgo.FirewallRule, error)

CheckDuplicateFirewallRule based on firewallRuleName, and the immutable property protocol

func (*APIClient) CreateFirewallRule

func (cp *APIClient) CreateFirewallRule(ctx context.Context, datacenterID, serverID, nicID string, firewallRule sdkgo.FirewallRule) (sdkgo.FirewallRule, *sdkgo.APIResponse, error)

CreateFirewallRule based on FirewallRule properties

func (*APIClient) DeleteFirewallRule

func (cp *APIClient) DeleteFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleID string) (*sdkgo.APIResponse, error)

DeleteFirewallRule based on firewallRuleID

func (*APIClient) GetAPIClient

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

GetAPIClient gets the APIClient

func (*APIClient) GetFirewallRule

func (cp *APIClient) GetFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleID string) (sdkgo.FirewallRule, *sdkgo.APIResponse, error)

GetFirewallRule based on firewallRuleID

func (*APIClient) GetFirewallRuleID

func (cp *APIClient) GetFirewallRuleID(firewallRule *sdkgo.FirewallRule) (string, error)

GetFirewallRuleID based on FirewallRule

func (*APIClient) UpdateFirewallRule

func (cp *APIClient) UpdateFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleID string, firewallRule sdkgo.FirewallruleProperties) (sdkgo.FirewallRule, *sdkgo.APIResponse, error)

UpdateFirewallRule based on firewallRuleID and FirewallRule properties

type Client

type Client interface {
	CheckDuplicateFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleName, protocol string) (*sdkgo.FirewallRule, error)
	GetFirewallRuleID(firewallRule *sdkgo.FirewallRule) (string, error)
	GetFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleID string) (sdkgo.FirewallRule, *sdkgo.APIResponse, error)
	CreateFirewallRule(ctx context.Context, datacenterID, serverID, nicID string, firewallRule sdkgo.FirewallRule) (sdkgo.FirewallRule, *sdkgo.APIResponse, error)
	UpdateFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleID string, firewallRule sdkgo.FirewallruleProperties) (sdkgo.FirewallRule, *sdkgo.APIResponse, error)
	DeleteFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleID string) (*sdkgo.APIResponse, error)
	GetAPIClient() *sdkgo.APIClient
}

Client is a wrapper around IONOS Service FirewallRule methods

Jump to

Keyboard shortcuts

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