Documentation ¶
Overview ¶
Package cmd provides default implementation for command-line-like actions.
Index ¶
- type ResyncAction
- func (c *ResyncAction) GetDescription(lang ...string) actions.ActionDescription
- func (c *ResyncAction) GetName() string
- func (c *ResyncAction) GetParametersForm() *forms.Form
- func (c *ResyncAction) Init(job *jobs.Job, cl client.Client, action *jobs.Action) error
- func (c *ResyncAction) Run(ctx context.Context, channels *actions.RunnableChannels, ...) (jobs.ActionMessage, error)
- func (c *ResyncAction) SetTask(task *jobs.Task)
- type RpcAction
- func (c *RpcAction) GetDescription(lang ...string) actions.ActionDescription
- func (c *RpcAction) GetName() string
- func (c *RpcAction) GetParametersForm() *forms.Form
- func (c *RpcAction) Init(job *jobs.Job, cl client.Client, action *jobs.Action) error
- func (c *RpcAction) Run(ctx context.Context, channels *actions.RunnableChannels, ...) (jobs.ActionMessage, error)
- type ShellAction
- func (c *ShellAction) GetDescription(lang ...string) actions.ActionDescription
- func (c *ShellAction) GetName() string
- func (c *ShellAction) GetParametersForm() *forms.Form
- func (c *ShellAction) Init(job *jobs.Job, cl client.Client, action *jobs.Action) error
- func (c *ShellAction) Run(ctx context.Context, channels *actions.RunnableChannels, ...) (jobs.ActionMessage, error)
- type WGetAction
- func (w *WGetAction) GetDescription(lang ...string) actions.ActionDescription
- func (w *WGetAction) GetName() string
- func (w *WGetAction) GetParametersForm() *forms.Form
- func (w *WGetAction) Init(job *jobs.Job, cl client.Client, action *jobs.Action) error
- func (w *WGetAction) Run(ctx context.Context, channels *actions.RunnableChannels, ...) (jobs.ActionMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResyncAction ¶
func (*ResyncAction) GetDescription ¶
func (c *ResyncAction) GetDescription(lang ...string) actions.ActionDescription
func (*ResyncAction) GetParametersForm ¶
func (c *ResyncAction) GetParametersForm() *forms.Form
func (*ResyncAction) Run ¶
func (c *ResyncAction) Run(ctx context.Context, channels *actions.RunnableChannels, input jobs.ActionMessage) (jobs.ActionMessage, error)
Run the actual action code
func (*ResyncAction) SetTask ¶
func (c *ResyncAction) SetTask(task *jobs.Task)
Implement TaskUpdaterDelegateAction as the target service will update the task status on its side.
type RpcAction ¶
type RpcAction struct { Client client.Client ServiceName string MethodName string JsonRequest string }
func (*RpcAction) GetDescription ¶
func (c *RpcAction) GetDescription(lang ...string) actions.ActionDescription
func (*RpcAction) GetParametersForm ¶
func (*RpcAction) Run ¶
func (c *RpcAction) Run(ctx context.Context, channels *actions.RunnableChannels, input jobs.ActionMessage) (jobs.ActionMessage, error)
Run the actual action code
type ShellAction ¶
type ShellAction struct { Client client.Client Router *views.Router CmdBin string CmdParameters []string TemporaryFolder string ExitOnError bool // Input via tmp file or via StdIn StreamToStdIn bool UseTemporaryFolder bool // Output (if any) from tmp file or from StdOut OutputNodePlaceHolder string StreamFromStdOut bool // Output result ResultPlaceHolder string }
func (*ShellAction) GetDescription ¶
func (c *ShellAction) GetDescription(lang ...string) actions.ActionDescription
func (*ShellAction) GetParametersForm ¶
func (c *ShellAction) GetParametersForm() *forms.Form
func (*ShellAction) Run ¶
func (c *ShellAction) Run(ctx context.Context, channels *actions.RunnableChannels, input jobs.ActionMessage) (jobs.ActionMessage, error)
Run the actual action code
type WGetAction ¶
type WGetAction struct { Router *views.Router SourceUrl *url.URL // contains filtered or unexported fields }
WGetAction performs a wget command with the provided URL
func (*WGetAction) GetDescription ¶
func (w *WGetAction) GetDescription(lang ...string) actions.ActionDescription
func (*WGetAction) GetName ¶
func (w *WGetAction) GetName() string
GetName returns the unique identifier of this action
func (*WGetAction) GetParametersForm ¶
func (w *WGetAction) GetParametersForm() *forms.Form
func (*WGetAction) Run ¶
func (w *WGetAction) Run(ctx context.Context, channels *actions.RunnableChannels, input jobs.ActionMessage) (jobs.ActionMessage, error)
Run the actual action code
Click to show internal directories.
Click to hide internal directories.