Documentation
¶
Index ¶
- Variables
- func EnsureAuthenticated(ctx context.Context) bool
- func EnsureAuthenticatedE(cmd *cobra.Command, _ []string) error
- func GetBaseURLOrAsk() string
- func SetURLAction() bool
- func WaitForAPIKeyCallback(ctx context.Context, datarobotHost string) (string, error)
- func WriteConfigFile() error
- func WriteConfigFileSilent() error
Constants ¶
This section is empty.
Variables ¶
View Source
var APIKeyCallbackFunc = WaitForAPIKeyCallback
APIKeyCallbackFunc is a variable that holds the function for retrieving API keys. This can be overridden in tests to mock the browser-based authentication flow.
Functions ¶
func EnsureAuthenticated ¶
EnsureAuthenticated checks if valid authentication exists, and if not, triggers the login flow automatically. Returns true if authentication is valid or was successfully obtained.
func EnsureAuthenticatedE ¶
EnsureAuthenticatedE checks if valid authentication exists, and if not, triggers the login flow automatically. Returns an error if authentication fails, suitable for use in Cobra PreRunE hooks.
func GetBaseURLOrAsk ¶ added in v0.2.30
func GetBaseURLOrAsk() string
func SetURLAction ¶
func SetURLAction() bool
func WaitForAPIKeyCallback ¶
func WriteConfigFile ¶
func WriteConfigFile() error
func WriteConfigFileSilent ¶
func WriteConfigFileSilent() error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.