runner

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandTildeInPath

func ExpandTildeInPath(path string) string

Types

type CommandRunner

type CommandRunner interface {
	Run(cmdStr string) (stdOut string, stdErr string, err error)
}

type CopyFromRemoteToLocalRunner

type CopyFromRemoteToLocalRunner struct {
	SshApi  *sshwrapper.SshApi
	Verbose bool
}

func NewCopyFromRemoteToLocalRunner

func NewCopyFromRemoteToLocalRunner(sshApi *sshwrapper.SshApi) CopyFromRemoteToLocalRunner

func (CopyFromRemoteToLocalRunner) Copy

func (runner CopyFromRemoteToLocalRunner) Copy(source string, dest string) (stdOut string, stdErr string, err error)

type CopyRunner

type CopyRunner interface {
	Copy(source string, dest string) (stdOut string, stdErr string, err error)
}

type CopyToLocalFromLocalRunner

type CopyToLocalFromLocalRunner struct {
	SshApi  *sshwrapper.SshApi
	Verbose bool
}

func NewCopyToLocalFromLocalRunner

func NewCopyToLocalFromLocalRunner(sshApi *sshwrapper.SshApi) CopyToLocalFromLocalRunner

func (CopyToLocalFromLocalRunner) Copy

func (runner CopyToLocalFromLocalRunner) Copy(source string, dest string) (stdOut string, stdErr string, err error)

type CopyToRemoteFromLocalRunner

type CopyToRemoteFromLocalRunner struct {
	SshApi  *sshwrapper.SshApi
	Verbose bool
}

func NewCopyToRemoteFromLocalRunner

func NewCopyToRemoteFromLocalRunner(sshApi *sshwrapper.SshApi) CopyToRemoteFromLocalRunner

func (CopyToRemoteFromLocalRunner) Copy

func (runner CopyToRemoteFromLocalRunner) Copy(source string, dest string) (stdOut string, stdErr string, err error)

type DockerCommandRunner

type DockerCommandRunner struct {
	Container      string
	Shell          string // used to run your command in a shell docker exec %CONTAINER %SHELL -c '%CMD'
	CommandPattern string // use this to run your own run patter, should look like docker exec %s %s (first is container name, second your command, shell is no used here)
	Verbose        bool
}

func NewDockerCommandRunner

func NewDockerCommandRunner(container string) DockerCommandRunner

func (DockerCommandRunner) Run

func (runner DockerCommandRunner) Run(cmdStr string) (stdOut string, stdErr string, err error)

type LocalCommandRunner

type LocalCommandRunner struct {
	Verbose bool
}

func NewLocalCommandRunner

func NewLocalCommandRunner() LocalCommandRunner

func (LocalCommandRunner) Run

func (runner LocalCommandRunner) Run(cmdStr string) (stdOut string, stdErr string, err error)

type SshCommandRunner

type SshCommandRunner struct {
	SshApi  *sshwrapper.SshApi
	Verbose bool
}

func NewSshCommandRunner

func NewSshCommandRunner(sshApi *sshwrapper.SshApi) SshCommandRunner

func (SshCommandRunner) Run

func (runner SshCommandRunner) Run(cmdStr string) (stdOut string, stdErr string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL