Versions in this module Expand all Collapse all v0 v0.1.1 Feb 23, 2024 Changes in this version + func Ack(writer io.Writer) error + func CopyN(writer io.Writer, src io.Reader, size int64) (int64, error) + type Client struct + ClientConfig *ssh.ClientConfig + Host string + RemoteBinary string + Timeout time.Duration + func NewClient(host string, config *ssh.ClientConfig) Client + func NewClientBySSH(ssh *ssh.Client) (Client, error) + func NewClientBySSHWithTimeout(ssh *ssh.Client, timeout time.Duration) (Client, error) + func NewClientWithTimeout(host string, config *ssh.ClientConfig, timeout time.Duration) Client + func (a *Client) Close() + func (a *Client) Connect() error + func (a *Client) Copy(ctx context.Context, r io.Reader, remotePath string, permissions string, ...) error + func (a *Client) CopyFile(ctx context.Context, fileReader io.Reader, remotePath string, ...) error + func (a *Client) CopyFilePassThru(ctx context.Context, fileReader io.Reader, remotePath string, ...) error + func (a *Client) CopyFromFile(ctx context.Context, file os.File, remotePath string, permissions string) error + func (a *Client) CopyFromFilePassThru(ctx context.Context, file os.File, remotePath string, permissions string, ...) error + func (a *Client) CopyFromRemote(ctx context.Context, file *os.File, remotePath string) error + func (a *Client) CopyFromRemotePassThru(ctx context.Context, w io.Writer, remotePath string, passThru PassThru) error + func (a *Client) CopyPassThru(ctx context.Context, r io.Reader, remotePath string, permissions string, ...) error + type ClientConfigurer struct + func NewConfigurer(host string, config *ssh.ClientConfig) *ClientConfigurer + func (c *ClientConfigurer) ClientConfig(config *ssh.ClientConfig) *ClientConfigurer + func (c *ClientConfigurer) Create() Client + func (c *ClientConfigurer) Host(host string) *ClientConfigurer + func (c *ClientConfigurer) RemoteBinary(path string) *ClientConfigurer + func (c *ClientConfigurer) SSHClient(sshClient *ssh.Client) *ClientConfigurer + func (c *ClientConfigurer) Timeout(timeout time.Duration) *ClientConfigurer + type FileInfos struct + Filename string + Message string + Permissions string + Size int64 + type PassThru func(r io.Reader, total int64) io.Reader + type Response struct + Message string + Type ResponseType + func ParseResponse(reader io.Reader) (Response, error) + func (r *Response) GetMessage() string + func (r *Response) IsError() bool + func (r *Response) IsFailure() bool + func (r *Response) IsOk() bool + func (r *Response) IsWarning() bool + func (r *Response) ParseFileInfos() (*FileInfos, error) + type ResponseType = uint8 + const Error + const Ok + const Warning