Documentation ¶
Index ¶
- Variables
- func ErrorHandler(session ssh.Session, err error)
- func KeyText(session ssh.Session) (string, error)
- func NewLimitReader(r io.Reader, limit int) io.Reader
- func PrintMsg(session ssh.Session, stdout []string, stderr []error)
- type CopyFromClientHandler
- type FileEntry
- type LimitReader
- type ReadAndReaderAt
- type ReaderAtCloser
- type VirtualFile
Constants ¶
This section is empty.
Variables ¶
View Source
var NULL = []byte{'\x00'}
NULL is an array with a single NULL byte.
Functions ¶
func ErrorHandler ¶
Types ¶
type CopyFromClientHandler ¶
type CopyFromClientHandler interface { // Write should write the given file. Delete(ssh.Session, *FileEntry) error Write(ssh.Session, *FileEntry) (string, error) Read(ssh.Session, *FileEntry) (os.FileInfo, ReaderAtCloser, error) List(ssh ssh.Session, path string, isDir bool, recursive bool) ([]os.FileInfo, error) GetLogger() *slog.Logger Validate(ssh.Session) error }
CopyFromClientHandler is a handler that can be implemented to handle files being copied from the client to the server.
type FileEntry ¶
type FileEntry struct { Filepath string Mode fs.FileMode Size int64 Reader io.Reader Atime int64 Mtime int64 }
FileEntry is an Entry that reads from a Reader, defining a file and its contents.
type LimitReader ¶
type LimitReader struct {
// contains filtered or unexported fields
}
type ReaderAtCloser ¶
type ReaderAtCloser interface { io.ReaderAt io.ReadCloser }
func NopReaderAtCloser ¶
func NopReaderAtCloser(r ReadAndReaderAt) ReaderAtCloser
type VirtualFile ¶
func (*VirtualFile) IsDir ¶
func (f *VirtualFile) IsDir() bool
func (*VirtualFile) ModTime ¶
func (f *VirtualFile) ModTime() time.Time
func (*VirtualFile) Mode ¶
func (f *VirtualFile) Mode() os.FileMode
func (*VirtualFile) Name ¶
func (f *VirtualFile) Name() string
func (*VirtualFile) Size ¶
func (f *VirtualFile) Size() int64
func (*VirtualFile) Sys ¶
func (f *VirtualFile) Sys() any
Click to show internal directories.
Click to hide internal directories.