manifestutil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFilename = "manifest.wall"

Variables

This section is empty.

Functions

func FindPaths

func FindPaths(slices []*setup.Slice) map[string][]*setup.Slice

FindPaths finds the paths marked with "generate:manifest" and returns a map from the manifest path to all the slices that declare it.

func SetDebug

func SetDebug(debug bool)

Enable the delivery of debug messages to the logger. Only meaningful if a logger is also set.

func SetLogger

func SetLogger(logger log_Logger)

Specify the *log.Logger object where log messages should be sent to.

func Validate

func Validate(mfest *manifest.Manifest) (err error)

Validate checks that the Manifest is valid. Note that to do that it has to load practically the whole manifest into memory and unmarshall all the entries.

func Write

func Write(options *WriteOptions, writer io.Writer) error

Types

type Report

type Report struct {
	// Root is the filesystem path where the all reported content is based.
	Root string
	// Entries holds all reported content, indexed by their path.
	Entries map[string]ReportEntry
	// contains filtered or unexported fields
}

Report holds the information about files and directories created when slicing packages.

func NewReport

func NewReport(root string) (*Report, error)

NewReport returns an empty report for content that will be based at the provided root path.

func (*Report) Add

func (r *Report) Add(slice *setup.Slice, fsEntry *fsutil.Entry) error

func (*Report) Mutate

func (r *Report) Mutate(fsEntry *fsutil.Entry) error

Mutate updates the FinalSHA256 and Size of an existing path entry.

type ReportEntry

type ReportEntry struct {
	Path        string
	Mode        fs.FileMode
	SHA256      string
	Size        int
	Slices      map[*setup.Slice]bool
	Link        string
	FinalSHA256 string
	// If Inode is greater than 0, all entries represent hard links to the same
	// inode.
	Inode uint64
}

type WriteOptions

type WriteOptions struct {
	PackageInfo []*archive.PackageInfo
	Selection   []*setup.Slice
	Report      *Report
}

Jump to

Keyboard shortcuts

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