Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOp ¶
func GetOp() ops.RegisterableOp
NewCommandExecutionActivity creates a new command execution activity that implements RegisterableOp
Types ¶
type CommandExecutionConfig ¶
type CommandExecutionConfig struct {
// Optional: working directory for command execution
WorkingDir string `json:"working_dir"`
// Optional: shell to use (bash, sh, powershell, cmd)
Shell string `json:"shell"`
// Optional: environment variables
Env map[string]string `json:"env" secret:"env"`
}
CommandExecutionConfig defines the configuration for command execution activities - ALL fields MUST have json tags
type CommandExecutionInput ¶
type CommandExecutionInput struct {
Run string `json:"run" validate:"required"` // Required: command to execute
WorkingDirectory string `json:"working_directory" default:"{{ context.environment.op.worktree_path }}"` // Optional: override working directory
Shell string `json:"shell" validate:"omitempty,oneof=bash sh powershell cmd"` // Optional: override shell
Env map[string]string `json:"env" secret:"env"` // Optional: additional env vars
ContinueOnError bool `json:"continue_on_error"` // Optional: don't fail on non-zero exit
Timeout string `json:"timeout"` // Optional: timeout duration (e.g., "30s")
}
CommandExecutionInput defines the input for command execution activities - ALL fields MUST have json tags
type CommandExecutionOutput ¶
type CommandExecutionOutput struct {
Stdout string `json:"stdout"` // Standard output
Stderr string `json:"stderr"` // Standard error
ExitCode int `json:"exit_code"` // Process exit code
Success bool `json:"success"` // Whether command succeeded
TimedOut bool `json:"timed_out"` // Whether command timed out
ErrorMessage string `json:"error_message"` // Error message if failed
}
CommandExecutionOutput defines the output from command execution activities - ALL fields MUST have json tags
Click to show internal directories.
Click to hide internal directories.