Documentation
¶
Index ¶
- type FS
- type FakeResponse
- type FakeSession
- func (f *FakeSession) Close() error
- func (f *FakeSession) CombinedOutput(cmd string) ([]byte, error)
- func (f *FakeSession) Output(cmd string) ([]byte, error)
- func (f *FakeSession) Run(cmd string) error
- func (f *FakeSession) SetResponse(key string, resp *FakeResponse)
- func (f *FakeSession) StdinPipe() (io.WriteCloser, error)
- func (f *FakeSession) Wait() error
- type FileInfo
- type LocalFS
- func (fs *LocalFS) Base(path string) string
- func (fs *LocalFS) Close() error
- func (fs *LocalFS) CopyFrom(r io.Reader, path string, mtime time.Time, mode os.FileMode) error
- func (fs *LocalFS) CopyTo(w io.Writer, path string) error
- func (fs *LocalFS) Dir(path string) string
- func (fs *LocalFS) Join(elem ...string) string
- func (fs *LocalFS) MkdirAll(path string) error
- func (fs *LocalFS) Read(path string) ([]byte, error)
- func (fs *LocalFS) ReadDir(path string) ([]*FileInfo, error)
- func (fs *LocalFS) Rel(base, target string) (string, error)
- func (fs *LocalFS) Remove(path string) error
- func (fs *LocalFS) Stat(path string) (*FileInfo, error)
- func (fs *LocalFS) Write(path string, data []byte, mtime time.Time, mode os.FileMode) error
- type ReadWriter
- type SFTPFS
- func (fs *SFTPFS) Base(remotePath string) string
- func (fs *SFTPFS) Close() error
- func (fs *SFTPFS) CopyFrom(r io.Reader, remotePath string, mtime time.Time, mode os.FileMode) error
- func (fs *SFTPFS) CopyTo(w io.Writer, remotePath string) error
- func (fs *SFTPFS) Dir(remotePath string) string
- func (fs *SFTPFS) Join(elem ...string) string
- func (fs *SFTPFS) MkdirAll(remotePath string) error
- func (fs *SFTPFS) Read(remotePath string) ([]byte, error)
- func (fs *SFTPFS) ReadDir(remotePath string) ([]*FileInfo, error)
- func (fs *SFTPFS) Rel(base, target string) (string, error)
- func (fs *SFTPFS) Remove(remotePath string) error
- func (fs *SFTPFS) SetMtime(remotePath string, mtime time.Time) error
- func (fs *SFTPFS) Stat(remotePath string) (*FileInfo, error)
- func (fs *SFTPFS) Write(remotePath string, data []byte, mtime time.Time, mode os.FileMode) error
- type Session
- type ShellFS
- func (fs *ShellFS) Base(remotePath string) string
- func (fs *ShellFS) Close() error
- func (fs *ShellFS) CopyFrom(r io.Reader, remotePath string, mtime time.Time, mode os.FileMode) error
- func (fs *ShellFS) CopyTo(w io.Writer, remotePath string) error
- func (fs *ShellFS) Dir(remotePath string) string
- func (fs *ShellFS) Join(elem ...string) string
- func (fs *ShellFS) MkdirAll(remotePath string) error
- func (fs *ShellFS) Read(remotePath string) ([]byte, error)
- func (fs *ShellFS) ReadDir(remotePath string) ([]*FileInfo, error)
- func (fs *ShellFS) Rel(base, target string) (string, error)
- func (fs *ShellFS) Remove(remotePath string) error
- func (fs *ShellFS) SetMtime(remotePath string, mtime time.Time) error
- func (fs *ShellFS) Stat(remotePath string) (*FileInfo, error)
- func (fs *ShellFS) Write(remotePath string, data []byte, mtime time.Time, mode os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS interface {
Stat(path string) (*FileInfo, error)
Read(path string) ([]byte, error)
Write(path string, data []byte, mtime time.Time, mode os.FileMode) error
Remove(path string) error
ReadDir(path string) ([]*FileInfo, error)
MkdirAll(path string) error
Join(elem ...string) string
Base(path string) string
Dir(path string) string
Rel(base, target string) (string, error)
}
type FakeResponse ¶
type FakeSession ¶
type FakeSession struct {
Commands []string
Responses map[string]*FakeResponse
StdinData map[string][]byte
// contains filtered or unexported fields
}
func NewFakeSession ¶
func NewFakeSession() *FakeSession
func (*FakeSession) Close ¶
func (f *FakeSession) Close() error
func (*FakeSession) CombinedOutput ¶
func (f *FakeSession) CombinedOutput(cmd string) ([]byte, error)
func (*FakeSession) Run ¶
func (f *FakeSession) Run(cmd string) error
func (*FakeSession) SetResponse ¶
func (f *FakeSession) SetResponse(key string, resp *FakeResponse)
func (*FakeSession) StdinPipe ¶
func (f *FakeSession) StdinPipe() (io.WriteCloser, error)
func (*FakeSession) Wait ¶
func (f *FakeSession) Wait() error
type LocalFS ¶
type LocalFS struct{}
func NewLocalFS ¶
func NewLocalFS() *LocalFS
type ReadWriter ¶
type ReadWriter interface {
FS
CopyTo(w io.Writer, path string) error
CopyFrom(r io.Reader, path string, mtime time.Time, mode os.FileMode) error
Close() error
}
func NewRemoteFS ¶
func NewRemoteFS(client *ssh.Client) (ReadWriter, error)
type SFTPFS ¶
type SFTPFS struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.