ssh_handler

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SshCommand

type SshCommand struct {
	CommandPrefix string
	BaseCommand   string
	EnvVars       map[string]string
	Args          []string
}

func (*SshCommand) GetParsedCommand

func (s *SshCommand) GetParsedCommand() (string, error)

type SshCommandInterface

type SshCommandInterface interface {
	GetParsedCommand() (string, error)
}

type SshConfig

type SshConfig struct {
	// contains filtered or unexported fields
}

func NewSshConfig

func NewSshConfig(host string, port string, user string, password string, privateKey string, privateKeyPassphrase string) *SshConfig

func (*SshConfig) GetHost

func (s *SshConfig) GetHost() string

func (*SshConfig) GetPassword

func (s *SshConfig) GetPassword() string

func (*SshConfig) GetPort

func (s *SshConfig) GetPort() string

func (*SshConfig) GetPrivateKey

func (s *SshConfig) GetPrivateKey() string

func (*SshConfig) GetPrivateKeyPassphrase

func (s *SshConfig) GetPrivateKeyPassphrase() string

func (*SshConfig) GetUser

func (s *SshConfig) GetUser() string

func (*SshConfig) HasChanged

func (s *SshConfig) HasChanged(other *SshConfig) bool

func (*SshConfig) IsValid

func (s *SshConfig) IsValid() error

type SshHandler

type SshHandler struct {
	// contains filtered or unexported fields
}

func NewSshHandler

func NewSshHandler(sshConfig *SshConfig) (*SshHandler, error)

func (*SshHandler) Close

func (s *SshHandler) Close() error

func (*SshHandler) WithSession

func (s *SshHandler) WithSession(ssCommand SshCommandInterface, input *bytes.Buffer) error

func (*SshHandler) WithSessionReturning added in v1.1.0

func (s *SshHandler) WithSessionReturning(ssCommand SshCommandInterface, input *bytes.Buffer) ([]byte, error)

func (*SshHandler) WithTerminalMode

func (s *SshHandler) WithTerminalMode(modes *ssh.TerminalModes) (*context.Context, *context.CancelFunc)

Jump to

Keyboard shortcuts

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