Documentation
¶
Index ¶
- func DevVersion(digest string) string
- func IsDevVersion(version string) bool
- func PullTag(version string) string
- type Remote
- type Service
- func (s *Service) Download(ctx context.Context, remote Remote, out, packageName, tag string) error
- func (s *Service) GetFileContent(ctx context.Context, remote Remote, path, tag, filePath string) ([]byte, error)
- func (s *Service) GetImageDigest(ctx context.Context, remote Remote, packageName, tag string) (string, error)
- func (s *Service) GetImageReader(ctx context.Context, remote Remote, packageName, tag string) (io.ReadCloser, error)
- func (s *Service) GetImageRootHash(ctx context.Context, remote Remote, packageName, tag string) (string, error)
- func (s *Service) ImageExists(ctx context.Context, remote Remote, path, tag string) error
- func (s *Service) SetClusterUUID(id string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DevVersion ¶ added in v1.78.0
DevVersion is the immutable version of a dev image with digest "sha256:<hex>": dev-<hex>.
func IsDevVersion ¶ added in v1.78.0
IsDevVersion reports whether version was made by DevVersion.
Types ¶
type Remote ¶ added in v1.75.0
type Remote struct {
Name string `json:"name" yaml:"name"`
Repository string `json:"repository" yaml:"repository"`
DockerConfig string `json:"dockercfg" yaml:"dockercfg"`
Login string `json:"login" yaml:"login"`
Password string `json:"password" yaml:"password"`
Scheme string `json:"scheme" yaml:"scheme"`
CA string `json:"ca" yaml:"ca"`
}
func BuildRemote ¶ added in v1.75.0
func BuildRemote[T *v1alpha1.ModuleSource | *v1alpha1.PackageRepository](reg T) Remote
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(dc dependency.Container, logger *log.Logger) *Service
func (*Service) Download ¶
Download downloads package on temp fs and returns path to it <registry>/<package>:<tag>
func (*Service) GetFileContent ¶ added in v1.78.0
func (s *Service) GetFileContent(ctx context.Context, remote Remote, path, tag, filePath string) ([]byte, error)
GetFileContent downloads image and extracts the file content from it <registry>/<path>:<tag>
func (*Service) GetImageDigest ¶
func (s *Service) GetImageDigest(ctx context.Context, remote Remote, packageName, tag string) (string, error)
GetImageDigest downloads package image and returns its digest <registry>/<package>:<tag>
func (*Service) GetImageReader ¶
func (s *Service) GetImageReader(ctx context.Context, remote Remote, packageName, tag string) (io.ReadCloser, error)
GetImageReader downloads the package image and extracts it. IMPORTANT do not forget to close reader <registry>/<packageName>:<tag>
func (*Service) GetImageRootHash ¶
func (s *Service) GetImageRootHash(ctx context.Context, remote Remote, packageName, tag string) (string, error)
GetImageRootHash downloads package manifest to parse rootHash from manifest annotations <registry>/<package>:<tag>