doctor

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Summary

func Summary(results []CheckResult) (passed int, failed int)

Summary returns a summary of check results

Types

type BaseCheck

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

BaseCheck provides common functionality for checks

func (*BaseCheck) Name

func (b *BaseCheck) Name() string

type Check

type Check interface {
	Name() string
	Check(ctx context.Context) CheckResult
}

Check defines the interface for a diagnostic check

type CheckResult

type CheckResult struct {
	Name    string
	Passed  bool
	Message string
	Details map[string]string
}

CheckResult represents the result of a single diagnostic check

type DockerCheck

type DockerCheck struct {
	BaseCheck
}

DockerCheck validates Docker installation and daemon status

func NewDockerCheck

func NewDockerCheck() *DockerCheck

func (*DockerCheck) Check

func (c *DockerCheck) Check(ctx context.Context) CheckResult

type ForgeMetadataCheck

type ForgeMetadataCheck struct {
	BaseCheck
}

ForgeMetadataCheck validates project metadata if in a Forge project

func NewForgeMetadataCheck

func NewForgeMetadataCheck() *ForgeMetadataCheck

func (*ForgeMetadataCheck) Check

type GoCheck

type GoCheck struct {
	BaseCheck
}

GoCheck validates Go installation and version

func NewGoCheck

func NewGoCheck() *GoCheck

func (*GoCheck) Check

func (c *GoCheck) Check(ctx context.Context) CheckResult

type PostgreSQLCheck

type PostgreSQLCheck struct {
	BaseCheck
}

PostgreSQLCheck validates PostgreSQL connectivity

func NewPostgreSQLCheck

func NewPostgreSQLCheck() *PostgreSQLCheck

func (*PostgreSQLCheck) Check

type RedisCheck

type RedisCheck struct {
	BaseCheck
}

RedisCheck validates Redis connectivity

func NewRedisCheck

func NewRedisCheck() *RedisCheck

func (*RedisCheck) Check

func (c *RedisCheck) Check(ctx context.Context) CheckResult

type Runner

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

Runner executes a collection of checks and reports results

func NewRunner

func NewRunner(checks ...Check) *Runner

NewRunner creates a new check runner with the given checks

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) []CheckResult

Run executes all checks and returns the results

Jump to

Keyboard shortcuts

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