Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PlatformLinux is a universal string for linux-based operating systems // based on the possible values of runtime.GOOS PlatformLinux = "linux" // PlatformMac is a universal string for macos-based operating systems // based on the possible values of runtime.GOOS PlatformMac = "darwin" // PlatformWindows is a universal string for windows-based operating systems // based on the possible values of runtime.GOOS PlatformWindows = "windows" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct {
// Command is the command to run including arguments
Command []string `json:"command" yaml:"command,omitempty"`
// ExitCode is the expected exit code we can expect from the command running if defined
ExitCode int `json:"exitCode" yaml:"exitCode,omitempty"`
// Stdout is the expected output on stdout if defined
Stdout *string `json:"stdout" yaml:"stdout,omitempty"`
// Stderr is the expected output on stderr if defined
Stderr *string `json:"stderr" yaml:"stderr,omitempty"`
// contains filtered or unexported fields
}
Check represents a functional check on whether the software exists. It works by running the command as specified in Command and comparing the output with the provided ExitCode, Stdout, and Stderr.
Usage: 1. Use `.Run()` method to run the check, results will be stored in the `.observed` property 1. Use `.Verify()` method to verify that the `.observed` property matches the provided parameters
func (Check) GetObserved ¶
GetObserved returns the observed results, a nil indicates the check has never been run before
type Install ¶ added in v0.0.16
type Install struct {
Link string `json:"link" yaml:"link"`
}
Install defines installation instructions for the software
type Software ¶
type Software struct {
Name string `json:"name" yaml:"name,omitempty"`
Description string `json:"description" yaml:"description,omitempty"`
// Platforms when specified, restricts the operations to run only
// when the check is being run on the allowed operating systems
Platforms Platforms `json:"platforms" yaml:"platforms,omitempty"`
Check Check `json:"check" yaml:"check,omitempty"`
Install Install `json:"install" yaml:"install,omitempty"`
}
Software represents a software that should be installed on the user's machine
Click to show internal directories.
Click to hide internal directories.