Documentation ¶
Index ¶
- func Command(name string, arg ...string) string
- func Dir(path string) string
- func Exists(path string) bool
- func FileName(path string) string
- type Cmd
- type FileInfo
- type LocalSession
- func (s *LocalSession) CombinedOutput(name string, arg ...string) ([]byte, error)
- func (s *LocalSession) Create(name string) error
- func (s *LocalSession) Exists(path string) (bool, error)
- func (s *LocalSession) MakeDirAll(path string, perm os.FileMode) error
- func (s *LocalSession) Output(name string, arg ...string) ([]byte, error)
- func (s *LocalSession) OutputGrep(cmdList []Cmd) ([]byte, error)
- func (s *LocalSession) ReadDir(dir string) ([]FileInfo, error)
- func (s *LocalSession) ReadFile(fileName string) ([]byte, error)
- func (s *LocalSession) Remove(name string) error
- func (s *LocalSession) RemoveAll(path string) error
- func (s *LocalSession) Run(name string, arg ...string) error
- func (s *LocalSession) WriteString(name string, data string, mode ...string) error
- type RemoteSession
- func (s *RemoteSession) Close() error
- func (s *RemoteSession) CombinedOutput(name string, arg ...string) ([]byte, error)
- func (s *RemoteSession) Connect() error
- func (s *RemoteSession) Create(name string) error
- func (s *RemoteSession) Exists(path string) (bool, error)
- func (s *RemoteSession) MakeDirAll(path string, perm os.FileMode) error
- func (s *RemoteSession) Output(name string, arg ...string) ([]byte, error)
- func (s *RemoteSession) OutputGrep(cmdList []Cmd) ([]byte, error)
- func (s *RemoteSession) ReadDir(dir string) ([]FileInfo, error)
- func (s *RemoteSession) ReadFile(fileName string) ([]byte, error)
- func (s *RemoteSession) Reconnect() error
- func (s *RemoteSession) Remove(name string) error
- func (s *RemoteSession) RemoveAll(path string) error
- func (s *RemoteSession) Run(name string, arg ...string) error
- func (s *RemoteSession) WriteString(name string, data string, mode ...string) error
- type Session
- type SingleSession
- func (s SingleSession) CombinedOutput(name string, arg ...string) ([]byte, error)
- func (s SingleSession) Create(name string) error
- func (s SingleSession) Exists(path string) (bool, error)
- func (s SingleSession) MakeDirAll(path string, perm os.FileMode) error
- func (s SingleSession) Output(name string, arg ...string) ([]byte, error)
- func (s SingleSession) OutputGrep(cmdList []Cmd) ([]byte, error)
- func (s SingleSession) ReadDir(dir string) ([]FileInfo, error)
- func (s SingleSession) ReadFile(fileName string) ([]byte, error)
- func (s SingleSession) Remove(name string) error
- func (s SingleSession) RemoveAll(path string) error
- func (s SingleSession) Run(name string, arg ...string) error
- func (s SingleSession) WriteString(name string, data string, mode ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LocalSession ¶
type LocalSession struct {
// contains filtered or unexported fields
}
func (*LocalSession) CombinedOutput ¶
func (s *LocalSession) CombinedOutput(name string, arg ...string) ([]byte, error)
func (*LocalSession) Create ¶
func (s *LocalSession) Create(name string) error
func (*LocalSession) MakeDirAll ¶
func (s *LocalSession) MakeDirAll(path string, perm os.FileMode) error
func (*LocalSession) Output ¶
func (s *LocalSession) Output(name string, arg ...string) ([]byte, error)
func (*LocalSession) OutputGrep ¶
func (s *LocalSession) OutputGrep(cmdList []Cmd) ([]byte, error)
func (*LocalSession) Remove ¶
func (s *LocalSession) Remove(name string) error
func (*LocalSession) RemoveAll ¶
func (s *LocalSession) RemoveAll(path string) error
func (*LocalSession) WriteString ¶
func (s *LocalSession) WriteString(name string, data string, mode ...string) error
type RemoteSession ¶
type RemoteSession struct {
// contains filtered or unexported fields
}
func (*RemoteSession) Close ¶
func (s *RemoteSession) Close() error
func (*RemoteSession) CombinedOutput ¶
func (s *RemoteSession) CombinedOutput(name string, arg ...string) ([]byte, error)
func (*RemoteSession) Connect ¶
func (s *RemoteSession) Connect() error
func (*RemoteSession) Create ¶
func (s *RemoteSession) Create(name string) error
func (*RemoteSession) MakeDirAll ¶
func (s *RemoteSession) MakeDirAll(path string, perm os.FileMode) error
func (*RemoteSession) Output ¶
func (s *RemoteSession) Output(name string, arg ...string) ([]byte, error)
func (*RemoteSession) OutputGrep ¶
func (s *RemoteSession) OutputGrep(cmdList []Cmd) ([]byte, error)
func (*RemoteSession) Reconnect ¶
func (s *RemoteSession) Reconnect() error
func (*RemoteSession) Remove ¶
func (s *RemoteSession) Remove(name string) error
func (*RemoteSession) RemoveAll ¶
func (s *RemoteSession) RemoveAll(path string) error
func (*RemoteSession) WriteString ¶
func (s *RemoteSession) WriteString(name string, data string, mode ...string) error
type Session ¶
type Session interface { Run(name string, arg ...string) error Output(name string, arg ...string) ([]byte, error) CombinedOutput(name string, arg ...string) ([]byte, error) OutputGrep(cmdList []Cmd) ([]byte, error) Exists(path string) (bool, error) ReadFile(fileName string) ([]byte, error) ReadDir(dir string) ([]FileInfo, error) MakeDirAll(path string, perm os.FileMode) error Remove(name string) error RemoveAll(path string) error Create(name string) error WriteString(name string, data string, mode ...string) error }
type SingleSession ¶
type SingleSession struct { Session // contains filtered or unexported fields }
func (SingleSession) CombinedOutput ¶
func (s SingleSession) CombinedOutput(name string, arg ...string) ([]byte, error)
func (SingleSession) Create ¶
func (s SingleSession) Create(name string) error
func (SingleSession) MakeDirAll ¶
func (s SingleSession) MakeDirAll(path string, perm os.FileMode) error
func (SingleSession) Output ¶
func (s SingleSession) Output(name string, arg ...string) ([]byte, error)
func (SingleSession) OutputGrep ¶
func (s SingleSession) OutputGrep(cmdList []Cmd) ([]byte, error)
func (SingleSession) Remove ¶
func (s SingleSession) Remove(name string) error
func (SingleSession) RemoveAll ¶
func (s SingleSession) RemoveAll(path string) error
func (SingleSession) WriteString ¶
func (s SingleSession) WriteString(name string, data string, mode ...string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.