auth

package
v0.2.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

func EnsureAuthenticated(ctx context.Context) bool

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

func EnsureAuthenticatedE(cmd *cobra.Command, _ []string) error

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 WaitForAPIKeyCallback(ctx context.Context, datarobotHost string) (string, error)

func WriteConfigFile

func WriteConfigFile() error

func WriteConfigFileSilent

func WriteConfigFileSilent() error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL