Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureAuthenticated ¶
EnsureAuthenticated verifies the user has a valid token for the profile. It is a thin shim over EnsureAuthenticatedWithStdout that routes the login subprocess stdout to os.Stdout — the same behaviour as before this variant was introduced, preserving backward compatibility for all existing callers. cmdName is the Databricks CLI binary name or path; pass "" to use the default.
func EnsureAuthenticatedWithStdout ¶ added in v0.19.0
EnsureAuthenticatedWithStdout verifies the user has a valid token for the profile. If not authenticated, it runs "<cmdName> auth login --profile <profile>" interactively; the login subprocess's stdout is written to w (e.g. os.Stderr or a bytes.Buffer) rather than the caller's stdout. This lets callers that own their stdout for another protocol (e.g. the credential helper emitting a bare token) capture or suppress the login subprocess's output without leaking it. cmdName is the Databricks CLI binary name or path; pass "" to use the default.
func IsAuthenticated ¶
IsAuthenticated returns true if a valid token can be fetched for the given Databricks profile without triggering an interactive login. cmdName is the Databricks CLI binary name or path; pass "" to use the default ("databricks").
Types ¶
This section is empty.