command

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllDirsInsideTmpl

func GetAllDirsInsideTmpl() ([]string, error)

GetAllDirsInsideTmpl gets all directories inside template folder

Types

type Instance

type Instance struct {
	Config    map[string]interface{}
	Error     error
	Flags     *pflag.FlagSet
	StartTime time.Time
	ConfigDir string
	execution.Instance
}

Instance is the main struct for command configs

func New

func New(flags *pflag.FlagSet) *Instance

New creates a new instance for command execution

func (*Instance) CreateFromConfig

func (i *Instance) CreateFromConfig() *Instance

CreateFromConfig writes config struct to file

func (*Instance) CreateSampleConfigFile

func (i *Instance) CreateSampleConfigFile() *Instance

CreateSampleConfigFile creates sample config file

func (*Instance) DeleteStateForDir

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

DeleteStateForDir deletes state for given dir

func (*Instance) GenerateConfigFilesFromDir

func (i *Instance) GenerateConfigFilesFromDir(dirToGenerateFrom string) *Instance

GenerateConfigFilesFromDir generates all config files

func (*Instance) ParseConfig

func (i *Instance) ParseConfig() *Instance

ParseConfig parses the file passed in through flags

func (*Instance) PrintStateForDir

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

PrintStateForDir prints state for given dir

func (*Instance) ReturnStateForDir

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

ReturnStateForDir prints state for given dir

func (*Instance) RunScripts

func (i *Instance) RunScripts() *Instance

RunScripts runs all scripts in a directory

func (*Instance) StopRunningCommand

func (i *Instance) StopRunningCommand() *Instance

StopRunningCommand stops currently running command

func (*Instance) TimeTaken

func (i *Instance) TimeTaken() *Instance

TimeTaken prints time taken for execution

Jump to

Keyboard shortcuts

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