Documentation ¶
Index ¶
- Variables
- func GetCredential(endpoint string) (u, p string, err error)
- func IsCredentialRecorded() bool
- func Printf(out *os.File, str string, a ...interface{})
- func PromptForCredential(m string) (u, p string, err error)
- func Setup(endpoint string) (err error)
- func WriteCredential(endpoint, username, password string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CredentialPath is the path on disk to where credential is recorded CredentialPath string // TTY is the terminal for reading credentials from users TTY *os.File )
Functions ¶
func GetCredential ¶
GetCredential returns Basic Auth credentials for authenticating to the Section API
func IsCredentialRecorded ¶
func IsCredentialRecorded() bool
IsCredentialRecorded returns if API credentials have been recorded
func Printf ¶
Printf formats according to a format specifier and writes to an output. Output can be overridden for testing purposes by setting: auth.TTY
func PromptForCredential ¶
PromptForCredential interactively prompts the user for a credential to authenticate to the Section API
func WriteCredential ¶
WriteCredential saves Section API credentials to disk
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.