device

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorStreamerNotSupportedByDevice = errors.New("unsupported streamer")

Functions

func ExecuteBulk

func ExecuteBulk(dev Device, commands []gcmd.Cmd) ([]gcmd.CmdRes, error)

func ThrowEchoReadException

func ThrowEchoReadException(lastRead []byte) error

func ThrowExecException

func ThrowExecException(data string) error

func ThrowQuestionException

func ThrowQuestionException(question []byte) error

Types

type Device

type Device interface {
	Connect(ctx context.Context) error
	Execute(command gcmd.Cmd) (gcmd.CmdRes, error)
	Download(paths []string) (map[string]streamer.File, error)
	Upload(paths map[string]streamer.File) error
	Close()
	GetAux() map[string]any
}

type EchoReadException

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

func (*EchoReadException) Error

func (e *EchoReadException) Error() string

type ExecException

type ExecException struct {
	Data string
}

func (*ExecException) Error

func (m *ExecException) Error() string

func (*ExecException) Is

func (m *ExecException) Is(target error) bool

type QuestionException

type QuestionException struct {
	Question []byte
}

func (*QuestionException) Error

func (e *QuestionException) Error() string

type SFTPSupport

type SFTPSupport interface {
	EnableSFTP()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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