auth

package
v0.302.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthCmd

func AuthCmd(ch *cmdutil.Helper) *cobra.Command

AuthCmd returns the base command for authentication.

func CheckCmd added in v0.140.0

func CheckCmd(ch *cmdutil.Helper) *cobra.Command

func LoginCmd

func LoginCmd(ch *cmdutil.Helper) *cobra.Command

LoginCmd is the command for logging into a PlanetScale account.

func LogoutCmd

func LogoutCmd(ch *cmdutil.Helper) *cobra.Command

Types

type AuthCheckResponse added in v0.292.0

type AuthCheckResponse struct {
	Status            string      `json:"status"`
	Authenticated     bool        `json:"authenticated"`
	AuthMethod        string      `json:"auth_method,omitempty"`
	Organization      string      `json:"organization,omitempty"`
	APIURL            string      `json:"api_url,omitempty"`
	AgentGuideCommand string      `json:"agent_guide_command,omitempty"`
	Issues            []AuthIssue `json:"issues,omitempty"`
	NextSteps         []string    `json:"next_steps,omitempty"`
}

AuthCheckResponse is the JSON payload for `pscale auth check --format json`.

type AuthIssue added in v0.292.0

type AuthIssue struct {
	Code        string `json:"code"`
	Message     string `json:"message"`
	Remediation string `json:"remediation,omitempty"`
}

AuthIssue describes a blocking onboarding problem for agent/human callers.

type LoginErrorResponse added in v0.292.0

type LoginErrorResponse struct {
	Status    string      `json:"status"`
	Message   string      `json:"message"`
	Issues    []AuthIssue `json:"issues,omitempty"`
	NextSteps []string    `json:"next_steps,omitempty"`
}

LoginErrorResponse is emitted when login fails in JSON mode.

type LoginOKResponse added in v0.292.0

type LoginOKResponse struct {
	Status    string      `json:"status"`
	Message   string      `json:"message"`
	Issues    []AuthIssue `json:"issues,omitempty"`
	NextSteps []string    `json:"next_steps,omitempty"`
}

LoginOKResponse is emitted after successful login.

type LoginPendingResponse added in v0.292.0

type LoginPendingResponse struct {
	Status          string   `json:"status"`
	VerificationURL string   `json:"verification_url"`
	UserCode        string   `json:"user_code"`
	BrowserOpened   bool     `json:"browser_opened"`
	Message         string   `json:"message"`
	NextSteps       []string `json:"next_steps,omitempty"`
}

LoginPendingResponse is emitted while waiting for browser authorization.

Jump to

Keyboard shortcuts

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