service

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

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

func GetEditionFromRegistryPath(registryRepo string) (string, pkg.Edition)

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, ""

func UnmarshalContract added in v0.32.0

func UnmarshalContract(raw []byte, dst *PluginContract) error

UnmarshalContract decodes raw contract JSON into dst. It rewrites encoding/json's default errors as user-actionable messages. Wording stays identical across sources: a cache file or a registry-packages-proxy tar entry.

Types

type AnyOfGroupDTO added in v0.30.11

type AnyOfGroupDTO struct {
	Description string                 `json:"description,omitempty"`
	Modules     []ModuleRequirementDTO `json:"modules,omitempty"`
}

AnyOfGroupDTO represents an "at least one of" group of module requirements. The Description is surfaced in user-facing error messages when no module in the group satisfies the constraint.

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

func NewBasicService(name string, client registry.Client, logger *log.Logger) *BasicService

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) GetDigest added in v0.22.1

func (s *BasicService) GetDigest(ctx context.Context, tag string) (*v1.Hash, error)

GetDigest retrieves a digest from the registry

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

func (*BasicService) ListTags added in v0.22.1

func (s *BasicService) ListTags(ctx context.Context) ([]string, error)

type DeckhouseReleaseMetadata added in v0.22.1

type DeckhouseReleaseMetadata struct {
	Version string
	Suspend bool
}

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

type DeckhouseRequirementDTO added in v0.30.11

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

DeckhouseRequirementDTO represents a constraint on the running Deckhouse version.

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 client.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 FlagDTO

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

FlagDTO represents a flag 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

func NewInstallerServices(name string, client client.Client, logger *log.Logger) *InstallerServices

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 ModuleRequirementsGroupDTO added in v0.30.11

type ModuleRequirementsGroupDTO struct {
	Mandatory   []ModuleRequirementDTO `json:"mandatory,omitempty"`
	Conditional []ModuleRequirementDTO `json:"conditional,omitempty"`
	AnyOf       []AnyOfGroupDTO        `json:"anyOf,omitempty"`
}

ModuleRequirementsGroupDTO splits module requirements into Mandatory, Conditional, and AnyOf sections.

type ModuleService

type ModuleService struct {
	*BasicService
	// contains filtered or unexported fields
}

ModuleService provides high-level operations for module management

func NewModuleService

func NewModuleService(client client.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 client.Client, logger *log.Logger) *ModulesService

func (*ModulesService) Module added in v0.22.9

func (s *ModulesService) Module(moduleName string) *ModuleService

type PackageService added in v0.30.18

type PackageService struct {
	*BasicService
	// contains filtered or unexported fields
}

PackageService provides high-level operations for a single package.

func NewPackageService added in v0.30.18

func NewPackageService(client client.Client, logger *log.Logger) *PackageService

NewPackageService creates a new package service.

func (*PackageService) Extra added in v0.30.18

func (s *PackageService) Extra() *BasicService

func (*PackageService) ExtraImage added in v0.30.18

func (s *PackageService) ExtraImage(extraName string) *BasicService

ExtraImage returns a BasicService scoped to a specific extra image (e.g., packages/<package>/extra/<extraName>).

func (*PackageService) VersionChannels added in v0.30.18

func (s *PackageService) VersionChannels() *PackageVersionService

VersionChannels returns the service scoped to packages/<package>/version.

type PackageVersionService added in v0.30.18

type PackageVersionService struct {
	*BasicService
}

func NewPackageVersionService added in v0.30.18

func NewPackageVersionService(basicService *BasicService) *PackageVersionService

type PackagesService added in v0.30.18

type PackagesService struct {
	*BasicService
	// contains filtered or unexported fields
}

func NewPackagesService added in v0.30.18

func NewPackagesService(client client.Client, logger *log.Logger) *PackagesService

func (*PackagesService) Package added in v0.30.18

func (s *PackagesService) Package(packageName string) *PackageService

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 PluginRequirementsGroupDTO added in v0.30.11

type PluginRequirementsGroupDTO struct {
	Mandatory   []PluginRequirementDTO `json:"mandatory,omitempty"`
	Conditional []PluginRequirementDTO `json:"conditional,omitempty"`
}

PluginRequirementsGroupDTO splits plugin requirements into Mandatory and Conditional sections.

type RequirementsDTO

type RequirementsDTO struct {
	Kubernetes KubernetesRequirementDTO   `json:"kubernetes,omitempty"`
	Deckhouse  DeckhouseRequirementDTO    `json:"deckhouse,omitempty"`
	Modules    ModuleRequirementsGroupDTO `json:"modules,omitempty"`
	Plugins    PluginRequirementsGroupDTO `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 NewSecurityServices(name string, client client.Client, logger *log.Logger) *SecurityServices

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

func NewService(c client.Client, edition pkg.Edition, logger *log.Logger) *Service

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) GetEditionRoot added in v0.30.6

func (s *Service) GetEditionRoot() string

GetEditionRoot returns the registry root scoped to the edition sub-path (e.g. "registry.deckhouse.ru/deckhouse/fe"). When no edition is configured the result equals GetRoot(). Use this when building references for services that live under the edition sub-tree (deckhouse, modules, security).

func (*Service) GetRoot added in v0.24.1

func (s *Service) GetRoot() string

GetRoot gets path of the registry root, without the edition segment. This is the non-edition-scoped root (e.g. "registry.deckhouse.ru/deckhouse") used for services that live outside the edition sub-tree (installer, plugins).

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) PackageService added in v0.30.18

func (s *Service) PackageService() *PackagesService

PackageService returns the packages service

func (*Service) Security added in v0.24.1

func (s *Service) Security() *SecurityServices

Jump to

Keyboard shortcuts

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