cmds

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 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 UhohCommand

type UhohCommand struct {
	*glazedcmds.CommandDescription `yaml:",inline"`
	Form                           *pkg.Form `yaml:"form"`
}

func NewUhohCommand

func NewUhohCommand(
	description *glazedcmds.CommandDescription,
	form *pkg.Form,
) (*UhohCommand, error)

func (*UhohCommand) Run

func (u *UhohCommand) Run(ctx context.Context, parsedLayers *layers.ParsedLayers) error

type UhohCommandDescription

type UhohCommandDescription struct {
	Name      string                            `yaml:"name"`
	Short     string                            `yaml:"short"`
	Long      string                            `yaml:"long,omitempty"`
	Flags     []*parameters.ParameterDefinition `yaml:"flags,omitempty"`
	Arguments []*parameters.ParameterDefinition `yaml:"arguments,omitempty"`
	Layers    []layers.ParameterLayer           `yaml:"layers,omitempty"`
	Form      struct {
		Name  string `yaml:"name,omitempty"`
		Theme string `yaml:"theme,omitempty"`

		Groups []struct {
			Name   string                   `yaml:"name,omitempty"`
			Fields []fieldWithRawAttributes `yaml:"fields"`
		} `yaml:"groups"`
	} `yaml:"form"`
}

type UhohCommandLoader

type UhohCommandLoader struct{}

func (*UhohCommandLoader) IsFileSupported

func (u *UhohCommandLoader) IsFileSupported(f fs.FS, fileName string) bool

func (*UhohCommandLoader) LoadCommands

func (u *UhohCommandLoader) LoadCommands(
	f fs.FS, entryName string,
	options []cmds.CommandDescriptionOption,
	aliasOptions []alias.Option,
) ([]cmds.Command, error)

Jump to

Keyboard shortcuts

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