Documentation
¶
Index ¶
Constants ¶
const ( AdminDB = "admin" ExternalAuthDB = "$external" )
Variables ¶
This section is empty.
Functions ¶
func BuildAtlasRoles ¶ added in v0.1.0
BuildAtlasRoles converts the roles inside the array of string in an array of mongodbatlas.Role structs r contains roles in the format roleName@dbName
func BuildOMRoles ¶ added in v0.1.0
BuildOMRoles converts the roles inside the array of string in an array of opsmngr.Role structs r contains roles in the format roleName@dbName
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { RSConfig `yaml:",inline"` MongoURI string `yaml:"mongoURI,omitempty" json:"mongoURI,omitempty"` Shards []*RSConfig `yaml:"shards,omitempty" json:"shards,omitempty"` Config *RSConfig `yaml:"config,omitempty" json:"config,omitempty"` Mongos []*ProcessConfig `yaml:"mongos,omitempty" json:"mongos,omitempty"` }
ClusterConfig configuration for a cluster This cluster can be used to patch an automation config
func FromAutomationConfig ¶
func FromAutomationConfig(c *opsmngr.AutomationConfig) []*ClusterConfig
FromAutomationConfig convert from opsmngr.AutomationConfig format to []*ClusterConfig the given opsmngr.AutomationConfig will be modified
func (*ClusterConfig) PatchAutomationConfig ¶
func (c *ClusterConfig) PatchAutomationConfig(out *opsmngr.AutomationConfig) error
PatchAutomationConfig adds the ClusterConfig to a opsmngr.AutomationConfig this method will modify the given AutomationConfig to add the new replica set or sharded cluster information
type ProcessConfig ¶
type ProcessConfig struct { AuditLogPath string `yaml:"auditLogPath,omitempty" json:"auditLogPath,omitempty"` AuditLogDestination string `yaml:"auditLogDestination,omitempty" json:"auditLogDestination,omitempty"` AuditLogFormat string `yaml:"auditLogFormat,omitempty" json:"auditLogFormat,omitempty"` AuditLogFilter string `yaml:"auditLogFilter,omitempty" json:"auditLogFilter,omitempty"` BuildIndexes *bool `yaml:"buildIndexes,omitempty" json:"buildIndexes,omitempty"` DBPath string `yaml:"dbPath,omitempty" json:"dbPath,omitempty"` BindIP *string `yaml:"bindIp,omitempty" json:"bindIp,omitempty"` BindIPAll *bool `yaml:"bindIpAll,omitempty" json:"bindIpAll,omitempty"` DirectoryPerDB *bool `yaml:"directoryPerDB,omitempty" json:"directoryPerDB,omitempty"` Engine string `yaml:"engine,omitempty" json:"engine,omitempty"` FCVersion string `yaml:"featureCompatibilityVersion,omitempty" json:"featureCompatibilityVersion,omitempty"` Hostname string `yaml:"hostname" json:"hostname"` InMemory *map[string]interface{} `yaml:"inMemory,omitempty" json:"inMemory,omitempty"` IndexBuildRetry *bool `yaml:"indexBuildRetry,omitempty" json:"indexBuildRetry,omitempty"` IPV6 *bool `yaml:"ipv6,omitempty" json:"ipv6,omitempty"` Journal *map[string]interface{} `yaml:"journal,omitempty" json:"journal,omitempty"` LogAppend bool `yaml:"logAppend,omitempty" json:"logAppend,omitempty"` LogDestination string `yaml:"logDestination,omitempty" json:"logDestination,omitempty"` LogPath string `yaml:"logPath" json:"logPath"` LogRotate string `yaml:"logRotate,omitempty" json:"logRotate,omitempty"` LogVerbosity int `yaml:"logVerbosity,omitempty" json:"logVerbosity,omitempty"` Name string `yaml:"name,omitempty" json:"name,omitempty"` OplogMinRetentionHours *float64 `yaml:"oplogMinRetentionHours,omitempty" json:"oplogMinRetentionHours,omitempty"` Port int `yaml:"port" json:"port"` Priority *float64 `yaml:"priority,omitempty" json:"priority,omitempty"` ProcessType string `yaml:"processType" json:"processType"` SlaveDelay *float64 `yaml:"slaveDelay,omitempty" json:"slaveDelay,omitempty"` SyncPeriodSecs *float64 `yaml:"syncPeriodSecs,omitempty" json:"syncPeriodSecs,omitempty"` Votes *float64 `yaml:"votes,omitempty" json:"votes,omitempty"` ArbiterOnly *bool `yaml:"arbiterOnly,omitempty" json:"arbiterOnly,omitempty"` Disabled bool `yaml:"disabled" json:"disabled"` Hidden *bool `yaml:"hidden,omitempty" json:"hidden,omitempty"` Security *map[string]interface{} `yaml:"security,omitempty" json:"security,omitempty"` TLS *TLS `yaml:"tls,omitempty" json:"tls,omitempty"` Version string `yaml:"version,omitempty" json:"version,omitempty"` WiredTiger *map[string]interface{} `yaml:"wiredTiger,omitempty" json:"wiredTiger,omitempty"` }
ProcessConfig that belongs to a cluster
type RSConfig ¶ added in v1.1.0
type RSConfig struct { Name string `yaml:"name,omitempty" json:"name,omitempty"` FCVersion string `yaml:"featureCompatibilityVersion,omitempty" json:"featureCompatibilityVersion,omitempty"` ProcessConfigs []*ProcessConfig `yaml:"processes,omitempty" json:"processes,omitempty"` Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"` Version string `yaml:"version,omitempty" json:"version,omitempty"` }
RSConfig shared properties of replica sets, config servers, and sharded clusters
type TLS ¶ added in v1.8.0
type TLS struct { CAFile string `yaml:"CAFile,omitempty" json:"CAFile,omitempty"` CertificateKeyFile string `yaml:"certificateKeyFile,omitempty" json:"certificateKeyFile,omitempty"` CertificateKeyFilePassword string `yaml:"certificateKeyFilePassword,omitempty" json:"certificateKeyFilePassword,omitempty"` CertificateSelector string `yaml:"certificateSelector,omitempty" json:"certificateSelector,omitempty"` ClusterCertificateSelector string `yaml:"clusterCertificateSelector,omitempty" json:"clusterCertificateSelector,omitempty"` ClusterFile string `yaml:"clusterFile,omitempty" json:"clusterFile,omitempty"` ClusterPassword string `yaml:"clusterPassword,omitempty" json:"clusterPassword,omitempty"` CRLFile string `yaml:"CRLFile,omitempty" json:"CRLFile,omitempty"` DisabledProtocols string `yaml:"disabledProtocols,omitempty" json:"disabledProtocols,omitempty"` FIPSMode string `yaml:"FIPSMode,omitempty" json:"FIPSMode,omitempty"` Mode string `yaml:"mode,omitempty" json:"mode,omitempty"` PEMKeyFile string `yaml:"PEMKeyFile,omitempty" json:"PEMKeyFile,omitempty"` }
TLS defines TLS parameters for Net