registry

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRegistryCommand

type AddRegistryCommand struct {
	Name string   `short:"n" help:"The name of the registry"`
	URL  *url.URL `short:"u" help:"The HTTPS URL hosting the registry's index.yaml. Do not include index.yaml in the URL"`
	// contains filtered or unexported fields
}

func (*AddRegistryCommand) BeforeApply

func (a *AddRegistryCommand) BeforeApply() error

func (*AddRegistryCommand) Run

func (a *AddRegistryCommand) Run(ctx *kong.Context) error

type Command

type Command struct {
	ShowCatalog      *ListInstalledRegistries `cmd:"" aliases:"ls" help:"List all installed plugin registries"`
	AvailablePlugins *ListAvailablePlugins    `cmd:"" help:"List all plugins available in a registry"`
	Add              *AddRegistryCommand      `cmd:"" help:"Add a registry from which plugins can be installed"`
	Remove           *RemoveRegistryCommand   `cmd:"" aliases:"rm" help:"Remove a registry from the local catalog"`
}

type ListAvailablePlugins

type ListAvailablePlugins struct {
	Name                 string `short:"n" default:"default" help:"The registry to list available plugins from"`
	ExcludeInstalled     bool   `short:"x" help:"If true, hide plugins that are already installed"`
	ShowAllArchitectures bool   `short:"a" help:"If true, show plugins available for any architecture, not just the local architecture"`
	// contains filtered or unexported fields
}

func (*ListAvailablePlugins) BeforeApply

func (l *ListAvailablePlugins) BeforeApply() error

func (*ListAvailablePlugins) Run

func (l *ListAvailablePlugins) Run(ctx *kong.Context) error

type ListInstalledRegistries

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

func (*ListInstalledRegistries) BeforeApply

func (l *ListInstalledRegistries) BeforeApply() error

func (*ListInstalledRegistries) Run

type PluginRegistries

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

func LoadFromDisk

func LoadFromDisk() (*PluginRegistries, error)

func (*PluginRegistries) Add

func (p *PluginRegistries) Add(name string, location *url.URL) error

func (*PluginRegistries) Delete

func (p *PluginRegistries) Delete(name string) bool

func (*PluginRegistries) Get

func (p *PluginRegistries) Get(name string) *PluginRegistry

func (*PluginRegistries) GetAll

func (p *PluginRegistries) GetAll() map[string]*PluginRegistry

func (*PluginRegistries) SaveToDisk

func (p *PluginRegistries) SaveToDisk() error

type PluginRegistry

type PluginRegistry struct {
	URL     *url.URL          `yaml:",inline"`
	Plugins []registry.Plugin `yaml:"-"`
}

func (*PluginRegistry) Clone

func (r *PluginRegistry) Clone() *PluginRegistry

func (*PluginRegistry) LazyLoad

func (r *PluginRegistry) LazyLoad() error

type RemoveRegistryCommand added in v1.1.0

type RemoveRegistryCommand struct {
	Name string `arg:"" help:"The name of the registry to remove"`
	// contains filtered or unexported fields
}

func (*RemoveRegistryCommand) BeforeApply added in v1.1.0

func (r *RemoveRegistryCommand) BeforeApply() error

func (*RemoveRegistryCommand) Run added in v1.1.0

func (r *RemoveRegistryCommand) Run(ctx *kong.Context) error

Jump to

Keyboard shortcuts

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