Help us shape the future of Go! Take the 2026 Go Developer Survey

layouts

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrImageNotFound = errors.New("image not found")

Functions

func CreateEmptyImageLayout added in v0.10.0

func CreateEmptyImageLayout(path string) (layout.Path, error)

func FillLayoutsWithBasicDeckhouseImages

func FillLayoutsWithBasicDeckhouseImages(
	pullParams *params.PullParams,
	layouts *ImageLayouts,
	deckhouseVersions []string,
)

func FindDeckhouseModulesImages

func FindDeckhouseModulesImages(
	params *params.PullParams,
	layouts *ImageLayouts,
	modulesData []modules.Module,
	filter *modules.Filter,
) error

func FindImageByTag

func FindImageByTag(l layout.Path, tag string) (v1.Image, error)

func FindImageDescriptorByTag added in v0.12.0

func FindImageDescriptorByTag(l layout.Path, tag string) (v1.Descriptor, error)

func NopTagToDigestMappingFunc

func NopTagToDigestMappingFunc(_ string) *v1.Hash

TODO no-op must be the default, this should not exist

func PullDeckhouseImages

func PullDeckhouseImages(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullDeckhouseReleaseChannels

func PullDeckhouseReleaseChannels(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullImageSet

func PullImageSet(
	pullParams *params.PullParams,
	targetLayout layout.Path,
	imageSet map[string]struct{},
	opts ...func(opts *pullImageSetOptions),
) error

func PullInstallers

func PullInstallers(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullModules

func PullModules(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullStandaloneInstallers added in v0.3.4

func PullStandaloneInstallers(pullParams *params.PullParams, layouts *ImageLayouts) error

func PullTrivyVulnerabilityDatabasesImages

func PullTrivyVulnerabilityDatabasesImages(
	pullParams *params.PullParams,
	layouts *ImageLayouts,
) error

func PushLayoutToRepo

func PushLayoutToRepo(
	imagesLayout layout.Path,
	registryRepo string,
	authProvider authn.Authenticator,
	logger params.Logger,
	parallelismConfig params.ParallelismConfig,
	insecure, skipVerifyTLS bool,
) error

func PushLayoutToRepoContext added in v0.6.0

func PushLayoutToRepoContext(
	ctx context.Context,
	imagesLayout layout.Path,
	registryRepo string,
	authProvider authn.Authenticator,
	logger params.Logger,
	parallelismConfig params.ParallelismConfig,
	insecure, skipVerifyTLS bool,
) error

func SortIndexManifests added in v0.9.2

func SortIndexManifests(l layout.Path) error

func TagImage added in v0.12.0

func TagImage(l layout.Path, imageDigest v1.Hash, tag string) error

func WithAllowMissingTags

func WithAllowMissingTags(allow bool) func(opts *pullImageSetOptions)

func WithTagToDigestMapper

func WithTagToDigestMapper(fn TagToDigestMappingFunc) func(opts *pullImageSetOptions)

Types

type ImageLayouts

type ImageLayouts struct {
	Deckhouse       layout.Path
	DeckhouseImages map[string]struct{}

	Install       layout.Path
	InstallImages map[string]struct{}

	InstallStandalone       layout.Path
	InstallStandaloneImages map[string]struct{}

	ReleaseChannel       layout.Path
	ReleaseChannelImages map[string]struct{}

	TrivyDB           layout.Path
	TrivyDBImages     map[string]struct{}
	TrivyBDU          layout.Path
	TrivyBDUImages    map[string]struct{}
	TrivyJavaDB       layout.Path
	TrivyJavaDBImages map[string]struct{}
	TrivyChecks       layout.Path
	TrivyChecksImages map[string]struct{}

	Modules map[string]ModuleImageLayout

	TagsResolver *TagsResolver
}

func CreateOCIImageLayoutsForDeckhouse

func CreateOCIImageLayoutsForDeckhouse(
	rootFolder string,
	modules []modules.Module,
) (*ImageLayouts, error)

func NewImageLayouts added in v0.10.0

func NewImageLayouts() *ImageLayouts

func (*ImageLayouts) AsList added in v0.12.0

func (l *ImageLayouts) AsList() []layout.Path

AsList returns a list of layout.Path's in it. Undefined path's are not included in the list.

type ModuleImageLayout

type ModuleImageLayout struct {
	ModuleLayout layout.Path
	ModuleImages map[string]struct{}

	ReleasesLayout layout.Path
	ReleaseImages  map[string]struct{}
}

type TagToDigestMappingFunc

type TagToDigestMappingFunc func(imageRef string) *v1.Hash

type TagsResolver

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

func NewTagsResolver

func NewTagsResolver() *TagsResolver

func (*TagsResolver) GetTagDigest

func (r *TagsResolver) GetTagDigest(imageRef string) *v1.Hash

func (*TagsResolver) ResolveTagsDigestsForImageLayouts

func (r *TagsResolver) ResolveTagsDigestsForImageLayouts(mirrorCtx *params.BaseParams, layouts *ImageLayouts) error

func (*TagsResolver) ResolveTagsDigestsFromImageSet

func (r *TagsResolver) ResolveTagsDigestsFromImageSet(
	imageSet map[string]struct{},
	authProvider authn.Authenticator,
	insecure, skipTLSVerification bool,
) error

Jump to

Keyboard shortcuts

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