plugincommand

package
v2.0.0-...-00053fb Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package plugincommand implements plugin discovery, installation, inspection and authoring commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeclaredPlugin

func DeclaredPlugin(ctx context.Context, project *installation.Project, refs []pluginreference.Reference, name, registry string) (int, error)

DeclaredPlugin resolves command spelling against declarations and recorded pins only. A shorthand from another registry never selects this declaration.

func RequestedPlugin

func RequestedPlugin(name string, options RegistryOptions, existing []pluginreference.Reference) (pluginreference.Reference, error)

func RequestedPluginIndex

func RequestedPluginIndex(ref pluginreference.Reference, registry string, existing []pluginreference.Reference) (int, error)

RequestedPluginIndex finds the existing declaration for this repository. Aliases stay scoped to the registry that assigns them.

Types

type InspectOptions

type InspectOptions struct {
	Source   string
	JSON     bool
	Registry string
}

func (InspectOptions) Run

func (r InspectOptions) Run(ctx context.Context, streams output.Streams, acquisition dependencycache.Acquisition) (int, error)

Run reads plugin metadata without executing the plugin.

type Operation

type Operation string
const (
	Search   Operation = "plugin search"
	Versions Operation = "plugin versions"
	Install  Operation = "plugin install"
	List     Operation = "plugin list"
	Update   Operation = "plugin update"
	Remove   Operation = "plugin remove"
	Sync     Operation = "plugin sync"
)

type RegistryOptions

type RegistryOptions struct {
	Registry string
	Version  string
}

type RegistryRequest

type RegistryRequest struct {
	Operation Operation
	Options   RegistryOptions
	Paths     []string

	Config configuration.ConfigFileSelection
	JSON   bool
}

func (RegistryRequest) Run

func (r RegistryRequest) Run(ctx context.Context, streams output.Streams, acquisition dependencycache.Acquisition) (int, error)

Run executes the plugin registry operation.

type TestOptions

type TestOptions struct {
	Paths []string
	JSON  bool
}

func (TestOptions) Run

Run applies the manifest transforms to fixtures without running its tool.

type ValidateOptions

type ValidateOptions struct {
	Path string
	JSON bool
}

func (ValidateOptions) Run

Run validates the manifest without running its tool.

Jump to

Keyboard shortcuts

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