Documentation
¶
Overview ¶
NOTE:
Index ¶
- func CheckIsDirPath(path string) (result bool, dir, base string)
- func DupPermutationsRecursive0(n, k int) [][]int
- func ExpandLocalPath(path string) (expandPaths []string, err error)
- func ExpandRemotePath(client *TargetConnectMap, path string) (expandPaths []string, err error)
- func GeneratePermWithUmask(defaultPerm, umask []string) fs.FileMode
- type ByName
- type BySize
- type ByTime
- type FileInfo
- type FileInfos
- type PathSet
- type RunSftp
- func (r *RunSftp) Completer(t prompt.Document) []prompt.Suggest
- func (r *RunSftp) CreateModeComplete() (p []prompt.Suggest)
- func (r *RunSftp) CreatePrompt() (p string, result bool)
- func (r *RunSftp) Executor(command string)
- func (r *RunSftp) GetLocalComplete(path string)
- func (r *RunSftp) GetRemoteComplete(ishost, ispath, useTargetmap bool, path string) (confirmRemote bool)
- func (r *RunSftp) PathComplete(remote, local, useTargetmap bool, t prompt.Document) []prompt.Suggest
- func (r *RunSftp) SortLsData(c *cli.Context, files []sftpFileInfo)
- func (r *RunSftp) Start()
- type SftpConnect
- type TargetConnectMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIsDirPath ¶ added in v0.6.8
CheckIsDirPath return path specifies a directory. This function working only local machine.
func DupPermutationsRecursive0 ¶ added in v0.6.7
func ExpandLocalPath ¶ added in v0.6.8
Pass path including tilde etc., expand it as local machine PATH and return
func ExpandRemotePath ¶ added in v0.6.8
func ExpandRemotePath(client *TargetConnectMap, path string) (expandPaths []string, err error)
Pass path including tilde etc., expand it as local machine PATH and return
func GeneratePermWithUmask ¶ added in v0.6.8
A function that returns the value of fs.Filemode from the permissions and umask passed in an array. ex)
defaultPerm ... [0,7,7,7] umask ... [0,2,2]
Types ¶
type RunSftp ¶
type RunSftp struct { // select server SelectServer []string // config Config conf.Config // Client Client map[string]*SftpConnect // Complete select client TargetClient map[string]*SftpConnect // ssh Run Run *sshl.Run // Permission bool // local umask. [000-777] LocalUmask []string // progress bar Progress *mpb.Progress ProgressWG *sync.WaitGroup // PathComplete RemoteComplete []prompt.Suggest LocalComplete []prompt.Suggest }
RunSftp struct sftp run
func (*RunSftp) Completer ¶
func (r *RunSftp) Completer(t prompt.Document) []prompt.Suggest
Completer is sftp Shell mode function TODO(blacknon): PATH補完については、flagを見て対象のコマンドラインの初回だけ行わせるようにする(プロンプトが切り替わる度にflagをfalse or trueにすることで対処?)
func (*RunSftp) CreateModeComplete ¶ added in v0.6.7
func (r *RunSftp) CreateModeComplete() (p []prompt.Suggest)
CreateModeComplete return file permission modes suggest
func (*RunSftp) CreatePrompt ¶
CreatePrompt return prompt string.
func (*RunSftp) GetLocalComplete ¶
GetLocalComplete set r.LocalComplete
func (*RunSftp) GetRemoteComplete ¶
func (r *RunSftp) GetRemoteComplete(ishost, ispath, useTargetmap bool, path string) (confirmRemote bool)
GetRemoteComplete set r.RemoteComplete
func (*RunSftp) PathComplete ¶
func (r *RunSftp) PathComplete(remote, local, useTargetmap bool, t prompt.Document) []prompt.Suggest
PathComplete return path complete data
func (*RunSftp) SortLsData ¶
SortLsData is sort []os.FileInfo.
type SftpConnect ¶
type SftpConnect struct { // ssh connect SshConnect *sshlib.Connect // sftp connect Connect *sftp.Client // Output Output *output.Output // Current Directory Pwd string }
SftpConnect struct at sftp client
type TargetConnectMap ¶ added in v0.6.7
type TargetConnectMap struct { SftpConnect // Target Path list Path []string }