Documentation
¶
Overview ¶
Package doctor provides health checks for melange authorization infrastructure.
The doctor command validates that the authorization system is properly configured by checking schema files, database state, generated functions, and data health.
Example usage:
d := doctor.New(db, "schemas")
report, err := d.Run(ctx)
if err != nil {
log.Fatal(err)
}
report.Print(os.Stdout, true) // verbose=true
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckResult ¶
type CheckResult struct {
// Category groups related checks (e.g., "schema", "functions", "tuples").
Category string
// Name is a short identifier for the check.
Name string
// Status is the check outcome.
Status Status
// Message is a human-readable description of the result.
Message string
// Details provides additional information for verbose output.
Details string
// FixHint suggests how to resolve issues.
FixHint string
}
CheckResult represents the outcome of a single health check.
type Doctor ¶
type Doctor struct {
// contains filtered or unexported fields
}
Doctor performs health checks on the melange authorization infrastructure.
type Report ¶
type Report struct {
Checks []CheckResult
// Summary counts.
Passed int
Warnings int
Errors int
}
Report contains all health check results.
func (*Report) AddCheck ¶
func (r *Report) AddCheck(check CheckResult)
AddCheck adds a check result and updates summary counts.
Click to show internal directories.
Click to hide internal directories.