Documentation ¶
Index ¶
- func GenerateCreateClusterInput(cr *v1alpha1.MongoCluster) (*ionoscloud.CreateClusterRequest, error)
- func GenerateCreateUserInput(cr *v1alpha1.MongoUser) *ionoscloud.User
- func GenerateUpdateClusterInput(cr *v1alpha1.MongoCluster) (*ionoscloud.PatchClusterRequest, error)
- func GenerateUpdateUserInput(cr *v1alpha1.MongoUser) (*ionoscloud.PatchUserRequest, error)
- func IsClusterUpToDate(cr *v1alpha1.MongoCluster, clusterResponse ionoscloud.ClusterResponse) bool
- func IsUserUpToDate(cr *v1alpha1.MongoUser, user ionoscloud.User) bool
- func LateInitializer(in *v1alpha1.ClusterParameters, sg *ionoscloud.ClusterResponse)
- type ClusterAPIClient
- func (cp *ClusterAPIClient) CheckDuplicateCluster(ctx context.Context, clusterName string, cr *v1alpha1.MongoCluster) (*ionoscloud.ClusterResponse, error)
- func (cp *ClusterAPIClient) CheckDuplicateUser(ctx context.Context, clusterID, userName string) (*ionoscloud.User, error)
- func (cp *ClusterAPIClient) CreateCluster(ctx context.Context, cluster ionoscloud.CreateClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) CreateUser(ctx context.Context, clusterID string, user ionoscloud.User) (ionoscloud.User, *ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) DeleteCluster(ctx context.Context, clusterID string) (*ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) DeleteUser(ctx context.Context, clusterID, userName string) (*ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) GetCluster(ctx context.Context, clusterID string) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) GetClusterID(cluster *ionoscloud.ClusterResponse) (string, error)
- func (cp *ClusterAPIClient) GetUser(ctx context.Context, clusterID, username string) (ionoscloud.User, *ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) PatchUser(ctx context.Context, clusterID, username string, ...) (ionoscloud.User, *ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) UpdateCluster(ctx context.Context, clusterID string, cluster ionoscloud.PatchClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error)
- func (cp *ClusterAPIClient) UpdateUser(ctx context.Context, clusterID, userName string, ...) (ionoscloud.User, *ionoscloud.APIResponse, error)
- type ClusterClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCreateClusterInput ¶
func GenerateCreateClusterInput(cr *v1alpha1.MongoCluster) (*ionoscloud.CreateClusterRequest, error)
GenerateCreateClusterInput returns CreateClusterRequest based on the CR spec
func GenerateCreateUserInput ¶
func GenerateCreateUserInput(cr *v1alpha1.MongoUser) *ionoscloud.User
GenerateCreateUserInput returns mongo User based on the CR spec
func GenerateUpdateClusterInput ¶
func GenerateUpdateClusterInput(cr *v1alpha1.MongoCluster) (*ionoscloud.PatchClusterRequest, error)
GenerateUpdateClusterInput returns PatchClusterRequest based on the CR spec modifications
func GenerateUpdateUserInput ¶
func GenerateUpdateUserInput(cr *v1alpha1.MongoUser) (*ionoscloud.PatchUserRequest, error)
GenerateUpdateUserInput returns PatchClusterRequest based on the CR spec modifications
func IsClusterUpToDate ¶
func IsClusterUpToDate(cr *v1alpha1.MongoCluster, clusterResponse ionoscloud.ClusterResponse) bool
IsClusterUpToDate returns true if the cluster is up-to-date or false if it does not
func IsUserUpToDate ¶
func IsUserUpToDate(cr *v1alpha1.MongoUser, user ionoscloud.User) bool
IsUserUpToDate returns true if the user 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 Mongo Cluster
func (*ClusterAPIClient) CheckDuplicateCluster ¶
func (cp *ClusterAPIClient) CheckDuplicateCluster(ctx context.Context, clusterName string, cr *v1alpha1.MongoCluster) (*ionoscloud.ClusterResponse, error)
CheckDuplicateCluster based on clusterName and on multiple properties from CR spec
func (*ClusterAPIClient) CheckDuplicateUser ¶
func (cp *ClusterAPIClient) CheckDuplicateUser(ctx context.Context, clusterID, userName string) (*ionoscloud.User, error)
CheckDuplicateUser based on clusterName and on multiple properties from CR spec
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) CreateUser ¶
func (cp *ClusterAPIClient) CreateUser(ctx context.Context, clusterID string, user ionoscloud.User) (ionoscloud.User, *ionoscloud.APIResponse, error)
CreateUser based on clusterID and user properties
func (*ClusterAPIClient) DeleteCluster ¶
func (cp *ClusterAPIClient) DeleteCluster(ctx context.Context, clusterID string) (*ionoscloud.APIResponse, error)
DeleteCluster based on clusterID
func (*ClusterAPIClient) DeleteUser ¶
func (cp *ClusterAPIClient) DeleteUser(ctx context.Context, clusterID, userName string) (*ionoscloud.APIResponse, error)
DeleteUser 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) GetClusterID ¶
func (cp *ClusterAPIClient) GetClusterID(cluster *ionoscloud.ClusterResponse) (string, error)
GetClusterID based on cluster
func (*ClusterAPIClient) GetUser ¶
func (cp *ClusterAPIClient) GetUser(ctx context.Context, clusterID, username string) (ionoscloud.User, *ionoscloud.APIResponse, error)
GetUser based on clusterID and user properties
func (*ClusterAPIClient) PatchUser ¶
func (cp *ClusterAPIClient) PatchUser(ctx context.Context, clusterID, username string, patchReq ionoscloud.PatchUserRequest) (ionoscloud.User, *ionoscloud.APIResponse, error)
PatchUser based on clusterID, username and user properties
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
func (*ClusterAPIClient) UpdateUser ¶
func (cp *ClusterAPIClient) UpdateUser(ctx context.Context, clusterID, userName string, patchReq ionoscloud.PatchUserRequest) (ionoscloud.User, *ionoscloud.APIResponse, error)
UpdateUser based on clusterID and cluster properties
type ClusterClient ¶
type ClusterClient interface { CheckDuplicateCluster(ctx context.Context, clusterName string, cr *v1alpha1.MongoCluster) (*ionoscloud.ClusterResponse, error) GetClusterID(cluster *ionoscloud.ClusterResponse) (string, error) GetCluster(ctx context.Context, clusterID string) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error) DeleteCluster(ctx context.Context, clusterID string) (*ionoscloud.APIResponse, error) DeleteUser(ctx context.Context, clusterID, userName string) (*ionoscloud.APIResponse, error) CreateCluster(ctx context.Context, cluster ionoscloud.CreateClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error) CreateUser(ctx context.Context, clusterID string, user ionoscloud.User) (ionoscloud.User, *ionoscloud.APIResponse, error) UpdateCluster(ctx context.Context, clusterID string, cluster ionoscloud.PatchClusterRequest) (ionoscloud.ClusterResponse, *ionoscloud.APIResponse, error) GetUser(ctx context.Context, clusterID, username string) (ionoscloud.User, *ionoscloud.APIResponse, error) UpdateUser(ctx context.Context, clusterID, userName string, cluster ionoscloud.PatchUserRequest) (ionoscloud.User, *ionoscloud.APIResponse, error) }
ClusterClient is a wrapper around IONOS Service DBaaS Mongo Cluster methods