Documentation
¶
Index ¶
Constants ¶
View Source
const ( CRLF = "\r\n" ClearPreviousLine = "\033[1A\033[K" Delimiter = "===============================================================" WordsWelcome = Delimiter + CRLF + " へ /|" + CRLF + " /\7 ∠_/ " + CRLF + " / │ / /" + CRLF + " │ Z _,< / /� │ � / 〉 Y / /" + CRLF + " ● ● 〈 /" + CRLF + " () へ | \〈" + CRLF + " > _ ィ │ //" + CRLF + " / へ / <| \\" + CRLF + " �_ (_/ │//" + CRLF + " 7 |/" + CRLF + " >�r ̄ ̄r�_" + CRLF + Delimiter + CRLF WordsInfo = "\x1b[33;40m Welcome %s. %s \x1b[0m" + CRLF WordsDone = "\x1b[33;40m Goodbye. Good luck. \x1b[0m" + CRLF WordsNotFound = "Command not found: %s" + CRLF WordsCommandError = "Command exec wrong: %s" + CRLF WordsNotSupport = "Sorry, command not support now: %s" + CRLF WordsSSHNotAvailable = "SSH not available: %s" + CRLF WordsSSHInfo = "Remote addr is %s. " + CRLF + Delimiter + CRLF WordsSSHLoading = "\x1b[33;40m The connection is being established, please wait. \x1b[0m" + CRLF WordsSSHDone = CRLF + "\x1b[33;40m Connection closed. Please press Enter twice to continue. \x1b[0m" + CRLF WordsExecWrong = "cmd.Run() failed with %s" + CRLF )
Variables ¶
This section is empty.
Functions ¶
func CreateSSHSession ¶
func CreateSSHSession(rw io.ReadWriter, host string, config *ssh.ClientConfig) (*ssh.Session, error)
Types ¶
type Command ¶
func NewCommand ¶
type TermWrapper ¶
type TermWrapper struct {
// contains filtered or unexported fields
}
TermWrapper 封装 terminal 为一个 io.reader
func NewTermWrapper ¶
func NewTermWrapper(channel ssh.Channel) *TermWrapper
func (*TermWrapper) Close ¶
func (t *TermWrapper) Close() (err error)
Click to show internal directories.
Click to hide internal directories.