Documentation
¶
Index ¶
- func DebugSSOLogHandler(ctx *cmdctx.Ctx) error
- func EnvHandler(ctx *cmdctx.Ctx) error
- func LoginHandler(ctx *cmdctx.Ctx) error
- func LogoutHandler(ctx *cmdctx.Ctx) error
- func ProfilesFetchFn(ctx *cmdctx.Ctx, _ *spec.EndpointSpec, _, _ int, _ any) (*cmdctx.PageResult, error)
- func SSORefreshHandler(ctx *cmdctx.Ctx) error
- func SSOStatusHandler(ctx *cmdctx.Ctx) error
- func SetHandler(ctx *cmdctx.Ctx) error
- func StatusHandler(ctx *cmdctx.Ctx) error
- func TokenHandler(ctx *cmdctx.Ctx) error
- type SetWizardInput
- type WizardExisting
- type WizardResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugSSOLogHandler ¶
DebugSSOLogHandler force-refreshes the SSO token, then for every log key of an execution prints a ready-to-paste curl command followed by a truncated preview of firing that request in-process. Because refresh and fetch happen back-to-back the inline calls never hit the ~2min token expiry; the printed curl is minted fresh each run so it can be copy/pasted and retried by hand.
func EnvHandler ¶
func LoginHandler ¶
func LogoutHandler ¶
func ProfilesFetchFn ¶
func ProfilesFetchFn(ctx *cmdctx.Ctx, _ *spec.EndpointSpec, _, _ int, _ any) (*cmdctx.PageResult, error)
func SSORefreshHandler ¶
func SSOStatusHandler ¶
func SetHandler ¶
func StatusHandler ¶
func TokenHandler ¶
Types ¶
type SetWizardInput ¶
type SetWizardInput struct {
APIURL string
Token string
AccountID string
AuthType pkgauth.AuthType
RegURL string
OrgID string
ProjectID string
}
SetWizardInput carries the pre-filled credentials and current defaults for RunSetWizard.
type WizardExisting ¶
type WizardExisting struct {
APIURL string
Token string
OrgID string
ProjectID string
// OtherURLs lists API URLs already saved across all profiles, offered
// as quick-pick options alongside APIURL.
OtherURLs []string
}
WizardExisting carries values from an already-saved profile so the wizard can offer "use existing" options instead of requiring re-entry.
type WizardResult ¶
type WizardResult struct {
APIURL string
Token string
Account string
RegURL string
OrgID string
Project string
ScopeNotSet bool // true when org/project not configured — caller should prompt setscope
ScopeSkipped bool // true when user explicitly chose to save without selecting org/project
SSOSelected bool // true when the user chose "Login with SSO" — no other fields are set
}
WizardResult is returned by RunLoginWizard on success.
func RunLoginWizard ¶
func RunLoginWizard(ctx *cmdctx.Ctx, existing *WizardExisting) (*WizardResult, error)
RunLoginWizard runs the interactive TUI and returns the collected values. Pass existing profile values so the wizard can offer "use existing" options. Returns (nil, nil) if the user canceled.
func RunSetWizard ¶
func RunSetWizard(ctx *cmdctx.Ctx, in *SetWizardInput) (*WizardResult, error)
RunSetWizard starts the wizard at the org-pick step using already-validated credentials. Pre-selects the currently saved org and project. Returns (nil, nil) if canceled.