Documentation
¶
Index ¶
- Constants
- Variables
- func AccessToken() string
- func CLIConfigHome() (string, error)
- func Get(name string) any
- func GetString(name string) string
- func IsTrue(s string) bool
- func Name() string
- func OpsManagerURL() string
- func OrgID() string
- func Output() string
- func PrivateAPIKey() string
- func ProjectID() string
- func PublicAPIKey() string
- func RefreshToken() string
- func Service() string
- func SetGlobal(name string, value any)
- func Token() (*auth.Token, error)
- type AuthMechanism
- type Profile
- func (p *Profile) AccessToken() string
- func (p *Profile) AuthType() AuthMechanism
- func (p *Profile) Get(name string) any
- func (p *Profile) GetString(name string) string
- func (p *Profile) Name() 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) RefreshToken() string
- func (p *Profile) Service() string
- func (*Profile) SetGlobal(name string, value any)
- func (p *Profile) Token() (*auth.Token, error)
Constants ¶
View Source
const ( DefaultProfile = "default" // DefaultProfile default CloudService = "cloud" // CloudService setting when using Atlas API CloudGovService = "cloudgov" // CloudGovService setting when using Atlas API for Government AccessTokenField = "access_token" RefreshTokenField = "refresh_token" OpsManagerURLField = "ops_manager_url" AtlasCLI = "atlascli" ContainerizedHostNameEnv = "MONGODB_ATLAS_IS_CONTAINERIZED" GitHubActionsHostNameEnv = "GITHUB_ACTIONS" AtlasActionHostNameEnv = "ATLAS_GITHUB_ACTION" CLIUserTypeEnv = "CLI_USER_TYPE" // CLIUserTypeEnv is used to separate MongoDB University users from default users DefaultUser = "default" // Users that do NOT use ATLAS CLI with MongoDB University NativeHostName = "native" DockerContainerHostName = "container" GitHubActionsHostName = "all_github_actions" AtlasActionHostName = "atlascli_github_action" )
Variables ¶
Functions ¶
Types ¶
type AuthMechanism ¶
type AuthMechanism int
const ( APIKeys AuthMechanism = iota OAuth NotLoggedIn )
func AuthType ¶
func AuthType() AuthMechanism
AuthType returns the type of authentication used in the profile.
type Profile ¶
type Profile struct {
// contains filtered or unexported fields
}
func (*Profile) AccessToken ¶
func (*Profile) AuthType ¶
func (p *Profile) AuthType() AuthMechanism
func (*Profile) OpsManagerURL ¶
func (*Profile) PrivateAPIKey ¶
func (*Profile) PublicAPIKey ¶
func (*Profile) RefreshToken ¶
Click to show internal directories.
Click to hide internal directories.