cli

package
v0.0.0-...-a4993c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPair

type AuthPair struct {
	Username, Password string
}

func (AuthPair) Validate

func (a AuthPair) Validate(username, password string) bool

type Cli

type Cli struct {
	AuthPair AuthPair
}

func New

func New(username, password string) Cli

func (Cli) NewSession

func (cli Cli) NewSession(sshSession ssh.Session)

type LineToCarriage

type LineToCarriage struct {
	// contains filtered or unexported fields
}

LineToCarriage Converts input `\n` to `\r` to fix issues with the Python pexpect library and ssh.Terminal

func (LineToCarriage) Read

func (r LineToCarriage) Read(p []byte) (n int, err error)

func (LineToCarriage) Write

func (r LineToCarriage) Write(p []byte) (n int, err error)

type Session

type Session struct {
	// contains filtered or unexported fields
}

func (*Session) AutoComplete

func (s *Session) AutoComplete(line string, pos int, key rune) (newLine string, newPos int, ok bool)

func (Session) CompleteCommand

func (s Session) CompleteCommand(line string) (completion string, ok bool)

func (Session) Handle

func (s Session) Handle()

func (*Session) SendResponse

func (s *Session) SendResponse(path string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL