Documentation
¶
Index ¶
Constants ¶
const KindChecklist = "Checklist"
KindChecklist defines the name for a checklist step in the config file
const KindCommand = "Command"
KindCommand defines the name for a command step in the config file
const KindCopy = "Copy"
KindCopy is the name used to define this kind of step in the config file
const KindCreateFolder = "CreateFolder"
KindCreateFolder defines the name for a create folder step in the config file
const KindDelete = "Delete"
KindDelete defines the name for a delete step in the config file
const KindDownload = "Download"
KindDownload defines the name for a download step in the config file
const KindService = "Service"
KindService defines the name for a step that can start/stop a service
const KindUnzip = "Unzip"
KindUnzip defines the name for a unzip step in the config file
const KindWatch = "Watch"
KindWatch defines the name for a log step in the config file
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
DownloadFile will download a url to a local file. It's efficient because it will write as it downloads and not load the whole file into memory.
Types ¶
type Checklist ¶
type Checklist struct {
model.RunnableStep
// Items represents the individual checks the user has to tick
Items []string
// Message can be used to give the user and indication of what the checklist is used for
Message string
}
Checklist is a step used to show the user a list of items to tick
func (*Checklist) FromConfig ¶
FromConfig creates the struct representation of a step showing a checklist
func (Checklist) GetDescription ¶
GetDescription returns a summary of what this steps does
type Command ¶
type Command struct {
model.RunnableStep
Command string
Args []string
Path string
// Whether or not the output of the command is printed to the console
Silent bool
}
Command executes the defined command
func (*Command) FromConfig ¶
FromConfig creates a command struct from the given config
func (Command) GetDescription ¶
GetDescription gives a description of what this step does
type Copy ¶
type Copy struct {
model.RunnableStep
Source string
Destination string
}
Copy represents the struct of a step type that can be used to copy a file or folder
func (Copy) Execute ¶
Execute determins if a file or folder has to be copied an triggers the apropiate copy operation
func (*Copy) FromConfig ¶
FromConfig creates the copy struct based on the provided config data
func (Copy) GetDescription ¶
GetDescription gives a short summary of what this step does
type CreateFolder ¶
type CreateFolder struct {
model.RunnableStep
Path string
}
CreateFolder is a step that is used to create a folder
func (CreateFolder) Execute ¶
func (createFolder CreateFolder) Execute() model.Result
Execute create a folder at a defined path
func (*CreateFolder) FromConfig ¶
func (createFolder *CreateFolder) FromConfig(configYaml map[string]interface{}) error
FromConfig create the struct representation of a step creating a folder
func (CreateFolder) GetDescription ¶
func (createFolder CreateFolder) GetDescription() string
GetDescription returns a summary of what this step does
func (CreateFolder) GetKind ¶
func (createFolder CreateFolder) GetKind() string
GetKind returns the type this step is of
type Delete ¶
type Delete struct {
model.RunnableStep
Path string
}
Delete is a step used to delete a file/folder
func (*Delete) FromConfig ¶
FromConfig creates the struct representation of a step deleting a file/folder
func (Delete) GetDescription ¶
GetDescription returns a summary of what this step does
type Download ¶
type Download struct {
model.RunnableStep
URL string
Path string
}
Download represents a step used to download a file from aj url
func (*Download) FromConfig ¶
FromConfig creates the struct representation of a download step
func (Download) GetDescription ¶
GetDescription returns a text summarizing what this step does
type Service ¶
type Service struct {
model.RunnableStep
// Name of the Servie according to it's preferences. (Attention: In Windows there is a "service name" and a "display name". Here the "service name" has to be used.)
Name string
// Action whether to "start/stop" the service
Action string
}
Service represents a step used to start/stop a service
func (*Service) FromConfig ¶
FromConfig creates the struct representation of a service step
func (Service) GetDescription ¶
GetDescription returns a text summarizing what this step does
type Unzip ¶
type Unzip struct {
model.RunnableStep
Source string
Destination string
}
Unzip represents a task used to unzip a zip archive file
func (*Unzip) FromConfig ¶
FromConfig creates the struct representation of a unzip step
func (Unzip) GetDescription ¶
GetDescription returns a text summarizing what this step does
type Watch ¶
type Watch struct {
model.RunnableStep
// Path is the location the file to be watched can be found
Path string
// Message is the string which the file is watched for
Message string
// Timeout in seconds after which watching the file will be interrupted (default time out is )
Timeout int
}
Watch is a step used to watch a file
func (Watch) Execute ¶
Execute starts the file watcher and terminates it if the defined string appeared or a timeout is reached.
func (*Watch) FromConfig ¶
FromConfig creates the struct representation of a step watching a file for a certain string
func (Watch) GetDescription ¶
GetDescription returns a summary of what this step does