Versions in this module Expand all Collapse all v1 v1.1.3 Nov 9, 2024 Changes in this version + var DefaultCiphers = []string + func Ack(writer io.Writer) error + func CopyFromLocal(ctx context.Context, s *ssh.Session, localPath string, remotePath string) error + func CopyFromRemote(ctx context.Context, s *ssh.Session, remotePath string, localPath string) error + func CopyN(writer io.Writer, src io.Reader, size int64) (int64, error) + func LoadConfig() error + func LoadConfigBytes(names ...string) ([]byte, error) + func LoadSshConfig() error + func ParseHostFile(s string) (host string, filePath string, err error) + func RecordHistory(cmd string) error + func SetLogger(logger Logger) + type CallbackShell struct + Cmd string + Delay time.Duration + type Client interface + Login func() + Scp func(ScpOption) + func NewClient(node *Node) Client + type FileInfos struct + Filename string + Message string + Permissions string + Size int64 + type Logger interface + Error func(args ...interface{}) + Errorf func(format string, args ...interface{}) + Info func(args ...interface{}) + Infof func(format string, args ...interface{}) + func GetLogger() Logger + type Node struct + Alias string + CallbackShells []*CallbackShell + Children []*Node + Host string + Jump []*Node + KeyPath string + Name string + Passphrase string + Password string + Port int + User string + func GetConfig() []*Node + func (n *Node) String() string + 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 + type ScpOption struct + SrcFilePath string + SrcHost string + TarFilePath string + TarHost string + func ParseScpOption(s string) (ScpOption, error) + func (o *ScpOption) Valid() error