command

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCommandFromFile added in v0.5.6

func LoadCommandFromFile(path string, loader loaders.CommandLoader) (cmds.Command, error)

Types

type CommandHandler

type CommandHandler struct {
	generic_command.GenericCommandHandler
	DevMode bool

	// can be any of BareCommand, WriterCommand or GlazeCommand
	Command cmds.Command
}

func NewCommandHandler

func NewCommandHandler(
	command cmds.Command,
	options ...CommandHandlerOption,
) *CommandHandler

func NewCommandHandlerFromConfig

func NewCommandHandlerFromConfig(
	config_ *config.Command,
	loader loaders.CommandLoader,
	options ...CommandHandlerOption,
) (*CommandHandler, error)

func (*CommandHandler) Serve

func (ch *CommandHandler) Serve(server *parka.Server, path string) error

type CommandHandlerOption

type CommandHandlerOption func(*CommandHandler)

func WithDevMode

func WithDevMode(devMode bool) CommandHandlerOption

func WithGenericCommandHandlerOptions added in v0.5.6

func WithGenericCommandHandlerOptions(options ...generic_command.GenericCommandHandlerOption) CommandHandlerOption

Jump to

Keyboard shortcuts

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