Documentation ¶
Index ¶
- Constants
- func NewTeam(name, namespace string) *akov2.AtlasTeam
- type AProject
- func (p *AProject) ConvertByte() []byte
- func (p *AProject) DeletePrivateLink(id string) *AProject
- func (p *AProject) GetK8sMetaName() string
- func (p *AProject) GetPrivateIDByProviderRegion(statusItem status.ProjectPrivateEndpoint) string
- func (p *AProject) GetProjectName() string
- func (p *AProject) ProjectName(name string) *AProject
- func (p *AProject) UpdatePrivateLinkByOrder(i int, id string) *AProject
- func (p *AProject) UpdatePrivateLinkID(test akov2.PrivateEndpoint) *AProject
- func (p *AProject) WithAuditing(auditing *akov2.Auditing) *AProject
- func (p *AProject) WithCloudProviderIntegration(role akov2.CloudProviderIntegration) *AProject
- func (p *AProject) WithEncryptionAtRest(spec *akov2.EncryptionAtRest) *AProject
- func (p *AProject) WithIntegration(spec ProjectIntegration) *AProject
- func (p *AProject) WithIpAccess(cidrBlock, comment string) *AProject
- func (p *AProject) WithNetworkPeer(peer akov2.NetworkPeer) *AProject
- func (p *AProject) WithPrivateLink(provider provider.ProviderName, region string) *AProject
- func (p *AProject) WithSecretRef(name string) *AProject
- func (p *AProject) WithSecretRefNamespaced(name, namespace string) *AProject
- func (p *AProject) WithX509(certRef *common.ResourceRefNamespaced) *AProject
- type AProjectWithStatus
- type AtlasDeployment
- type AtlasKeyType
- func (a *AtlasKeyType) CreateAsGlobalLevelKey() *AtlasKeyType
- func (a *AtlasKeyType) GetRole() []AtlasRoles
- func (a *AtlasKeyType) IsFullAccess() bool
- func (a *AtlasKeyType) UseDefaultFullAccess() *AtlasKeyType
- func (a *AtlasKeyType) WithRoles(r []AtlasRoles) *AtlasKeyType
- func (a *AtlasKeyType) WithWhiteList(wl []string) *AtlasKeyType
- type AtlasRoles
- type CatalogSource
- type CatalogSourceSpec
- type DBUser
- func (s *DBUser) AddBuildInAdminRole() *DBUser
- func (s *DBUser) AddBuildInReadAnyRole() *DBUser
- func (s *DBUser) AddBuildInReadWriteRole() *DBUser
- func (s *DBUser) AddCustomRole(role UserCustomRoleType, db string, collection string) *DBUser
- func (s *DBUser) DeleteAllRoles() *DBUser
- func (s *DBUser) GetFilePath(projectName string) string
- func (s *DBUser) SaveConfigurationTo(folder string)
- func (s *DBUser) WithAuthDatabase(name string) *DBUser
- func (s *DBUser) WithProjectRef(name string) *DBUser
- func (s *DBUser) WithSecretRef(name string) *DBUser
- func (s *DBUser) WithX509(username string) *DBUser
- type DeploymentSpec
- type ProjectIntegration
- func (i *ProjectIntegration) WithAPIKeyRef(name, ns string) *ProjectIntegration
- func (i *ProjectIntegration) WithAPITokenRef(name, ns string) *ProjectIntegration
- func (i *ProjectIntegration) WithAccountID(id string) *ProjectIntegration
- func (i *ProjectIntegration) WithChannelName(c string) *ProjectIntegration
- func (i *ProjectIntegration) WithFlowName(f string) *ProjectIntegration
- func (i *ProjectIntegration) WithLicenseKeyRef(name, ns string) *ProjectIntegration
- func (i *ProjectIntegration) WithOrgName(o string) *ProjectIntegration
- func (i *ProjectIntegration) WithReadTokenRef(name, ns string) *ProjectIntegration
- func (i *ProjectIntegration) WithRegion(region string) *ProjectIntegration
- func (i *ProjectIntegration) WithRoutingKeyRef(name, ns string) *ProjectIntegration
- func (i *ProjectIntegration) WithSecretRef(name, ns string) *ProjectIntegration
- func (i *ProjectIntegration) WithServiceKeyRef(name, ns string) *ProjectIntegration
- func (i *ProjectIntegration) WithTeamName(t string) *ProjectIntegration
- func (i *ProjectIntegration) WithURL(url string) *ProjectIntegration
- func (i *ProjectIntegration) WithWriteTokenRef(name, ns string) *ProjectIntegration
- type ProjectSpec
- type TestDataProvider
- func (data TestDataProvider) WithInitialDeployments(deployments ...*akov2.AtlasDeployment) *TestDataProvider
- func (data TestDataProvider) WithObjectDeletionProtection(protected bool) *TestDataProvider
- func (data TestDataProvider) WithProject(project *akov2.AtlasProject) *TestDataProvider
- func (data TestDataProvider) WithSubObjectDeletionProtection(protected bool) *TestDataProvider
- func (data TestDataProvider) WithUsers(users ...*akov2.AtlasDatabaseUser) *TestDataProvider
- type UserCustomRoleType
- type UserInputs
- func (u *UserInputs) GetAppFolder() string
- func (u *UserInputs) GetAtlasProjectFullKubeName() string
- func (u *UserInputs) GetOperatorFolder() string
- func (u *UserInputs) GetResourceFolder() string
- func (u *UserInputs) GetServiceCatalogSourceFolder() string
- func (u *UserInputs) GetUsersFolder() string
- type UserSpec
Constants ¶
View Source
const ( // build-in dbroles RoleBuildInAdmin string = "atlasAdmin" RoleBuildInReadWriteAny string = "readWriteAnyDatabase" RoleBuildInReadAny string = "readAnyDatabase" RoleCustomAdmin UserCustomRoleType = "dbAdmin" RoleCustomReadWrite UserCustomRoleType = "readWrite" RoleCustomRead UserCustomRoleType = "read" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AProject ¶
type AProject struct { metav1.TypeMeta `json:",inline"` ObjectMeta *metav1.ObjectMeta `json:"metadata,omitempty"` Spec ProjectSpec `json:"spec,omitempty"` }
func LoadUserProjectConfig ¶
LoadUserProjectConfig load configuration from file into object
func NewProject ¶
func (*AProject) ConvertByte ¶
func (*AProject) DeletePrivateLink ¶
func (*AProject) GetK8sMetaName ¶
func (*AProject) GetPrivateIDByProviderRegion ¶
func (p *AProject) GetPrivateIDByProviderRegion(statusItem status.ProjectPrivateEndpoint) string
func (*AProject) GetProjectName ¶
func (*AProject) ProjectName ¶
func (*AProject) UpdatePrivateLinkByOrder ¶
func (*AProject) UpdatePrivateLinkID ¶
func (p *AProject) UpdatePrivateLinkID(test akov2.PrivateEndpoint) *AProject
func (*AProject) WithCloudProviderIntegration ¶ added in v2.1.0
func (p *AProject) WithCloudProviderIntegration(role akov2.CloudProviderIntegration) *AProject
func (*AProject) WithEncryptionAtRest ¶
func (p *AProject) WithEncryptionAtRest(spec *akov2.EncryptionAtRest) *AProject
func (*AProject) WithIntegration ¶
func (p *AProject) WithIntegration(spec ProjectIntegration) *AProject
func (*AProject) WithIpAccess ¶
func (*AProject) WithNetworkPeer ¶
func (p *AProject) WithNetworkPeer(peer akov2.NetworkPeer) *AProject
func (*AProject) WithPrivateLink ¶
func (p *AProject) WithPrivateLink(provider provider.ProviderName, region string) *AProject
func (*AProject) WithSecretRef ¶
func (*AProject) WithSecretRefNamespaced ¶
type AProjectWithStatus ¶
type AProjectWithStatus struct { AProject Status status.AtlasProjectStatus }
type AtlasDeployment ¶
type AtlasDeployment struct { metav1.TypeMeta `json:",inline"` ObjectMeta *metav1.ObjectMeta `json:"metadata,omitempty"` Spec DeploymentSpec `json:"spec,omitempty"` }
func LoadUserDeploymentConfig ¶
func LoadUserDeploymentConfig(path string) AtlasDeployment
LoadUserDeploymentConfig load configuration into object
func (*AtlasDeployment) DeploymentFileName ¶
func (ad *AtlasDeployment) DeploymentFileName(input UserInputs) string
func (*AtlasDeployment) GetDeploymentNameResource ¶
func (ad *AtlasDeployment) GetDeploymentNameResource() string
type AtlasKeyType ¶
type AtlasKeyType struct { DefaultFullAccessKey bool // use full access key provided with github secrets Roles []AtlasRoles // specify role for non default Whitelist []string GlobalLevelKey bool // if true, tests create "<operator-deployment-name>-api-key" GlobalKeyAttached *admin.ApiKeyUserDetails }
func NewEmptyAtlasKeyType ¶
func NewEmptyAtlasKeyType() *AtlasKeyType
func (*AtlasKeyType) CreateAsGlobalLevelKey ¶
func (a *AtlasKeyType) CreateAsGlobalLevelKey() *AtlasKeyType
func (*AtlasKeyType) GetRole ¶
func (a *AtlasKeyType) GetRole() []AtlasRoles
func (*AtlasKeyType) IsFullAccess ¶
func (a *AtlasKeyType) IsFullAccess() bool
func (*AtlasKeyType) UseDefaultFullAccess ¶
func (a *AtlasKeyType) UseDefaultFullAccess() *AtlasKeyType
func (*AtlasKeyType) WithRoles ¶
func (a *AtlasKeyType) WithRoles(r []AtlasRoles) *AtlasKeyType
func (*AtlasKeyType) WithWhiteList ¶
func (a *AtlasKeyType) WithWhiteList(wl []string) *AtlasKeyType
type CatalogSource ¶
type CatalogSource struct { metav1.TypeMeta `json:",inline"` ObjectMeta *metav1.ObjectMeta `json:"metadata,omitempty"` Spec CatalogSourceSpec `json:"spec,omitempty"` }
func NewCatalogSource ¶
func NewCatalogSource(imageURL string) CatalogSource
type CatalogSourceSpec ¶
type DBUser ¶
type DBUser struct { metav1.TypeMeta `json:",inline"` ObjectMeta *metav1.ObjectMeta `json:"metadata,omitempty"` Spec UserSpec `json:"spec,omitempty"` }
func (*DBUser) AddBuildInAdminRole ¶
func (*DBUser) AddBuildInReadAnyRole ¶
func (*DBUser) AddBuildInReadWriteRole ¶
func (*DBUser) AddCustomRole ¶
func (s *DBUser) AddCustomRole(role UserCustomRoleType, db string, collection string) *DBUser
func (*DBUser) DeleteAllRoles ¶
func (*DBUser) GetFilePath ¶
func (*DBUser) SaveConfigurationTo ¶
func (*DBUser) WithAuthDatabase ¶
func (*DBUser) WithProjectRef ¶
func (*DBUser) WithSecretRef ¶
type DeploymentSpec ¶
type DeploymentSpec akov2.AtlasDeploymentSpec
func (DeploymentSpec) GetDeploymentName ¶
func (spec DeploymentSpec) GetDeploymentName() string
type ProjectIntegration ¶
type ProjectIntegration project.Integration
func NewPIntegration ¶
func NewPIntegration(iType string) *ProjectIntegration
func (*ProjectIntegration) WithAPIKeyRef ¶
func (i *ProjectIntegration) WithAPIKeyRef(name, ns string) *ProjectIntegration
func (*ProjectIntegration) WithAPITokenRef ¶
func (i *ProjectIntegration) WithAPITokenRef(name, ns string) *ProjectIntegration
func (*ProjectIntegration) WithAccountID ¶
func (i *ProjectIntegration) WithAccountID(id string) *ProjectIntegration
func (*ProjectIntegration) WithChannelName ¶
func (i *ProjectIntegration) WithChannelName(c string) *ProjectIntegration
func (*ProjectIntegration) WithFlowName ¶
func (i *ProjectIntegration) WithFlowName(f string) *ProjectIntegration
func (*ProjectIntegration) WithLicenseKeyRef ¶
func (i *ProjectIntegration) WithLicenseKeyRef(name, ns string) *ProjectIntegration
func (*ProjectIntegration) WithOrgName ¶
func (i *ProjectIntegration) WithOrgName(o string) *ProjectIntegration
func (*ProjectIntegration) WithReadTokenRef ¶
func (i *ProjectIntegration) WithReadTokenRef(name, ns string) *ProjectIntegration
func (*ProjectIntegration) WithRegion ¶
func (i *ProjectIntegration) WithRegion(region string) *ProjectIntegration
func (*ProjectIntegration) WithRoutingKeyRef ¶
func (i *ProjectIntegration) WithRoutingKeyRef(name, ns string) *ProjectIntegration
func (*ProjectIntegration) WithSecretRef ¶
func (i *ProjectIntegration) WithSecretRef(name, ns string) *ProjectIntegration
func (*ProjectIntegration) WithServiceKeyRef ¶
func (i *ProjectIntegration) WithServiceKeyRef(name, ns string) *ProjectIntegration
func (*ProjectIntegration) WithTeamName ¶
func (i *ProjectIntegration) WithTeamName(t string) *ProjectIntegration
func (*ProjectIntegration) WithURL ¶
func (i *ProjectIntegration) WithURL(url string) *ProjectIntegration
func (*ProjectIntegration) WithWriteTokenRef ¶
func (i *ProjectIntegration) WithWriteTokenRef(name, ns string) *ProjectIntegration
type ProjectSpec ¶
type ProjectSpec akov2.AtlasProjectSpec
type TestDataProvider ¶
type TestDataProvider struct { ConfPaths []string // init deployments configuration ConfUpdatePaths []string // update configuration Resources UserInputs // struct of all user resources project, deployments, database users Actions []func(*TestDataProvider) // additional actions for the current data set PortGroup int // ports for the test application starts from _ SkipAppConnectivityCheck bool Context context.Context K8SClient client.Client InitialDeployments []*akov2.AtlasDeployment Project *akov2.AtlasProject Prefix string Users []*akov2.AtlasDatabaseUser Teams []*akov2.AtlasTeam ManagerContext context.Context AWSResourcesGenerator *helper.AwsResourcesGenerator ObjectDeletionProtection bool SubObjectDeletionProtection bool }
TestDataProvider is the Full Data set for the current test case
func DataProvider ¶
func DataProvider(keyTestPrefix string, r *AtlasKeyType, portGroup int, actions []func(*TestDataProvider)) *TestDataProvider
func DataProviderWithResources ¶
func DataProviderWithResources(keyTestPrefix string, project AProject, r *AtlasKeyType, initDeploymentConfigs []string, updateDeploymentConfig []string, users []DBUser, portGroup int, actions []func(*TestDataProvider)) TestDataProvider
func (TestDataProvider) WithInitialDeployments ¶
func (data TestDataProvider) WithInitialDeployments(deployments ...*akov2.AtlasDeployment) *TestDataProvider
func (TestDataProvider) WithObjectDeletionProtection ¶
func (data TestDataProvider) WithObjectDeletionProtection(protected bool) *TestDataProvider
func (TestDataProvider) WithProject ¶
func (data TestDataProvider) WithProject(project *akov2.AtlasProject) *TestDataProvider
func (TestDataProvider) WithSubObjectDeletionProtection ¶
func (data TestDataProvider) WithSubObjectDeletionProtection(protected bool) *TestDataProvider
func (TestDataProvider) WithUsers ¶
func (data TestDataProvider) WithUsers(users ...*akov2.AtlasDatabaseUser) *TestDataProvider
type UserCustomRoleType ¶
type UserCustomRoleType string
type UserInputs ¶
type UserInputs struct { TestID string AtlasKeyAccessType AtlasKeyType ProjectID string KeyName string Namespace string ProjectPath string Deployments []AtlasDeployment Users []DBUser Project *AProject }
func NewSimpleUserInputs ¶
func NewSimpleUserInputs(keyTestPrefix string, r *AtlasKeyType) UserInputs
NewSimpleUserInputs prepare users inputs
func NewUserInputs ¶
func NewUserInputs(keyTestPrefix string, project AProject, users []DBUser, r *AtlasKeyType) UserInputs
NewUserInputs prepare users inputs
func (*UserInputs) GetAppFolder ¶
func (u *UserInputs) GetAppFolder() string
func (*UserInputs) GetAtlasProjectFullKubeName ¶
func (u *UserInputs) GetAtlasProjectFullKubeName() string
func (*UserInputs) GetOperatorFolder ¶
func (u *UserInputs) GetOperatorFolder() string
func (*UserInputs) GetResourceFolder ¶
func (u *UserInputs) GetResourceFolder() string
func (*UserInputs) GetServiceCatalogSourceFolder ¶
func (u *UserInputs) GetServiceCatalogSourceFolder() string
func (*UserInputs) GetUsersFolder ¶
func (u *UserInputs) GetUsersFolder() string
type UserSpec ¶
type UserSpec akov2.AtlasDatabaseUserSpec
Click to show internal directories.
Click to hide internal directories.