Documentation ¶
Index ¶
- func GenerateCreateIPFailoverInput(ipFailovers []sdkgo.IPFailover, ip, nicID string) (*sdkgo.LanProperties, error)
- func GenerateCreateLanInput(cr *v1alpha1.Lan) (*sdkgo.LanPost, error)
- func GenerateRemoveIPFailoverInput(ipFailovers []sdkgo.IPFailover, ip string) (*sdkgo.LanProperties, error)
- func GenerateUpdateIPFailoverInput(ipFailovers []sdkgo.IPFailover, newIP, oldIP, nicID string) (*sdkgo.LanProperties, error)
- func GenerateUpdateLanInput(cr *v1alpha1.Lan) (*sdkgo.LanProperties, error)
- func GetIPFailoverIPs(lan sdkgo.Lan) []string
- func IsIPFailoverPresent(ipFailovers []sdkgo.IPFailover, ip, nicID string) bool
- func IsIPFailoverUpToDate(cr *v1alpha1.IPFailover, lanIPFailovers []sdkgo.IPFailover, ipSetByUser string) bool
- func IsLanUpToDate(cr *v1alpha1.Lan, lan sdkgo.Lan) bool
- type APIClient
- func (cp *APIClient) CreateLan(ctx context.Context, datacenterID string, lan sdkgo.LanPost) (sdkgo.LanPost, *sdkgo.APIResponse, error)
- func (cp *APIClient) DeleteLan(ctx context.Context, datacenterID, lanID string) (*sdkgo.APIResponse, error)
- func (cp *APIClient) GetAPIClient() *sdkgo.APIClient
- func (cp *APIClient) GetLan(ctx context.Context, datacenterID, lanID string) (sdkgo.Lan, *sdkgo.APIResponse, error)
- func (cp *APIClient) GetLanIPFailovers(ctx context.Context, datacenterID, lanID string) ([]sdkgo.IPFailover, error)
- func (cp *APIClient) UpdateLan(ctx context.Context, datacenterID, lanID string, lan sdkgo.LanProperties) (sdkgo.Lan, *sdkgo.APIResponse, error)
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCreateIPFailoverInput ¶
func GenerateCreateIPFailoverInput(ipFailovers []sdkgo.IPFailover, ip, nicID string) (*sdkgo.LanProperties, error)
GenerateCreateIPFailoverInput returns sdkgo.LanProperties based on ip, nicID and current IPFailovers
func GenerateCreateLanInput ¶
GenerateCreateLanInput returns sdkgo.LanPost based on the CR spec
func GenerateRemoveIPFailoverInput ¶
func GenerateRemoveIPFailoverInput(ipFailovers []sdkgo.IPFailover, ip string) (*sdkgo.LanProperties, error)
GenerateRemoveIPFailoverInput returns sdkgo.LanProperties based on the ip and the current IPFailovers
func GenerateUpdateIPFailoverInput ¶
func GenerateUpdateIPFailoverInput(ipFailovers []sdkgo.IPFailover, newIP, oldIP, nicID string) (*sdkgo.LanProperties, error)
GenerateUpdateIPFailoverInput returns sdkgo.LanProperties based on the new IP, old IP and nicID set by the user and the current IPFailovers
func GenerateUpdateLanInput ¶
func GenerateUpdateLanInput(cr *v1alpha1.Lan) (*sdkgo.LanProperties, error)
GenerateUpdateLanInput returns sdkgo.LanProperties based on the CR spec modifications
func GetIPFailoverIPs ¶
GetIPFailoverIPs returns all the IPFailovers IPs set on Lan
func IsIPFailoverPresent ¶
func IsIPFailoverPresent(ipFailovers []sdkgo.IPFailover, ip, nicID string) bool
IsIPFailoverPresent returns true if the IPFailover exists in the specified Lan
func IsIPFailoverUpToDate ¶
func IsIPFailoverUpToDate(cr *v1alpha1.IPFailover, lanIPFailovers []sdkgo.IPFailover, ipSetByUser string) bool
IsIPFailoverUpToDate returns true if the IPFailover 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) CreateLan ¶
func (cp *APIClient) CreateLan(ctx context.Context, datacenterID string, lan sdkgo.LanPost) (sdkgo.LanPost, *sdkgo.APIResponse, error)
CreateLan based on datacenterID and Lan properties
func (*APIClient) DeleteLan ¶
func (cp *APIClient) DeleteLan(ctx context.Context, datacenterID, lanID string) (*sdkgo.APIResponse, error)
DeleteLan based on datacenterID, lanID
func (*APIClient) GetAPIClient ¶
GetAPIClient gets the APIClient
func (*APIClient) GetLan ¶
func (cp *APIClient) GetLan(ctx context.Context, datacenterID, lanID string) (sdkgo.Lan, *sdkgo.APIResponse, error)
GetLan based on datacenterID, lanID
func (*APIClient) GetLanIPFailovers ¶
func (cp *APIClient) GetLanIPFailovers(ctx context.Context, datacenterID, lanID string) ([]sdkgo.IPFailover, error)
GetLanIPFailovers based on datacenterID, lanID
type Client ¶
type Client interface { GetLan(ctx context.Context, datacenterID, lanID string) (sdkgo.Lan, *sdkgo.APIResponse, error) GetLanIPFailovers(ctx context.Context, datacenterID, lanID string) ([]sdkgo.IPFailover, error) CreateLan(ctx context.Context, datacenterID string, lan sdkgo.LanPost) (sdkgo.LanPost, *sdkgo.APIResponse, error) UpdateLan(ctx context.Context, datacenterID, lanID string, lan sdkgo.LanProperties) (sdkgo.Lan, *sdkgo.APIResponse, error) DeleteLan(ctx context.Context, datacenterID, lanID string) (*sdkgo.APIResponse, error) GetAPIClient() *sdkgo.APIClient }
Client is a wrapper around IONOS Service Lan methods