Documentation
¶
Index ¶
- Constants
- func NewClient(domain, publicKey, privateKey string) (*admin.APIClient, error)
- type ClientSet
- type ProductionProvider
- func (p *ProductionProvider) Client(ctx context.Context, secretRef *client.ObjectKey, log *zap.SugaredLogger) (*mongodbatlas.Client, string, error)
- func (p *ProductionProvider) IsCloudGov() bool
- func (p *ProductionProvider) IsResourceSupported(resource api.AtlasCustomResource) bool
- func (p *ProductionProvider) SdkClientSet(ctx context.Context, secretRef *client.ObjectKey, log *zap.SugaredLogger) (*ClientSet, string, error)
- type Provider
Constants ¶
View Source
const ( // Error codes that Atlas may return that we are concerned about GroupExistsAPIErrorCode = "GROUP_ALREADY_EXISTS" // The error that Atlas API returns if the GET request is sent to read the project that either doesn't exist // or the user doesn't have permissions for NotInGroup = "NOT_IN_GROUP" // Error indicates that the project is being removed while it still has clusters CannotCloseGroupActiveAtlasDeployment = "CANNOT_CLOSE_GROUP_ACTIVE_ATLAS_CLUSTERS" // Error indicates that the database user doesn't exist UsernameNotFound = "USERNAME_NOT_FOUND" // Error indicates that the database user doesn't exist UserNotfound = "USER_NOT_FOUND" // Error indicates that the cluster doesn't exist ClusterNotFound = "CLUSTER_NOT_FOUND" // ServerlessClusterNotFound indicates that the serverless cluster doesn't exist ServerlessInstanceNotFound = "SERVERLESS_INSTANCE_NOT_FOUND" // ServerlessClusterFromClusterAPI indicates that we are trying to access // a serverless instance from the cluster API, which is not allowed ServerlessInstanceFromClusterAPI = "CANNOT_USE_SERVERLESS_INSTANCE_IN_CLUSTER_API" ClusterInstanceFromServerlessAPI = "CANNOT_USE_CLUSTER_IN_SERVERLESS_INSTANCE_API" // Resource not found ResourceNotFound = "RESOURCE_NOT_FOUND" // Instance for the passed {groupId, tenantName} pair does not exist DataFederationTenantNotFound = "DATA_FEDERATION_TENANT_NOT_FOUND_FOR_NAME" // Backup Compliance Policy rejected, as there are existing backup policies which do not meet the requirements BackupComplianceNotMet = "BACKUP_POLICIES_NOT_MEETING_BACKUP_COMPLIANCE_POLICY_REQUIREMENTS" ProviderUnsupported = "PROVIDER_UNSUPPORTED" // Cannot use the Flex API to interact with non-Flex clusters NonFlexInFlexAPI = "CANNOT_USE_NON_FLEX_CLUSTER_IN_FLEX_API" FeatureUnsupported = "FEATURE_UNSUPPORTED" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientSet ¶
type ClientSet struct { SdkClient20231115008 *adminv20231115008.APIClient SdkClient20241113001 *adminv20241113001.APIClient }
type ProductionProvider ¶
type ProductionProvider struct {
// contains filtered or unexported fields
}
func NewProductionProvider ¶
func (*ProductionProvider) Client ¶
func (p *ProductionProvider) Client(ctx context.Context, secretRef *client.ObjectKey, log *zap.SugaredLogger) (*mongodbatlas.Client, string, error)
func (*ProductionProvider) IsCloudGov ¶
func (p *ProductionProvider) IsCloudGov() bool
func (*ProductionProvider) IsResourceSupported ¶
func (p *ProductionProvider) IsResourceSupported(resource api.AtlasCustomResource) bool
func (*ProductionProvider) SdkClientSet ¶
func (p *ProductionProvider) SdkClientSet(ctx context.Context, secretRef *client.ObjectKey, log *zap.SugaredLogger) (*ClientSet, string, error)
type Provider ¶
type Provider interface { Client(ctx context.Context, secretRef *client.ObjectKey, log *zap.SugaredLogger) (*mongodbatlas.Client, string, error) SdkClientSet(ctx context.Context, secretRef *client.ObjectKey, log *zap.SugaredLogger) (*ClientSet, string, error) IsCloudGov() bool IsResourceSupported(resource api.AtlasCustomResource) bool }
Click to show internal directories.
Click to hide internal directories.