cmds

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeppettoCommand

type GeppettoCommand struct {
	Factories map[string]interface{} `yaml:"__factories,omitempty"`
	Prompt    string
	// contains filtered or unexported fields
}

func (*GeppettoCommand) BuildCobraCommand

func (g *GeppettoCommand) BuildCobraCommand() (*cobra.Command, error)

func (*GeppettoCommand) Description

func (g *GeppettoCommand) Description() *glazedcmds.CommandDescription

func (*GeppettoCommand) Run

func (g *GeppettoCommand) Run(parameters map[string]interface{}, _ *glazedcmds.GlazeProcessor) error

func (*GeppettoCommand) RunFromCobra

func (g *GeppettoCommand) RunFromCobra(cmd *cobra.Command, args []string) error

type GeppettoCommandDescription

type GeppettoCommandDescription struct {
	Name      string                            `yaml:"name"`
	Short     string                            `yaml:"short"`
	Long      string                            `yaml:"long,omitempty"`
	Flags     []*glazedcmds.ParameterDefinition `yaml:"flags,omitempty"`
	Arguments []*glazedcmds.ParameterDefinition `yaml:"arguments,omitempty"`

	// TODO(manuel, 2023-02-04) This now has a hack to switch the step type
	Step *steps.StepDescription `yaml:"step,omitempty"`

	Prompt string `yaml:"prompt"`
}

type GeppettoCommandLoader

type GeppettoCommandLoader struct {
}

func (*GeppettoCommandLoader) LoadCommandAliasFromYAML

func (g *GeppettoCommandLoader) LoadCommandAliasFromYAML(s io.Reader) ([]*glazedcmds.CommandAlias, error)

func (*GeppettoCommandLoader) LoadCommandFromYAML

func (g *GeppettoCommandLoader) LoadCommandFromYAML(s io.Reader) ([]glazedcmds.Command, error)

Jump to

Keyboard shortcuts

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