Documentation
¶
Index ¶
- Constants
- func BooleanProperties() []string
- func Delete() error
- func Exists(name string) bool
- func Get(name string) interface{}
- func GetBool(name string) bool
- func GetString(name string) string
- func GlobalProperties() []string
- func IsAccessSet() bool
- func IsCloud() bool
- func IsTrue(s string) bool
- func List() []string
- func Load() error
- func Map() map[string]string
- func MongoShellPath() string
- func Name() string
- func OpsManagerCACertificate() string
- func OpsManagerSkipVerify() string
- func OpsManagerURL() string
- func OpsManagerVersionManifestURL() string
- func OrgID() string
- func Output() string
- func PrivateAPIKey() string
- func ProjectID() string
- func Properties() []string
- func PublicAPIKey() string
- func Rename(newProfileName string) error
- func Save() error
- func Service() string
- func Set(name string, value interface{})
- func SetGlobal(name string, value interface{})
- func SetMongoShellPath(v string)
- func SetName(name string)
- func SetOpsManagerURL(v string)
- func SetOrgID(v string)
- func SetOutput(v string)
- func SetPrivateAPIKey(v string)
- func SetProjectID(v string)
- func SetPublicAPIKey(v string)
- func SetService(v string)
- func SetSkipUpdateCheck(v bool)
- func SkipUpdateCheck() bool
- func SortedKeys() []string
- type GlobalSetter
- type Profile
- func (p *Profile) Delete() error
- func (p *Profile) Filename() string
- func (p *Profile) Get(name string) interface{}
- func (p *Profile) GetBool(name string) bool
- func (p *Profile) GetString(name string) string
- func (p *Profile) IsAccessSet() bool
- func (p *Profile) Load(readEnvironmentVars bool) error
- func (p *Profile) Map() map[string]string
- func (p *Profile) MongoShellPath() string
- func (p *Profile) Name() string
- func (p *Profile) OpsManagerCACertificate() string
- func (p *Profile) OpsManagerSkipVerify() string
- func (p *Profile) OpsManagerURL() string
- func (p *Profile) OpsManagerVersionManifestURL() string
- func (p *Profile) OrgID() string
- func (p *Profile) Output() string
- func (p *Profile) PrivateAPIKey() string
- func (p *Profile) ProjectID() string
- func (p *Profile) PublicAPIKey() string
- func (p *Profile) Rename(newProfileName string) error
- func (p *Profile) Save() error
- func (p *Profile) Service() string
- func (p *Profile) Set(name string, value interface{})
- func (p *Profile) SetGlobal(name string, value interface{})
- func (p *Profile) SetMongoShellPath(v string)
- func (p *Profile) SetName(name string)
- func (p *Profile) SetOpsManagerURL(v string)
- func (p *Profile) SetOrgID(v string)
- func (p *Profile) SetOutput(v string)
- func (p *Profile) SetPrivateAPIKey(v string)
- func (p *Profile) SetProjectID(v string)
- func (p *Profile) SetPublicAPIKey(v string)
- func (p *Profile) SetService(v string)
- func (p *Profile) SetSkipUpdateCheck(v bool)
- func (p *Profile) SkipUpdateCheck() bool
- func (p *Profile) SortedKeys() []string
- type Saver
- type SetSaver
- type Setter
Constants ¶
const ( ToolName = "mongocli" // ToolName of the CLI EnvPrefix = "mcli" // EnvPrefix prefix for ENV variables DefaultProfile = "default" // DefaultProfile default CloudService = "cloud" // CloudService setting when using Atlas API CloudGovService = "cloudgov" // CloudGovService setting when using Atlas API for Government CloudManagerService = "cloud-manager" // CloudManagerService settings when using CLoud Manager API OpsManagerService = "ops-manager" // OpsManagerService settings when using Ops Manager API JSON = "json" // JSON output format as json )
Variables ¶
This section is empty.
Functions ¶
func BooleanProperties ¶ added in v1.20.0
func BooleanProperties() []string
func Delete ¶ added in v1.1.0
func Delete() error
Delete deletes an existing configuration. The profiles are reloaded afterwards, as this edits the file directly.
func Exists ¶ added in v1.1.0
Exists returns true if there are any set settings for the profile name.
func GlobalProperties ¶ added in v1.20.0
func GlobalProperties() []string
func IsAccessSet ¶ added in v1.1.0
func IsAccessSet() bool
IsAccessSet return true if API keys have been set up. For Ops Manager we also check for the base URL.
func MongoShellPath ¶ added in v1.14.0
func MongoShellPath() string
MongoShellPath get the configured MongoDB Shell path.
func OpsManagerCACertificate ¶ added in v1.1.0
func OpsManagerCACertificate() string
OpsManagerCACertificate get configured ops manager CA certificate location.
func OpsManagerSkipVerify ¶ added in v1.1.0
func OpsManagerSkipVerify() string
OpsManagerSkipVerify get configured if transport should skip CA verification.
func OpsManagerVersionManifestURL ¶ added in v1.7.0
func OpsManagerVersionManifestURL() string
OpsManagerVersionManifestURL get configured ops manager version manifest base url.
func Properties ¶
func Properties() []string
func Rename ¶ added in v1.1.0
Rename replaces the Profile to a new Profile name, overwriting any Profile that existed before.
func SetMongoShellPath ¶ added in v1.14.0
func SetMongoShellPath(v string)
SetMongoShellPath sets the global MongoDB Shell path.
func SetOpsManagerURL ¶
func SetOpsManagerURL(v string)
SetOpsManagerURL set configured ops manager base url.
func SetPrivateAPIKey ¶
func SetPrivateAPIKey(v string)
SetPrivateAPIKey set configured private api key.
func SetSkipUpdateCheck ¶ added in v1.20.0
func SetSkipUpdateCheck(v bool)
SetSkipUpdateCheck sets the global skip update check.
func SkipUpdateCheck ¶ added in v1.20.0
func SkipUpdateCheck() bool
SkipUpdateCheck get the global skip update check.
func SortedKeys ¶ added in v1.2.0
func SortedKeys() []string
SortedKeys returns the properties of the Profile sorted.
Types ¶
type GlobalSetter ¶ added in v1.20.0
type GlobalSetter interface {
SetGlobal(string, interface{})
}
type Profile ¶
type Profile struct {
// contains filtered or unexported fields
}
func (*Profile) IsAccessSet ¶ added in v1.3.0
func (*Profile) MongoShellPath ¶ added in v1.14.0
func (*Profile) OpsManagerCACertificate ¶ added in v1.3.0
func (*Profile) OpsManagerSkipVerify ¶ added in v1.3.0
func (*Profile) OpsManagerURL ¶
func (*Profile) OpsManagerVersionManifestURL ¶ added in v1.7.0
func (*Profile) PrivateAPIKey ¶
func (*Profile) PublicAPIKey ¶
func (*Profile) SetMongoShellPath ¶ added in v1.14.0
func (*Profile) SetOpsManagerURL ¶
func (*Profile) SetPrivateAPIKey ¶
func (*Profile) SetProjectID ¶
func (*Profile) SetPublicAPIKey ¶
func (*Profile) SetService ¶
func (*Profile) SetSkipUpdateCheck ¶ added in v1.20.0
func (*Profile) SkipUpdateCheck ¶ added in v1.20.0
func (*Profile) SortedKeys ¶ added in v1.3.0
type SetSaver ¶ added in v1.0.0
type SetSaver interface { Setter Saver GlobalSetter }