mongo

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

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) bool

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

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

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

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

Jump to

Keyboard shortcuts

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