cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLIDriver

type CLIDriver interface {
	Name() string
	Init(info cli_models.Info) error
	SetDefaultAction(func())
	AddCommand(command cli_models.Command) error
	AddCommands(commands ...*cli_models.Command) error
	Execute() error
}

type CLIManager

type CLIManager struct {
	// contains filtered or unexported fields
}

func NewCLIManager

func NewCLIManager(drivers ...CLIDriver) *CLIManager

func (*CLIManager) CreateCLIFactory

func (c *CLIManager) CreateCLIFactory(driverName string, info cli_models.Info) (CLIDriver, error)

func (*CLIManager) ListDrivers

func (c *CLIManager) ListDrivers() []string

ListDrivers returns the names of all registered CLI drivers.

func (*CLIManager) RegisterDrivers

func (c *CLIManager) RegisterDrivers(drivers ...CLIDriver)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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