Documentation
¶
Index ¶
- Constants
- type EnvVarDTO
- type FlagDTO
- type KubernetesRequirementDTO
- type ModuleRequirementDTO
- type PluginContract
- type PluginService
- func (s *PluginService) ExtractPlugin(ctx context.Context, pluginName, tag, destination string) error
- func (s *PluginService) GetPluginContract(ctx context.Context, pluginName, tag string) (*internal.Plugin, error)
- func (s *PluginService) ListPluginTags(ctx context.Context, pluginName string) ([]string, error)
- func (s *PluginService) ListPlugins(ctx context.Context) ([]string, error)
- type RequirementsDTO
Constants ¶
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 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 ¶
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