plugins

package
v0.20.9 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginRepositoryPrefix is the base path for plugin images in the registry
	// This is relative to the registry base path (e.g., if registry is "registry.deckhouse.io/deckhouse/ee/modules"
	// then full path will be "registry.deckhouse.io/deckhouse/ee/modules/deckhouse/cli/plugins")
	PluginRepositoryPrefix = "deckhouse/ee/modules"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvVarDTO

type EnvVarDTO struct {
	Name string `json:"name"`
}

EnvVarDTO represents an environment variable in JSON

type FlagDTO

type FlagDTO struct {
	Name string `json:"name"`
}

FlagDTO represents a flag in JSON

type KubernetesRequirementDTO

type KubernetesRequirementDTO struct {
	Constraint string `json:"constraint"`
}

KubernetesRequirementDTO represents Kubernetes requirement in JSON

type ModuleRequirementDTO

type ModuleRequirementDTO struct {
	Name       string `json:"name"`
	Constraint string `json:"constraint"`
}

ModuleRequirementDTO represents module requirement in JSON

type PluginContract

type PluginContract struct {
	Name         string          `json:"name"`
	Version      string          `json:"version"`
	Description  string          `json:"description"`
	Env          []EnvVarDTO     `json:"env,omitempty"`
	Flags        []FlagDTO       `json:"flags,omitempty"`
	Requirements RequirementsDTO `json:"requirements,omitempty"`
}

PluginContract represents the plugin contract metadata (DTO for JSON unmarshaling)

type PluginService

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

PluginService provides high-level operations for plugin management

func NewPluginService

func NewPluginService(client pkg.RegistryClient, logger *log.Logger) *PluginService

NewPluginService creates a new plugin service

func (*PluginService) ExtractPlugin

func (s *PluginService) ExtractPlugin(ctx context.Context, pluginName, tag, destination string) error

ExtractPlugin downloads the plugin image and extracts it to the specified location

func (*PluginService) GetPluginContract

func (s *PluginService) GetPluginContract(ctx context.Context, pluginName, tag string) (*internal.Plugin, error)

GetPluginContract reads the plugin contract from image metadata annotation

func (*PluginService) ListPluginTags

func (s *PluginService) ListPluginTags(ctx context.Context, pluginName string) ([]string, error)

ListPluginTags lists all available tags for a specific plugin

func (*PluginService) ListPlugins

func (s *PluginService) ListPlugins(ctx context.Context) ([]string, error)

ListPlugins lists all available plugin names from the registry Note: This requires the registry to support the catalog API and grant access to it. If the registry doesn't allow catalog access, this will return an error.

type RequirementsDTO

type RequirementsDTO struct {
	Kubernetes KubernetesRequirementDTO `json:"kubernetes,omitempty"`
	Modules    []ModuleRequirementDTO   `json:"modules,omitempty"`
}

RequirementsDTO represents requirements in JSON

Jump to

Keyboard shortcuts

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