cmds

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandLoader

type CommandLoader[T glazed_cmds.Command] struct {
	// contains filtered or unexported fields
}

func NewCommandLoader

func NewCommandLoader[T glazed_cmds.Command](locations *CommandLocations) *CommandLoader[T]

func (*CommandLoader[T]) LoadCommands

func (c *CommandLoader[T]) LoadCommands(
	loader loaders.FSCommandLoader,
	helpSystem *help.HelpSystem,
	options ...glazed_cmds.CommandDescriptionOption,
) ([]T, []*alias.CommandAlias, error)

type CommandLocations

type CommandLocations struct {
	Embedded         []EmbeddedCommandLocation
	Repositories     []string
	AdditionalLayers []layers.ParameterLayer
	HelpSystem       *help.HelpSystem
}

func NewCommandLocations

func NewCommandLocations(options ...LoadCommandsOption) *CommandLocations

type EmbeddedCommandLocation

type EmbeddedCommandLocation struct {
	FS      fs.FS
	Name    string
	Root    string
	DocRoot string
}

type LoadCommandsOption

type LoadCommandsOption func(*CommandLocations)

func WithAdditionalLayers

func WithAdditionalLayers(layers ...layers.ParameterLayer) LoadCommandsOption

func WithEmbeddedLocations

func WithEmbeddedLocations(locations ...EmbeddedCommandLocation) LoadCommandsOption

func WithHelpSystem

func WithHelpSystem(helpSystem *help.HelpSystem) LoadCommandsOption

func WithRepositories

func WithRepositories(locations ...string) LoadCommandsOption

Jump to

Keyboard shortcuts

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