software

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 6 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 {
	// Command is the command to run including arguments
	Command []string `json:"command" yaml:"command"`
	// ExitCode is the expected exit code we can expect from the command running if defined
	ExitCode int `json:"exitCode" yaml:"exitCode"`
	// Stdout is the expected output on stdout if defined
	Stdout *string `json:"stdout" yaml:"stdout"`
	// Stderr is the expected output on stderr if defined
	Stderr *string `json:"stderr" yaml:"stderr"`
	// contains filtered or unexported fields
}

func (Check) GetObserved

func (check Check) GetObserved() *Check

GetObserved returns the observed results, a nil indicates the check has never been run before

func (*Check) Run

func (check *Check) Run() error

Run executes the check, use check.Verify() to verify the results, if this function returns an error, it's a system-type error meaning it has nothing to do with the command itself, but with it's invocation on the host system

func (Check) Verify

func (check Check) Verify() error

Verify returns nil on veritfication succeeded, returns an error instance containing the reason why verification failed otherwise

type Software

type Software struct {
	Name  string `json:"name" yaml:"name"`
	Check Check  `json:"check" yaml:"check"`
}

Software represents a software that should be installed on the user's machine

Jump to

Keyboard shortcuts

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