Documentation
¶
Index ¶
- Constants
- func ContractToDomain(contract *PluginContract) *internal.Plugin
- func GetEditionFromRegistryPath(registryRepo string) (string, pkg.Edition)
- func GetPluginContractFromFile(contractFilePath string) (*internal.Plugin, error)
- type BasicService
- func (s *BasicService) CheckImageExists(ctx context.Context, tag string) error
- func (s *BasicService) GetDigest(ctx context.Context, tag string) (*v1.Hash, error)
- func (s *BasicService) GetImage(ctx context.Context, tag string, opts ...registry.ImageGetOption) (pkg.RegistryImage, error)
- func (s *BasicService) ListTags(ctx context.Context) ([]string, error)
- type DeckhouseReleaseMetadata
- type DeckhouseReleaseService
- type DeckhouseService
- type EnvVarDTO
- type FlagDTO
- type InstallerServices
- type KubernetesRequirementDTO
- type ModuleReleaseService
- type ModuleRequirementDTO
- type ModuleService
- type ModulesService
- type PluginContract
- type PluginRequirementDTO
- 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
- type SecurityServices
- type Service
Constants ¶
const (
PluginContractAnnotation = "contract"
)
Variables ¶
This section is empty.
Functions ¶
func ContractToDomain ¶ added in v0.22.8
func ContractToDomain(contract *PluginContract) *internal.Plugin
ContractToDomain converts PluginContract DTO to Plugin domain entity
func GetEditionFromRegistryPath ¶ added in v0.29.0
GetEditionFromRegistryPath cuts the edition from the registry path returns the path without the edition and the edition this is needed because of the different paths for the installer images in the registry example: registry.deckhouse.ru/deckhouse/ee/ -> registry.deckhouse.ru/deckhouse, ee myregistry.ru/deckhouse/ -> myregistry.ru/deckhouse, ""
Types ¶
type BasicService ¶ added in v0.22.1
type BasicService struct {
// contains filtered or unexported fields
}
BasicService provides common registry operations with standardized logging
func NewBasicService ¶ added in v0.22.1
NewBasicService creates a new basic service
func (*BasicService) CheckImageExists ¶ added in v0.22.1
func (s *BasicService) CheckImageExists(ctx context.Context, tag string) error
func (*BasicService) GetImage ¶ added in v0.22.1
func (s *BasicService) GetImage(ctx context.Context, tag string, opts ...registry.ImageGetOption) (pkg.RegistryImage, error)
GetImage retrieves an image from the registry
type DeckhouseReleaseMetadata ¶ added in v0.22.1
type DeckhouseReleaseService ¶ added in v0.22.1
type DeckhouseReleaseService struct {
*BasicService
}
func NewDeckhouseReleaseService ¶ added in v0.22.1
func NewDeckhouseReleaseService(basicService *BasicService) *DeckhouseReleaseService
func (*DeckhouseReleaseService) GetMetadata ¶ added in v0.22.1
func (s *DeckhouseReleaseService) GetMetadata(ctx context.Context, tag string) (*DeckhouseReleaseMetadata, error)
type DeckhouseService ¶
type DeckhouseService struct {
*BasicService
// contains filtered or unexported fields
}
DeckhouseService provides high-level operations for Deckhouse platform management
func NewDeckhouseService ¶
func NewDeckhouseService(client registry.Client, logger *log.Logger) *DeckhouseService
NewDeckhouseService creates a new deckhouse service
func (*DeckhouseService) GetRoot ¶ added in v0.22.1
func (s *DeckhouseService) GetRoot() string
GetRoot gets path of the registry root
func (*DeckhouseService) Installer ¶ added in v0.22.1
func (s *DeckhouseService) Installer() *BasicService
func (*DeckhouseService) ReleaseChannels ¶ added in v0.22.1
func (s *DeckhouseService) ReleaseChannels() *DeckhouseReleaseService
func (*DeckhouseService) StandaloneInstaller ¶ added in v0.22.1
func (s *DeckhouseService) StandaloneInstaller() *BasicService
type EnvVarDTO ¶
type EnvVarDTO struct {
Name string `json:"name"`
}
EnvVarDTO represents an environment variable in JSON
type InstallerServices ¶ added in v0.29.0
type InstallerServices struct {
*BasicService
// contains filtered or unexported fields
}
func NewInstallerServices ¶ added in v0.29.0
type KubernetesRequirementDTO ¶
type KubernetesRequirementDTO struct {
Constraint string `json:"constraint"`
}
KubernetesRequirementDTO represents Kubernetes requirement in JSON
type ModuleReleaseService ¶ added in v0.24.3
type ModuleReleaseService struct {
*BasicService
}
func NewModuleReleaseService ¶ added in v0.24.3
func NewModuleReleaseService(basicService *BasicService) *ModuleReleaseService
type ModuleRequirementDTO ¶
type ModuleRequirementDTO struct {
Name string `json:"name"`
Constraint string `json:"constraint"`
}
ModuleRequirementDTO represents module requirement in JSON
type ModuleService ¶
type ModuleService struct {
*BasicService
// contains filtered or unexported fields
}
ModuleService provides high-level operations for module management
func NewModuleService ¶
func NewModuleService(client registry.Client, logger *log.Logger) *ModuleService
NewModuleService creates a new module service
func (*ModuleService) Extra ¶ added in v0.24.3
func (s *ModuleService) Extra() *BasicService
func (*ModuleService) ExtraImage ¶ added in v0.26.4
func (s *ModuleService) ExtraImage(extraName string) *BasicService
ExtraImage returns a BasicService scoped to a specific extra image (e.g., modules/<module>/extra/<extraName>)
func (*ModuleService) ReleaseChannels ¶ added in v0.24.3
func (s *ModuleService) ReleaseChannels() *ModuleReleaseService
type ModulesService ¶ added in v0.22.9
type ModulesService struct {
*BasicService
// contains filtered or unexported fields
}
func NewModulesService ¶ added in v0.22.9
func NewModulesService(client registry.Client, logger *log.Logger) *ModulesService
func (*ModulesService) Module ¶ added in v0.22.9
func (s *ModulesService) Module(moduleName string) *ModuleService
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)
func DomainToContract ¶ added in v0.22.8
func DomainToContract(plugin *internal.Plugin) *PluginContract
DomainToContract converts Plugin domain entity to PluginContract DTO
type PluginRequirementDTO ¶ added in v0.26.4
type PluginRequirementDTO struct {
Name string `json:"name"`
Constraint string `json:"constraint"`
}
PluginRequirementDTO represents plugin requirement in JSON
type PluginService ¶
type PluginService struct {
// contains filtered or unexported fields
}
PluginService provides high-level operations for plugin management
func NewPluginService ¶
func NewPluginService(client registry.Client, 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"`
Plugins []PluginRequirementDTO `json:"plugins,omitempty"`
}
RequirementsDTO represents requirements in JSON
type SecurityServices ¶ added in v0.22.9
type SecurityServices struct {
// contains filtered or unexported fields
}
func NewSecurityServices ¶ added in v0.22.9
func (*SecurityServices) Security ¶ added in v0.24.1
func (s *SecurityServices) Security(imageName string) *BasicService
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides high-level registry operations using a registry client
func NewService ¶
NewService creates a new registry service with the given client and logger
func (*Service) DeckhouseService ¶
func (s *Service) DeckhouseService() *DeckhouseService
DeckhouseService returns the deckhouse service
func (*Service) InstallerService ¶ added in v0.29.0
func (s *Service) InstallerService() *InstallerServices
func (*Service) ModuleService ¶
func (s *Service) ModuleService() *ModulesService
ModuleService returns the module service
func (*Service) PluginService ¶
func (s *Service) PluginService() *PluginService
PluginService returns the plugin service
func (*Service) Security ¶ added in v0.24.1
func (s *Service) Security() *SecurityServices