manifestgen

package
v0.112.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCommitResolver

func DefaultCommitResolver(commitSources map[string][]ostree.SourceSpec) (map[string][]ostree.CommitSpec, error)

DefaultCommitResolver provides a default implementation for ostree commit resolving. It should rarely be necessary to use it directly and will be used by default by manifestgen (unless overriden)

func DefaultContainerResolver

func DefaultContainerResolver(containerSources map[string][]container.SourceSpec, archName string) (map[string][]container.Spec, error)

DefaultContainersResolve provides a default implementation for container resolving. It should rarely be necessary to use it directly and will be used by default by manifestgen (unless overriden)

func DefaultDepsolver

func DefaultDepsolver(cacheDir string, packageSets map[string][]rpmmd.PackageSet, d distro.Distro, arch string) (map[string]dnfjson.DepsolveResult, error)

DefaultDepsolver provides a default implementation for depsolving. It should rarely be necessary to use it directly and will be used by default by manifestgen (unless overriden)

Types

type CommitResolverFunc

type CommitResolverFunc func(commitSources map[string][]ostree.SourceSpec) (map[string][]ostree.CommitSpec, error)

type ContainerResolverFunc

type ContainerResolverFunc func(containerSources map[string][]container.SourceSpec, archName string) (map[string][]container.Spec, error)

type DepsolveFunc

type DepsolveFunc func(cacheDir string, packageSets map[string][]rpmmd.PackageSet, d distro.Distro, arch string) (map[string]dnfjson.DepsolveResult, error)

type Generator

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

Generator can generate an osbuild manifest from a given repository and options.

func New

func New(reporegistry *reporegistry.RepoRegistry, opts *Options) (*Generator, error)

New will create a new manifest generator

func (*Generator) Generate

func (mg *Generator) Generate(bp *blueprint.Blueprint, dist distro.Distro, imgType distro.ImageType, a distro.Arch, imgOpts *distro.ImageOptions) error

Generate will generate a new manifest for the given distro/imageType/arch combination.

type Options

type Options struct {
	Cachedir string
	// Output is the writer that the generated osbuild manifest will
	// written to.
	Output io.Writer

	RpmDownloader osbuild.RpmDownloader

	// SBOMWriter will be called for each generated SBOM the
	// filename contains the suggest filename string and the
	// content can be read
	SBOMWriter SBOMWriterFunc

	// CustomSeed overrides the default rng seed, this is mostly
	// useful for testing
	CustomSeed *int64

	// Custom "solver" functions, if unset the defaults will be
	// used. Only needed for specialized use-cases.
	Depsolver         DepsolveFunc
	ContainerResolver ContainerResolverFunc
	CommitResolver    CommitResolverFunc
}

Options contains the optional settings for the manifest generation. For unset values defaults will be used.

type SBOMWriterFunc

type SBOMWriterFunc func(filename string, content io.Reader, docType sbom.StandardType) error

Jump to

Keyboard shortcuts

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