devconf

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeatureAutocmds        = "autocmds"
	FeatureSpacesAfterEcho = "spaces_after_echo"
)

Variables

This section is empty.

Functions

func GenericCLIDevToDev

func GenericCLIDevToDev(cli *genericcli.GenericCLI, opts ...genericcli.GenericDeviceOption) func(connector streamer.Connector) device.Device

func GenericCLIWrapper

func GenericCLIWrapper(cliFn func(connector streamer.Connector, opts ...genericcli.GenericDeviceOption) genericcli.GenericDevice, logger *zap.Logger) func(streamer.Connector) device.Device

func InitDefaultDeviceMapping

func InitDefaultDeviceMapping(logger *zap.Logger) map[string]func(streamer.Connector) device.Device

func LoadYamlDeviceConfigs

func LoadYamlDeviceConfigs(content []byte) (map[string]*genericcli.GenericCLI, error)

Types

type Conf

type Conf struct {
	Devices DevConfs `yaml:"devices"`
}

func NewConf

func NewConf() *Conf

type DevConf

type DevConf struct {
	Name               string        `yaml:"name"`
	PromptExpression   string        `yaml:"prompt_expression"`
	ErrorExpression    string        `yaml:"error_expression"`
	PagerExpression    string        `yaml:"pager_expression"`
	QuestionExpression string        `yaml:"question_expression"`
	Features           []interface{} `yaml:"features"`
	Tests              TestsConf     `yaml:"tests"`
}

func (DevConf) Make

func (m DevConf) Make() (*genericcli.GenericCLI, error)

type DevConfs

type DevConfs []DevConf

func (DevConfs) Make

func (m DevConfs) Make() (map[string]*genericcli.GenericCLI, error)

type TestsConf

type TestsConf struct {
	PromptExpressionVariants []string `yaml:"prompt_expression_variants"`
	ErrorExpressionVariants  []string `yaml:"error_expression_variants"`
	PagerExpressionVariants  []string `yaml:"pager_expression_variants"`
}

Jump to

Keyboard shortcuts

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