Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CredFileName is the name of the credential file written to the CLI's // config directory CredFileName = "cred_file.json" // CredentialsDir is the directory to store credentials from authentication. CredentialsDir = "~/.config/hcp/credentials/" )
Variables ¶
This section is empty.
Functions ¶
func GetHCPConfig ¶
func GetHCPConfig(options ...hcpconf.HCPConfigOption) (hcpconf.HCPConfig, error)
GetHCPConfig retrieves the HCP configuration with geography support. Geography configuration is handled by the HCP SDK through the WithGeography option.
func GetHCPConfigFromDir ¶
func GetHCPConfigFromDir(credFileDir string, options ...hcpconf.HCPConfigOption) (hcpconf.HCPConfig, error)
GetHCPConfigFromDir is like GetHCPConfig but can search non-default directories.
func GetHCPCredFilePath ¶
GetHCPCredFilePath returns the path to the cli's credential file.
func IsAuthenticated ¶ added in v0.2.0
IsAuthenticated returns if there is a valid token available.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.