core

package
v0.0.0-...-d379aa0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(s string)

Create device directory if it does not already exist

func FileStat

func FileStat(filename string) error

FileStat checks if a file exists and is readable

func LoadCommands

func LoadCommands(fileName string) data.Commands

func LoadDevices

func LoadDevices(fileName string) driver.Devices

Load a list of devices from a JSON file

func LoadVariables

func LoadVariables(fileName string) data.Variables

func WriteToFile

func WriteToFile(results []data.Result)

Write the output from commands run against devices to a plain text file

func WriteToJSONFile

func WriteToJSONFile(results []data.Result)

Write the output from commands run against devices to a json file

Types

type CommandExpect

type CommandExpect struct {
	CommandExpect []Expect `json:"command_expect"`
}

CommandExpect holds a slice of Expect Structs

type Expect

type Expect struct {
	Command   string `json:"command"`
	Expecting string `json:"expecting"`
	Timeout   int64  `json:"timeout"`
}

Expect struct Command: command to run Expecting: string you are expecting Timeout: How long to wait for a command

type Params

type Params struct {
	Credentials data.Credentials
	Devices     driver.Devices
	Commands    data.Commands
	NoOp        bool
}

Params contain the result of CLI input

func CLI

func CLI() Params

CLI is the interface to the CLI application

Jump to

Keyboard shortcuts

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