bash

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirExecStatusMap

type DirExecStatusMap map[string]map[string]FileExecStatus

DirExecStatusMap is a map of: directory -> file exec status of each file within that directory

type FileExecStatus

type FileExecStatus struct {
	StartTime       time.Time `json:"startTime"`
	TimeTaken       string    `json:"timeTaken"`
	LastSuccessTime string    `json:"lastSuccessTime"`
	LastErrorTime   string    `json:"lastErrorTime"`
	State           stateType `json:"state"`
	LogFilePath     string    `json:"logFilePath"`
}

FileExecStatus captures the status of a file

type Instance

type Instance struct {
	AutoYesEnabled  bool
	DryRunEnabled   bool
	RunOnLocal      bool
	ReRun           bool
	LogDir          string
	GeneratedDir    string
	TemplateDir     string
	Error           error
	TimeoutInterval time.Duration
	State
}

Instance is the main struct for bash configs

func (*Instance) DeleteState

func (i *Instance) DeleteState(directory string) *Instance

DeleteState deletes state

func (*Instance) Init

func (i *Instance) Init()

Init the bash instance

func (*Instance) PrintSeparator

func (i *Instance) PrintSeparator()

PrintSeparator prints a separator

func (*Instance) PrintState

func (i *Instance) PrintState(directory string) *Instance

PrintState prints current state

func (*Instance) ReturnState

func (i *Instance) ReturnState(directory string) *Instance

ReturnState returns state

func (*Instance) RunScriptsInDir

func (i *Instance) RunScriptsInDir(fullDirPath string)

RunScriptsInDir handles running of bash files inside a directory

func (*Instance) StopRunningCmd

func (i *Instance) StopRunningCmd()

StopRunningCmd stops currently running command

type State

type State struct {
	StateFilePath        string
	StateFileDefaultname string
	DeploymentID         string
	StateFileName        string
	ReturnStateMap       DirExecStatusMap
	DirExecStatusMap     DirExecStatusMap
}

State is the main struct to hold state object

Jump to

Keyboard shortcuts

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