Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileActivity ¶
func NewShellActivity ¶
Types ¶
type FileActivity ¶
type FileActivity struct{}
FileActivity can be used to perform file operations
func (*FileActivity) Name ¶
func (a *FileActivity) Name() string
type FileInput ¶
type FileInput struct {
Operation string `json:"operation"` // read, write, append, delete, exists, mkdir, list
Path string `json:"path"` // file or directory path
Content string `json:"content"` // content to write (for write/append operations)
Permissions string `json:"permissions"` // file permissions (e.g., "0644", "0755")
CreateDirs bool `json:"create_dirs"` // create parent directories if they don't exist
}
FileInput defines the input parameters for the file activity
type ShellActivity ¶
type ShellActivity struct{}
ShellActivity can be used to execute shell commands
func (*ShellActivity) Execute ¶
func (a *ShellActivity) Execute(ctx workflow.Context, params ShellInput) (map[string]any, error)
func (*ShellActivity) Name ¶
func (a *ShellActivity) Name() string
type ShellInput ¶
type ShellInput struct {
Command string `json:"command"`
Args []string `json:"args"`
WorkingDir string `json:"working_dir"`
Environment map[string]string `json:"environment"`
Timeout time.Duration `json:"timeout"` // 0 means no timeout
}
ShellInput defines the input parameters for the shell activity
Click to show internal directories.
Click to hide internal directories.