ui

package
v0.0.0-...-ed2ac0f Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCommandNotFound = errors.New("command not found")
)

Functions

func Banner(conn ssh.ConnMetadata) string

Types

type ShellWrapper

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

func NewShellWrapper

func NewShellWrapper(logger log.Logger) *ShellWrapper

func (*ShellWrapper) Execute

func (sw *ShellWrapper) Execute(ctx context.Context, command string) ([]byte, error)

type TerminalWrapper

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

func NewTerminalWrapper

func NewTerminalWrapper(logger log.Logger, userChannel ssh.Channel, system UserShell) *TerminalWrapper

func (*TerminalWrapper) Do

func (tw *TerminalWrapper) Do(ctx context.Context) error

type UserShell

type UserShell interface {
	Execute(context.Context, string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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