Documentation
¶
Index ¶
- func NewDAGCommand() *cobra.Command
- func NewDiscoverCommand() *cobra.Command
- func NewDoctorCommand() *cobra.Command
- func NewInitCommand() *cobra.Command
- func NewLSPCommand() *cobra.Command
- func NewLineageCommand() *cobra.Command
- func NewLintCommand() *cobra.Command
- func NewListCommand() *cobra.Command
- func NewQueryCommand() *cobra.Command
- func NewRenderCommand() *cobra.Command
- func NewRulesCommand() *cobra.Command
- func NewRunCommand() *cobra.Command
- func NewSeedCommand() *cobra.Command
- func NewUICommand() *cobra.Command
- func NewVersionCommand(version string) *cobra.Command
- type CommandContext
- type DoctorOptions
- type DoctorOutput
- type GraphQuerier
- type HealthCheck
- type LineageOptions
- type LintOptions
- type ProjectSummary
- type QueryOptions
- type RulesJSONOutput
- type RulesOptions
- type RunOptions
- type UIOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDiscoverCommand ¶
NewDiscoverCommand creates the discover command.
func NewDoctorCommand ¶
NewDoctorCommand creates the doctor command.
func NewLineageCommand ¶
NewLineageCommand creates the lineage command.
func NewQueryCommand ¶
NewQueryCommand creates the query command.
func NewRenderCommand ¶
NewRenderCommand creates the render command.
func NewRulesCommand ¶
NewRulesCommand creates the rules command.
func NewVersionCommand ¶
NewVersionCommand creates the version command.
Types ¶
type CommandContext ¶
type CommandContext struct {
Cfg *config.Config
Logger *slog.Logger
Engine *engine.Engine
Renderer *output.Renderer
}
CommandContext holds common dependencies for CLI commands.
func NewCommandContext ¶
func NewCommandContext(cmd *cobra.Command) (*CommandContext, func(), error)
NewCommandContext creates a CommandContext with engine and renderer. Returns the context and a cleanup function that must be called (typically via defer).
func NewCommandContextWithoutEngine ¶
func NewCommandContextWithoutEngine(cmd *cobra.Command) *CommandContext
NewCommandContextWithoutEngine creates a CommandContext without an engine. Useful for commands that don't need database access.
type DoctorOptions ¶
type DoctorOptions struct {
Format string // Output format: text, json
}
DoctorOptions holds options for the doctor command.
type DoctorOutput ¶
type DoctorOutput struct {
// Configuration info for debugging
ProjectRoot string `json:"project_root"`
ConfigFile string `json:"config_file,omitempty"`
ModelsDir string `json:"models_dir"`
MacrosDir string `json:"macros_dir"`
SeedsDir string `json:"seeds_dir"`
StatePath string `json:"state_path"`
// Project health
Summary ProjectSummary `json:"summary"`
HealthChecks []HealthCheck `json:"health_checks"`
Score int `json:"score"`
Recommendations []string `json:"recommendations"`
IssueCount int `json:"issue_count"`
}
DoctorOutput is the JSON output for the doctor command.
type GraphQuerier ¶
type GraphQuerier interface {
GetParents(string) []string
GetChildren(string) []string
NodeCount() int
EdgeCount() int
}
GraphQuerier provides read-only access to DAG structure.
type HealthCheck ¶
type HealthCheck struct {
RuleID string `json:"rule_id"`
Name string `json:"name"`
Group string `json:"group"`
Status string `json:"status"` // "pass", "warn", "error"
IssueCount int `json:"issue_count"`
Details []string `json:"details,omitempty"`
}
HealthCheck represents a single health check result.
type LineageOptions ¶
LineageOptions holds options for the lineage command.
type LintOptions ¶
type LintOptions struct {
Path string // File or directory path
Format string // Output format: text, json
Disable []string // Rule IDs to disable
Severity string // Minimum severity: error, warning, info, hint
Rules []string // Run only specific rules
SkipProject bool // Skip project health linting
Verbose bool // Show rule documentation with violations
}
LintOptions holds options for the lint command.
type ProjectSummary ¶
type ProjectSummary struct {
Models int `json:"models"`
Macros int `json:"macros"`
Seeds int `json:"seeds"`
DAGDepth int `json:"dag_depth"`
RootCount int `json:"root_count"`
LeafCount int `json:"leaf_count"`
EdgeCount int `json:"edge_count"`
}
ProjectSummary contains project-level statistics.
type QueryOptions ¶
QueryOptions holds options for the query command.
type RulesJSONOutput ¶
type RulesJSONOutput struct {
Rules []core.RuleInfo `json:"rules"`
Count struct {
SQL int `json:"sql"`
Project int `json:"project"`
Total int `json:"total"`
} `json:"count"`
}
RulesJSONOutput is the JSON output structure for rules listing.
type RulesOptions ¶
type RulesOptions struct {
Group string // Filter by group
Type string // Filter by type: sql, project
Verbose bool // Show full documentation
Format string // Output format
}
RulesOptions holds options for the rules command.
type RunOptions ¶
RunOptions holds options for the run command.