Documentation ¶
Index ¶
- func GenerateCreateClusterInput(cr *v1alpha1.PostgresCluster) (*ionoscloud.CreateClusterRequest, error)
- func GenerateUpdateClusterInput(cr *v1alpha1.PostgresCluster) (*ionoscloud.PatchClusterRequest, error)
- func IsClusterUpToDate(cr *v1alpha1.PostgresCluster, clusterResponse ionoscloud.ClusterResponse) bool
- func LateInitializer(in *v1alpha1.ClusterParameters, sg *ionoscloud.ClusterResponse)
- type ClusterAPIClient
- func (cp *ClusterAPIClient) CreateCluster(ctx context.Context, cluster ionoscloud.CreateClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) DeleteCluster(ctx context.Context, clusterID string) (*ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) GetCluster(ctx context.Context, clusterID string) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) UpdateCluster(ctx context.Context, clusterID string, cluster ionoscloud.PatchClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error)
- type ClusterClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCreateClusterInput ¶
func GenerateCreateClusterInput(cr *v1alpha1.PostgresCluster) (*ionoscloud.CreateClusterRequest, error)
GenerateCreateClusterInput returns CreateClusterRequest based on the CR spec
func GenerateUpdateClusterInput ¶
func GenerateUpdateClusterInput(cr *v1alpha1.PostgresCluster) (*ionoscloud.PatchClusterRequest, error)
GenerateUpdateClusterInput returns PatchClusterRequest based on the CR spec modifications
func IsClusterUpToDate ¶
func IsClusterUpToDate(cr *v1alpha1.PostgresCluster, clusterResponse ionoscloud.ClusterResponse) bool
IsClusterUpToDate returns true if the cluster is up-to-date or false if it does not
func LateInitializer ¶
func LateInitializer(in *v1alpha1.ClusterParameters, sg *ionoscloud.ClusterResponse)
LateInitializer fills the empty fields in *v1alpha1.ClusterParameters with the values seen in ionoscloud.ClusterResponse.
Types ¶
type ClusterAPIClient ¶
type ClusterAPIClient struct {
*clients.IonosServices
}
ClusterAPIClient is a wrapper around IONOS Service DBaaS Postgres Cluster
func (*ClusterAPIClient) CreateCluster ¶
func (cp *ClusterAPIClient) CreateCluster(ctx context.Context, cluster ionoscloud.CreateClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error)
CreateCluster based on cluster properties
func (*ClusterAPIClient) DeleteCluster ¶
func (cp *ClusterAPIClient) DeleteCluster(ctx context.Context, clusterID string) (*ionoscloud.APIResponse, error)
DeleteCluster based on clusterID
func (*ClusterAPIClient) GetCluster ¶
func (cp *ClusterAPIClient) GetCluster(ctx context.Context, clusterID string) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error)
GetCluster based on clusterID
func (*ClusterAPIClient) UpdateCluster ¶
func (cp *ClusterAPIClient) UpdateCluster(ctx context.Context, clusterID string, cluster ionoscloud.PatchClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error)
UpdateCluster based on clusterID and cluster properties
type ClusterClient ¶
type ClusterClient interface { GetCluster(ctx context.Context, clusterID string) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error) DeleteCluster(ctx context.Context, clusterID string) (*ionoscloud.APIResponse, error) CreateCluster(ctx context.Context, cluster ionoscloud.CreateClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error) UpdateCluster(ctx context.Context, clusterID string, cluster ionoscloud.PatchClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error) }
ClusterClient is a wrapper around IONOS Service DBaaS Postgres Cluster methods