Documentation
¶
Index ¶
- Constants
- func Delete() error
- func Exists(name string) bool
- func GetString(name string) string
- func IsAccessSet() bool
- func List() []string
- func Load() error
- func Map() map[string]string
- func Name() string
- func OpsManagerCACertificate() string
- func OpsManagerSkipVerify() string
- func OpsManagerURL() 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, value 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 SortedKeys() []string
- type Profile
- func (p *Profile) Delete() error
- func (p *Profile) Filename() string
- 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) Name() string
- func (p *Profile) OpsManagerCACertificate() string
- func (p *Profile) OpsManagerSkipVerify() string
- func (p *Profile) OpsManagerURL() 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, value 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) SortedKeys() []string
- 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 JSON = "json" // JSON output format as json )
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 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
func SortedKeys ¶ added in v1.2.0
func SortedKeys() []string
SortedKeys returns the properties of the Profile sorted.
Types ¶
type Profile ¶
type Profile struct {
// contains filtered or unexported fields
}