Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteInstall ¶
func ExecuteInstall(plan *InstallPlan, autoConfirm bool) error
ExecuteInstall runs the install plan, printing each command before running it.
func RunAuthStep ¶
RunAuthStep executes a single authentication step interactively. Returns true if the step was completed successfully.
Types ¶
type AuthStep ¶
type AuthStep struct {
Name string `json:"name"`
RequiredBy string `json:"required_by"`
Configured bool `json:"configured"`
Detail string `json:"detail"`
Action string `json:"action,omitempty"` // human-readable action to take
}
AuthStep represents a single authentication step.
type CredentialStatus ¶
type CredentialStatus struct {
Name string `json:"name"`
RequiredBy string `json:"required_by"`
Configured bool `json:"configured"`
Detail string `json:"detail,omitempty"`
HowToFix string `json:"how_to_fix,omitempty"`
}
CredentialStatus represents the state of a credential or auth session.
func CheckCredentials ¶
func CheckCredentials(envFile string) []CredentialStatus
CheckCredentials audits all credentials and auth sessions.
type InstallPlan ¶
type InstallPlan struct {
PackageManager string `json:"package_manager"`
Steps []InstallStep `json:"steps"`
}
InstallPlan describes what will be installed and the commands to run.
func PlanInstall ¶
func PlanInstall(requiredOnly bool) (*InstallPlan, error)
PlanInstall looks at missing tools and returns the commands needed to install them. If requiredOnly is true, only required tools are included.
type InstallStep ¶
type InstallStep struct {
Tool string `json:"tool"`
Command string `json:"command"`
Tap string `json:"tap,omitempty"`
IsRequired bool `json:"required"`
}
InstallStep is a single install action.
type Report ¶
type Report struct {
System SystemInfo `json:"system"`
Tools []ToolStatus `json:"tools"`
Credentials []CredentialStatus `json:"credentials"`
}
Report is the full doctor audit result.
func RunFullAudit ¶
RunFullAudit runs the complete doctor check.
type SystemInfo ¶
type SystemInfo struct {
OS string `json:"os"`
Arch string `json:"arch"`
PackageManager string `json:"package_manager"`
PMVersion string `json:"pm_version,omitempty"`
}
SystemInfo holds detected system information.
func DetectSystem ¶
func DetectSystem() SystemInfo
DetectSystem detects the OS, architecture, and package manager.
type ToolStatus ¶
type ToolStatus struct {
Name string `json:"name"`
Binary string `json:"binary"`
FeatureArea string `json:"feature_area"`
Required bool `json:"required"`
Installed bool `json:"installed"`
Version string `json:"version,omitempty"`
Path string `json:"path,omitempty"`
InstallCmd string `json:"install_cmd,omitempty"`
InstallTap string `json:"install_tap,omitempty"`
Note string `json:"note,omitempty"`
}
ToolStatus represents the state of a single prerequisite tool.