Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DispatchSftpMessage ¶
func UploadFile ¶
func UploadFile(desPath string, client *sftp.Client, srcFile multipart.File, header *multipart.FileHeader) error
upload file to server via sftp. * @desPath: relative path in remote server.
Types ¶
type Download ¶
type Download struct{}
func (Download) ServeAfterAuthenticated ¶
func (Download) ShouldClearSessionAfterExec ¶
type FileStat ¶
type FileStat struct{}
func (FileStat) ServeAfterAuthenticated ¶
func (FileStat) ShouldClearSessionAfterExec ¶
type FileUpload ¶
type FileUpload struct{}
func (FileUpload) ServeAfterAuthenticated ¶
func (f FileUpload) ServeAfterAuthenticated(w http.ResponseWriter, r *http.Request, claims *utils.Claims, session utils.Session)
func (FileUpload) ShouldClearSessionAfterExec ¶
func (f FileUpload) ShouldClearSessionAfterExec() bool
type List ¶
type List struct{}
func (List) ServeAfterAuthenticated ¶
func (List) ShouldClearSessionAfterExec ¶
type SftpEstablish ¶
type SftpEstablish struct{}
func (SftpEstablish) ServeAfterAuthenticated ¶
func (e SftpEstablish) ServeAfterAuthenticated(w http.ResponseWriter, r *http.Request, claims *utils.Claims, session utils.Session)
establish webSocket connection to browser to maintain connection with remote sftp server. If establish success, add sftp connection to a list. and then, handle all message from message (e.g.list files in one directory.).
func (SftpEstablish) ShouldClearSessionAfterExec ¶
func (e SftpEstablish) ShouldClearSessionAfterExec() bool
Click to show internal directories.
Click to hide internal directories.