Documentation ¶
Index ¶
- func GenerateCreateFirewallRuleInput(cr *v1alpha1.FirewallRule, sourceIP, targetIP string) (*sdkgo.FirewallRule, error)
- func GenerateUpdateFirewallRuleInput(cr *v1alpha1.FirewallRule, sourceIP, targetIP string) (*sdkgo.FirewallruleProperties, error)
- func IsFirewallRuleUpToDate(cr *v1alpha1.FirewallRule, firewallRule sdkgo.FirewallRule, ...) bool
- type APIClient
- func (cp *APIClient) CheckDuplicateFirewallRule(ctx context.Context, ...) (*sdkgo.FirewallRule, error)
- func (cp *APIClient) CreateFirewallRule(ctx context.Context, datacenterID, serverID, nicID string, ...) (sdkgo.FirewallRule, *sdkgo.APIResponse, error)
- func (cp *APIClient) DeleteFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleID string) (*sdkgo.APIResponse, error)
- func (cp *APIClient) GetAPIClient() *sdkgo.APIClient
- func (cp *APIClient) GetFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleID string) (sdkgo.FirewallRule, *sdkgo.APIResponse, error)
- func (cp *APIClient) GetFirewallRuleID(firewallRule *sdkgo.FirewallRule) (string, error)
- func (cp *APIClient) UpdateFirewallRule(ctx context.Context, datacenterID, serverID, nicID, firewallRuleID string, ...) (sdkgo.FirewallRule, *sdkgo.APIResponse, error)
- type Client
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 ¶
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