Documentation ¶
Index ¶
- func ValidateShellConfig(shell ShellConfig)
- type CmdWrapper
- func (c *CmdWrapper) AttachIo()
- func (c *CmdWrapper) ExitCode() int
- func (c *CmdWrapper) Output() ([]byte, error)
- func (c *CmdWrapper) Pid() int
- func (c *CmdWrapper) Run() error
- func (c *CmdWrapper) SetCmdArgs()
- func (c *CmdWrapper) SetDir(dir string)
- func (c *CmdWrapper) SetEnv(env []string)
- func (c *CmdWrapper) Start() error
- func (c *CmdWrapper) StderrPipe() (io.ReadCloser, error)
- func (c *CmdWrapper) StdinPipe() (io.WriteCloser, error)
- func (c *CmdWrapper) StdoutPipe() (io.ReadCloser, error)
- func (c *CmdWrapper) Stop(sig int, parentOnly bool) error
- func (c *CmdWrapper) Wait() error
- type CmdWrapperPty
- type Commander
- type MockCommand
- func (c *MockCommand) ExitCode() int
- func (c *MockCommand) Output() ([]byte, error)
- func (c *MockCommand) Pid() int
- func (c *MockCommand) SetCmdArgs()
- func (c *MockCommand) SetDir(dir string)
- func (c *MockCommand) SetEnv(env []string)
- func (c *MockCommand) Start() error
- func (c *MockCommand) StderrPipe() (io.ReadCloser, error)
- func (c *MockCommand) StdoutPipe() (io.ReadCloser, error)
- func (c *MockCommand) Stop(_ int) error
- func (c *MockCommand) Wait() error
- type ShellConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateShellConfig ¶ added in v0.29.1
func ValidateShellConfig(shell ShellConfig)
Types ¶
type CmdWrapper ¶ added in v0.55.0
type CmdWrapper struct {
// contains filtered or unexported fields
}
func BuildCommand ¶
func BuildCommand(cmd string, args []string) *CmdWrapper
func BuildCommandContext ¶
func BuildCommandContext(ctx context.Context, shellCmd string) *CmdWrapper
func BuildCommandShellArgContext ¶ added in v0.29.1
func BuildCommandShellArgContext(ctx context.Context, shell ShellConfig, cmd string) *CmdWrapper
func (*CmdWrapper) AttachIo ¶ added in v0.75.0
func (c *CmdWrapper) AttachIo()
func (*CmdWrapper) ExitCode ¶ added in v0.55.0
func (c *CmdWrapper) ExitCode() int
func (*CmdWrapper) Output ¶ added in v1.46.0
func (c *CmdWrapper) Output() ([]byte, error)
func (*CmdWrapper) Pid ¶ added in v0.55.0
func (c *CmdWrapper) Pid() int
func (*CmdWrapper) Run ¶ added in v0.60.0
func (c *CmdWrapper) Run() error
func (*CmdWrapper) SetCmdArgs ¶ added in v0.55.0
func (c *CmdWrapper) SetCmdArgs()
func (*CmdWrapper) SetDir ¶ added in v0.55.0
func (c *CmdWrapper) SetDir(dir string)
func (*CmdWrapper) SetEnv ¶ added in v0.55.0
func (c *CmdWrapper) SetEnv(env []string)
func (*CmdWrapper) Start ¶ added in v0.55.0
func (c *CmdWrapper) Start() error
func (*CmdWrapper) StderrPipe ¶ added in v0.55.0
func (c *CmdWrapper) StderrPipe() (io.ReadCloser, error)
func (*CmdWrapper) StdinPipe ¶ added in v1.9.0
func (c *CmdWrapper) StdinPipe() (io.WriteCloser, error)
func (*CmdWrapper) StdoutPipe ¶ added in v0.55.0
func (c *CmdWrapper) StdoutPipe() (io.ReadCloser, error)
func (*CmdWrapper) Stop ¶ added in v0.55.0
func (c *CmdWrapper) Stop(sig int, parentOnly bool) error
func (*CmdWrapper) Wait ¶ added in v0.55.0
func (c *CmdWrapper) Wait() error
type CmdWrapperPty ¶ added in v0.88.0
type CmdWrapperPty struct { *CmdWrapper // contains filtered or unexported fields }
func BuildPtyCommand ¶ added in v0.88.0
func BuildPtyCommand(cmd string, args []string) *CmdWrapperPty
func (*CmdWrapperPty) SetCmdArgs ¶ added in v0.88.0
func (c *CmdWrapperPty) SetCmdArgs()
func (*CmdWrapperPty) Start ¶ added in v0.88.0
func (c *CmdWrapperPty) Start() (err error)
func (*CmdWrapperPty) StderrPipe ¶ added in v0.88.0
func (c *CmdWrapperPty) StderrPipe() (io.ReadCloser, error)
func (*CmdWrapperPty) StdinPipe ¶ added in v1.9.0
func (c *CmdWrapperPty) StdinPipe() (io.WriteCloser, error)
func (*CmdWrapperPty) StdoutPipe ¶ added in v0.88.0
func (c *CmdWrapperPty) StdoutPipe() (io.ReadCloser, error)
func (*CmdWrapperPty) Wait ¶ added in v0.88.0
func (c *CmdWrapperPty) Wait() error
type Commander ¶ added in v0.88.0
type Commander interface { Stop(sig int, _parentOnly bool) error SetCmdArgs() Start() error Run() error Wait() error ExitCode() int Pid() int StdoutPipe() (io.ReadCloser, error) StderrPipe() (io.ReadCloser, error) StdinPipe() (io.WriteCloser, error) AttachIo() SetEnv(env []string) SetDir(dir string) Output() ([]byte, error) }
type MockCommand ¶ added in v0.55.0
type MockCommand struct {
// contains filtered or unexported fields
}
func NewMockCommand ¶ added in v0.55.0
func NewMockCommand() *MockCommand
func (*MockCommand) ExitCode ¶ added in v0.55.0
func (c *MockCommand) ExitCode() int
func (*MockCommand) Output ¶ added in v1.46.0
func (c *MockCommand) Output() ([]byte, error)
func (*MockCommand) Pid ¶ added in v0.55.0
func (c *MockCommand) Pid() int
func (*MockCommand) SetCmdArgs ¶ added in v0.55.0
func (c *MockCommand) SetCmdArgs()
func (*MockCommand) SetDir ¶ added in v0.55.0
func (c *MockCommand) SetDir(dir string)
func (*MockCommand) SetEnv ¶ added in v0.55.0
func (c *MockCommand) SetEnv(env []string)
func (*MockCommand) Start ¶ added in v0.55.0
func (c *MockCommand) Start() error
func (*MockCommand) StderrPipe ¶ added in v0.55.0
func (c *MockCommand) StderrPipe() (io.ReadCloser, error)
func (*MockCommand) StdoutPipe ¶ added in v0.55.0
func (c *MockCommand) StdoutPipe() (io.ReadCloser, error)
func (*MockCommand) Stop ¶ added in v0.55.0
func (c *MockCommand) Stop(_ int) error
func (*MockCommand) Wait ¶ added in v0.55.0
func (c *MockCommand) Wait() error
type ShellConfig ¶ added in v0.29.1
type ShellConfig struct { ShellCommand string `yaml:"shell_command"` ShellArgument string `yaml:"shell_argument"` ElevatedShellCmd string `yaml:"elevated_shell_command"` ElevatedShellArg string `yaml:"elevated_shell_argument"` }
func DefaultShellConfig ¶ added in v0.29.1
func DefaultShellConfig() *ShellConfig
Click to show internal directories.
Click to hide internal directories.