cli

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CommandManifestContextKey = "commandManifest"
)

Variables

This section is empty.

Functions

func ContextWithCommandManifest added in v0.0.5

func ContextWithCommandManifest(ctx context.Context, commandManifest *plugin.Plugin) context.Context

Types

type Builder

type Builder interface {
	Build(options *Options) *cobra.Command
}

Builder is responsible for building the CLI from command manifests

func NewBuilder

func NewBuilder(paths environment.Paths, commandWrapper CommandWrapper) Builder

type CommandWrapper

type CommandWrapper interface {
	Wrap(plugin2 *plugin.Plugin) func(cmd *cobra.Command, args []string)
}

CommandWrapper is responsible for wrapping the command manifest to cobra command

func NewCmdWrapper added in v0.0.7

func NewCmdWrapper(exec process.Executor, pluginManager plugin.Manager) CommandWrapper

type Options added in v0.0.7

type Options struct {
	Plugins         []*plugin.Plugin
	RootCmd         *cobra.Command
	HostAddress     string
	Logger          logger.Logger
	Auth            auth.Auth
	MetadataStorage storage.MetadataStorage
	PluginPath      string
}

Jump to

Keyboard shortcuts

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