client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientManagerDefault = &ClientManager{}

Functions

This section is empty.

Types

type AWSSSMConnection

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

func (*AWSSSMConnection) Command

func (a *AWSSSMConnection) Command(cmdLine []string) ([]byte, error)

func (*AWSSSMConnection) Connect

func (a *AWSSSMConnection) Connect() error

func (*AWSSSMConnection) CopyFile

func (a *AWSSSMConnection) CopyFile(localPath string, remotePath string) error

func (*AWSSSMConnection) Disconnect

func (a *AWSSSMConnection) Disconnect() error

func (*AWSSSMConnection) Info

func (a *AWSSSMConnection) Info() string

func (*AWSSSMConnection) User

func (a *AWSSSMConnection) User() string

type Client

type Client struct {
	Env     map[string]string
	WorkDir string
	Sudo    bool
	// contains filtered or unexported fields
}

func (Client) Command

func (c Client) Command(cmdLine []string) ([]byte, error)

func (Client) Connect

func (c Client) Connect() error

func (Client) ConnectWithRetry

func (c Client) ConnectWithRetry(timeout time.Duration, callback func()) error

func (Client) Connection

func (c Client) Connection() Connection

func (Client) DirCopy

func (c Client) DirCopy(localPath string, remotePath string, override bool) error

func (Client) DirEnsure

func (c Client) DirEnsure(path string) error

func (Client) DirExists

func (c Client) DirExists(path string) (bool, error)

func (Client) Disconnect

func (c Client) Disconnect() error

func (Client) FileCopy

func (c Client) FileCopy(localPath string, remotePath string, override bool) error

func (Client) FileExists

func (c Client) FileExists(path string) (bool, error)

func (Client) FileMakeExecutable

func (c Client) FileMakeExecutable(path string) error

func (Client) FileMove

func (c Client) FileMove(oldPath string, newPath string) error

func (Client) FileWrite

func (c Client) FileWrite(remotePath string, text string) error

func (Client) PathCopy

func (c Client) PathCopy(localPath string, remotePath string, override bool) error

func (Client) PathDelete

func (c Client) PathDelete(path string) error

func (Client) RunShellCommand

func (c Client) RunShellCommand(cmd string, dir string) ([]byte, error)

func (Client) RunShellPurely

func (c Client) RunShellPurely(cmd string) ([]byte, error)

func (Client) RunShellScript

func (c Client) RunShellScript(cmdName string, cmdScript string, dir string) ([]byte, error)

func (Client) SetupEnv

func (c Client) SetupEnv() error

func (Client) TypeName

func (c Client) TypeName() string

func (Client) Use

func (c Client) Use(callback func(c Client) error) error

type ClientManager

type ClientManager struct{}

func (ClientManager) Make

func (c ClientManager) Make(typeName string, settings map[string]string) (*Client, error)

func (ClientManager) Use

func (c ClientManager) Use(typeName string, settings map[string]string, callback func(c Client) error) error

type Connection

type Connection interface {
	Info() string
	User() string
	Connect() error
	Disconnect() error
	Command(cmdLine []string) ([]byte, error)
	CopyFile(localPath string, remotePath string) error
}

type SSHConnection

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

func (*SSHConnection) Command

func (s *SSHConnection) Command(cmdLine []string) ([]byte, error)

func (*SSHConnection) Connect

func (s *SSHConnection) Connect() error

func (*SSHConnection) CopyFile

func (s *SSHConnection) CopyFile(localPath string, remotePath string) error

func (*SSHConnection) Disconnect

func (s *SSHConnection) Disconnect() error

func (*SSHConnection) Info

func (s *SSHConnection) Info() string

func (*SSHConnection) User

func (s *SSHConnection) User() string

Jump to

Keyboard shortcuts

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