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

layouts

package
v0.26.6 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 32 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,
	channelsToMirror []string,
	deckhouseVersions []string,
)

func FindDeckhouseModulesImages

func FindDeckhouseModulesImages(
	params *params.PullParams,
	layouts *ImageLayouts,
	modulesData []modules.Module,
	filter *modules.Filter,
	client registry.Client,
) 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 FindVexImage added in v0.20.16

func FindVexImage(
	params *params.PullParams,
	_ string,
	nameOpts []name.Option,
	_ []remote.Option,
	digest string,
	client registry.Client,
) (string, error)

func NopTagToDigestMappingFunc

func NopTagToDigestMappingFunc(_ string) *v1.Hash

TODO no-op must be the default, this should not exist NopTagToDigestMappingFunc is a no-operation function that returns nil for any input. This is used as a placeholder when no mapping is needed. Example usage: digest := NopTagToDigestMappingFunc("some-tag")

func PullDeckhouseImages

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

func PullDeckhouseReleaseChannels

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

func PullImageSet

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

func PullInstallers

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

func PullModules

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

func PullStandaloneInstallers added in v0.3.4

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

func PullTrivyVulnerabilityDatabasesImages

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

func PushLayoutToRepo

func PushLayoutToRepo(
	client registry.Client,
	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,
	client registry.Client,
	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{}

	ExtraLayout       layout.Path
	ExtraNamedLayouts map[string]layout.Path

	ExtraNamedImages map[string]map[string]struct{}
}

type TagToDigestMappingFunc

type TagToDigestMappingFunc func(imageRef string) *v1.Hash

type TagsResolver

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

TagsResolver is responsible for resolving tag to digest mappings for images. It holds a mapping of tags to their corresponding digests. Example usage: resolver := NewTagsResolver() err := resolver.ResolveTagsDigestsForImageLayouts(mirrorCtx, layouts)

func NewTagsResolver

func NewTagsResolver() *TagsResolver

NewTagsResolver initializes a new TagsResolver with an empty mapping. Example usage: resolver := NewTagsResolver()

func (*TagsResolver) GetTagDigest

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

func (*TagsResolver) ResolveTagsDigestsForImageLayouts

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

ResolveTagsDigestsForImageLayouts resolves the digests for the given image layouts. It takes a mirror context and the layouts to resolve. Example usage: err := resolver.ResolveTagsDigestsForImageLayouts(mirrorCtx, layouts)

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