Documentation
¶
Overview ¶
Package doctor provides environment diagnostics for roji.
It checks the system environment for common issues and can auto-fix some problems when requested.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasErrors ¶
func HasErrors(results []CheckResult) bool
HasErrors returns true if any check failed
func HasWarnings ¶
func HasWarnings(results []CheckResult) bool
HasWarnings returns true if any check has warnings
Types ¶
type Check ¶
type Check interface {
// Name returns the name of this check
Name() string
// Run executes the check and returns the result
Run(ctx context.Context, cfg *Config) CheckResult
// CanFix returns whether this check supports auto-fixing
CanFix() bool
// Fix attempts to fix the issue found by this check
// Should only be called if CanFix returns true and Run returned Fail/Warn
Fix(ctx context.Context, cfg *Config) error
}
Check is the interface that all diagnostic checks must implement
type CheckResult ¶
type CheckResult struct {
Name string `json:"name"` // Name of the check
Status Status `json:"status"` // Result status
Message string `json:"message"` // Human-readable message
Details string `json:"details"` // Additional details (optional)
Fixable bool `json:"fixable"` // Whether the issue can be auto-fixed
}
CheckResult represents the result of a single check
type Config ¶
type Config struct {
Settings *config.Settings
CertsDir string
ConfigPath string // Path to the config file (for validation)
}
Config holds configuration for running checks
type Doctor ¶
type Doctor struct {
// contains filtered or unexported fields
}
Doctor runs diagnostic checks on the system
Click to show internal directories.
Click to hide internal directories.