postgrescluster

package
v1.0.0-beta.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

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

GetCluster based on clusterID

func (*ClusterAPIClient) UpdateCluster

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

Jump to

Keyboard shortcuts

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