Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Registry ¶
func Registry() target.ModuleRegistry
Registry returns a map of all built-in module names to their implementations.
Types ¶
type DirectoryModule ¶
type DirectoryModule struct{}
DirectoryModule manages a directory at a given path. Params:
- path (required): directory path
- ensure: "present" (default) or "absent"
- owner: (future) directory owner
- permissions: (future) directory permissions
type EnvironmentModule ¶
type EnvironmentModule struct{}
EnvironmentModule manages environment variables. Params:
- name (required): variable name
- value (required for ensure=present): variable value
- scope: "user" (default) or "machine"
- ensure: "present" (default) or "absent"
Note: os.Setenv affects the current process. Machine-scope persistence on Windows requires registry writes (handled in environment_windows.go).
type FileModule ¶
type FileModule struct{}
FileModule manages a file at a destination path. Params:
- dest (required): destination path
- src: source path to copy from
- ensure: "present" (default) or "absent"
- owner: (future) file owner
- permissions: (future) file permissions
type PowershellModule ¶
type PowershellModule struct{}
PowershellModule runs PowerShell scripts or files. On non-Windows platforms, attempts to exec `powershell` (WSL/cross-platform compat). Params:
- script: inline PowerShell script string
- file: path to a .ps1 file
- args: list of additional arguments (used with file)
- creates: path that indicates the operation is already done
type RebootModule ¶
type RebootModule struct{}
RebootModule triggers or checks for a pending system reboot. Params:
- condition: "always" (default) or "if_needed"
- timeout: seconds before reboot (default 60, Windows only)
type ShellModule ¶
type ShellModule struct{}
ShellModule runs an arbitrary shell command. Params:
- cmd (required): command to execute
- args: list of arguments
- creates: path; if it exists, skip execution
- working_dir: working directory for the command
type WaitModule ¶
type WaitModule struct{}
WaitModule polls until a condition is met or a timeout expires. Params:
- condition (required): "port_open", "file_exists", or "service_running"
- target (required): address:port / path / service name depending on condition
- timeout: duration string (default "5m")