Documentation
¶
Index ¶
- type Context
- type FileTransfer
- type Host
- type SSHContext
- func (ctx *SSHContext) ActivateConfiguration(host Host, configuration string, action string) error
- func (sshCtx *SSHContext) Cmd(host Host, parts ...string) (*exec.Cmd, error)
- func (sshCtx *SSHContext) CmdContext(ctx context.Context, host Host, parts ...string) (*exec.Cmd, error)
- func (sshCtx *SSHContext) CmdInteractive(host Host, timeout int, parts ...string)
- func (sshCtx *SSHContext) GetBootID(host Host) (string, error)
- func (ctx *SSHContext) MakeDirs(host Host, path string, parents bool, mode os.FileMode) (err error)
- func (ctx *SSHContext) MakeTempFile(host Host) (path string, err error)
- func (ctx *SSHContext) MoveFile(host Host, source string, destination string) (err error)
- func (ctx *SSHContext) SetOwner(host Host, path string, user string, group string) (err error)
- func (ctx *SSHContext) SetPermissions(host Host, path string, permissions string) (err error)
- func (sshCtx *SSHContext) SudoCmd(host Host, parts ...string) (*exec.Cmd, error)
- func (sshCtx *SSHContext) SudoCmdContext(ctx context.Context, host Host, parts ...string) (*exec.Cmd, error)
- func (ctx *SSHContext) UploadFile(host Host, source string, destination string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface {
ActivateConfiguration(host Host, configuration string, action string) error
MakeTempFile(host Host) (path string, err error)
UploadFile(host Host, source string, destination string) error
SetOwner(host Host, path string, user string, group string) error
SetPermissions(host Host, path string, permissions string) error
MoveFile(host Host, source string, destination string) error
MakeDirs(host Host, path string, parents bool, mode os.FileMode) error
Cmd(host Host, parts ...string) (*exec.Cmd, error)
SudoCmd(host Host, parts ...string) (*exec.Cmd, error)
CmdInteractive(host Host, timeout int, parts ...string)
}
type FileTransfer ¶ added in v1.2.0
type SSHContext ¶
type SSHContext struct {
AskForSudoPassword bool
Username string
IdentityFile string
SkipHostKeyCheck bool
// contains filtered or unexported fields
}
func (*SSHContext) ActivateConfiguration ¶
func (ctx *SSHContext) ActivateConfiguration(host Host, configuration string, action string) error
func (*SSHContext) CmdContext ¶ added in v1.2.0
func (*SSHContext) CmdInteractive ¶
func (sshCtx *SSHContext) CmdInteractive(host Host, timeout int, parts ...string)
func (*SSHContext) GetBootID ¶ added in v1.2.0
func (sshCtx *SSHContext) GetBootID(host Host) (string, error)
func (*SSHContext) MakeTempFile ¶
func (ctx *SSHContext) MakeTempFile(host Host) (path string, err error)
func (*SSHContext) MoveFile ¶
func (ctx *SSHContext) MoveFile(host Host, source string, destination string) (err error)
func (*SSHContext) SetPermissions ¶
func (ctx *SSHContext) SetPermissions(host Host, path string, permissions string) (err error)
func (*SSHContext) SudoCmdContext ¶ added in v1.2.0
func (*SSHContext) UploadFile ¶
func (ctx *SSHContext) UploadFile(host Host, source string, destination string) (err error)
Click to show internal directories.
Click to hide internal directories.