Documentation
¶
Overview ¶
Package sshsftp contains the shared SSH session and SFTP route implementation.
Index ¶
Constants ¶
View Source
const ( CredentialPasswordField = "credential_password_id" CredentialPrivateKeyField = "credential_private_key_id" )
View Source
const ( CredentialKindSSHPrivateKey = plugin.CredentialKindSSHPrivateKey CredentialKindSSHPassword = plugin.CredentialKindSSHPassword )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileContent ¶
type FileContent struct {
Path string `json:"path"`
MIME string `json:"mime,omitempty"`
Encoding string `json:"encoding,omitempty"`
Content string `json:"content,omitempty"`
URL string `json:"url,omitempty"`
Size int64 `json:"size,omitempty"`
Truncated bool `json:"truncated,omitempty"`
}
FileContent is the generic file_browser preview payload.
type FileEntry ¶
type FileEntry struct {
Name string `json:"name"`
Path string `json:"path"`
IsDir bool `json:"isDir"`
Size int64 `json:"size,omitempty"`
MIME string `json:"mime,omitempty"`
ModTime time.Time `json:"modTime,omitzero"`
Mode string `json:"mode,omitempty"`
Symlink string `json:"symlink,omitempty"`
}
FileEntry is the generic file_browser listing row.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session holds all mutable per-connection SSH state.
func NewSession ¶
NewSession wraps an authenticated SSH client.
func (*Session) Filesystem ¶
Filesystem opens SFTP lazily over the existing SSH client.
func (*Session) OpenChannel ¶
Click to show internal directories.
Click to hide internal directories.