dev

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunConfigCommand

func RunConfigCommand(w io.Writer, flags ConfigCommandFlags) (handled bool, err error)

RunConfigCommand executes the dev config subcommand logic. Returns nil if a flag was handled, or an error. Returns (false, nil) if no flags were specified (caller should show help).

Types

type CheckStatus

type CheckStatus int

CheckStatus represents the status of a health check

const (
	CheckPassed CheckStatus = iota
	CheckWarning
	CheckFailed
)

func (CheckStatus) String

func (s CheckStatus) String() string

String returns a colorized string representation of CheckStatus

type ConfigCommandFlags

type ConfigCommandFlags struct {
	List     bool
	Show     bool
	Export   string
	Validate bool
	Prefix   string
}

ConfigCommandFlags holds the flags for the config subcommand

type ConfigInspector

type ConfigInspector struct {
	// contains filtered or unexported fields
}

ConfigInspector provides utilities for inspecting configuration

func NewConfigInspector

func NewConfigInspector() *ConfigInspector

NewConfigInspector creates a new ConfigInspector

func (*ConfigInspector) ExportToJSON

func (ci *ConfigInspector) ExportToJSON(includeEffective bool) (string, error)

ExportToJSON exports configuration to JSON format

func (*ConfigInspector) FormatAsTable

func (ci *ConfigInspector) FormatAsTable() string

FormatAsTable returns a formatted table of configuration options

func (*ConfigInspector) FormatEffectiveAsTable

func (ci *ConfigInspector) FormatEffectiveAsTable() string

FormatEffectiveAsTable returns a formatted table of effective configuration

func (*ConfigInspector) GetConfigByPrefix

func (ci *ConfigInspector) GetConfigByPrefix(prefix string) []config.ConfigOption

GetConfigByPrefix returns all config options matching a key prefix

func (*ConfigInspector) GetConfigSourceInfo

func (ci *ConfigInspector) GetConfigSourceInfo(envPrefix string) *ConfigSources

GetConfigSourceInfo returns configuration values grouped by their source

func (*ConfigInspector) GetEffectiveConfig

func (ci *ConfigInspector) GetEffectiveConfig() map[string]interface{}

GetEffectiveConfig returns a map of all config keys with their effective values

func (*ConfigInspector) ListAllOptions

func (ci *ConfigInspector) ListAllOptions() []config.ConfigOption

ListAllOptions returns all registered configuration options

func (*ConfigInspector) ValidateConfig

func (ci *ConfigInspector) ValidateConfig() []error

ValidateConfig validates the current configuration

type ConfigSources

type ConfigSources struct {
	Defaults    map[string]interface{} `json:"defaults"`
	File        map[string]interface{} `json:"file,omitempty"`
	Environment map[string]interface{} `json:"environment,omitempty"`
	Effective   map[string]interface{} `json:"effective"`
}

GetConfigSources returns config values grouped by source

type Doctor

type Doctor struct {
	// contains filtered or unexported fields
}

Doctor performs environment health checks

func NewDoctor

func NewDoctor() *Doctor

NewDoctor creates a new Doctor instance

func (*Doctor) FormatResults

func (d *Doctor) FormatResults() string

FormatResults returns a formatted string of all check results

func (*Doctor) GetResults

func (d *Doctor) GetResults() []HealthCheck

GetResults returns all health check results

func (*Doctor) HasFailures

func (d *Doctor) HasFailures() bool

HasFailures returns true if any check failed

func (*Doctor) HasWarnings

func (d *Doctor) HasWarnings() bool

HasWarnings returns true if any check has warnings

func (*Doctor) RunAllChecks

func (d *Doctor) RunAllChecks()

RunAllChecks executes all health checks

type HealthCheck

type HealthCheck struct {
	Name    string
	Status  CheckStatus
	Message string
	Details string
}

HealthCheck represents a single health check result

Jump to

Keyboard shortcuts

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