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: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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