imagehandler

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package imagehandler holds helpers for working with oci images.

Index

Constants

View Source
const (
	// SPDXFileSuffix is the file suffix for SPDX files.
	SPDXFileSuffix = ".spdx.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(ctx context.Context, logger *zap.Logger, img v1.Image) error

Handler processes a fetched image, e.g. exporting it to local storage.

func Export

func Export(exportHandler func(logger *zap.Logger, r io.Reader) error) Handler

Export streams the image's flattened filesystem as a tar to exportHandler.

func OCI

func OCI(path string) Handler

OCI exports the image to an OCI layout at path.

func SPDX

func SPDX(files *[]SPDXFile, source string) Handler

SPDX creates an image handler that extracts SPDX files.

type SPDXFile

type SPDXFile struct {
	// Filename is the original filename (e.g., "extension-name.spdx.json").
	Filename string

	// Source is the source identifier (extension name or "talos").
	Source string

	// Content is the raw JSON content.
	Content []byte
}

SPDXFile represents an extracted SPDX file.

Jump to

Keyboard shortcuts

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