pkgcfg

package
v0.87.0-rc1 Latest Latest
Warning

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

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

Documentation

Overview

Package pkgcfg loads and applies schema migrations to zarf.yaml files.

Index

Constants

This section is empty.

Variables

View Source
var V1Alpha1 = Decoder[v1alpha1.ZarfPackage]{
	// contains filtered or unexported fields
}

V1Alpha1 decodes the v1alpha1 ZarfPackage schema.

View Source
var V1Beta1 = Decoder[v1beta1.Package]{
	// contains filtered or unexported fields
}

V1Beta1 decodes the v1beta1 Package schema.

Functions

func ParseAs added in v0.84.0

func ParseAs[T any](ctx context.Context, b []byte, d Decoder[T]) (T, error)

ParseAs returns the document matching the decoder's apiVersion from a package definition that may contain multiple documents, decoded into its native type.

func ParseMultiDoc added in v0.75.1

func ParseMultiDoc(ctx context.Context, b []byte) (api.Package, error)

ParseMultiDoc parses a multi doc zarf.yaml file into an operational Package. Multi doc definitions may contain one document per apiVersion; the highest-priority known version wins.

func ParseMultiDocNative added in v0.87.0

func ParseMultiDocNative(ctx context.Context, b []byte) (any, api.Package, error)

ParseMultiDocNative parses a multi-document zarf.yaml once and returns both the selected native wire definition and its operational representation.

func SelectVersion added in v0.84.0

func SelectVersion(ctx context.Context, b []byte) (string, error)

SelectVersion returns the apiVersion Zarf will decode from a package definition that may contain multiple documents; the highest-priority known version wins. Use it to pick the decode target before calling ParseAs.

Types

type Decoder added in v0.84.0

type Decoder[T any] struct {
	// contains filtered or unexported fields
}

Decoder decodes one apiVersion's document into its native package type T and converts that into a Package.

Jump to

Keyboard shortcuts

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