Documentation
¶
Index ¶
- Constants
- func Delete() error
- func Exists(name string) bool
- func GetConfigDescription() map[string]string
- func GetString(name string) string
- func IsAccessSet() bool
- func List() []string
- func Load() error
- func Name() string
- func OpsManagerCACertificate() string
- func OpsManagerSkipVerify() string
- func OpsManagerURL() string
- func OrgID() 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, value string)
- func SetName(name *string)
- func SetOpsManagerURL(v string)
- func SetOrgID(v string)
- func SetPrivateAPIKey(v string)
- func SetProjectID(v string)
- func SetPublicAPIKey(v string)
- func SetService(v string)
- type Config
- type Getter
- type Saver
- type SetSaver
- type Setter
Constants ¶
const ( ToolName = "mongocli" // ToolName of the CLI EnvPrefix = "mcli" // Prefix for ENV variables DefaultProfile = "default" // DefaultProfile default CloudService = "cloud" // CloudService setting when using Atlas API CloudManagerService = "cloud-manager" // CloudManagerService settings when using CLoud Manager API OpsManagerService = "ops-manager" // OpsManagerService settings when using Ops Manager API )
Variables ¶
This section is empty.
Functions ¶
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 GetConfigDescription ¶ added in v1.1.0
GetConfigDescription returns a map describing the configuration
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 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
SkipVerify get configured ops manager CA certificate location
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 SetOpsManagerURL ¶
func SetOpsManagerURL(v string)
SetOpsManagerURL set configured ops manager base url
func SetPrivateAPIKey ¶
func SetPrivateAPIKey(v string)
SetPrivateAPIKey set configured private api key