Versions in this module Expand all Collapse all v0 v0.7.0 Sep 23, 2026 v0.6.0 Sep 23, 2026 v0.5.0 Sep 23, 2026 Changes in this version + var ErrCompareRequired = errors.New("autoconfigure: BootstrapProviderFromSpec: Compare must not be nil") + var ErrConfigFileRequired = errors.New("autoconfigure: BootstrapProviderFromSpec: ConfigFile must not be empty") + var ErrGenerateRequired = errors.New("autoconfigure: BootstrapProviderFromSpec: Generate must not be nil") + func BootstrapProviderFromSpec[T any](spec BootstrapSpec[T]) (toolsdk.Spec, error) + type BootstrapSpec struct + Compare func(existing, expected T) []Change + ConfigFile finding.FilePath + ConfigFiles []finding.FilePath + CountLabel string + Description string + FixCommand string + Generate func(ctx context.Context) (T, int, error) + Marshal func(T) ([]byte, *ConfigError) + MissingRule finding.RuleName + Name string + NormalizeExpected func(existing, expected T) T + Parse func(data []byte) (T, *ConfigError) + Recognizable func(ctx context.Context) (bool, error) v0.4.1 Sep 23, 2026 v0.4.0 Sep 23, 2026 Changes in this version + func FirstExisting(root string, candidates ...string) (string, bool) + func FormatDiff(changes []Change) string + func StringValue(v any) string + func Summary(changes []Change) string + func WorkingDir(ctx context.Context) string + type Change struct + Kind Kind + New string + Old string + Path string + func DiffBlobs(before, after []string, prefix string) []Change + func DiffMaps(before, after map[string]string, prefix string) []Change + func DiffSets(before, after []string, prefix string) []Change type ConfigError + func MarshalJSONIndented(v any) ([]byte, *ConfigError) + func ParseJSON[T any](data []byte) (*T, *ConfigError) + func SaveJSONBytes(path string, data []byte) (bool, *ConfigError) + type Kind string + const KindAdded + const KindModified + const KindRemoved type ProviderSpec + ConfigFiles []finding.FilePath v0.3.1 Sep 22, 2026 v0.3.0 Sep 22, 2026 v0.2.0 Sep 11, 2026 Changes in this version + var ErrAnalyzeRequired = errors.New("autoconfigure: ProviderFromSpec: Analyze must not be nil") + var ErrDescriptionRequired = errors.New("autoconfigure: ProviderFromSpec: Description must not be empty") + var ErrNameRequired = errors.New("autoconfigure: ProviderFromSpec: Name must not be empty") type ConfigIssue + Confidence finding.Confidence + FixStrategy *finding.FixStrategy v0.1.0 Sep 10, 2026 Changes in this version + var ErrNoRepair = errors.New("autoconfigure: tool does not support auto-repair") + func FindingFromIssue(toolName finding.ToolName, issue ConfigIssue) (finding.Finding, error) + func FindingsFromIssues(toolName finding.ToolName, issues []ConfigIssue) ([]finding.Finding, error) + func ProviderFromSpec(spec ProviderSpec) (toolsdk.Spec, error) + type ConfigError struct + Err error + Op Op + Path string + func LoadJSON[T any](path string) (*T, *ConfigError) + func ReadConfig(path string) ([]byte, *ConfigError) + func SaveJSON(path string, v any) (bool, *ConfigError) + func (e *ConfigError) As(target any) bool + func (e *ConfigError) Error() string + func (e *ConfigError) Is(target error) bool + func (e *ConfigError) Unwrap() error + type ConfigIssue struct + File finding.FilePath + Line int + Message string + Rule finding.RuleName + Severity finding.Severity + Suggestion string + type Op string + const OpMarshal + const OpMkdir + const OpRead + const OpUnmarshal + const OpWrite + type ProviderSpec struct + Analyze func(ctx context.Context) ([]ConfigIssue, error) + ConfigFile finding.FilePath + Description string + Name string + Repair func(ctx context.Context) (string, error) + func (s ProviderSpec) HasRepair() bool