expect

package
v0.0.0-...-2cbbd22 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TEXT = "text"
	JSON = "json"
	XML  = "xml"
)

Variables

This section is empty.

Functions

func BuildXML

func BuildXML(command string, parameters ...map[string]string) (out string)

func Mapper

func Mapper(matcher *regexp.Regexp, in any, mapping map[string]string) (out map[string]any)

func NewSSHTransport

func NewSSHTransport(remote string, credentials *SSHCredentials, options *SSHOptions, extra ...int) (transport *sshTransport, err error)

Types

type SSHCredentials

type SSHCredentials struct {
	Username string
	Password string
	Key      string
}

type SSHOptions

type SSHOptions struct {
	Mode      string
	SubSystem string
	Marker    string
	Filter    string
}

type Transport

type Transport interface {
	Run(command string, timeout time.Duration, cache ...bool) (result any, err error)
	Map(command string, timeout time.Duration, mapping map[string]string, cache ...bool) (result map[string]any, err error)
}

Jump to

Keyboard shortcuts

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