resources

package
v0.0.0-...-8972199 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalOS

func GetLocalOS() (string, string, error)

GetLocalOS - Get the local

func GetRemoteOS

func GetRemoteOS(client *ssh.Client) (string, string, error)

GetRemoteOS - Function to determine the operating system of the remote system

Types

type Command

type Command struct {
	Name           string   `hcl:"cmd"`
	Arguments      []string `hcl:"args,optional"`
	ExpectedOutput string   `hcl:"expectedOutput"`
	Cmd            *exec.Cmd
	Stdout, Stderr bytes.Buffer
	ExitStatus     int
}

Command - Struct to hold the command block from the HCL Parsing

func NewCommand

func NewCommand(name string, args ...string) *Command

NewCommand - Function to initialize a new command

func (*Command) RunLocal

func (c *Command) RunLocal() error

RunLocal - Function to run a command locally

func (*Command) RunRemote

func (c *Command) RunRemote(client *ssh.Client) error

RunRemote - Function to run a command on a remote system

type OS

type OS struct {
	DistributionID string `hcl:"distributionID"`
	Version        string `hcl:"version,optional"`
}

OS - Struct to hold the os block testing information

Jump to

Keyboard shortcuts

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