Versions in this module Expand all Collapse all v0 v0.2.8 Jul 12, 2026 Changes in this version + const ContextFormatBase64 + const ContextFormatJSON + const StepOutputTypeJson + const StepOutputTypePlain + const StepOutputTypeStruct + func BuildContexts(files, flags []string, format string) (map[string]map[string]any, error) + func ChdirOrCreate(dir string) error + func LoadContextFiles(files []string) (map[string]map[string]any, error) + func MergeContexts(dst, src map[string]map[string]any) + func ParseContextFlags(flags []string, format string) (map[string]map[string]any, error) + func RenderTemplate(content string, contexts map[string]map[string]any) (string, error) + func ShellEscape(cmd string) string + type Agent struct + func NewAgent() *Agent + func (a *Agent) AgentWithCallback(callback func(interface{}), format int) RunOption + func (a *Agent) AgentWithConfigs(w WorkflowConfig, i InventoryConfig) RunOption + func (a *Agent) AgentWithContexts(contexts map[string]map[string]any) RunOption + func (a *Agent) AgentWithFiles(w string, i string) RunOption + func (a *Agent) Install(args InstallArgs) error + func (a *Agent) InstallDev(ic InventoryConfig) error + func (a *Agent) InstallProd(ic InventoryConfig) error + func (a *Agent) Run(opts ...RunOption) error + func (a *Agent) Uninstall(args UninstallArgs) error + type AuthenticateArgs struct + Host string + Password string + Port int + PrivateSshKey string + User string + type CopyFileArgs struct + Client *ssh.Client + From string + Permissions string + To string + type Defaults struct + Directory string + Shell string + type ExecuteArgs struct + Command string + Directory string + ErrorCallback func(string) + OutputCallback func(string) + Shell string + type ExecuteCommandArgs struct + Client *ssh.Client + Command string + ErrorCallback func(string) + OutputCallback func(string) + type InstallArgs struct + Ic InventoryConfig + If string + Mode string + type Inventory struct + func NewInventory() *Inventory + func (i *Inventory) Decrypt(ciphertext string, decryptionKey string) (*string, error) + func (i *Inventory) Encrypt(file string, encryptionKey string) (*string, error) + func (i *Inventory) Load(file string) (*InventoryConfig, error) + type InventoryConfig struct + Servers []Server + type Job struct + Name string + Needs string + RunsOn string + Steps []Step + type JobState map[string]State + type RunArgs struct + Callback func(interface{}) + Contexts map[string]map[string]any + Ic *InventoryConfig + If *string + StepOutputType int + Wc *WorkflowConfig + Wf *string + type RunOption func(*RunArgs) + type Server struct + Host string + Name string + Port int + PrivateSshKey string + SshPassword string + SudoPassword string + User string + func (s *Server) UnmarshalYAML(unmarshal func(interface{}) error) error + type Ssh struct + func NewSsh() *Ssh + func (s *Ssh) Authenticate(args AuthenticateArgs) (*ssh.Client, error) + func (s *Ssh) CopyFile(args CopyFileArgs) error + func (s *Ssh) CopyTo(client *ssh.Client, source string, destination string) error + func (s *Ssh) CreateDirectory(sftpClient *sftp.Client, dirPath string) error + func (s *Ssh) ExecuteCommand(args ExecuteCommandArgs) (string, string, error) + type State struct + Error error + IsCompleted bool + IsSuccessful bool + type Step struct + Directory string + Name string + Run string + Shell string + type StepOutputPlain string + type UninstallArgs struct + Ic InventoryConfig + If string + type Workflow struct + func NewWorkflow() *Workflow + func (w *Workflow) Dump(content WorkflowConfig) (*string, error) + func (w *Workflow) Execute(args ExecuteArgs) error + func (w *Workflow) Load(file string) (*WorkflowConfig, error) + func (w *Workflow) Run(opts ...WorkflowRunOptions) error + func (w *Workflow) WorkflowWithCallback(callback func(any), sot int) WorkflowRunOptions + func (w *Workflow) WorkflowWithConfig(config WorkflowConfig) WorkflowRunOptions + func (w *Workflow) WorkflowWithContexts(contexts map[string]map[string]any) WorkflowRunOptions + func (w *Workflow) WorkflowWithDirectory(directory string) WorkflowRunOptions + func (w *Workflow) WorkflowWithFile(file string) WorkflowRunOptions + type WorkflowConfig struct + Defaults Defaults + Directory string + Jobs []Job + Name string + On struct{ ... } + type WorkflowRunArgs struct + Callback func(any) + Config *WorkflowConfig + Contexts map[string]map[string]any + Directory string + File *string + StepOutputType int + type WorkflowRunOptions func(*WorkflowRunArgs) + type WorkflowStepOutputStruct struct + Command string + Message string + Path string