doctor

package
v1.5.14 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Key       string   `json:"key"`
	Section   string   `json:"section"`
	Title     string   `json:"title"`
	Summary   string   `json:"summary,omitempty"`
	URL       string   `json:"url,omitempty"`
	UsedBy    string   `json:"usedBy,omitempty"`
	Modules   []string `json:"modules,omitempty"`
	Platforms []string `json:"platforms,omitempty"`
	Core      bool     `json:"core,omitempty"`
	Fn        CheckFn  `json:"-"`
	Solve     SolveFn  `json:"-"`
}

func (*Check) Applies added in v0.10.10

func (c *Check) Applies() bool

func (*Check) Check

func (c *Check) Check(ctx context.Context, logger util.Logger) *Result

type CheckFn

type CheckFn func(ctx context.Context, r *Result, logger util.Logger) *Result

type Checks

type Checks []*Check

func (Checks) Get added in v0.7.15

func (c Checks) Get(key string) *Check

func (Checks) Keys added in v0.10.28

func (c Checks) Keys() []string

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Args    []any  `json:"args,omitempty"`
}

func NewError

func NewError(code string, message string, args ...any) *Error

func (*Error) String

func (e *Error) String() string

type Errors

type Errors []*Error

func (Errors) Find

func (e Errors) Find(code string) *Error

type Result

type Result struct {
	Check     *Check   `json:"-"`
	Key       string   `json:"key"`
	Title     string   `json:"title"`
	Status    string   `json:"status,omitempty"`
	Summary   string   `json:"summary,omitempty"`
	Errors    Errors   `json:"errors,omitempty"`
	Duration  int      `json:"duration,omitempty"`
	Solutions []string `json:"solution,omitempty"`
	Logs      []string `json:"logs,omitempty"`
}

func NewResult

func NewResult(check *Check, key string, title string, summary string) *Result

func (*Result) AddLog

func (p *Result) AddLog(msg string) *Result

func (*Result) AddPackageSolution added in v0.10.10

func (p *Result) AddPackageSolution(name string, pkg string) *Result

func (*Result) AddSolution

func (p *Result) AddSolution(msg string) *Result

func (*Result) CleanSolutions added in v0.9.30

func (p *Result) CleanSolutions() []string

func (*Result) ErrorString added in v0.10.29

func (p *Result) ErrorString() string

func (*Result) WithError

func (p *Result) WithError(err *Error) *Result

type Results

type Results []*Result

func (Results) ErrorSummary added in v0.9.30

func (r Results) ErrorSummary() string

func (Results) Errors added in v0.9.30

func (r Results) Errors() Results

type SolveFn

type SolveFn func(ctx context.Context, r *Result, logger util.Logger) *Result

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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