Documentation ¶
Index ¶
- Constants
- type AC
- type AP
- type AtlasKeyType
- func (a *AtlasKeyType) CreateAsGlobalLevelKey() *AtlasKeyType
- func (a *AtlasKeyType) GetRole() []AtlasRoles
- func (a *AtlasKeyType) IsFullAccess() bool
- func (a *AtlasKeyType) UseDefaulFullAccess() *AtlasKeyType
- func (a *AtlasKeyType) WithRoles(r []AtlasRoles) *AtlasKeyType
- func (a *AtlasKeyType) WithWhiteList(wl []string) *AtlasKeyType
- type AtlasRoles
- type CatalogSource
- type CatalogSourceSpec
- type ClusterSpec
- 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 (u *DBUser) WithAuthDatabase(name string) *DBUser
- func (s *DBUser) WithProjectRef(name string) *DBUser
- func (s *DBUser) WithSecretRef(name string) *DBUser
- type ProjectSpec
- type TestDataProvider
- type UserCustomRoleType
- type UserInputs
- 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 ¶
This section is empty.
Types ¶
type AC ¶
type AC struct { metav1.TypeMeta `json:",inline"` ObjectMeta *metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec,omitempty"` }
func LoadUserClusterConfig ¶
LoadUserClusterConfig load configuration into object
func (*AC) ClusterFileName ¶
func (ac *AC) ClusterFileName(input UserInputs) string
func (*AC) GetClusterNameResource ¶
type AP ¶ added in v0.6.1
type AP 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 (*AP) ConvertByte ¶ added in v0.6.1
func (*AP) GetK8sMetaName ¶ added in v0.6.1
func (*AP) GetProjectName ¶ added in v0.6.1
func (*AP) ProjectName ¶ added in v0.6.1
func (*AP) WithIpAccess ¶ added in v0.6.1
type AtlasKeyType ¶ added in v0.6.1
type AtlasKeyType struct { GlobalLevelKey bool // if true, tests create "<operator-deployment-name>-api-key" DefaultFullAccessKey bool // use full access key provided with github secrets Roles []AtlasRoles // specify role for non default Whitelist []string }
func NewAtlasKeyType ¶ added in v0.6.1
func NewAtlasKeyType(r []AtlasRoles, wl []string) *AtlasKeyType
func NewEmptyAtlasKeyType ¶ added in v0.6.1
func NewEmptyAtlasKeyType() *AtlasKeyType
func (*AtlasKeyType) CreateAsGlobalLevelKey ¶ added in v0.6.1
func (a *AtlasKeyType) CreateAsGlobalLevelKey() *AtlasKeyType
func (*AtlasKeyType) GetRole ¶ added in v0.6.1
func (a *AtlasKeyType) GetRole() []AtlasRoles
func (*AtlasKeyType) IsFullAccess ¶ added in v0.6.1
func (a *AtlasKeyType) IsFullAccess() bool
func (*AtlasKeyType) UseDefaulFullAccess ¶ added in v0.6.1
func (a *AtlasKeyType) UseDefaulFullAccess() *AtlasKeyType
func (*AtlasKeyType) WithRoles ¶ added in v0.6.1
func (a *AtlasKeyType) WithRoles(r []AtlasRoles) *AtlasKeyType
func (*AtlasKeyType) WithWhiteList ¶ added in v0.6.1
func (a *AtlasKeyType) WithWhiteList(wl []string) *AtlasKeyType
type AtlasRoles ¶ added in v0.6.1
type AtlasRoles = string
const ( OrgOwner AtlasRoles = "ORG_OWNER" OrgMember AtlasRoles = "ORG_MEMBER" OrgGroupCreator AtlasRoles = "ORG_GROUP_CREATOR" OrgBillingAdmin AtlasRoles = "ORG_BILLING_ADMIN" OrgReadOnly AtlasRoles = "ORG_READ_ONLY" GroupClusterManager AtlasRoles = "GROUP_CLUSTER_MANAGER" GroupDataAccessAdmin AtlasRoles = "GROUP_DATA_ACCESS_ADMIN" GropuDataAccessReadOnly AtlasRoles = "GROUP_DATA_ACCESS_READ_ONLY" GroupDataAccessReadWrite AtlasRoles = "GROUP_DATA_ACCESS_READ_WRITE" GroupOwner AtlasRoles = "GROUP_OWNER" GroupReadOnly AtlasRoles = "GROUP_READ_ONLY" )
type CatalogSource ¶ added in v0.6.1
type CatalogSource struct { metav1.TypeMeta `json:",inline"` ObjectMeta *metav1.ObjectMeta `json:"metadata,omitempty"` Spec CatalogSourceSpec `json:"spec,omitempty"` }
func NewCatalogSource ¶ added in v0.6.1
func NewCatalogSource(imageURL string) CatalogSource
type CatalogSourceSpec ¶ added in v0.6.1
type ClusterSpec ¶
type ClusterSpec v1.AtlasClusterSpec
type DBUser ¶
type DBUser struct { metav1.TypeMeta `json:",inline"` ObjectMeta *metav1.ObjectMeta `json:"metadata,omitempty"` Spec UserSpec `json:"spec,omitempty"` }
func (*DBUser) AddBuildInAdminRole ¶ added in v0.6.1
func (*DBUser) AddBuildInReadAnyRole ¶ added in v0.6.1
func (*DBUser) AddBuildInReadWriteRole ¶ added in v0.6.1
func (*DBUser) AddCustomRole ¶ added in v0.6.1
func (s *DBUser) AddCustomRole(role UserCustomRoleType, db string, collection string) *DBUser
func (*DBUser) DeleteAllRoles ¶ added in v0.6.1
func (*DBUser) GetFilePath ¶
func (*DBUser) SaveConfigurationTo ¶
func (*DBUser) WithAuthDatabase ¶
func (*DBUser) WithProjectRef ¶
func (*DBUser) WithSecretRef ¶
type ProjectSpec ¶
type ProjectSpec v1.AtlasProjectSpec
type TestDataProvider ¶ added in v0.6.1
type TestDataProvider struct { ConfPaths []string // init clusters configuration ConfUpdatePaths []string // update configuration Resources UserInputs // struct of all user resoucers project,clusters,databaseusers Actions []func(*TestDataProvider) // additional actions for the current data set PortGroup int // ports for the test application starts from _ }
Full Data set for the current test case
func NewTestDataProvider ¶ added in v0.6.1
func NewTestDataProvider(keyTestPrefix string, r *AtlasKeyType, initClusterConfigs []string, updateClusterConfig []string, users []DBUser, portGroup int, actions []func(*TestDataProvider)) TestDataProvider
type UserCustomRoleType ¶ added in v0.6.1
type UserCustomRoleType string
type UserInputs ¶
type UserInputs struct { AtlasKeyAccessType AtlasKeyType ProjectID string KeyName string Namespace string K8sFullProjectName string ProjectPath string Clusters []AC Users []DBUser Project *AP }
func NewUserInputs ¶
func NewUserInputs(keyTestPrefix string, users []DBUser, r *AtlasKeyType) UserInputs
NewUsersInputs prepare users inputs
func (*UserInputs) GetAppFolder ¶
func (u *UserInputs) GetAppFolder() string
func (*UserInputs) GetOperatorFolder ¶
func (u *UserInputs) GetOperatorFolder() string
func (*UserInputs) GetResourceFolder ¶
func (u *UserInputs) GetResourceFolder() string
func (*UserInputs) GetServiceCatalogSourceFolder ¶ added in v0.6.1
func (u *UserInputs) GetServiceCatalogSourceFolder() string
func (*UserInputs) GetUsersFolder ¶
func (u *UserInputs) GetUsersFolder() string
type UserSpec ¶
type UserSpec v1.AtlasDatabaseUserSpec
Click to show internal directories.
Click to hide internal directories.