internal

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle()

func Initialize

func Initialize()

Types

type Config

type Config struct {
	Debug     bool  `yaml:"debug"`
	Verbosity int   `yaml:"verbosity"`
	Tests     Tests `yaml:"tests"`

	Delay   time.Duration `yaml:"delay"`
	Retries uint          `yaml:"retries"`
	DSN     pg.Dsn        `yaml:"dsn"`
	// contains filtered or unexported fields
}

func (Config) Name

func (c Config) Name() (name string)

type Configs

type Configs []Config

func GetConfigs

func GetConfigs() (configs Configs, err error)

func NewConfigsFromFile

func NewConfigsFromFile(path string) (c Configs, err error)

func NewConfigsFromReader

func NewConfigsFromReader(reader io.Reader, name string) (configs Configs, err error)

func NewConfigsFromStdin

func NewConfigsFromStdin() (configs Configs, err error)

func ReadFromFileOrDir

func ReadFromFileOrDir(path string) (configs Configs, err error)

ReadFromFileOrDir returns an array of Configs parsed from all yaml files, found while recursively walking through a directory, while following symlinks as needed.

type Test

type Test struct {
	Name    string     `yaml:"name"`
	Check   string     `yaml:"check"`
	Divisor string     `yaml:"divisor"`
	Url     string     `yaml:"url"`
	Advice  string     `yaml:"advice"`
	Results pg.Results `yaml:"results"`
	Score   TestScore  `yaml:"score"`
}

func (*Test) Validate

func (t *Test) Validate() (err error)

type TestScore

type TestScore struct {
	Min    float32 `yaml:"min"`
	Max    float32 `yaml:"max"`
	Weight float32 `yaml:"weight"`
}

func (TestScore) Flawless

func (ts TestScore) Flawless() float64

func (TestScore) FromResult

func (ts TestScore) FromResult(dividend float64, divisor float64) float64

func (TestScore) Validate

func (ts TestScore) Validate() (err error)

type Tests

type Tests []Test

Jump to

Keyboard shortcuts

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