chisel

package
v0.15.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// MaxManifestSize is the maximum decompressed size accepted for a native
	// Chisel manifest.wall file.
	MaxManifestSize = 64 << 20
)

Variables

This section is empty.

Functions

func OCIPlatformToChiselArch

func OCIPlatformToChiselArch(platform ocispec.Platform) (string, error)

OCIPlatformToChiselArch maps a Linux OCI platform to the Debian architecture name accepted by Chisel.

Types

type Manifest

type Manifest struct {
	Packages   map[string]Package
	Slices     []string
	OwnedPaths map[string]PathMetadata
}

Manifest contains the validated package, slice, and managed-filesystem state extracted from a native Chisel manifest.wall file.

func ParseManifest

func ParseManifest(reader io.Reader) (*Manifest, error)

ParseManifest reads, bounds, parses, and validates a zstd-compressed native Chisel manifest.wall stream.

type Package

type Package struct {
	Name         string
	Version      string
	SHA256       string
	Architecture string
}

Package describes an installed Debian package recorded in a Chisel manifest.

type PathMetadata

type PathMetadata struct {
	Path        string
	Mode        fs.FileMode
	Slices      []string
	SHA256      string
	FinalSHA256 string
	Size        uint64
	Link        string
	Inode       uint64
}

PathMetadata describes a filesystem path owned by one or more selected Chisel slices.

func (PathMetadata) Digest

func (metadata PathMetadata) Digest() string

Digest returns the digest expected for the final filesystem contents.

func (PathMetadata) IsDir

func (metadata PathMetadata) IsDir() bool

IsDir reports whether the manifest path represents a directory.

func (PathMetadata) IsRegular

func (metadata PathMetadata) IsRegular() bool

IsRegular reports whether the manifest path represents a regular file.

func (metadata PathMetadata) IsSymlink() bool

IsSymlink reports whether the manifest path represents a symbolic link.

type Release

type Release struct {
	Kind     ReleaseKind
	Location string
	Revision string
}

Release describes a validated Chisel release source. Location is a release name, canonical local directory, or Git URL without its revision fragment.

func InferRelease

func InferRelease(osRelease io.Reader) (Release, error)

InferRelease infers a standard Chisel release from VERSION_ID in an /etc/os-release stream.

func ParseRelease

func ParseRelease(value string) (Release, error)

ParseRelease validates an explicit named, local-directory, or pinned-Git Chisel release override.

func ResolveRelease

func ResolveRelease(override string, osRelease io.Reader) (Release, error)

ResolveRelease parses an explicit override when present, otherwise inferring a named release from os-release.

func (Release) String

func (release Release) String() string

String reconstructs the user-facing release source representation.

type ReleaseKind

type ReleaseKind string

ReleaseKind identifies how a Chisel release definition should be resolved.

const (
	// ReleaseNamed identifies a standard named Chisel release.
	ReleaseNamed ReleaseKind = "named"
	// ReleaseLocal identifies a release definition in a local directory.
	ReleaseLocal ReleaseKind = "local"
	// ReleaseGit identifies a release definition in a pinned Git repository.
	ReleaseGit ReleaseKind = "git"
)

Jump to

Keyboard shortcuts

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