identitydiag

package
v1.0.89 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusReady         = "ready"
	StatusNotConfigured = "not_configured"
	StatusMissing       = "missing"
	StatusNeedsRefresh  = "needs_refresh"
	StatusVerifyFailed  = "verify_failed"
)

Variables

This section is empty.

Functions

func StatusMessage

func StatusMessage(status string) string

Types

type Identity

type Identity struct {
	Status           string `json:"status"`
	Available        bool   `json:"available"`
	Verified         *bool  `json:"verified,omitempty"`
	Message          string `json:"message,omitempty"`
	Hint             string `json:"hint,omitempty"`
	OpenID           string `json:"openId,omitempty"`
	AppName          string `json:"appName,omitempty"`
	UserName         string `json:"userName,omitempty"`
	TokenStatus      string `json:"tokenStatus,omitempty"`
	Scope            string `json:"scope,omitempty"`
	ExpiresAt        string `json:"expiresAt,omitempty"`
	RefreshExpiresAt string `json:"refreshExpiresAt,omitempty"`
	GrantedAt        string `json:"grantedAt,omitempty"`
	// contains filtered or unexported fields
}

Identity is a single identity diagnostic result.

type Result

type Result struct {
	Bot  Identity `json:"bot"`
	User Identity `json:"user"`
}

Result describes the independently usable bot and user identities.

func Diagnose

func Diagnose(ctx context.Context, f *cmdutil.Factory, cfg *core.CliConfig, verify bool) Result

Diagnose checks bot and user identities separately. When verify is false, it only reports local readiness and skips server calls.

func FilterRecovery added in v1.0.84

func FilterRecovery(result Result, canReference func(recovery.Target) bool) Result

FilterRecovery returns a copy whose command-targeted hints are removed when the current presenter cannot reference their semantic target. Identity diagnosis itself remains unaware of plugins, policy, and distributions.

Jump to

Keyboard shortcuts

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