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"`
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"`
FCVersion string `yaml:"featureCompatibilityVersion,omitempty" json:"featureCompatibilityVersion,omitempty"`
Hostname string `yaml:"hostname" json:"hostname"`
IPV6 *bool `yaml:"ipv6,omitempty" json:"ipv6,omitempty"`
LogPath string `yaml:"logPath" json:"logPath"`
LogDestination string `yaml:"logDestination,omitempty" json:"logDestination,omitempty"`
Name string `yaml:"name,omitempty" json:"name,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"`
Version string `yaml:"version,omitempty" json:"version,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"`
TLS *TLS `yaml:"tls,omitempty" json:"tls,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